1 /***************************************************************************
2 * Copyright (C) 2005-07 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 "ui_mainwin.h"
29 #include "chatwidget.h"
30 #include "bufferviewfilter.h"
31 #include "bufferviewwidget.h"
35 //class BufferViewDock;
40 //!\brief The main window and central object of Quassel GUI.
41 /** In addition to displaying the main window including standard stuff like a menubar,
42 * dockwidgets and of course the chat window, this class also stores all data it
43 * receives from the core, and it maintains a list of all known nicks.
45 class MainWin : public QMainWindow {
53 void registerBufferViewDock(BufferViewDock *);
56 void closeEvent(QCloseEvent *event);
59 //void sendInput(BufferId, QString message);
60 //void bufferSelected(Buffer *);
61 //void bufferUpdated(Buffer *);
62 //void bufferActivity(Buffer::ActivityLevel, Buffer *);
63 //void bufferDestroyed(Buffer *);
64 //void backlogReceived(Buffer *, QList<Message>);
65 //void requestBacklog(BufferId, QVariant, QVariant);
67 void importOldBacklog();
71 //void userInput(BufferId, QString);
72 //void networkConnected(QString);
73 //void networkDisconnected(QString);
74 //void recvNetworkState(QString, QVariant);
75 //void recvMessage(Message message);
76 //void recvStatusMsg(QString network, QString message);
77 //void setTopic(QString net, QString buf, QString);
78 //void addNick(QString net, QString nick, VarMap props);
79 //void removeNick(QString net, QString nick);
80 //void renameNick(QString net, QString oldnick, QString newnick);
81 //void updateNick(QString net, QString nick, VarMap props);
82 //void setOwnNick(QString net, QString nick);
83 //void recvBacklogData(BufferId, QList<QVariant>, bool);
84 //void updateBufferId(BufferId);
86 void showServerList();
87 void showSettingsDlg();
89 void showBuffer(BufferId);
90 void showBuffer(Buffer *);
99 void setupSettingsDlg();
100 //void syncToCore(); // implemented in main_mono.cpp or main_gui.cpp
101 //Buffer * getBuffer(QString net, QString buf);
102 //Buffer *getBuffer(BufferId);
103 //BufferId getStatusBufferId(QString net);
104 //BufferId getBufferId(QString net, QString buf);
105 //void buffersUpdated();
107 QSystemTrayIcon *systray;
108 //QWorkspace *workspace;
110 //BufferWidget *bufferWidget;
112 ServerListDlg *serverListDlg;
113 CoreConnectDlg *coreConnectDlg;
114 SettingsDlg *settingsDlg;
116 //QString currentNetwork, currentBuffer;
117 //QHash<QString, QHash<QString, Buffer*> > buffers;
119 //QHash<BufferId, Buffer *> buffers;
120 //QHash<uint, BufferId> bufferIds;
121 //QHash<QString, QHash<QString, VarMap> > nicks;
122 //QHash<QString, bool> connected;
123 //QHash<QString, QString> ownNick;
124 //QHash<QString, QList<Message> > coreBackLog;
125 //QList<BufferId> coreBuffers;
127 QList<BufferViewDock *> netViews;
129 //QTimer *layoutTimer;
130 //QList<Message> layoutQueue;