qscan345server.h

Go to the documentation of this file.
00001 #ifndef QSCAN345SERVER_H
00002 #define QSCAN345SERVER_H
00003 
00004 #include <QTcpServer>
00005 #include <QHostAddress>
00006 class QScan345MainWindow;
00007 class QTcpSocket;
00008 
00009 class QScan345Server : public QTcpServer
00010 {
00011   Q_OBJECT;
00012 
00013  public:
00014   QScan345Server(QScan345MainWindow* win, QObject *parent=0);
00015   typedef QTcpServer inherited;
00016 
00017  public:
00018   void startServer(QHostAddress a, int p);
00019 
00020  public slots:
00021   void openNewConnection();
00022   void connectionClosed();
00023   void clientRead();
00024 
00025   void scan_finished();
00026   void erase_finished();
00027 
00028  signals:
00029   void print_message(QString msg);
00030   void execute_command(QString cmd);
00031 
00032  private:
00033   QScan345MainWindow  *m_MainWindow;
00034   QTcpSocket          *m_Socket;
00035 };
00036 
00037 #endif