diff options
author | Sebastian | 2010-05-12 19:42:27 +0200 |
---|---|---|
committer | Sebastian | 2010-05-12 19:42:27 +0200 |
commit | ce3329047d378a14006ce74ec273ac59e3375303 (patch) | |
tree | 782430f270b4c7aca1b35d5b7813518e3797c555 /src/pvsgui.h | |
download | pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.gz pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.xz pvs-ce3329047d378a14006ce74ec273ac59e3375303.zip |
initial import of latest svn version
Diffstat (limited to 'src/pvsgui.h')
-rw-r--r-- | src/pvsgui.h | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/src/pvsgui.h b/src/pvsgui.h new file mode 100644 index 0000000..f9a0ab8 --- /dev/null +++ b/src/pvsgui.h @@ -0,0 +1,103 @@ +/* + # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of + # Freiburg + # + # This program is free software distributed under the GPL version 2. + # See http://openslx.org/COPYING + # + # If you have any feedback please consult http://openslx.org/feedback and + # send your suggestions, praise, or complaints to feedback@openslx.org + # + # General information about OpenSLX can be found at http://openslx.org/ + */ + +#ifndef PVSCLIENTGUI_H_ +#define PVSCLIENTGUI_H_ + +#include <QtGui> +#include <QtNetwork> +#include "ui_clientToolbar.h" +#include "src/gui/clientConfigDialog.h" +#include "src/gui/clientChatDialog.h" +#include "src/gui/clientFileSendDialog.h" +#include "src/gui/clientFileReceiveDialog.h" +#include "src/gui/clientVNCViewer.h" +#include "src/gui/clientInfoDialog.h" +#include "src/gui/aboutDialog.h" + +#include "pvsinterface.h" + +class PVSGUI: public QWidget, private Ui_ClientToolbarClass +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.openslx.pvsgui") + +public: + PVSGUI(QWidget *parent = 0); + ~PVSGUI(); + + int const static POSITION_TOP_LEFT = 0; + int const static POSITION_TOP_CENTER = 1; + int const static POSITION_TOP_RIGHT = 2; + int const static POSITION_BOTTOM_LEFT = 3; + int const static POSITION_BOTTOM_CENTER = 4; + int const static POSITION_BOTTOM_RIGHT = 5; + +public Q_SLOTS: + void updateConfig(); + +protected: + void enterEvent(QEvent *e); + void leaveEvent(QEvent *e); + void mousePressEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + +private Q_SLOTS: + void showMessage(QString title, QString msg, bool useDialog = false); + void hide(); + void connected(QString host); + void disconnected(); + void addHost(QString host); + void delHost(QString host); + void pvsConnect(QAction *action); + void pvsDisconnect(); + void setVncAllow(int i); + void sendFile(); + void receiveFile(); + +private: + void setupMenu(); + void setLocation(int location); + void hide(bool b); + + QMenu *_menu; + QMenu *_hostMenu; + QHash<QString, QAction*> *_hosts; + QSettings _settings; + QSystemTrayIcon *_trayIcon; + ClientChatDialog *_chatDialog; + ClientConfigDialog *_configDialog; + ClientInfoDialog *_infoDialog; + ClientVNCViewer *_vncViewer; + AboutDialog *_aboutDialog; + + QAction *_disconnectAction; + QAction *_startChatAction; + QAction *_sendFileAction; + QAction *_configAction; + QAction *_showInfoAction; + QAction *_aboutAction; + QAction *_quitAction; + + int _location; + QPoint _clickPoint; + QString _passwd; + + QTcpServer *_serverSocket; + + OrgOpenslxPvsInterface *_ifaceDBus; + +}; + +#endif /* PVSCLIENTGUI_H_ */ |