X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=gui%2Fmainwin.h;h=ff3596ec49c148e63f8c77b4d952e96ce3f71a02;hb=9cbaab34158d0f2e77c18d6ac055582102812553;hp=a6d1e1ec40e614347be1b2892716230822f3b008;hpb=117a8a4d7ced61a3e374f20c74bea1834386a1d7;p=quassel.git diff --git a/gui/mainwin.h b/gui/mainwin.h index a6d1e1ec..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 * @@ -24,31 +24,92 @@ #include #include "gui/ui_mainwin.h" +#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(Buffer *); + void bufferUpdated(Buffer *); + void bufferDestroyed(Buffer *); + void backlogReceived(Buffer *, QList); + private slots: + void userInput(QString, QString, QString); + void networkConnected(QString); + void networkDisconnected(QString); + void recvNetworkState(QString, QVariant); + void recvMessage(QString network, Message message); + void recvStatusMsg(QString network, QString message); + void setTopic(QString, QString, QString); + void setNicks(QString, QString, QStringList); + void addNick(QString net, QString nick, VarMap props); + void removeNick(QString net, QString nick); + void renameNick(QString net, QString oldnick, QString newnick); + void updateNick(QString net, QString nick, VarMap props); + 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 syncToCore(); + void setupViews(); + void setupSettingsDlg(); + void syncToCore(); // implemented in main_mono.cpp or main_gui.cpp + Buffer * getBuffer(QString net, QString buf); + //void buffersUpdated(); - QWorkspace *workspace; + QSystemTrayIcon *systray; + //QWorkspace *workspace; + //QWidget *widget; + //BufferWidget *bufferWidget; ServerListDlg *serverListDlg; CoreConnectDlg *coreConnectDlg; + SettingsDlg *settingsDlg; + + QString currentNetwork, currentBuffer; + QHash > buffers; + QHash > nicks; + QHash connected; + QHash ownNick; + QHash > coreBackLog; + + QList netViews; }; #endif