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/gui/mainWindow.h | |
| download | pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.gz pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.xz pvs-ce3329047d378a14006ce74ec273ac59e3375303.zip | |
initial import of latest svn version
Diffstat (limited to 'src/gui/mainWindow.h')
| -rw-r--r-- | src/gui/mainWindow.h | 200 |
1 files changed, 200 insertions, 0 deletions
diff --git a/src/gui/mainWindow.h b/src/gui/mainWindow.h new file mode 100644 index 0000000..00bd927 --- /dev/null +++ b/src/gui/mainWindow.h @@ -0,0 +1,200 @@ +#ifndef _MAINWINDOW_H_ +#define _MAINWINDOW_H_ + +#include <QtGui> +#include <QtNetwork> +#include <QMainWindow> +#include <QFileDialog> +#include <src/gui/connectionList.h> +#include <src/util/consoleLogger.h> +#include <src/gui/connectionWindow.h> +#include <src/gui/profileDialog.h> +//#include <src/gui/dialog.h> +#include <src/core/pvsClient.h> +#include <src/core/pvsConnectionManager.h> +#include "src/gui/aboutDialog.h" +#include "src/gui/serverChatDialog.h" +#include <src/gui/serverFileTransfert.h> + + +namespace Ui +{ +class MainWindow; +} + + +class PVSClient; +class ConnectionList; +class ConnectionWindow; +class profileDialog; +class ServerChatDialog; +//class Dialog; + + +class MainWindow : public QMainWindow +{ + friend class PVSConnectionManager; + + Q_OBJECT + + +public: + MainWindow(QWidget *parent = 0); + ~MainWindow(); + + //singleton methods + static MainWindow* getWindow(); + static ConnectionWindow* getConnectionWindow(); + static ConnectionList* getConnectionList(); + + ServerChatDialog sChatDialog; + + + int getConnectionWindowWidth(); + int getConnectionWindowHeight(); + int x,y; + QImage img; + QImage img2; + QString test; + QStringList profilList; + QStringList getProfilList(); + void addProfileInMenu(QString name); + void removeProfileInMenu(QString name); + QString currentProfi; + QString getCurrentProfi() + { + return currentProfi; + } + void loadSettings(); + void loadSettings(QString profilname); + void saveSettings(QString profilname); + void removeProfil(QString profilname); + + // connection add/remove and dialog methods + void addConnection(PVSClient* newCon); + void removeConnection(PVSClient* newCon); + //ConnectionFrame* getNewFrame(); + void onConnectionFailed(QString host = ""); + void onConnectionTerminated(PVSClient* newConnection); + void onConnectionRemoved(PVSClient* newConnection); + void onPasswordFailed(QString Qhost = ""); + + void sendChatMsg(PVSMsg myMsg); + void receiveChatMsg(QString nick_from, QString nick_to, QString msg); + + // view mode related methods + unsigned int getGlobalFrameRate(); + void setGlobalFrameRate(unsigned int newRate); + int getPrevWidth(); + void setPrevWidth(int newWidth); + int getPrevHeight(); + void setPrevHeight(int newHeight); + + // int createMsgDiag(); + void setMsgDialog(QString msgd){msgDialog = msgd;}; + QString getMsgDialog(){return msgDialog;}; + + bool isLockAllStatus() + { + return _isLockAll; + } + + void appendLogMsg(); + + + +protected: + void closeEvent(QCloseEvent *e); + void changeEvent(QEvent *e); + void resizeEvent(QResizeEvent *event); //We need this to resize the frame in the window when window are resized. + void updatePos(ConnectionFrame* cf, int x, int y); + virtual void on_log_line(LogEntry consoleEntry); + + + + +private: + Ui::MainWindow *ui; + static ConnectionWindow* conWin; + static ConnectionList* conList; + //Dialog messageDiag; + static MainWindow* myself; + QString _pwdCon; + QString _sessionName; + QString _profilName; + + QStringList _chatListClients; + + + + /*ConnectionDialog* myConDiag; + ConnectionDialog* pwDiag; + ConnectionDialog* messageDiag;*/ + + AboutDialog *_aboutDialog; + + QString msgDialog; + bool bgimage; + bool locked, locked1; + bool force_square; + bool is_fullscreen; + bool is_closeup; + static bool _isLockAll; + bool showError, showNormal, showNetwork, showTerminal, showChat, showAtAll; + bool isDozent; + QString fileName; + + int _initW, _initH, _firstResize; + + unsigned int updateRate, frameRate; + int prev_width, prev_height, menuindex1, menuindex2; + + QTcpServer *_serverSocket; + QPoint _framePosOnCloseUp; + + bool _isThumbnailrate; + int _updatefreq; + QString _oldRatio; + + QMenu* _profileMenuList; + QMap<QString, QAction*> _mapProfileToAction; + +public slots: + void loadProfile(QAction* actiontriggered); + void setindexback(); + //void setindexback2(); + void lockalltoolbar(); + void resetall(); + void locksingle(); + void unlocksingle(); + void clientlisthide(); + void projecttoolbar(); + void unprojecttoolbar(); + void closeUp(); + void foto(); + void backgroundpicture(); + void repaintbackgroundpicture(); + void setdozenttoolbar(); + void startChatDialog(); + +private slots: + void onToggleLog(bool showtime); + void setLogConsoleDisabled(bool visible); + //void close(); + void disconnect(); + void lockUnlockAll(); + void createProfile(); + void showusername(); + void showname(); + void showip(); + void incomingFile(); + void changeRatio(int ratio); + void changeStatus (int index); + void setVNCQuality(int quality); + void setPasswordForConnection(int enabled); + void combobox1(int menuindex1); // Funktion um index der combobox auszulesen und weiterzuverarbeiten s. Ticker 671 + //void combobox2(int menuindex2); // Funktion um index der combobox auszulesen und weiterzuverarbeiten +}; + + +#endif |
