KVIrc 5.2.0
Developer APIs
KviChannelWindow.h
Go to the documentation of this file.
1#ifndef _KVI_CHANNEL_H_
2#define _KVI_CHANNEL_H_
3//=============================================================================
4//
5// File : KviChannelWindow.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-2011 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 option) 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
33#include "kvi_settings.h"
34#include "KviConsoleWindow.h"
35#include "KviWindow.h"
36#include "KviIrcUserDataBase.h"
37#include "KviPixmap.h"
38#include "KviUserListView.h"
39#include "KviTimeUtils.h"
40#include "KviModeWidget.h"
41
42#include <QDateTime>
43#include <QList>
44#include <QString>
45#include <QStringList>
46#include <QToolButton>
47
48#include <map>
49#include <vector>
50
52class KviIrcMask;
53class KviMaskEditor;
54class KviModeEditor;
55class KviTalHBox;
56class KviThemedLabel;
57class KviTopicWidget;
58
59#ifdef COMPILE_ON_WINDOWS
60// windows compiler wants this instead of the forward decl
61#include "KviMaskEditor.h"
62#else
63struct KviMaskEntry; // KviMaskEditor.h
64#endif
65
71#define KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT 40
72#define KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN 600
73
74#ifndef KVI_CHANNEL_AVERAGE_USERS
75#define KVI_CHANNEL_AVERAGE_USERS 101
76#endif
77
83{
84 QString szNick; // action source nick
85 unsigned int uActionType; // type of the action
86 kvi_time_t tTime; // time of the action
87 int iTemperature; // temperature of the action
88};
89
95{
96 unsigned int uActionCount; // number of actions in the history
97 bool bStatsInaccurate; // the stats are inaccurate because we have just joined the chan
98 unsigned int uLastActionTimeSpan; // the timespan between the last action and now
99 unsigned int uFirstActionTimeSpan; // the time span between the first and the last action
100 double dActionsPerMinute; // average number of actions per minute in the lastActionTimeSpan
101 unsigned int uActionsInTheLastMinute; // number of actions in the last minute
102 int iAverageActionTemperature; // the average chan temperature
103 unsigned int uHotActionCount;
104 unsigned int uHotActionPercent;
105 QStringList lTalkingUsers; // users that seem to be talking NOW
106 QStringList lWereTalkingUsers;
107};
108
114{
115 Q_OBJECT
116public:
122 {
123 HaveAllNames = 1,
124 HaveWhoList = (1 << 2),
125 DeadChan = (1 << 3),
126 SentWhoRequest = (1 << 4),
127 SentPart = (1 << 5),
128 Synchronized = (1 << 6),
129 NoCloseOnPart = (1 << 7),
130 SentSyncWhoRequest = (1 << 8)
131 };
132
138 {
139 Ice = 5,
140 VeryCold = 10,
141 Cold = 20,
142 Undefined = 30,
143 Hot = 50,
144 VeryHot = 70
145 };
146
153 KviChannelWindow(KviConsoleWindow * lpConsole, const QString & szName);
154
159
160protected:
163 QToolButton * m_pDoubleViewButton;
166 std::map<char, KviWindowToolPageButton *> m_ListEditorButtons;
167 std::map<char, KviMaskEditor *> m_ListEditors;
176 std::map<char, QString> m_szChannelParameterModes;
177 std::map<char, std::vector<KviMaskEntry *>> m_ModeLists;
179 QDateTime m_joinTime;
181 QStringList * m_pTmpHighLighted;
183 QList<KviChannelAction *> m_lActionHistory;
188
189public:
194 KviUserListView * userListView() { return m_pUserListView; };
195
200 KviTopicWidget * topicWidget() { return m_pTopicWidget; };
201
206 KviIrcView * messageView() const { return m_pMessageView; };
207
212 QFrame * buttonContainer() override { return (QFrame *)m_pButtonContainer; }
213
218 const std::vector<KviMaskEntry *> & modeMasks(char cMode) const
219 {
220 static const std::vector<KviMaskEntry *> EMPTY_VECTOR;
221 const auto it = m_ModeLists.find(cMode);
222 if(it != m_ModeLists.end())
223 return it->second;
224 return EMPTY_VECTOR;
225 };
226
231 QString * firstSelectedNickname() { return m_pUserListView->firstSelectedNickname(); };
232
237 QString * nextSelectedNickname() { return m_pUserListView->nextSelectedNickname(); };
238
243 const QString & target() override { return windowName(); }
244
249 const QString & nameWithUserFlag() { return m_szNameWithUserFlag; };
250
256 void getChannelActivityStats(KviChannelActivityStats * pStats);
257
262 int selectedCount() { return m_pUserListView->selectedCount(); };
263
268 int chanOwnerCount() { return m_pUserListView->chanOwnerCount(); };
269
274 int chanAdminCount() { return m_pUserListView->chanAdminCount(); };
275
280 int opCount() { return m_pUserListView->opCount(); };
281
286 int halfOpCount() { return m_pUserListView->halfOpCount(); };
287
292 int voiceCount() { return m_pUserListView->voiceCount(); };
293
298 int userOpCount() { return m_pUserListView->userOpCount(); };
299
304 unsigned int count() { return m_pUserListView->count(); };
305
310 size_t maskCount(char cMode) const { return this->modeMasks(cMode).size(); };
311
329 void setModeInList(char cMode, const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt, QString szChangeMask = QString());
330
335 kvi_time_t lastReceivedWhoReply() { return m_tLastReceivedWhoReply; };
336
342 void setLastReceivedWhoReply(kvi_time_t tTime) { m_tLastReceivedWhoReply = tTime; };
343
348 bool sentSyncWhoRequest() { return (m_iStateFlags & SentSyncWhoRequest); };
349
354 void setSentSyncWhoRequest() { m_iStateFlags |= SentSyncWhoRequest; };
355
360 void clearSentSyncWhoRequest() { m_iStateFlags ^= SentSyncWhoRequest; };
361
366 bool sentWhoRequest() { return (m_iStateFlags & SentWhoRequest); };
367
372 void setSentWhoRequest() { m_iStateFlags |= SentWhoRequest; };
373
378 bool sentListRequest(char cMode) { return m_szSentModeRequests.contains(cMode); };
379
384 void setSentListRequest(char cMode) { m_szSentModeRequests.append(cMode); };
385
390 void setListRequestDone(char cMode)
391 {
392 m_szSentModeRequests.remove(cMode);
393 checkChannelSync();
394 };
395
400 bool hasAllNames() { return (m_iStateFlags & HaveAllNames); };
401
407 {
408 m_iStateFlags |= HaveAllNames;
409 checkChannelSync();
410 };
411
416 bool hasInviteList() { return m_ModeLists.count('I'); };
417
422 bool hasWhoList() { return (m_iStateFlags & HaveWhoList); };
423
429 {
430 m_iStateFlags |= HaveWhoList;
431 checkChannelSync();
432 };
433
438 bool hasBanList() { return m_ModeLists.count('b'); };
439
444 bool hasBanExceptionList() { return m_ModeLists.count('e'); };
445
450 bool hasQuietBanList() { return m_ModeLists.count('q'); };
451
456 bool closeOnPart() { return !(m_iStateFlags & NoCloseOnPart); };
457
464 void partMessageSent(bool bCloseOnPart = true, bool bShowMessage = true);
465
472 bool activityMeter(unsigned int * puActivityValue, unsigned int * puActivityTemperature) override;
473
478 void setDeadChan();
479
484 bool isDeadChan() { return (m_iStateFlags & DeadChan); };
485
490 void setAliveChan();
491
498 void prependUserFlag(const QString & szNick, QString & szBuffer) { m_pUserListView->prependUserFlag(szNick, szBuffer); };
499
505 char getUserFlag(const QString & szNick) { return m_pUserListView->getUserFlag(szNick); };
506
511 QSize sizeHint() const override;
512
518 void enableUserListUpdates(bool bEnable) { m_pUserListView->enableUpdates(bEnable); };
519
528 KviUserListEntry * join(const QString & szNick, const QString & szUser = QString(), const QString & szHost = QString(), int iFlags = 0) { return m_pUserListView->join(szNick, szUser, szHost, iFlags); };
529
535 bool avatarChanged(const QString & szNick) { return m_pUserListView->avatarChanged(szNick); };
536
543 bool setChanOwner(const QString & szNick, bool bChanOwner) { return m_pUserListView->setChanOwner(szNick, bChanOwner); };
544
551 bool setChanAdmin(const QString & szNick, bool bChanAdmin) { return m_pUserListView->setChanAdmin(szNick, bChanAdmin); };
552
560 bool setOp(const QString & szNick, bool bOp, bool bIsMe);
561
568 bool setHalfOp(const QString & szNick, bool bHalfOp, bool) { return m_pUserListView->setHalfOp(szNick, bHalfOp); };
569
576 bool setVoice(const QString & szNick, bool bVoice, bool) { return m_pUserListView->setVoice(szNick, bVoice); };
577
584 bool setUserOp(const QString & szNick, bool bUserOp, bool) { return m_pUserListView->setUserOp(szNick, bUserOp); };
585
592 bool isChanOwner(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isChanOwner(szNick, bAtLeast); };
593
600 bool isChanAdmin(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isChanAdmin(szNick, bAtLeast); };
601
608 bool isOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isOp(szNick, bAtLeast); };
609
616 bool isHalfOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isHalfOp(szNick, bAtLeast); };
617
624 bool isVoice(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isVoice(szNick, bAtLeast); };
625
632 bool isUserOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isUserOp(szNick, bAtLeast); };
633
639 bool isMeIrcOp(bool bAtLeast = false);
640
646 bool isMeChanOwner(bool bAtLeast = false);
647
653 bool isMeChanAdmin(bool bAtLeast = false);
654
660 bool isMeOp(bool bAtLeast = false);
661
667 bool isMeHalfOp(bool bAtLeast = false);
668
674 bool isMeVoice(bool bAtLeast = false);
675
681 bool isMeUserOp(bool bAtLeast = false);
682
689 void userAction(KviIrcMask * user, unsigned int uActionType);
690
697 void userAction(const QString & szNick, unsigned int uActionType);
698
707 void userAction(const QString & szNick, const QString & szUser, const QString & szHost, unsigned int uActionType);
708
716 void channelAction(const QString & szNick, unsigned int uActionType, int iTemperature);
717
724 bool nickChange(const QString & szOldNick, const QString & szNewNick);
725
731 bool part(const QString & szNick);
732
738 bool isOn(const QString & szNick) { return (m_pUserListView->findEntry(szNick) != 0); };
739
745 KviUserListEntry * findEntry(const QString & szNick) { return m_pUserListView->findEntry(szNick); };
746
751 int myFlags();
752
757 void updateModeLabel();
758
765 virtual void outputMessage(int iMsgType, const QString & szMsg, const QDateTime & datetime = QDateTime());
766
773 void ownMessage(const QString & szBuffer, bool bUserFeedback = true) override;
774
780 void ownAction(const QString & szBuffer) override;
781
788 void setChannelMode(char cMode, bool bAdd);
789
794 QString plainChannelMode() { return m_szChannelMode; };
795
801 void getChannelModeString(QString & szBuffer);
802
808 QString getChannelModeStringWithEmbeddedParams();
809
816 void setChannelModeWithParam(char cMode, QString & szParam);
817
823 bool hasChannelMode(char cMode) { return m_szChannelParameterModes.count(cMode); };
824
830 QString channelModeParam(char cMode) const
831 {
832 const auto it = m_szChannelParameterModes.find(cMode);
833 if(it != m_szChannelParameterModes.end())
834 return it->second;
835 return QString();
836 };
837
843 void addHighlightedUser(const QString & szNick);
844
850 void removeHighlightedUser(const QString & szNick);
851
857 bool isHighlightedUser(const QString & szNick) { return m_pTmpHighLighted->contains(szNick, Qt::CaseInsensitive); };
858
863 void lostUserFocus() override;
864
870 void getWindowListTipText(QString & szBuffer) override;
871
876 void unhighlight();
877
882 KviIrcConnectionServerInfo * serverInfo();
883
888 void checkChannelSync();
889
897 KviIrcView * lastClickedView() const override;
898
899protected:
906 bool eventFilter(QObject * pObject, QEvent * pEvent) override;
907
912 QPixmap * myIconPtr() override;
913
918 void fillCaptionBuffers() override;
919
925 void getConfigGroupName(QString & szBuffer) override;
926
932 void saveProperties(KviConfigurationFile * pCfg) override;
933
939 void loadProperties(KviConfigurationFile * pCfg) override;
940
945 void applyOptions() override;
946
952 void getBaseLogFileName(QString & szBuffer) override;
953
958 void triggerCreationEvents() override;
959
971 void internalMask(const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt, std::vector<KviMaskEntry *> & l, KviMaskEditor ** ppEd, QString & szChangeMask);
972
982 void showDoubleView(bool bShow);
983
988 void fixActionHistory();
989
997 void getTalkingUsersStats(QString & szBuffer, QStringList & list, bool bPast);
998
1004 void preprocessMessage(QString & szMessage) override;
1005
1006 void resizeEvent(QResizeEvent *) override;
1007 void closeEvent(QCloseEvent * pEvent) override;
1008public slots:
1013 void toggleDoubleView();
1014
1015private slots:
1020 void toggleListView();
1021
1026 void toggleListModeEditor();
1027
1032 void toggleModeEditor();
1033
1037 void modeSelectorDone();
1038
1044 void topicSelected(const QString & szTopic);
1045
1051 void setMode(const QString & szMode);
1052
1059 void textViewRightClicked();
1060
1067 void removeMasks(KviMaskEditor * pEd, const std::vector<KviMaskEntry *> & pList);
1068
1073 void toggleToolButtons();
1074
1075signals:
1081};
1082
1083#endif //_KVI_CHANNEL_H_
User DB handling.
#define KviTalSplitter
Definition KviTalSplitter.h:34
Time management.
#define kvi_time_t
Definition KviTimeUtils.h:43
User list view management.
Contains the KviWindow class.
The class which manages a channel.
Definition KviChannelWindow.h:114
const QString & nameWithUserFlag()
Returns the name of the channel with user flags.
Definition KviChannelWindow.h:249
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flag to the nickname.
Definition KviChannelWindow.h:498
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a half operator.
Definition KviChannelWindow.h:616
void setSentWhoRequest()
Sets the WHO request flag.
Definition KviChannelWindow.h:372
bool hasChannelMode(char cMode)
Returns true if the channel has a mode with parameter set (eg. mode k)
Definition KviChannelWindow.h:823
QString m_szSentModeRequests
Definition KviChannelWindow.h:174
QString channelModeParam(char cMode) const
Returns the value (parameter) for a channel mode (eg. the password for mode k)
Definition KviChannelWindow.h:830
ActivityLimit
Holds the limits of the activity in a channel.
Definition KviChannelWindow.h:138
bool sentSyncWhoRequest()
Returns true if we have sent the sync WHO request.
Definition KviChannelWindow.h:348
void setSentSyncWhoRequest()
Sets the sync WHO request flag.
Definition KviChannelWindow.h:354
bool hasQuietBanList()
Returns true if the channel has a quiet ban list.
Definition KviChannelWindow.h:450
bool setVoice(const QString &szNick, bool bVoice, bool)
Sets the voice mode.
Definition KviChannelWindow.h:576
bool hasBanList()
Returns true if the channel has a ban list.
Definition KviChannelWindow.h:438
KviIrcView * messageView() const
Returns the irc view object.
Definition KviChannelWindow.h:206
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
Definition KviChannelWindow.h:600
bool isDeadChan()
Returns true if the channel is dead.
Definition KviChannelWindow.h:484
QDateTime m_joinTime
Definition KviChannelWindow.h:179
QString m_szChannelMode
Definition KviChannelWindow.h:175
bool isOn(const QString &szNick)
Returns true if the user is on the channel.
Definition KviChannelWindow.h:738
kvi_time_t lastReceivedWhoReply()
Returns the time of the last received WHO reply.
Definition KviChannelWindow.h:335
KviWindowToolPageButton * m_pModeEditorButton
Definition KviChannelWindow.h:165
bool setHalfOp(const QString &szNick, bool bHalfOp, bool)
Sets the half operator mode.
Definition KviChannelWindow.h:568
size_t maskCount(char cMode) const
Returns the number of masks is a channel mode list.
Definition KviChannelWindow.h:310
int chanOwnerCount()
Returns the number of users with chanowner status.
Definition KviChannelWindow.h:268
QString m_szNameWithUserFlag
Definition KviChannelWindow.h:180
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
Definition KviChannelWindow.h:592
StateFlag
Holds the state flags of the channel.
Definition KviChannelWindow.h:122
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
Definition KviChannelWindow.h:608
QString plainChannelMode()
Returns only the plain (parameter-less) channel modes (eg: mi)
Definition KviChannelWindow.h:794
const std::vector< KviMaskEntry * > & modeMasks(char cMode) const
Returns a list of masks for a specific mode.
Definition KviChannelWindow.h:218
QList< int > m_SplitterSizesList
Definition KviChannelWindow.h:186
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
Definition KviChannelWindow.h:632
KviUserListView * m_pUserListView
Definition KviChannelWindow.h:171
KviPixmap m_privateBackground
Definition KviChannelWindow.h:178
KviIrcView * m_pMessageView
Definition KviChannelWindow.h:169
bool isMeIrcOp(bool bAtLeast=false)
Returns true if we are an ircop.
KviTalHBox * m_pButtonContainer
Definition KviChannelWindow.h:187
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
Definition KviChannelWindow.h:543
bool isMeChanOwner(bool bAtLeast=false)
Returns true if we are a chan owner.
bool isMeOp(bool bAtLeast=false)
Returns true if we are an operator.
bool setChanAdmin(const QString &szNick, bool bChanAdmin)
Sets the chan admin mode.
Definition KviChannelWindow.h:551
KviTalSplitter * m_pVertSplitter
Definition KviChannelWindow.h:162
void setSentListRequest(char cMode)
Sets the "sent request" flag for a specific channel mode.
Definition KviChannelWindow.h:384
bool hasAllNames()
Returns true if the channel has all names.
Definition KviChannelWindow.h:400
QStringList * m_pTmpHighLighted
Definition KviChannelWindow.h:181
const QString & target() override
Returns the name of the channel.
Definition KviChannelWindow.h:243
QList< KviChannelAction * > m_lActionHistory
Definition KviChannelWindow.h:183
void setHasWhoList()
Sets the existence of the WHO list.
Definition KviChannelWindow.h:428
void setListRequestDone(char cMode)
Clears the "sent request" flag for a specific chanel mode.
Definition KviChannelWindow.h:390
KviTalSplitter * m_pTopSplitter
Definition KviChannelWindow.h:161
bool isHighlightedUser(const QString &szNick)
Returns true if the user is highlighted.
Definition KviChannelWindow.h:857
bool closeOnPart()
Returns true if the channel has to be closed on part.
Definition KviChannelWindow.h:456
void setLastReceivedWhoReply(kvi_time_t tTime)
Sets the time of the last received WHO reply.
Definition KviChannelWindow.h:342
kvi_time_t m_tLastReceivedWhoReply
Definition KviChannelWindow.h:184
int halfOpCount()
Returns the number of users with halfop status.
Definition KviChannelWindow.h:286
bool isMeVoice(bool bAtLeast=false)
Returns true if we are a voice.
KviUserListView * userListView()
Returns the user listview object.
Definition KviChannelWindow.h:194
void opStatusChanged()
Emitted when our op status change.
QString * firstSelectedNickname()
Returns the first selected nickname in the userlist.
Definition KviChannelWindow.h:231
void clearSentSyncWhoRequest()
Clears the sync WHO request flag.
Definition KviChannelWindow.h:360
bool hasWhoList()
Returns true if the channel has a WHO list.
Definition KviChannelWindow.h:422
QList< int > m_VertSplitterSizesList
Definition KviChannelWindow.h:185
std::map< char, std::vector< KviMaskEntry * > > m_ModeLists
Definition KviChannelWindow.h:177
int userOpCount()
Returns the number of users with userop status.
Definition KviChannelWindow.h:298
KviTopicWidget * topicWidget()
Returns the topic widget object.
Definition KviChannelWindow.h:200
KviUserListEntry * join(const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
Called when a user joins the channel.
Definition KviChannelWindow.h:528
int selectedCount()
Returns the number of selected users.
Definition KviChannelWindow.h:262
void setHasAllNames()
Sets the existence of all names.
Definition KviChannelWindow.h:406
KviUserListEntry * findEntry(const QString &szNick)
Searches for a user in the userlist.
Definition KviChannelWindow.h:745
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviChannelWindow.h:535
bool hasInviteList()
Returns true if the channel has an invite list.
Definition KviChannelWindow.h:416
bool isMeHalfOp(bool bAtLeast=false)
Returns true if we are a half operator.
KviTopicWidget * m_pTopicWidget
Definition KviChannelWindow.h:170
KviWindowToolPageButton * m_pListViewButton
Definition KviChannelWindow.h:164
QString * nextSelectedNickname()
Returns the next selected nickname in the userlist.
Definition KviChannelWindow.h:237
QToolButton * m_pDoubleViewButton
Definition KviChannelWindow.h:163
KviModeEditor * m_pModeEditor
Definition KviChannelWindow.h:168
unsigned int m_uActionHistoryHotActionCount
Definition KviChannelWindow.h:182
bool isMeUserOp(bool bAtLeast=false)
Returns true if we are a user operator.
int voiceCount()
Returns the number of users with voice status.
Definition KviChannelWindow.h:292
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
Definition KviChannelWindow.h:624
bool isMeChanAdmin(bool bAtLeast=false)
Returns true if we are a chan admin.
bool sentListRequest(char cMode)
Returns true if we have sent a list request for a specific channel mode.
Definition KviChannelWindow.h:378
bool sentWhoRequest()
Returns true if we have sent the WHO request.
Definition KviChannelWindow.h:366
int opCount()
Returns the number of users with op status.
Definition KviChannelWindow.h:280
QFrame * buttonContainer() override
Returns the button container object.
Definition KviChannelWindow.h:212
bool setUserOp(const QString &szNick, bool bUserOp, bool)
Sets the user operator mode.
Definition KviChannelWindow.h:584
int chanAdminCount()
Returns the number of users with chanadmin status.
Definition KviChannelWindow.h:274
KviModeWidget * m_pModeWidget
Definition KviChannelWindow.h:172
bool hasBanExceptionList()
Returns true if the channel has a ban exception list.
Definition KviChannelWindow.h:444
std::map< char, KviWindowToolPageButton * > m_ListEditorButtons
Definition KviChannelWindow.h:166
unsigned int count()
Returns the number of users.
Definition KviChannelWindow.h:304
std::map< char, QString > m_szChannelParameterModes
Definition KviChannelWindow.h:176
int m_iStateFlags
Definition KviChannelWindow.h:173
void enableUserListUpdates(bool bEnable)
Enables or disable the userlist updates.
Definition KviChannelWindow.h:518
std::map< char, KviMaskEditor * > m_ListEditors
Definition KviChannelWindow.h:167
char getUserFlag(const QString &szNick)
Returns the flag of a user.
Definition KviChannelWindow.h:505
Definition KviConfigurationFile.h:50
Definition KviConsoleWindow.h:74
Definition KviIrcConnectionServerInfo.h:300
Irc user mask handling.
Definition KviIrcMask.h:48
Definition KviIrcView.h:60
Definition KviMaskEditor.h:97
Definition KviModeEditor.h:44
Definition KviModeWidget.h:35
Definition KviPixmap.h:35
Toolkit Abstraction Layer: hbox class.
Definition KviTalHBox.h:44
Definition KviThemedLabel.h:34
Definition KviTopicWidget.h:68
Userlist entry management class.
Definition KviUserListView.h:134
User list view management class.
Definition KviUserListView.h:226
bool setVoice(const QString &szNick, bool bVoice)
Sets the voice mode.
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
int userOpCount()
Returns the number of user operators.
Definition KviUserListView.h:390
QString * firstSelectedNickname()
Returns the first selected nickname in the list.
Definition KviUserListView.cpp:1161
int voiceCount()
Returns the number of voices.
Definition KviUserListView.h:384
int selectedCount()
Returns the number of selected entries in the userlist.
Definition KviUserListView.h:348
KviUserListEntry * findEntry(const QString &szNick)
Searches an entry in the userlist.
Definition KviUserListView.h:399
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
bool setHalfOp(const QString &szNick, bool bHalfOp)
Sets the half operator mode.
bool setUserOp(const QString &szNick, bool bUserOp)
Sets the user operator mode.
int chanOwnerCount()
Returns the number of chan owners.
Definition KviUserListView.h:360
int chanAdminCount()
Returns the number of chan admins.
Definition KviUserListView.h:366
KviUserListEntry * join(const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
Called when a user joins the channel.
Definition KviUserListView.cpp:834
QString * nextSelectedNickname()
Returns the next selected nickname in the list.
Definition KviUserListView.cpp:1177
int halfOpCount()
Returns the number of half operators.
Definition KviUserListView.h:378
int opCount()
Returns the number of operators.
Definition KviUserListView.h:372
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
void enableUpdates(bool bEnable)
Enables the updates on the view list area.
Definition KviUserListView.cpp:385
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flags before the nickname.
Definition KviUserListView.cpp:1102
unsigned int count()
Returns the number of the entries in the userlist.
Definition KviUserListView.h:342
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an half operator.
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviUserListView.cpp:889
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
char getUserFlag(KviUserListEntry *pEntry)
Returns the flags of a user.
Definition KviUserListView.cpp:1094
bool setChanAdmin(const QString &szNick, bool bChanAdmin)
Sets the chan admin mode.
Definition KviWindowToolWidget.h:47
Base class for all windows in KVIrc.
Definition KviWindow.h:75
virtual void loadProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:596
bool eventFilter(QObject *pObject, QEvent *pEvent) override
Definition KviWindow.cpp:1007
virtual void preprocessMessage(QString &szMessage)
Definition KviWindow.cpp:1327
const QString & windowName() const
Returns the name of this window.
Definition KviWindow.h:228
virtual KviIrcView * lastClickedView() const
Returns the KviIrcView that was last clicked in this window.
Definition KviWindow.h:291
virtual void applyOptions()
Definition KviWindow.cpp:1137
virtual QPixmap * myIconPtr()
Definition KviWindow.cpp:627
virtual void triggerCreationEvents()
Definition KviWindow.h:468
virtual void getWindowListTipText(QString &szBuffer)
Definition KviWindow.h:357
virtual void fillCaptionBuffers()
Definition KviWindow.cpp:632
virtual void saveProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:570
virtual void lostUserFocus()
Definition KviWindow.cpp:1157
virtual void ownAction(const QString &)
Definition KviWindow.h:391
virtual void ownMessage(const QString &, bool=true)
Definition KviWindow.h:390
virtual void getBaseLogFileName(QString &szBuffer)
Definition KviWindow.cpp:565
void closeEvent(QCloseEvent *pEvent) override
Definition KviWindow.cpp:866
void unhighlight()
Definition KviWindow.cpp:1320
virtual void getConfigGroupName(QString &szBuffer)
Definition KviWindow.cpp:498
virtual bool activityMeter(unsigned int *puActivityValue, unsigned int *puActivityTemperature)
Definition KviWindow.cpp:282
#define l
Definition detector.cpp:77
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
QString szHost
Definition libkvisetup.cpp:48
Definition KviChannelWindow.h:83
QString szNick
Definition KviChannelWindow.h:84
int iTemperature
Definition KviChannelWindow.h:87
unsigned int uActionType
Definition KviChannelWindow.h:85
kvi_time_t tTime
Definition KviChannelWindow.h:86
Definition KviChannelWindow.h:95
bool bStatsInaccurate
Definition KviChannelWindow.h:97
unsigned int uHotActionPercent
Definition KviChannelWindow.h:104
unsigned int uActionsInTheLastMinute
Definition KviChannelWindow.h:101
QStringList lTalkingUsers
Definition KviChannelWindow.h:105
unsigned int uHotActionCount
Definition KviChannelWindow.h:103
double dActionsPerMinute
Definition KviChannelWindow.h:100
QStringList lWereTalkingUsers
Definition KviChannelWindow.h:106
unsigned int uLastActionTimeSpan
Definition KviChannelWindow.h:98
unsigned int uFirstActionTimeSpan
Definition KviChannelWindow.h:99
int iAverageActionTemperature
Definition KviChannelWindow.h:102
unsigned int uActionCount
Definition KviChannelWindow.h:96
Definition KviMaskEditor.h:44
char szBuffer[4096]
Definition winamp.cpp:77