X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=gui%2Fmainwin.h;h=ff3596ec49c148e63f8c77b4d952e96ce3f71a02;hb=9cbaab34158d0f2e77c18d6ac055582102812553;hp=d899695330c0770bc52a923c8a05fcbbc4d694a0;hpb=d6a96a47a3964b9c0b1ea2413601d70d0d327413;p=quassel.git diff --git a/gui/mainwin.h b/gui/mainwin.h index d8996953..ff3596ec 100644 --- a/gui/mainwin.h +++ b/gui/mainwin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005 by The Quassel Team * + * Copyright (C) 2005-07 by The Quassel Team * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -26,24 +26,41 @@ #include "global.h" #include "message.h" +#include "chatwidget.h" class ServerListDlg; class CoreConnectDlg; class NetworkView; class Buffer; +class BufferWidget; +class SettingsDlg; +extern LayoutThread *layoutThread; + +//!\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 { Q_OBJECT public: MainWin(); + ~MainWin(); + + void init(); + void registerNetView(NetworkView *); protected: void closeEvent(QCloseEvent *event); signals: void sendInput(QString network, QString buffer, QString message); - void bufferSelected(QString net, QString buffer); + void bufferSelected(Buffer *); + void bufferUpdated(Buffer *); + void bufferDestroyed(Buffer *); + void backlogReceived(Buffer *, QList); private slots: void userInput(QString, QString, QString); @@ -61,22 +78,29 @@ class MainWin : public QMainWindow { void setOwnNick(QString net, QString nick); void showServerList(); + void showSettingsDlg(); void showBuffer(QString net, QString buf); + void showBuffer(Buffer *); private: Ui::MainWin ui; void setupMenus(); + void setupViews(); + void setupSettingsDlg(); void syncToCore(); // implemented in main_mono.cpp or main_gui.cpp Buffer * getBuffer(QString net, QString buf); - void buffersUpdated(); + //void buffersUpdated(); - QWorkspace *workspace; - QWidget *widget; + QSystemTrayIcon *systray; + //QWorkspace *workspace; + //QWidget *widget; + //BufferWidget *bufferWidget; ServerListDlg *serverListDlg; CoreConnectDlg *coreConnectDlg; + SettingsDlg *settingsDlg; QString currentNetwork, currentBuffer; QHash > buffers; @@ -85,7 +109,7 @@ class MainWin : public QMainWindow { QHash ownNick; QHash > coreBackLog; - NetworkView *netView; + QList netViews; }; #endif