~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/kvirc/ui/kvi_channel.h

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _KVI_CHANNEL_H_
2
 
#define _KVI_CHANNEL_H_
3
 
//=============================================================================
4
 
//
5
 
//   File : kvi_channel.h
6
 
//   Creation date : Tue Aug  1 2000 01:42:00 by Szymon Stefanek
7
 
//
8
 
//   This file is part of the KVirc irc client distribution
9
 
//   Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net)
10
 
//
11
 
//   This program is FREE software. You can redistribute it and/or
12
 
//   modify it under the terms of the GNU General Public License
13
 
//   as published by the Free Software Foundation; either version 2
14
 
//   of the License, or (at your opinion) any later version.
15
 
//
16
 
//   This program is distributed in the HOPE that it will be USEFUL,
17
 
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
 
//   See the GNU General Public License for more details.
20
 
//
21
 
//   You should have received a copy of the GNU General Public License
22
 
//   along with this program. If not, write to the Free Software Foundation,
23
 
//   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24
 
//
25
 
//=============================================================================
26
 
 
27
 
/**
28
 
* \file kvi_channel.h
29
 
* \author Szymon Stefanek
30
 
* \brief Channel widget: abstraction of an IRC channel
31
 
*/
32
 
 
33
 
#include "kvi_settings.h"
34
 
#include "kvi_console.h"
35
 
#include "kvi_window.h"
36
 
#include "kvi_string.h"
37
 
#include "kvi_ircuserdb.h"
38
 
#include "kvi_pixmap.h"
39
 
#include "kvi_userlistview.h"
40
 
#include "kvi_time.h"
41
 
#include "kvi_modew.h"
42
 
#include "kvi_pointerhashtable.h"
43
 
 
44
 
#include <QList>
45
 
#include <QDateTime>
46
 
#include <QStringList>
47
 
#include <QToolButton>
48
 
 
49
 
 
50
 
class KviConsole;
51
 
class KviTopicWidget;
52
 
class KviIrcMask;
53
 
class KviThemedLabel;
54
 
class KviTalHBox;
55
 
class KviMaskEditor;
56
 
class KviModeEditor;
57
 
 
58
 
#ifdef COMPILE_ON_WINDOWS
59
 
        // windows compiler wants this instead of the forward decl
60
 
        #include "kvi_maskeditor.h"
61
 
#else
62
 
        typedef struct _KviMaskEntry KviMaskEntry; // kvi_maskeditor.h
63
 
#endif
64
 
 
65
 
/**
66
 
* \def KVI_CHANNEL_STATE_HAVEALLNAMES Flag for "have all names"
67
 
* \def KVI_CHANNEL_STATE_HAVEBANLIST Flag for "have ban list"
68
 
* \def KVI_CHANNEL_STATE_HAVEWHOLIST Flag for "have WHO list"
69
 
* \def KVI_CHANNEL_STATE_HAVEBANEXCEPTIONLIST Flag for "have ban exception list"
70
 
* \def KVI_CHANNEL_STATE_HAVEINVITELIST Flag for "have invite list"
71
 
* \def KVI_CHANNEL_STATE_HAVEQUIETBANLIST Flag for "have quiet ban list"
72
 
* \def KVI_CHANNEL_STATE_DEADCHAN Flag for "dead channel"
73
 
* \def KVI_CHANNEL_STATE_SENTBANLISTREQUEST Flag to set ban list request
74
 
* \def KVI_CHANNEL_STATE_SENTBANEXCEPTIONLISTREQUEST Flag to set ban exception list request
75
 
* \def KVI_CHANNEL_STATE_SENTINVITELISTREQUEST Flag to set invite list request
76
 
* \def KVI_CHANNEL_STATE_SENTQUIETBANLISTREQUEST Flag to set ban list request
77
 
* \def KVI_CHANNEL_STATE_SENTWHOREQUEST Flag to set WHO request
78
 
* \def KVI_CHANNEL_STATE_SENTPART Flag to set PART request
79
 
* \def KVI_CHANNEL_STATE_SYNCHRONIZED Flag to set SYNC request
80
 
* \def KVI_CHANNEL_STATE_NOCLOSEONPART Flag to set no close on part
81
 
* \def KVI_CHANNEL_STATE_SENTSYNCWHOREQUEST Flag for SYNC request
82
 
*/
83
 
#define KVI_CHANNEL_STATE_HAVEALLNAMES 1
84
 
#define KVI_CHANNEL_STATE_HAVEBANLIST (1 << 1)
85
 
#define KVI_CHANNEL_STATE_HAVEWHOLIST (1 << 2)
86
 
#define KVI_CHANNEL_STATE_HAVEBANEXCEPTIONLIST (1 << 3)
87
 
#define KVI_CHANNEL_STATE_HAVEINVITELIST (1 << 4)
88
 
#define KVI_CHANNEL_STATE_HAVEQUIETBANLIST (1 << 5)
89
 
#define KVI_CHANNEL_STATE_DEADCHAN (1 << 6)
90
 
#define KVI_CHANNEL_STATE_SENTBANLISTREQUEST (1 << 7)
91
 
#define KVI_CHANNEL_STATE_SENTBANEXCEPTIONLISTREQUEST (1 << 8)
92
 
#define KVI_CHANNEL_STATE_SENTINVITELISTREQUEST (1 << 9)
93
 
#define KVI_CHANNEL_STATE_SENTQUIETBANLISTREQUEST (1 << 10)
94
 
#define KVI_CHANNEL_STATE_SENTWHOREQUEST (1 << 11)
95
 
#define KVI_CHANNEL_STATE_SENTPART (1 << 12)
96
 
#define KVI_CHANNEL_STATE_SYNCHRONIZED (1 << 13)
97
 
#define KVI_CHANNEL_STATE_NOCLOSEONPART (1 << 14)
98
 
#define KVI_CHANNEL_STATE_SENTSYNCWHOREQUEST (1 << 15)
99
 
 
100
 
/**
101
 
* \def KVI_CHANACTIVITY_LIMIT_ICE The limit to be "ice"
102
 
* \def KVI_CHANACTIVITY_LIMIT_VERYCOLD The limit to be "very cold"
103
 
* \def KVI_CHANACTIVITY_LIMIT_COLD The limit to be "cold"
104
 
* \def KVI_CHANACTIVITY_LIMIT_UNDEFINED The limit to be "undefined"
105
 
* \def KVI_CHANACTIVITY_LIMIT_HOT The limit to be "hot"
106
 
* \def KVI_CHANACTIVITY_LIMIT_VERYHOT The limit to be "very hot"
107
 
*/
108
 
#define KVI_CHANACTIVITY_LIMIT_ICE 5
109
 
#define KVI_CHANACTIVITY_LIMIT_VERYCOLD 10
110
 
#define KVI_CHANACTIVITY_LIMIT_COLD 20
111
 
#define KVI_CHANACTIVITY_LIMIT_UNDEFINED 30
112
 
#define KVI_CHANACTIVITY_LIMIT_HOT 50
113
 
#define KVI_CHANACTIVITY_LIMIT_VERYHOT 70
114
 
 
115
 
/**
116
 
* \def AVERAGE_CHANNEL_USERS The average channel users of a channel
117
 
*/
118
 
#ifndef AVERAGE_CHANNEL_USERS
119
 
        #define AVERAGE_CHANNEL_USERS 101
120
 
#endif
121
 
 
122
 
/**
123
 
* \def KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT Maximum actions count we keep in memory
124
 
* \def KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN Timespan of the oldest action we keep in memory (600 secs = 10 mins)
125
 
*/
126
 
#define KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT 40
127
 
#define KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN 600
128
 
 
129
 
/**
130
 
* \typedef KviChannelAction
131
 
* \struct _KviChannelAction
132
 
* \brief A struct which holds the channel actions
133
 
*/
134
 
typedef struct _KviChannelAction
135
 
{
136
 
        QString      szNick;       // action source nick
137
 
        unsigned int uActionType;  // type of the action
138
 
        kvi_time_t   tTime;        // time of the action
139
 
        int          iTemperature; // temperature of the action
140
 
} KviChannelAction;
141
 
 
142
 
/**
143
 
* \typedef KviChannelActivityStats
144
 
* \struct _KviChannelActivityStats
145
 
* \brief A struct which holds the activity stats
146
 
*/
147
 
typedef struct _KviChannelActivityStats
148
 
{
149
 
        unsigned int        uActionCount;              // number of actions in the history
150
 
        bool                bStatsInaccurate;          // the stats are inaccurate because we have just joined the chan
151
 
        unsigned int        uLastActionTimeSpan;       // the timespan between the last action and now
152
 
        unsigned int        uFirstActionTimeSpan;      // the time span between the first and the last action
153
 
        double              dActionsPerMinute;         // average number of actions per minute in the lastActionTimeSpan
154
 
        unsigned int        uActionsInTheLastMinute;   // number of actions in the last minute
155
 
        int                 iAverageActionTemperature; // the average chan temperature
156
 
        unsigned int        uHotActionCount;
157
 
        unsigned int        uHotActionPercent;
158
 
        QStringList         lTalkingUsers;             // users that seem to be talking NOW
159
 
        QStringList         lWereTalkingUsers;
160
 
} KviChannelActivityStats;
161
 
 
162
 
/**
163
 
* \class KviChannel
164
 
* \brief The class which manages a channel
165
 
*/
166
 
class KVIRC_API KviChannel : public KviWindow
167
 
{
168
 
        Q_OBJECT
169
 
public:
170
 
        /**
171
 
        * \brief Constructs the channel object
172
 
        * \param lpFrm The parent frame object
173
 
        * \param lpConsole The console of the context
174
 
        * \param szName The name of the channel
175
 
        * \return KviChannel
176
 
        */
177
 
        KviChannel(KviFrame * lpFrm, KviConsole * lpConsole, const QString & szName);
178
 
 
179
 
        /**
180
 
        * \brief Destroys the channel object
181
 
        */
182
 
        ~KviChannel();
183
 
protected:
184
 
        KviTalSplitter                       * m_pTopSplitter;
185
 
        KviTalSplitter                       * m_pVertSplitter;
186
 
        QToolButton                          * m_pDoubleViewButton;
187
 
        KviWindowToolPageButton              * m_pListViewButton;
188
 
        KviWindowToolPageButton              * m_pBanEditorButton;
189
 
        KviWindowToolPageButton              * m_pBanExceptionEditorButton;
190
 
        KviWindowToolPageButton              * m_pInviteEditorButton;
191
 
        KviWindowToolPageButton              * m_pQuietBanEditorButton;
192
 
        KviWindowToolPageButton              * m_pModeEditorButton;
193
 
        KviMaskEditor                        * m_pBanEditor;
194
 
        KviMaskEditor                        * m_pBanExceptionEditor;
195
 
        KviMaskEditor                        * m_pInviteEditor;
196
 
        KviMaskEditor                        * m_pQuietBanEditor;
197
 
        KviModeEditor                        * m_pModeEditor;
198
 
        KviIrcView                           * m_pMessageView;
199
 
        KviTopicWidget                       * m_pTopicWidget;
200
 
        KviUserListView                      * m_pUserListView;
201
 
        KviModeWidget                        * m_pModeWidget;
202
 
        int                                    m_iStateFlags;
203
 
        QString                                m_szChannelMode;
204
 
        QString                                m_szChannelKey;
205
 
        QString                                m_szChannelLimit;
206
 
        KviPointerList<KviMaskEntry>         * m_pBanList;
207
 
        KviPointerList<KviMaskEntry>         * m_pBanExceptionList;
208
 
        KviPointerList<KviMaskEntry>         * m_pInviteList;
209
 
        KviPointerList<KviMaskEntry>         * m_pQuietBanList;
210
 
        KviPixmap                              m_privateBackground;
211
 
        QDateTime                              m_joinTime;
212
 
        QString                                m_szNameWithUserFlag;
213
 
        QStringList                          * m_pTmpHighLighted;
214
 
        unsigned int                           m_uActionHistoryHotActionCount;
215
 
        KviPointerList<KviChannelAction>     * m_pActionHistory;
216
 
        kvi_time_t                             m_tLastReceivedWhoReply;
217
 
        QList<int>                             m_VertSplitterSizesList;
218
 
        KviTalHBox                           * m_pButtonContainer;
219
 
public:
220
 
        /**
221
 
        * \brief Returns the user listview object
222
 
        * \return KviUserListView *
223
 
        */
224
 
        KviUserListView * userListView(){ return m_pUserListView; };
225
 
 
226
 
        /**
227
 
        * \brief Returns the topic widget object
228
 
        * \return KviTopicWidget *
229
 
        */
230
 
        KviTopicWidget * topicWidget(){ return m_pTopicWidget; };
231
 
 
232
 
        /**
233
 
        * \brief Returns the irc view object
234
 
        * \return KviIrcView *
235
 
        */
236
 
        KviIrcView * messageView() const { return m_pMessageView; };
237
 
 
238
 
        /**
239
 
        * \brief Returns the button container object
240
 
        * \return QFrame *
241
 
        */
242
 
        QFrame * buttonContainer() { return (QFrame*)m_pButtonContainer; };
243
 
 
244
 
        /**
245
 
        * \brief Returns the list of bans set
246
 
        * \return KviPointerList<KviMaskEntry> *
247
 
        */
248
 
        KviPointerList<KviMaskEntry> * banList(){ return m_pBanList; };
249
 
 
250
 
        /**
251
 
        * \brief Returns the list of ban exceptions set
252
 
        * \return KviPointerList<KviMaskEntry> *
253
 
        */
254
 
        KviPointerList<KviMaskEntry> * banExceptionList(){ return m_pBanExceptionList; };
255
 
 
256
 
        /**
257
 
        * \brief Returns the list of invites set
258
 
        * \return KviPointerList<KviMaskEntry> *
259
 
        */
260
 
        KviPointerList<KviMaskEntry> * inviteList(){ return m_pInviteList; };
261
 
 
262
 
        /**
263
 
        * \brief Returns the list of quiet bans set
264
 
        * \return KviPointerList<KviMaskEntry> *
265
 
        */
266
 
        KviPointerList<KviMaskEntry> * quietBanList(){ return m_pQuietBanList; };
267
 
 
268
 
        /**
269
 
        * \brief Returns the first selected nickname in the userlist
270
 
        * \return QString *
271
 
        */
272
 
        QString * firstSelectedNickname(){ return m_pUserListView->firstSelectedNickname(); };
273
 
 
274
 
        /**
275
 
        * \brief Returns the next selected nickname in the userlist
276
 
        * \return QString *
277
 
        */
278
 
        QString * nextSelectedNickname(){ return m_pUserListView->nextSelectedNickname(); };
279
 
 
280
 
        /**
281
 
        * \brief Returns the name of the channel
282
 
        * \return const QString &
283
 
        */
284
 
        virtual const QString & target(){ return windowName(); };
285
 
 
286
 
        /**
287
 
        * \brief Returns the name of the channel with user flags
288
 
        * \return const QString &
289
 
        */
290
 
        const QString & nameWithUserFlag(){ return m_szNameWithUserFlag; };
291
 
 
292
 
        /**
293
 
        * \brief Gets the channel activity stats and put them in the buffer
294
 
        * \param s The buffer where to store the data
295
 
        * \return void
296
 
        */
297
 
        void getChannelActivityStats(KviChannelActivityStats * s);
298
 
 
299
 
        /**
300
 
        * \brief Returns the number of selected users
301
 
        * \return int
302
 
        */
303
 
        int selectedCount(){ return m_pUserListView->selectedCount(); };
304
 
 
305
 
        /**
306
 
        * \brief Returns the number of users with chanowner status
307
 
        * \return int
308
 
        */
309
 
        int chanOwnerCount(){ return m_pUserListView->chanOwnerCount(); };
310
 
 
311
 
        /**
312
 
        * \brief Returns the number of users with chanadmin status
313
 
        * \return int
314
 
        */
315
 
        int chanAdminCount(){ return m_pUserListView->chanAdminCount(); };
316
 
 
317
 
        /**
318
 
        * \brief Returns the number of users with op status
319
 
        * \return int
320
 
        */
321
 
        int opCount(){ return m_pUserListView->opCount(); };
322
 
 
323
 
        /**
324
 
        * \brief Returns the number of users with halfop status
325
 
        * \return int
326
 
        */
327
 
        int halfOpCount(){ return m_pUserListView->halfOpCount(); };
328
 
 
329
 
        /**
330
 
        * \brief Returns the number of users with voice status
331
 
        * \return int
332
 
        */
333
 
        int voiceCount(){ return m_pUserListView->voiceCount(); };
334
 
 
335
 
        /**
336
 
        * \brief Returns the number of users with userop status
337
 
        * \return int
338
 
        */
339
 
        int userOpCount(){ return m_pUserListView->userOpCount(); };
340
 
 
341
 
        /**
342
 
        * \brief Returns the number of users
343
 
        * \return unsigned int
344
 
        */
345
 
        unsigned int count(){ return m_pUserListView->count(); };
346
 
 
347
 
        /**
348
 
        * \brief Returns the number of ban masks
349
 
        * \return unsigned int
350
 
        */
351
 
        unsigned int banCount(){ return m_pBanList->count(); };
352
 
 
353
 
        /**
354
 
        * \brief Returns the number of ban exceptions masks list
355
 
        * \return unsigned int
356
 
        */
357
 
        unsigned int banExceptionCount(){ return m_pBanExceptionList->count(); };
358
 
 
359
 
        /**
360
 
        * \brief Returns the number of invite masks
361
 
        * \return unsigned int
362
 
        */
363
 
        unsigned int inviteCount(){ return m_pInviteList->count(); };
364
 
 
365
 
        /**
366
 
        * \brief Returns the number of quiet ban masks
367
 
        * \return unsigned int
368
 
        */
369
 
        unsigned int quietBanCount(){ return m_pQuietBanList->count(); };
370
 
 
371
 
        /**
372
 
        * \brief Called when someone sets a mask in the channel's lists
373
 
        *
374
 
        * The type of the mask can be:
375
 
        *  - b: ban
376
 
        *  - e: ban exception
377
 
        *  - I: invite
378
 
        *  - q: quiet ban
379
 
        * \param cFlag The type of the mask
380
 
        * \param szMask The mask set
381
 
        * \param bAdd Whether to add or remove the mask
382
 
        * \param szSetBy Who set the mask
383
 
        * \param uSetAt The datetime when the mask was set
384
 
        * \return void
385
 
        */
386
 
        void setMask(char cFlag, const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt);
387
 
 
388
 
        /**
389
 
        * \brief Returns the time of the last received WHO reply
390
 
        * \return kvi_time_t
391
 
        */
392
 
        kvi_time_t lastReceivedWhoReply(){ return m_tLastReceivedWhoReply; };
393
 
 
394
 
        /**
395
 
        * \brief Sets the time of the last received WHO reply
396
 
        * \param tTime The source time
397
 
        * \return void
398
 
        */
399
 
        void setLastReceivedWhoReply(kvi_time_t tTime){ m_tLastReceivedWhoReply = tTime; };
400
 
 
401
 
        /**
402
 
        * \brief Returns true if we have sent the sync WHO request
403
 
        * \return bool
404
 
        */
405
 
        bool sentSyncWhoRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTSYNCWHOREQUEST); };
406
 
 
407
 
        /**
408
 
        * \brief Sets the sync WHO request flag
409
 
        * \return void
410
 
        */
411
 
        void setSentSyncWhoRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTSYNCWHOREQUEST; };
412
 
 
413
 
        /**
414
 
        * \brief Clears the sync WHO request flag
415
 
        * \return void
416
 
        */
417
 
        void clearSentSyncWhoRequest(){ m_iStateFlags ^= KVI_CHANNEL_STATE_SENTSYNCWHOREQUEST; };
418
 
 
419
 
        /**
420
 
        * \brief Returns true if we have sent the WHO request
421
 
        * \return bool
422
 
        */
423
 
        bool sentWhoRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTWHOREQUEST); };
424
 
 
425
 
        /**
426
 
        * \brief Sets the WHO request flag
427
 
        * \return void
428
 
        */
429
 
        void setSentWhoRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTWHOREQUEST; };
430
 
 
431
 
        /**
432
 
        * \brief Returns true if we have sent the invite list request
433
 
        * \return bool
434
 
        */
435
 
        bool sentInviteListRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTINVITELISTREQUEST); };
436
 
 
437
 
        /**
438
 
        * \brief Sets the invite request flag
439
 
        * \return void
440
 
        */
441
 
        void setSentInviteListRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTINVITELISTREQUEST; };
442
 
 
443
 
        /**
444
 
        * \brief Clears the invite request flag
445
 
        * \return void
446
 
        */
447
 
        void setInviteListDone(){ m_iStateFlags ^= KVI_CHANNEL_STATE_SENTINVITELISTREQUEST; };
448
 
 
449
 
        /**
450
 
        * \brief Returns true if we have sent the ban list request
451
 
        * \return bool
452
 
        */
453
 
        bool sentBanListRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTBANLISTREQUEST); };
454
 
 
455
 
        /**
456
 
        * \brief Sets the ban request flag
457
 
        * \return void
458
 
        */
459
 
        void setSentBanListRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTBANLISTREQUEST; };
460
 
 
461
 
        /**
462
 
        * \brief Clears the ban request flag
463
 
        * \return void
464
 
        */
465
 
        void setBanListDone(){ m_iStateFlags ^= KVI_CHANNEL_STATE_SENTBANLISTREQUEST; };
466
 
 
467
 
        /**
468
 
        * \brief Returns true if we have sent the ban exception list request
469
 
        * \return bool
470
 
        */
471
 
        bool sentBanExceptionListRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTBANEXCEPTIONLISTREQUEST); };
472
 
 
473
 
        /**
474
 
        * \brief Sets the ban exception request flag
475
 
        * \return void
476
 
        */
477
 
        void setSentBanExceptionListRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTBANEXCEPTIONLISTREQUEST; };
478
 
 
479
 
        /**
480
 
        * \brief Clears the ban exception request flag
481
 
        * \return void
482
 
        */
483
 
        void setBanExceptionListDone(){ m_iStateFlags ^= KVI_CHANNEL_STATE_SENTBANEXCEPTIONLISTREQUEST; };
484
 
 
485
 
        /**
486
 
        * \brief Returns true if we have sent the quiet ban list request
487
 
        * \return bool
488
 
        */
489
 
        bool sentQuietBanListRequest(){ return (m_iStateFlags & KVI_CHANNEL_STATE_SENTQUIETBANLISTREQUEST); };
490
 
 
491
 
        /**
492
 
        * \brief Sets the quiet ban request flag
493
 
        * \return void
494
 
        */
495
 
        void setSentQuietBanListRequest(){ m_iStateFlags |= KVI_CHANNEL_STATE_SENTQUIETBANLISTREQUEST; };
496
 
 
497
 
        /**
498
 
        * \brief Clears the quiet ban request flag
499
 
        * \return void
500
 
        */
501
 
        void setQuietBanListDone(){ m_iStateFlags ^= KVI_CHANNEL_STATE_SENTQUIETBANLISTREQUEST; };
502
 
 
503
 
        /**
504
 
        * \brief Returns true if the channel has all names
505
 
        * \return bool
506
 
        */
507
 
        bool hasAllNames(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEALLNAMES); };
508
 
 
509
 
        /**
510
 
        * \brief Sets the existance of all names
511
 
        * \return void
512
 
        */
513
 
        void setHasAllNames(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEALLNAMES; checkChannelSync(); };
514
 
 
515
 
        /**
516
 
        * \brief Returns true if the channel has an invite list
517
 
        * \return bool
518
 
        */
519
 
        bool hasInviteList(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEINVITELIST); checkChannelSync(); };
520
 
 
521
 
        /**
522
 
        * \brief Sets the existance of the invite list
523
 
        * \return void
524
 
        */
525
 
        void setHasInviteList(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEINVITELIST; };
526
 
 
527
 
        /**
528
 
        * \brief Returns true if the channel has a WHO list
529
 
        * \return bool
530
 
        */
531
 
        bool hasWhoList(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEWHOLIST); };
532
 
 
533
 
        /**
534
 
        * \brief Sets the existance of the WHO list
535
 
        * \return void
536
 
        */
537
 
        void setHasWhoList(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEWHOLIST; checkChannelSync(); };
538
 
 
539
 
        /**
540
 
        * \brief Returns true if the channel has a ban list
541
 
        * \return bool
542
 
        */
543
 
        bool hasBanList(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEBANLIST); };
544
 
 
545
 
        /**
546
 
        * \brief Sets the existance of the ban list
547
 
        * \return void
548
 
        */
549
 
        void setHasBanList(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEBANLIST; checkChannelSync(); };
550
 
 
551
 
        /**
552
 
        * \brief Returns true if the channel has a ban exception list
553
 
        * \return bool
554
 
        */
555
 
        bool hasBanExceptionList(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEBANEXCEPTIONLIST); };
556
 
 
557
 
        /**
558
 
        * \brief Sets the existance of the ban exception list
559
 
        * \return void
560
 
        */
561
 
        void setHasBanExceptionList(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEBANEXCEPTIONLIST; checkChannelSync(); };
562
 
 
563
 
        /**
564
 
        * \brief Returns true if the channel has a quiet ban list
565
 
        * \return bool
566
 
        */
567
 
        bool hasQuietBanList(){ return (m_iStateFlags & KVI_CHANNEL_STATE_HAVEQUIETBANLIST); };
568
 
 
569
 
        /**
570
 
        * \brief Sets the existance of the quiet ban list
571
 
        * \return void
572
 
        */
573
 
        void setHasQuietBanList(){ m_iStateFlags |= KVI_CHANNEL_STATE_HAVEQUIETBANLIST; checkChannelSync(); };
574
 
 
575
 
        /**
576
 
        * \brief Returns true if the channel has to be closed on part
577
 
        * \return bool
578
 
        */
579
 
        bool closeOnPart(){ return !(m_iStateFlags & KVI_CHANNEL_STATE_NOCLOSEONPART); };
580
 
 
581
 
        /**
582
 
        * \brief Called when we want to part a channel
583
 
        * \param bCloseOnPart Whether to leave channel open after part
584
 
        * \param bShowMessage Whether to show part message
585
 
        * \return void
586
 
        */
587
 
        void partMessageSent(bool bCloseOnPart = true, bool bShowMessage = true);
588
 
 
589
 
        /**
590
 
        * \brief Colors the icon who tells how much activity there is
591
 
        * \param puActivityValue The value of the activity
592
 
        * \param puActivityTemperature The temperature of the activity
593
 
        * \return bool
594
 
        */
595
 
        virtual bool activityMeter(unsigned int * puActivityValue, unsigned int * puActivityTemperature);
596
 
 
597
 
        /**
598
 
        * \brief Sets the channel as dead
599
 
        * \return void
600
 
        */
601
 
        void setDeadChan();
602
 
 
603
 
        /**
604
 
        * \brief Returns true if the channel is dead
605
 
        * \return bool
606
 
        */
607
 
        bool isDeadChan(){ return (m_iStateFlags & KVI_CHANNEL_STATE_DEADCHAN); };
608
 
 
609
 
        /**
610
 
        * \brief Sets the channel as alive
611
 
        * \return void
612
 
        */
613
 
        void setAliveChan();
614
 
 
615
 
        /**
616
 
        * \brief Prepends the user flag to the nickname
617
 
        * \param szNick The nickname of the user
618
 
        * \param szBuffer The buffer :)
619
 
        * \return void
620
 
        */
621
 
        void prependUserFlag(const QString & szNick, QString & szBuffer){ m_pUserListView->prependUserFlag(szNick,szBuffer); };
622
 
 
623
 
        /**
624
 
        * \brief Returns the flag of a user
625
 
        * \param szNick The nick of the user
626
 
        * \return char
627
 
        */
628
 
        char getUserFlag(const QString & szNick){ return m_pUserListView->getUserFlag(szNick); };
629
 
 
630
 
        /**
631
 
        * \brief Returns the size of the channel
632
 
        * \return QSize
633
 
        */
634
 
        virtual QSize sizeHint() const;
635
 
 
636
 
        /**
637
 
        * \brief Enables or disable the userlist updates
638
 
        * \param bEnable Whether to enable the updates
639
 
        * \return void
640
 
        */
641
 
        void enableUserListUpdates(bool bEnable){ m_pUserListView->enableUpdates(bEnable); };
642
 
 
643
 
        /**
644
 
        * \brief Called when a user joins the channel
645
 
        * \param szNick The nickname of the user
646
 
        * \param szUser The username of the user
647
 
        * \param szHost The hostname of the user
648
 
        * \param iFlags The flags of the user
649
 
        * \return KviUserListEntry *
650
 
        */
651
 
        KviUserListEntry * join(const QString & szNick, const QString & szUser = QString(), const QString & szHost = QString(), int iFlags = 0){ return m_pUserListView->join(szNick,szUser,szHost,iFlags); };
652
 
 
653
 
        /**
654
 
        * \brief Returns true if the avatar of a user is changed
655
 
        * \param szNick The nickname of the user
656
 
        * \return bool
657
 
        */
658
 
        bool avatarChanged(const QString & szNick){ return m_pUserListView->avatarChanged(szNick); };
659
 
 
660
 
        /**
661
 
        * \brief Sets the chan owner mode
662
 
        * \param szNick The nick to set the mode on
663
 
        * \param bChanOwner Whether to set or unset the mode on the user
664
 
        * \return bool
665
 
        */
666
 
        bool setChanOwner(const QString & szNick, bool bChanOwner){ return m_pUserListView->setChanOwner(szNick,bChanOwner); };
667
 
 
668
 
        /**
669
 
        * \brief Sets the chan admin mode
670
 
        * \param szNick The nick to set the mode on
671
 
        * \param bChanAdmin Whether to set or unset the mode on the user
672
 
        * \return bool
673
 
        */
674
 
        bool setChanAdmin(const QString & szNick, bool bChanAdmin){ return m_pUserListView->setChanAdmin(szNick,bChanAdmin); };
675
 
 
676
 
        /**
677
 
        * \brief Sets the operator mode
678
 
        * \param szNick The nick to set the mode on
679
 
        * \param bOp Whether to set or unset the mode on the user
680
 
        * \return bool
681
 
        */
682
 
        bool setOp(const QString & szNick, bool bOp){ return m_pUserListView->setOp(szNick,bOp); };
683
 
 
684
 
        /**
685
 
        * \brief Sets the half operator mode
686
 
        * \param szNick The nick to set the mode on
687
 
        * \param bHalfOp Whether to set or unset the mode on the user
688
 
        * \return bool
689
 
        */
690
 
        bool setHalfOp(const QString & szNick, bool bHalfOp){ return m_pUserListView->setHalfOp(szNick,bHalfOp); };
691
 
 
692
 
        /**
693
 
        * \brief Sets the voice mode
694
 
        * \param szNick The nick to set the mode on
695
 
        * \param bVoice Whether to set or unset the mode on the user
696
 
        * \return bool
697
 
        */
698
 
        bool setVoice(const QString & szNick, bool bVoice){ return m_pUserListView->setVoice(szNick,bVoice); };
699
 
 
700
 
        /**
701
 
        * \brief Sets the user operator mode
702
 
        * \param szNick The nick to set the mode on
703
 
        * \param bUserOp Whether to set or unset the mode on the user
704
 
        * \return bool
705
 
        */
706
 
        bool setUserOp(const QString & szNick, bool bUserOp){ return m_pUserListView->setUserOp(szNick,bUserOp); };
707
 
 
708
 
        /**
709
 
        * \brief Returns true if the user is a chan owner
710
 
        * \param szNick The nickname of the user to check
711
 
        * \param bAtLeast Whether the user is at least a chan owner
712
 
        * \return bool
713
 
        */
714
 
        bool isChanOwner(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isChanOwner(szNick,bAtLeast); };
715
 
 
716
 
        /**
717
 
        * \brief Returns true if the user is a chan admin
718
 
        * \param szNick The nickname of the user to check
719
 
        * \param bAtLeast Whether the user is at least a chan admin
720
 
        * \return bool
721
 
        */
722
 
        bool isChanAdmin(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isChanAdmin(szNick,bAtLeast); };
723
 
 
724
 
        /**
725
 
        * \brief Returns true if the user is an operator
726
 
        * \param szNick The nickname of the user to check
727
 
        * \param bAtLeast Whether the user is at least an operator
728
 
        * \return bool
729
 
        */
730
 
        bool isOp(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isOp(szNick,bAtLeast); };
731
 
 
732
 
        /**
733
 
        * \brief Returns true if the user is a half operator
734
 
        * \param szNick The nickname of the user to check
735
 
        * \param bAtLeast Whether the user is at least a half operator
736
 
        * \return bool
737
 
        */
738
 
        bool isHalfOp(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isHalfOp(szNick,bAtLeast); };
739
 
 
740
 
        /**
741
 
        * \brief Returns true if the user is a voice
742
 
        * \param szNick The nickname of the user to check
743
 
        * \param bAtLeast Whether the user is at least a voice
744
 
        * \return bool
745
 
        */
746
 
        bool isVoice(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isVoice(szNick,bAtLeast); };
747
 
 
748
 
        /**
749
 
        * \brief Returns true if the user is a user operator
750
 
        * \param szNick The nickname of the user to check
751
 
        * \param bAtLeast Whether the user is at least a user operator
752
 
        * \return bool
753
 
        */
754
 
        bool isUserOp(const QString & szNick, bool bAtLeast = false){ return m_pUserListView->isUserOp(szNick,bAtLeast); };
755
 
 
756
 
        /**
757
 
        * \brief Returns true if we are an ircop
758
 
        * \param bAtLeast Whether we are at least an ircop
759
 
        * \return bool
760
 
        */
761
 
        bool isMeIrcOp(bool bAtLeast = false);
762
 
 
763
 
        /**
764
 
        * \brief Returns true if we are a chan owner
765
 
        * \param bAtLeast Whether we are at least a chan owner
766
 
        * \return bool
767
 
        */
768
 
        bool isMeChanOwner(bool bAtLeast = false);
769
 
 
770
 
        /**
771
 
        * \brief Returns true if we are a chan admin
772
 
        * \param bAtLeast Whether we are at least a chan admin
773
 
        * \return bool
774
 
        */
775
 
        bool isMeChanAdmin(bool bAtLeast = false);
776
 
 
777
 
        /**
778
 
        * \brief Returns true if we are an operator
779
 
        * \param bAtLeast Whether we are at least an operator
780
 
        * \return bool
781
 
        */
782
 
        bool isMeOp(bool bAtLeast = false);
783
 
 
784
 
        /**
785
 
        * \brief Returns true if we are a half operator
786
 
        * \param bAtLeast Whether we are at least a half operator
787
 
        * \return bool
788
 
        */
789
 
        bool isMeHalfOp(bool bAtLeast = false);
790
 
 
791
 
        /**
792
 
        * \brief Returns true if we are a voice
793
 
        * \param bAtLeast Whether we are at least a voice
794
 
        * \return bool
795
 
        */
796
 
        bool isMeVoice(bool bAtLeast = false);
797
 
 
798
 
        /**
799
 
        * \brief Returns true if we are a user operator
800
 
        * \param bAtLeast Whether we are at least a user operator
801
 
        * \return bool
802
 
        */
803
 
        bool isMeUserOp(bool bAtLeast = false);
804
 
 
805
 
        /**
806
 
        * \brief Perform a user action in the channel
807
 
        * \param user The user who made the action
808
 
        * \param uActionType The type of the action
809
 
        * \return void
810
 
        */
811
 
        void userAction(KviIrcMask * user, unsigned int uActionType);
812
 
 
813
 
        /**
814
 
        * \brief Perform a user action in the channel
815
 
        * \param szNick The nickname of the user who made the action
816
 
        * \param uActionType The type of the action
817
 
        * \return void
818
 
        */
819
 
        void userAction(const QString & szNick, unsigned int uActionType);
820
 
 
821
 
        /**
822
 
        * \brief Perform a user action in the channel
823
 
        * \param szNick The nickname of the user who made the action
824
 
        * \param szUser The username of the user who made the action
825
 
        * \param szHost The hostname of the user who made the action
826
 
        * \param uActionType The type of the action
827
 
        * \return void
828
 
        */
829
 
        void userAction(const QString & szNick, const QString & szUser, const QString & szHost, unsigned int uActionType);
830
 
 
831
 
        /**
832
 
        * \brief Called when someone perform an action in the channel
833
 
        * \param szNick The nickname of the user who made the action
834
 
        * \param uActionType The type of the action
835
 
        * \param iTemperature The temperature of the action
836
 
        * \return void
837
 
        */
838
 
        void channelAction(const QString & szNick, unsigned int uActionType, int iTemperature);
839
 
 
840
 
        /**
841
 
        * \brief Called when someone changes his nick
842
 
        * \param szOldNick The old nickname of the user
843
 
        * \param szNewNick The new nickname of the user
844
 
        * \return bool
845
 
        */
846
 
        bool nickChange(const QString & szOldNick, const QString & szNewNick);
847
 
 
848
 
        /**
849
 
        * \brief Called when someone parts the channel
850
 
        * \param szNick The nickname of the user who parts
851
 
        * \return bool
852
 
        */
853
 
        bool part(const QString & szNick);
854
 
 
855
 
        /**
856
 
        * \brief Returns true if the user is on the channel
857
 
        * \param szNick The nickname of the user
858
 
        * \return bool
859
 
        */
860
 
        bool isOn(const QString & szNick){ return (m_pUserListView->findEntry(szNick) != 0); };
861
 
 
862
 
        /**
863
 
        * \brief Searches for a user in the userlist
864
 
        * \param szNick The nickname of the user to find
865
 
        * \return KviUserListEntry *
866
 
        */
867
 
        KviUserListEntry * findEntry(const QString & szNick){ return m_pUserListView->findEntry(szNick); };
868
 
 
869
 
        /**
870
 
        * \brief Returns our flags
871
 
        * \return int
872
 
        */
873
 
        int myFlags();
874
 
 
875
 
        /**
876
 
        * \brief Updates the tooltip over the channel modes
877
 
        * \return void
878
 
        */
879
 
        void updateModeLabel();
880
 
 
881
 
        /**
882
 
        * \brief Outputs a message to the channel window
883
 
        * \param iMsgType The type of the message
884
 
        * \param szMsg The message :)
885
 
        * \return void
886
 
        */
887
 
        virtual void outputMessage(int iMsgType, const QString & szMsg);
888
 
 
889
 
        /**
890
 
        * \brief Called when we send a message
891
 
        * \param szBuffer The buffer :)
892
 
        * \return void
893
 
        */
894
 
        void ownMessage(const QString & szBuffer);
895
 
 
896
 
        /**
897
 
        * \brief Called when we perform an action
898
 
        * \param szBuffer The buffer :)
899
 
        * \return void
900
 
        */
901
 
        void ownAction(const QString & szBuffer);
902
 
 
903
 
        /**
904
 
        * \brief Sets the channel mode
905
 
        * \param cMode The mode to set
906
 
        * \param bAdd Whether to add or remove the mode
907
 
        * \return void
908
 
        */
909
 
        void setChannelMode(char cMode, bool bAdd);
910
 
 
911
 
        /**
912
 
        * \brief Returns the channel mode
913
 
        * \return QString
914
 
        */
915
 
        QString channelMode() { return m_szChannelMode; };
916
 
 
917
 
        /**
918
 
        * \brief Gets the channel mode string and saves it in the buffer
919
 
        * \param szBuffer The buffer :)
920
 
        * \return void
921
 
        */
922
 
        void getChannelModeString(QString & szBuffer);
923
 
 
924
 
        /**
925
 
        * \brief Sets the limit for the channel
926
 
        * \param pcLimit The limit of the channel
927
 
        * \return void
928
 
        */
929
 
        void setChannelLimit(const char * pcLimit);
930
 
 
931
 
        /**
932
 
        * \brief Returns true if the channel has a limit set
933
 
        * \return bool
934
 
        */
935
 
        bool hasChannelLimit(){ return !m_szChannelLimit.isEmpty(); };
936
 
 
937
 
        /**
938
 
        * \brief Returns the limit number
939
 
        * \return QString &
940
 
        */
941
 
        QString & channelLimit(){ return m_szChannelLimit; };
942
 
 
943
 
        /**
944
 
        * \brief Sets the key for the channel
945
 
        * \param pcKey The key of the channel
946
 
        * \return void
947
 
        */
948
 
        void setChannelKey(const char * pcKey);
949
 
 
950
 
        /**
951
 
        * \brief Returns true if the channel has a key set
952
 
        * \return bool
953
 
        */
954
 
        bool hasChannelKey() { return !m_szChannelKey.isEmpty(); };
955
 
 
956
 
        /**
957
 
        * \brief Returns the channel key
958
 
        * \return QString &
959
 
        */
960
 
        QString & channelKey(){ return m_szChannelKey; };
961
 
 
962
 
        /**
963
 
        * \brief Adds a user to the highlight list
964
 
        * \param szNick The nickname of the user
965
 
        * \return void
966
 
        */
967
 
        void addHighlightedUser(const QString & szNick);
968
 
 
969
 
        /**
970
 
        * \brief Removes a user from the highlight list
971
 
        * \param szNick The nickname of the user
972
 
        * \return void
973
 
        */
974
 
        void removeHighlightedUser(const QString & szNick);
975
 
 
976
 
        /**
977
 
        * \brief Returns true if the user is highlighted
978
 
        * \param szNick The nickname of the user
979
 
        * \return bool
980
 
        */
981
 
        bool isHighlightedUser(const QString & szNick) { return m_pTmpHighLighted->contains(szNick,Qt::CaseInsensitive); };
982
 
 
983
 
        /**
984
 
        * \brief Called when the channel losts the focus by the user
985
 
        * \return void
986
 
        */
987
 
        virtual void lostUserFocus();
988
 
 
989
 
        /**
990
 
        * \brief Creates the tooltip over the channel treeview
991
 
        * \param szBuffer The buffer where to store the data
992
 
        * \return void
993
 
        */
994
 
        virtual void getWindowListTipText(QString & szBuffer);
995
 
 
996
 
        /**
997
 
        * \brief Unhighlights the windowlist item
998
 
        * \return void
999
 
        */
1000
 
        void unhighlight();
1001
 
 
1002
 
        /**
1003
 
        * \brief Pastes the most recent channel log into the buffer
1004
 
        *
1005
 
        * It searches for the most recent channel log of the channel we have just
1006
 
        * joined, and pastes into the buffer the last N lines, where N is get from
1007
 
        * the options
1008
 
        * \return void
1009
 
        */
1010
 
        void pasteLastLog();
1011
 
 
1012
 
        /**
1013
 
        * \brief Loads a log file
1014
 
        *
1015
 
        * It opens a logfile, gzipped or not, and returns the content in a buffer
1016
 
        * \param szFileName The filename of the log file
1017
 
        * \param bGzip Whether the log file is gzipped
1018
 
        * \return QByteArray
1019
 
        */
1020
 
        QByteArray loadLogFile(const QString & szFileName, bool bGzip);
1021
 
protected:
1022
 
        /**
1023
 
        * \brief Filters the events
1024
 
        * \param o The object
1025
 
        * \param e The event
1026
 
        * \return bool
1027
 
        */
1028
 
        bool eventFilter(QObject * o, QEvent * e);
1029
 
 
1030
 
        /**
1031
 
        * \brief Returns the correct icon for the channel
1032
 
        * \return QPixmap *
1033
 
        */
1034
 
        virtual QPixmap * myIconPtr();
1035
 
 
1036
 
        /**
1037
 
        * \brief Fills in the caption buffers
1038
 
        * \return void
1039
 
        */
1040
 
        virtual void fillCaptionBuffers();
1041
 
 
1042
 
        /**
1043
 
        * \brief Gets the group name
1044
 
        * \param szBuffer The buffer where to save the data
1045
 
        * \return void
1046
 
        */
1047
 
        virtual void getConfigGroupName(QString & szBuffer);
1048
 
 
1049
 
        /**
1050
 
        * \brief Saves the properties to file
1051
 
        * \param cfg The config file
1052
 
        * \return void
1053
 
        */
1054
 
        virtual void saveProperties(KviConfig * cfg);
1055
 
 
1056
 
        /**
1057
 
        * \brief Loads the properties from file
1058
 
        * \param cfg The config file
1059
 
        * \return void
1060
 
        */
1061
 
        virtual void loadProperties(KviConfig * cfg);
1062
 
 
1063
 
        /**
1064
 
        * \brief Applies the options
1065
 
        * \return void
1066
 
        */
1067
 
        virtual void applyOptions();
1068
 
 
1069
 
        /**
1070
 
        * \brief Gets the base name for log file
1071
 
        * \param szBuffer The buffer where to save data
1072
 
        * \return void
1073
 
        */
1074
 
        virtual void getBaseLogFileName(QString & szBuffer);
1075
 
 
1076
 
        /**
1077
 
        * \brief Trigger the OnChannelWindowCreated event
1078
 
        * \return void
1079
 
        */
1080
 
        virtual void triggerCreationEvents();
1081
 
 
1082
 
        /**
1083
 
        * \brief Called when we toggle bans, quiet bans, exceptions or invites editor
1084
 
        * \param ppEd The mask editor
1085
 
        * \param ppBtn The toolpage button
1086
 
        * \param l The masks list
1087
 
        * \param cFlag The type of flag
1088
 
        * \param pcEdName Tee editor name
1089
 
        * \return void
1090
 
        */
1091
 
        void toggleEditor(KviMaskEditor ** ppEd, KviWindowToolPageButton ** ppBtn, KviPointerList<KviMaskEntry> * l, char cFlag, const char * pcEdName);
1092
 
 
1093
 
        /**
1094
 
        * \brief Called when someone sets a mask in the channel's lists
1095
 
        * \param szMask The mask set
1096
 
        * \param bAdd Whether to add or remove the mask
1097
 
        * \param szSetBy Who set the mask
1098
 
        * \param uSetAt The datetime when the mask was set
1099
 
        * \param l The list of masks in the channel lists
1100
 
        * \param ppEd The mask editor window
1101
 
        * \return void
1102
 
        */
1103
 
        void internalMask(const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt, KviPointerList<KviMaskEntry> * l, KviMaskEditor ** ppEd);
1104
 
 
1105
 
        /**
1106
 
        * \brief Checks the channel synchronization time
1107
 
        * \return void
1108
 
        */
1109
 
        void checkChannelSync();
1110
 
 
1111
 
        /**
1112
 
        * \brief Splits the channel view into two views
1113
 
        *
1114
 
        * The upper one will be used to show all system messages like join,
1115
 
        * parts, quits, topics and so on, while the lower one will be used to
1116
 
        * show the users messages.
1117
 
        * \param bShow Whether to show the double view
1118
 
        * \return void
1119
 
        */
1120
 
        void showDoubleView(bool bShow);
1121
 
 
1122
 
        /**
1123
 
        * \brief Fixes the action history
1124
 
        * \return void
1125
 
        */
1126
 
        void fixActionHistory();
1127
 
 
1128
 
        /**
1129
 
        * \brief Gets the talking user stats to fill in the tooltip
1130
 
        * \param szBuffer The buffer where to store the data
1131
 
        * \param list The list of talking users
1132
 
        * \param bPast Whether the activity is recent or in the past
1133
 
        * \return void
1134
 
        */
1135
 
        void getTalkingUsersStats(QString & szBuffer, QStringList & list, bool bPast);
1136
 
 
1137
 
        /**
1138
 
        * \brief Preprocess message stripping control bytes
1139
 
        * \param szMessage The message :)
1140
 
        * \return void
1141
 
        */
1142
 
        virtual void preprocessMessage(QString & szMessage);
1143
 
 
1144
 
        virtual void resizeEvent(QResizeEvent * e);
1145
 
        virtual void closeEvent(QCloseEvent * e);
1146
 
private slots:
1147
 
        /**
1148
 
        * \brief Toggles the double view mode
1149
 
        * \return void
1150
 
        */
1151
 
        void toggleDoubleView();
1152
 
 
1153
 
        /**
1154
 
        * \brief Toggles the userlist view
1155
 
        * \return void
1156
 
        */
1157
 
        void toggleListView();
1158
 
 
1159
 
        /**
1160
 
        * \brief Toggles the ban editor
1161
 
        * \return void
1162
 
        */
1163
 
        void toggleBanEditor();
1164
 
 
1165
 
        /**
1166
 
        * \brief Toggles the ban exception editor
1167
 
        * \return void
1168
 
        */
1169
 
        void toggleBanExceptionEditor();
1170
 
 
1171
 
        /**
1172
 
        * \brief Toggles the invite editor
1173
 
        * \return void
1174
 
        */
1175
 
        void toggleInviteEditor();
1176
 
 
1177
 
        /**
1178
 
        * \brief Toggles the quiet ban editor
1179
 
        * \return void
1180
 
        */
1181
 
        void toggleQuietBanEditor();
1182
 
 
1183
 
        /**
1184
 
        * \brief Toggles the mode editor
1185
 
        * \return void
1186
 
        */
1187
 
        void toggleModeEditor();
1188
 
 
1189
 
        /**
1190
 
        * \brief Called when we close the mode editor
1191
 
        */
1192
 
        void modeSelectorDone();
1193
 
 
1194
 
        /**
1195
 
        * \brief Called when we select the topic
1196
 
        * \param szTopic The topic :)
1197
 
        * \return void
1198
 
        */
1199
 
        void topicSelected(const QString & szTopic);
1200
 
 
1201
 
        /**
1202
 
        * \brief Called when we select the modes from the mode editor
1203
 
        * \param pcMode The modes selected
1204
 
        * \return void
1205
 
        */
1206
 
        void setMode(const char * pcMode);
1207
 
 
1208
 
        /**
1209
 
        * \brief Called when we right-click the irc view.
1210
 
        *
1211
 
        * Trigger the OnChannelPopupRequest event
1212
 
        * \return void
1213
 
        */
1214
 
        void textViewRightClicked();
1215
 
 
1216
 
        /**
1217
 
        * \brief Removes the masks from the mask editor window
1218
 
        * \param pEd The mask editor
1219
 
        * \param pList The list of masks to remove
1220
 
        * \return void
1221
 
        */
1222
 
        void removeMasks(KviMaskEditor * pEd, KviPointerList<KviMaskEntry> * pList);
1223
 
 
1224
 
        /**
1225
 
        * \brief Toggles tool buttons widget over the listview
1226
 
        * \return void
1227
 
        */
1228
 
        void toggleToolButtons();
1229
 
};
1230
 
 
1231
 
#endif //_KVI_CHANNEL_H_