diff options
author | sr | 2013-02-04 19:50:31 +0100 |
---|---|---|
committer | sr | 2013-02-04 19:50:31 +0100 |
commit | 1a5709501f94014d41987b956338bb6424b9f90c (patch) | |
tree | d3b93fe8dc406bca56aff147ef5cc4cbf9ed6be0 /src/server/mainwindow/mainwindow.h | |
parent | Test (diff) | |
download | pvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.gz pvs2-1a5709501f94014d41987b956338bb6424b9f90c.tar.xz pvs2-1a5709501f94014d41987b956338bb6424b9f90c.zip |
Initial commit
Diffstat (limited to 'src/server/mainwindow/mainwindow.h')
-rw-r--r-- | src/server/mainwindow/mainwindow.h | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h new file mode 100644 index 0000000..4f9d142 --- /dev/null +++ b/src/server/mainwindow/mainwindow.h @@ -0,0 +1,76 @@ +#ifndef _MAINWINDOW_H_ +#define _MAINWINDOW_H_ + +#include <QtGui> +#include <QMainWindow> + +class SessionNameWindow; +class ConnectionFrame; +class ListenServer; +class DiscoveryListener; +class Client; +class ClientLogin; + +namespace Ui +{ + class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +private: + Ui::MainWindow *ui; + SessionNameWindow *_sessionNameWindow; + QLabel *_sessionNameLabel; + QList<ConnectionFrame*> _clientFrames; + int _tileWidth, _tileHeight; + int _tilesX, _tilesY; + int _tbIconSize; + Qt::ToolBarArea _tbArea; + int _timerId, _timerTimeout; + ListenServer *_listenServer; + DiscoveryListener *_discoveryListener; + qint64 _buttonBlockTime; + + void placeFrameInFreeSlot(ConnectionFrame* frame); + ConnectionFrame* createFrame(); + bool loadPosition(QSettings& settings, const QString& id, int& x, int& y); + void savePosition(ConnectionFrame *cf); + +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + +protected: + void closeEvent(QCloseEvent *e); + void changeEvent(QEvent *e); + void resizeEvent(QResizeEvent *e); + void mouseReleaseEvent(QMouseEvent* e); + void timerEvent(QTimerEvent* event); + + +protected slots: + // This + void onSessionNameClick(); + void onSessionNameUpdate(); + void onButtonSettings(); + void onButtonChat(); + void onButtonBroadcast(); + void onButtonLock(bool checked); + void onButtonExit(); + // connection frame + void onPlaceFrame(ConnectionFrame* frame); + void onFrameClicked(ConnectionFrame* frame); + // Net + void onClientConnected(Client* client); + void onClientAuthenticating(Client* client, ClientLogin* request); + void onClientAuthenticated(Client* client); + void onVncServerStateChange(Client* client); + void onVncClientStateChange(Client* client); + +}; + + +#endif |