1 /***************************************************************************
2 * Copyright (C) 2005 by The Quassel Team *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
25 #include "gui/ui_mainwin.h"
36 //!\brief The main window and central object of Quassel GUI.
37 /** In addition to displaying the main window including standard stuff like a menubar,
38 * dockwidgets and of course the chat window, this class also stores all data it
39 * receives from the core, and it maintains a list of all known nicks.
41 class MainWin : public QMainWindow {
48 void closeEvent(QCloseEvent *event);
51 void sendInput(QString network, QString buffer, QString message);
52 void bufferSelected(QString net, QString buffer);
55 void userInput(QString, QString, QString);
56 void networkConnected(QString);
57 void networkDisconnected(QString);
58 void recvNetworkState(QString, QVariant);
59 void recvMessage(QString network, Message message);
60 void recvStatusMsg(QString network, QString message);
61 void setTopic(QString, QString, QString);
62 void setNicks(QString, QString, QStringList);
63 void addNick(QString net, QString nick, VarMap props);
64 void removeNick(QString net, QString nick);
65 void renameNick(QString net, QString oldnick, QString newnick);
66 void updateNick(QString net, QString nick, VarMap props);
67 void setOwnNick(QString net, QString nick);
69 void showServerList();
70 void showSettingsDlg();
72 void showBuffer(QString net, QString buf);
78 void syncToCore(); // implemented in main_mono.cpp or main_gui.cpp
79 Buffer * getBuffer(QString net, QString buf);
80 void buffersUpdated();
82 QWorkspace *workspace;
85 ServerListDlg *serverListDlg;
86 CoreConnectDlg *coreConnectDlg;
87 SettingsDlg *settingsDlg;
89 QString currentNetwork, currentBuffer;
90 QHash<QString, QHash<QString, Buffer*> > buffers;
91 QHash<QString, QHash<QString, VarMap> > nicks;
92 QHash<QString, bool> connected;
93 QHash<QString, QString> ownNick;
94 QHash<QString, QList<Message> > coreBackLog;