7 #include <QResizeEvent>
9 /**********************************************************************
11 --- Qt Architect generated file ---
13 File: servercontroller.h
14 Last generated: Sat Nov 29 08:50:19 1997
16 Now Under CVS control.
20 *********************************************************************/
22 #ifndef servercontroller_included
23 #define servercontroller_included
25 class servercontroller
;
26 class dockServerController
;
35 #include <k3listview.h>
36 #include <kmainwindow.h>
38 #include "ksircprocess.h"
39 #include "ksircchannel.h"
41 //#include "puke/controller.h"
46 class nickColourMaker
;
47 class dockServerController
;
49 class ProcCommand
// ServerController message
66 class ServCommand
// ServerController message
75 class scInside
: Q3Frame
78 friend class servercontroller
;
80 scInside ( QWidget
*parent
= 0L, const char * name
= 0, Qt::WFlags f
=0 );
84 virtual void resizeEvent ( QResizeEvent
* );
87 K3ListView
*ConnectionTree
;
92 class servercontroller
: public KMainWindow
95 friend class dockServerController
;
98 servercontroller ( QWidget
* parent
= 0L, const char* name
= NULL
);
99 virtual ~servercontroller();
101 const Q3Dict
<KSircProcess
> &processes() const { return proc_list
; }
103 static servercontroller
*self() { return s_self
; }
106 * Someone is talking to the user (blue icon), notify him (using the docked icon).
108 void increaseNotificationCount(const QString
& reason
= QString::null
, const QString
& text
= QString::null
);
111 * The channel in which the user was talked to, has been read.
112 * -> decrease count of blue icons.
114 void decreaseNotificationCount(QString reason
= QString::null
);
117 * This resets all notificaiton counts and allows new ones
118 * this is used if we don't want to give the window
119 * focus to reset focus
121 void resetNotification();
125 //KGlobalAccel *getGlobalAccel(){ return m_kga; }
129 * Filter rules have changed, need to re-read and update.
131 void filters_update();
133 void ServMessage(QString server
, int command
, QString args
);
136 // All slots are described in servercontroll.cpp file
138 * Does auto-joins on start up
140 virtual void do_autoconnect();
142 * Creates popup asking for new connection
144 virtual void new_connection();
147 * QString: new server name or IP to connect to.
149 * Creates a new sirc process and window !default connected to the
150 * server. Does nothing if a server connection already exists.
152 // virtual void new_ksircprocess(QString);
153 virtual void new_ksircprocess(KSircServer
&);
155 * Creates popup asking for new channel name
157 virtual void new_channel();
160 * str: name of the new channel to be created
161 * server: name of the server channel is created on
163 * opens a new toplevel on the requested channel and server
165 virtual void new_toplevel(const KSircChannel
&channel
);
166 virtual void new_toplevel(const KSircChannel
&channel
, bool safe
);
169 * Notify all ksircprocess' to update filters
171 virtual void slot_filters_update();
172 virtual void ToggleAutoCreate();
175 * Action: Popup a general preferences window which allows various
178 virtual void general_prefs();
180 * Opens the dialog that lets the user configure system notifications
182 virtual void notification_prefs();
183 virtual void font_update(const QFont
&);
184 virtual void filter_rule_editor();
185 virtual void configChange();
187 virtual void ProcMessage(QString server
, int command
, QString args
);
189 * On quit we sync the config to disk and exit
191 virtual void endksirc();
195 void start_autoconnect();
197 * Start auto-connect with check
199 void start_autoconnect_check();
202 Q3ListViewItem
* findChild( Q3ListViewItem
*parent
, const QString
& text
);
205 void WindowSelected(Q3ListViewItem
*);
212 virtual void showEvent( QShowEvent
*e
);
213 virtual void hideEvent( QHideEvent
*e
);
214 virtual void closeEvent( QCloseEvent
* );
215 void saveDockingStatus();
217 void saveGlobalProperties(KConfig
*);
218 void readGlobalProperties(KConfig
*);
221 void saveSessionConfig();
223 // La raison d'etre. We don't run ConnectionTree ourselves, but
224 // we get it from our helper class scInside.
225 K3ListView
*ConnectionTree
;
229 // Menubar for the top.
232 // Hold a list of all KSircProcess's for access latter. Index by server
234 Q3Dict
<KSircProcess
> proc_list
;
235 Q3PopupMenu
*options
, *connections
;
236 int join_id
, server_id
;
238 //KGlobalAccel *m_kga;
248 // PukeController *PukeC;
250 // Holds dockable widget
251 dockServerController
*dockWidget
;
254 // Docked icon notification
255 int m_notificationCount
;
256 struct ChannelSessionInfo
264 typedef QList
<ChannelSessionInfo
> ChannelSessionInfoList
;
266 typedef QMap
<QString
, ChannelSessionInfoList
> SessionConfigMap
;
267 SessionConfigMap m_sessionConfig
;
269 static servercontroller
*s_self
;
273 nickColourMaker
*m_ncm
;
275 #endif // servercontroller_included