X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtgui%2Fmainwin.h;fp=src%2Fqtgui%2Fmainwin.h;h=eed60f78364388632a67dc43bdbcbc1095ff3473;hp=e46e233ecf18108405a91258e13d39bce6d9d5ff;hb=8836fdc8e4107437e5fff0e10e18d581297d59e4;hpb=d9398c1b8bfa66680d266bf968dc90f386c4ee7b diff --git a/src/qtgui/mainwin.h b/src/qtgui/mainwin.h index e46e233e..eed60f78 100644 --- a/src/qtgui/mainwin.h +++ b/src/qtgui/mainwin.h @@ -24,7 +24,6 @@ #include #include "ui_mainwin.h" -#include "quasselui.h" //#include "global.h" #include "message.h" #include "chatwidget.h" @@ -35,17 +34,32 @@ class ServerListDlg; class CoreConnectDlg; class Buffer; class SettingsDlg; +class MainWin; -//!\brief The main window and central object of Quassel GUI. -/** In addition to displaying the main window including standard stuff like a menubar, - * dockwidgets and of course the chat window, this class also stores all data it - * receives from the core, and it maintains a list of all known nicks. - */ -class MainWin : public QMainWindow, public AbstractUi { +class QtGui : public AbstractUi { Q_OBJECT public: - MainWin(); + QtGui(); + ~QtGui(); + void init(); + AbstractUiMsg *layoutMsg(const Message &); + + protected slots: + void connectedToCore(); + void disconnectedFromCore(); + + private: + MainWin *mainWin; +}; + + +//!\brief The main window of Quassel's QtGui. +class MainWin : public QMainWindow { + Q_OBJECT + + public: + MainWin(QtGui *gui, QWidget *parent = 0); virtual ~MainWin(); void init(); @@ -56,7 +70,9 @@ class MainWin : public QMainWindow, public AbstractUi { protected: void closeEvent(QCloseEvent *event); - //void importOldBacklog(); + protected slots: + void connectedToCore(); + void disconnectedFromCore(); private slots: @@ -69,15 +85,21 @@ class MainWin : public QMainWindow, public AbstractUi { void importBacklog(); signals: + void connectToCore(const VarMap &connInfo); + void disconnectFromCore(); + void requestBacklog(BufferId, QVariant, QVariant); void importOldBacklog(); private: Ui::MainWin ui; + QtGui *gui; void setupMenus(); void setupViews(); void setupSettingsDlg(); + void enableMenus(); + QSystemTrayIcon *systray; ServerListDlg *serverListDlg; @@ -88,6 +110,7 @@ class MainWin : public QMainWindow, public AbstractUi { QList netViews; + friend class QtGui; }; #endif