KVIrc 5.2.4
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 "KviMaskEditor.h"
38#include "KviPixmap.h"
39#include "KviUserListView.h"
40#include "KviTimeUtils.h"
41#include "KviModeWidget.h"
42
43#include <QDateTime>
44#include <QList>
45#include <QString>
46#include <QStringList>
47#include <QToolButton>
48
49#include <map>
50#include <vector>
51
53class KviIrcMask;
54class KviMaskEditor;
55class KviModeEditor;
56class KviTalHBox;
57class KviThemedLabel;
58class KviTopicWidget;
59
65#define KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT 40
66#define KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN 600
67
68#ifndef KVI_CHANNEL_AVERAGE_USERS
69#define KVI_CHANNEL_AVERAGE_USERS 101
70#endif
71
77{
78 QString szNick; // action source nick
79 unsigned int uActionType; // type of the action
80 kvi_time_t tTime; // time of the action
81 int iTemperature; // temperature of the action
82};
83
89{
90 unsigned int uActionCount; // number of actions in the history
91 bool bStatsInaccurate; // the stats are inaccurate because we have just joined the chan
92 unsigned int uLastActionTimeSpan; // the timespan between the last action and now
93 unsigned int uFirstActionTimeSpan; // the time span between the first and the last action
94 double dActionsPerMinute; // average number of actions per minute in the lastActionTimeSpan
95 unsigned int uActionsInTheLastMinute; // number of actions in the last minute
96 int iAverageActionTemperature; // the average chan temperature
97 unsigned int uHotActionCount;
98 unsigned int uHotActionPercent;
99 QStringList lTalkingUsers; // users that seem to be talking NOW
100 QStringList lWereTalkingUsers;
101};
102
108{
109 Q_OBJECT
110public:
116 {
117 HaveAllNames = 1,
118 HaveWhoList = (1 << 2),
119 DeadChan = (1 << 3),
120 SentWhoRequest = (1 << 4),
121 SentPart = (1 << 5),
122 Synchronized = (1 << 6),
123 NoCloseOnPart = (1 << 7),
124 SentSyncWhoRequest = (1 << 8)
125 };
126
132 {
133 Ice = 5,
134 VeryCold = 10,
135 Cold = 20,
136 Undefined = 30,
137 Hot = 50,
138 VeryHot = 70
139 };
140
147 KviChannelWindow(KviConsoleWindow * lpConsole, const QString & szName);
148
153
154protected:
157 QToolButton * m_pDoubleViewButton;
160 std::map<char, KviWindowToolPageButton *> m_ListEditorButtons;
161 std::map<char, KviMaskEditor *> m_ListEditors;
170 std::map<char, QString> m_szChannelParameterModes;
171 std::map<char, std::vector<KviMaskEntry *>> m_ModeLists;
173 QDateTime m_joinTime;
175 QStringList * m_pTmpHighLighted;
177 QList<KviChannelAction *> m_lActionHistory;
182
183public:
188 KviUserListView * userListView() { return m_pUserListView; };
189
194 KviTopicWidget * topicWidget() { return m_pTopicWidget; };
195
200 KviIrcView * messageView() const { return m_pMessageView; };
201
206 QFrame * buttonContainer() override { return (QFrame *)m_pButtonContainer; }
207
212 const std::vector<KviMaskEntry *> & modeMasks(char cMode) const
213 {
214 static const std::vector<KviMaskEntry *> EMPTY_VECTOR;
215 const auto it = m_ModeLists.find(cMode);
216 if(it != m_ModeLists.end())
217 return it->second;
218 return EMPTY_VECTOR;
219 };
220
225 QString * firstSelectedNickname() { return m_pUserListView->firstSelectedNickname(); };
226
231 QString * nextSelectedNickname() { return m_pUserListView->nextSelectedNickname(); };
232
237 const QString & target() override { return windowName(); }
238
243 const QString & nameWithUserFlag() { return m_szNameWithUserFlag; };
244
250 void getChannelActivityStats(KviChannelActivityStats * pStats);
251
256 int selectedCount() { return m_pUserListView->selectedCount(); };
257
262 int chanOwnerCount() { return m_pUserListView->chanOwnerCount(); };
263
268 int chanAdminCount() { return m_pUserListView->chanAdminCount(); };
269
274 int opCount() { return m_pUserListView->opCount(); };
275
280 int halfOpCount() { return m_pUserListView->halfOpCount(); };
281
286 int voiceCount() { return m_pUserListView->voiceCount(); };
287
292 int userOpCount() { return m_pUserListView->userOpCount(); };
293
298 unsigned int count() { return m_pUserListView->count(); };
299
304 size_t maskCount(char cMode) const { return this->modeMasks(cMode).size(); };
305
323 void setModeInList(char cMode, const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt, QString szChangeMask = QString());
324
329 kvi_time_t lastReceivedWhoReply() { return m_tLastReceivedWhoReply; };
330
336 void setLastReceivedWhoReply(kvi_time_t tTime) { m_tLastReceivedWhoReply = tTime; };
337
342 bool sentSyncWhoRequest() { return (m_iStateFlags & SentSyncWhoRequest); };
343
348 void setSentSyncWhoRequest() { m_iStateFlags |= SentSyncWhoRequest; };
349
354 void clearSentSyncWhoRequest() { m_iStateFlags ^= SentSyncWhoRequest; };
355
360 bool sentWhoRequest() { return (m_iStateFlags & SentWhoRequest); };
361
366 void setSentWhoRequest() { m_iStateFlags |= SentWhoRequest; };
367
372 bool sentListRequest(char cMode) { return m_szSentModeRequests.contains(cMode); };
373
378 void setSentListRequest(char cMode) { m_szSentModeRequests.append(cMode); };
379
384 void setListRequestDone(char cMode)
385 {
386 m_szSentModeRequests.remove(cMode);
387 checkChannelSync();
388 };
389
394 bool hasAllNames() { return (m_iStateFlags & HaveAllNames); };
395
401 {
402 m_iStateFlags |= HaveAllNames;
403 checkChannelSync();
404 };
405
410 bool hasInviteList() { return m_ModeLists.count('I'); };
411
416 bool hasWhoList() { return (m_iStateFlags & HaveWhoList); };
417
423 {
424 m_iStateFlags |= HaveWhoList;
425 checkChannelSync();
426 };
427
432 bool hasBanList() { return m_ModeLists.count('b'); };
433
438 bool hasBanExceptionList() { return m_ModeLists.count('e'); };
439
444 bool hasQuietBanList() { return m_ModeLists.count('q'); };
445
450 bool closeOnPart() { return !(m_iStateFlags & NoCloseOnPart); };
451
458 void partMessageSent(bool bCloseOnPart = true, bool bShowMessage = true);
459
466 bool activityMeter(unsigned int * puActivityValue, unsigned int * puActivityTemperature) override;
467
472 void setDeadChan();
473
478 bool isDeadChan() { return (m_iStateFlags & DeadChan); };
479
484 void setAliveChan();
485
492 void prependUserFlag(const QString & szNick, QString & szBuffer) { m_pUserListView->prependUserFlag(szNick, szBuffer); };
493
499 char getUserFlag(const QString & szNick) { return m_pUserListView->getUserFlag(szNick); };
500
505 QSize sizeHint() const override;
506
512 void enableUserListUpdates(bool bEnable) { m_pUserListView->enableUpdates(bEnable); };
513
522 KviUserListEntry * join(const QString & szNick, const QString & szUser = QString(), const QString & szHost = QString(), int iFlags = 0) { return m_pUserListView->join(szNick, szUser, szHost, iFlags); };
523
529 bool avatarChanged(const QString & szNick) { return m_pUserListView->avatarChanged(szNick); };
530
537 bool setChanOwner(const QString & szNick, bool bChanOwner) { return m_pUserListView->setChanOwner(szNick, bChanOwner); };
538
545 bool setChanAdmin(const QString & szNick, bool bChanAdmin) { return m_pUserListView->setChanAdmin(szNick, bChanAdmin); };
546
554 bool setOp(const QString & szNick, bool bOp, bool bIsMe);
555
562 bool setHalfOp(const QString & szNick, bool bHalfOp, bool) { return m_pUserListView->setHalfOp(szNick, bHalfOp); };
563
570 bool setVoice(const QString & szNick, bool bVoice, bool) { return m_pUserListView->setVoice(szNick, bVoice); };
571
578 bool setUserOp(const QString & szNick, bool bUserOp, bool) { return m_pUserListView->setUserOp(szNick, bUserOp); };
579
586 bool isChanOwner(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isChanOwner(szNick, bAtLeast); };
587
594 bool isChanAdmin(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isChanAdmin(szNick, bAtLeast); };
595
602 bool isOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isOp(szNick, bAtLeast); };
603
610 bool isHalfOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isHalfOp(szNick, bAtLeast); };
611
618 bool isVoice(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isVoice(szNick, bAtLeast); };
619
626 bool isUserOp(const QString & szNick, bool bAtLeast = false) { return m_pUserListView->isUserOp(szNick, bAtLeast); };
627
633 bool isMeIrcOp(bool bAtLeast = false);
634
640 bool isMeChanOwner(bool bAtLeast = false);
641
647 bool isMeChanAdmin(bool bAtLeast = false);
648
654 bool isMeOp(bool bAtLeast = false);
655
661 bool isMeHalfOp(bool bAtLeast = false);
662
668 bool isMeVoice(bool bAtLeast = false);
669
675 bool isMeUserOp(bool bAtLeast = false);
676
683 void userAction(KviIrcMask * user, unsigned int uActionType);
684
691 void userAction(const QString & szNick, unsigned int uActionType);
692
701 void userAction(const QString & szNick, const QString & szUser, const QString & szHost, unsigned int uActionType);
702
710 void channelAction(const QString & szNick, unsigned int uActionType, int iTemperature);
711
718 bool nickChange(const QString & szOldNick, const QString & szNewNick);
719
725 bool part(const QString & szNick);
726
732 bool isOn(const QString & szNick) { return (m_pUserListView->findEntry(szNick) != 0); };
733
739 KviUserListEntry * findEntry(const QString & szNick) { return m_pUserListView->findEntry(szNick); };
740
745 int myFlags();
746
751 void updateModeLabel();
752
759 virtual void outputMessage(int iMsgType, const QString & szMsg, const QDateTime & datetime = QDateTime());
760
767 void ownMessage(const QString & szBuffer, bool bUserFeedback = true) override;
768
774 void ownAction(const QString & szBuffer) override;
775
782 void setChannelMode(char cMode, bool bAdd);
783
788 QString plainChannelMode() { return m_szChannelMode; };
789
795 void getChannelModeString(QString & szBuffer);
796
802 QString getChannelModeStringWithEmbeddedParams();
803
810 void setChannelModeWithParam(char cMode, QString & szParam);
811
817 bool hasChannelMode(char cMode) { return m_szChannelParameterModes.count(cMode); };
818
824 QString channelModeParam(char cMode) const
825 {
826 const auto it = m_szChannelParameterModes.find(cMode);
827 if(it != m_szChannelParameterModes.end())
828 return it->second;
829 return QString();
830 };
831
837 void addHighlightedUser(const QString & szNick);
838
844 void removeHighlightedUser(const QString & szNick);
845
851 bool isHighlightedUser(const QString & szNick) { return m_pTmpHighLighted->contains(szNick, Qt::CaseInsensitive); };
852
857 void lostUserFocus() override;
858
864 void getWindowListTipText(QString & szBuffer) override;
865
870 void unhighlight();
871
876 KviIrcConnectionServerInfo * serverInfo();
877
882 void checkChannelSync();
883
891 KviIrcView * lastClickedView() const override;
892
893protected:
900 bool eventFilter(QObject * pObject, QEvent * pEvent) override;
901
906 QPixmap * myIconPtr() override;
907
912 void fillCaptionBuffers() override;
913
919 void getConfigGroupName(QString & szBuffer) override;
920
926 void saveProperties(KviConfigurationFile * pCfg) override;
927
933 void loadProperties(KviConfigurationFile * pCfg) override;
934
939 void applyOptions() override;
940
946 void getBaseLogFileName(QString & szBuffer) override;
947
952 void triggerCreationEvents() override;
953
965 void internalMask(const QString & szMask, bool bAdd, const QString & szSetBy, unsigned int uSetAt, std::vector<KviMaskEntry *> & l, KviMaskEditor ** ppEd, QString & szChangeMask);
966
976 void showDoubleView(bool bShow);
977
982 void fixActionHistory();
983
991 void getTalkingUsersStats(QString & szBuffer, QStringList & list, bool bPast);
992
998 void preprocessMessage(QString & szMessage) override;
999
1000 void resizeEvent(QResizeEvent *) override;
1001 void closeEvent(QCloseEvent * pEvent) override;
1002public slots:
1007 void toggleDoubleView();
1008
1009private slots:
1014 void toggleListView();
1015
1020 void toggleListModeEditor();
1021
1026 void toggleModeEditor();
1027
1031 void modeSelectorDone();
1032
1038 void topicSelected(const QString & szTopic);
1039
1045 void setMode(const QString & szMode);
1046
1053 void textViewRightClicked();
1054
1061 void removeMasks(KviMaskEditor * pEd, const std::vector<KviMaskEntry *> & pList);
1062
1067 void toggleToolButtons();
1068
1069signals:
1075};
1076
1077#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:108
const QString & nameWithUserFlag()
Returns the name of the channel with user flags.
Definition KviChannelWindow.h:243
void prependUserFlag(const QString &szNick, QString &szBuffer)
Prepends the user flag to the nickname.
Definition KviChannelWindow.h:492
bool isHalfOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a half operator.
Definition KviChannelWindow.h:610
void setSentWhoRequest()
Sets the WHO request flag.
Definition KviChannelWindow.h:366
bool hasChannelMode(char cMode)
Returns true if the channel has a mode with parameter set (eg. mode k)
Definition KviChannelWindow.h:817
QString m_szSentModeRequests
Definition KviChannelWindow.h:168
QString channelModeParam(char cMode) const
Returns the value (parameter) for a channel mode (eg. the password for mode k)
Definition KviChannelWindow.h:824
ActivityLimit
Holds the limits of the activity in a channel.
Definition KviChannelWindow.h:132
bool sentSyncWhoRequest()
Returns true if we have sent the sync WHO request.
Definition KviChannelWindow.h:342
void setSentSyncWhoRequest()
Sets the sync WHO request flag.
Definition KviChannelWindow.h:348
bool hasQuietBanList()
Returns true if the channel has a quiet ban list.
Definition KviChannelWindow.h:444
bool setVoice(const QString &szNick, bool bVoice, bool)
Sets the voice mode.
Definition KviChannelWindow.h:570
bool hasBanList()
Returns true if the channel has a ban list.
Definition KviChannelWindow.h:432
KviIrcView * messageView() const
Returns the irc view object.
Definition KviChannelWindow.h:200
bool isChanAdmin(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan admin.
Definition KviChannelWindow.h:594
bool isDeadChan()
Returns true if the channel is dead.
Definition KviChannelWindow.h:478
QDateTime m_joinTime
Definition KviChannelWindow.h:173
QString m_szChannelMode
Definition KviChannelWindow.h:169
bool isOn(const QString &szNick)
Returns true if the user is on the channel.
Definition KviChannelWindow.h:732
kvi_time_t lastReceivedWhoReply()
Returns the time of the last received WHO reply.
Definition KviChannelWindow.h:329
KviWindowToolPageButton * m_pModeEditorButton
Definition KviChannelWindow.h:159
bool setHalfOp(const QString &szNick, bool bHalfOp, bool)
Sets the half operator mode.
Definition KviChannelWindow.h:562
size_t maskCount(char cMode) const
Returns the number of masks is a channel mode list.
Definition KviChannelWindow.h:304
int chanOwnerCount()
Returns the number of users with chanowner status.
Definition KviChannelWindow.h:262
QString m_szNameWithUserFlag
Definition KviChannelWindow.h:174
bool isChanOwner(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a chan owner.
Definition KviChannelWindow.h:586
StateFlag
Holds the state flags of the channel.
Definition KviChannelWindow.h:116
bool isOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is an operator.
Definition KviChannelWindow.h:602
QString plainChannelMode()
Returns only the plain (parameter-less) channel modes (eg: mi)
Definition KviChannelWindow.h:788
const std::vector< KviMaskEntry * > & modeMasks(char cMode) const
Returns a list of masks for a specific mode.
Definition KviChannelWindow.h:212
QList< int > m_SplitterSizesList
Definition KviChannelWindow.h:180
bool isUserOp(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a user operator.
Definition KviChannelWindow.h:626
KviUserListView * m_pUserListView
Definition KviChannelWindow.h:165
KviPixmap m_privateBackground
Definition KviChannelWindow.h:172
KviIrcView * m_pMessageView
Definition KviChannelWindow.h:163
bool isMeIrcOp(bool bAtLeast=false)
Returns true if we are an ircop.
KviTalHBox * m_pButtonContainer
Definition KviChannelWindow.h:181
bool setChanOwner(const QString &szNick, bool bChanOwner)
Sets the chan owner mode.
Definition KviChannelWindow.h:537
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:545
KviTalSplitter * m_pVertSplitter
Definition KviChannelWindow.h:156
void setSentListRequest(char cMode)
Sets the "sent request" flag for a specific channel mode.
Definition KviChannelWindow.h:378
bool hasAllNames()
Returns true if the channel has all names.
Definition KviChannelWindow.h:394
QStringList * m_pTmpHighLighted
Definition KviChannelWindow.h:175
const QString & target() override
Returns the name of the channel.
Definition KviChannelWindow.h:237
QList< KviChannelAction * > m_lActionHistory
Definition KviChannelWindow.h:177
void setHasWhoList()
Sets the existence of the WHO list.
Definition KviChannelWindow.h:422
void setListRequestDone(char cMode)
Clears the "sent request" flag for a specific chanel mode.
Definition KviChannelWindow.h:384
KviTalSplitter * m_pTopSplitter
Definition KviChannelWindow.h:155
bool isHighlightedUser(const QString &szNick)
Returns true if the user is highlighted.
Definition KviChannelWindow.h:851
bool closeOnPart()
Returns true if the channel has to be closed on part.
Definition KviChannelWindow.h:450
void setLastReceivedWhoReply(kvi_time_t tTime)
Sets the time of the last received WHO reply.
Definition KviChannelWindow.h:336
kvi_time_t m_tLastReceivedWhoReply
Definition KviChannelWindow.h:178
int halfOpCount()
Returns the number of users with halfop status.
Definition KviChannelWindow.h:280
bool isMeVoice(bool bAtLeast=false)
Returns true if we are a voice.
KviUserListView * userListView()
Returns the user listview object.
Definition KviChannelWindow.h:188
void opStatusChanged()
Emitted when our op status change.
QString * firstSelectedNickname()
Returns the first selected nickname in the userlist.
Definition KviChannelWindow.h:225
void clearSentSyncWhoRequest()
Clears the sync WHO request flag.
Definition KviChannelWindow.h:354
bool hasWhoList()
Returns true if the channel has a WHO list.
Definition KviChannelWindow.h:416
QList< int > m_VertSplitterSizesList
Definition KviChannelWindow.h:179
std::map< char, std::vector< KviMaskEntry * > > m_ModeLists
Definition KviChannelWindow.h:171
int userOpCount()
Returns the number of users with userop status.
Definition KviChannelWindow.h:292
KviTopicWidget * topicWidget()
Returns the topic widget object.
Definition KviChannelWindow.h:194
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:522
int selectedCount()
Returns the number of selected users.
Definition KviChannelWindow.h:256
void setHasAllNames()
Sets the existence of all names.
Definition KviChannelWindow.h:400
KviUserListEntry * findEntry(const QString &szNick)
Searches for a user in the userlist.
Definition KviChannelWindow.h:739
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviChannelWindow.h:529
bool hasInviteList()
Returns true if the channel has an invite list.
Definition KviChannelWindow.h:410
bool isMeHalfOp(bool bAtLeast=false)
Returns true if we are a half operator.
KviTopicWidget * m_pTopicWidget
Definition KviChannelWindow.h:164
KviWindowToolPageButton * m_pListViewButton
Definition KviChannelWindow.h:158
QString * nextSelectedNickname()
Returns the next selected nickname in the userlist.
Definition KviChannelWindow.h:231
QToolButton * m_pDoubleViewButton
Definition KviChannelWindow.h:157
KviModeEditor * m_pModeEditor
Definition KviChannelWindow.h:162
unsigned int m_uActionHistoryHotActionCount
Definition KviChannelWindow.h:176
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:286
bool isVoice(const QString &szNick, bool bAtLeast=false)
Returns true if the user is a voice.
Definition KviChannelWindow.h:618
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:372
bool sentWhoRequest()
Returns true if we have sent the WHO request.
Definition KviChannelWindow.h:360
int opCount()
Returns the number of users with op status.
Definition KviChannelWindow.h:274
QFrame * buttonContainer() override
Returns the button container object.
Definition KviChannelWindow.h:206
bool setUserOp(const QString &szNick, bool bUserOp, bool)
Sets the user operator mode.
Definition KviChannelWindow.h:578
int chanAdminCount()
Returns the number of users with chanadmin status.
Definition KviChannelWindow.h:268
KviModeWidget * m_pModeWidget
Definition KviChannelWindow.h:166
bool hasBanExceptionList()
Returns true if the channel has a ban exception list.
Definition KviChannelWindow.h:438
std::map< char, KviWindowToolPageButton * > m_ListEditorButtons
Definition KviChannelWindow.h:160
unsigned int count()
Returns the number of users.
Definition KviChannelWindow.h:298
std::map< char, QString > m_szChannelParameterModes
Definition KviChannelWindow.h:170
int m_iStateFlags
Definition KviChannelWindow.h:167
void enableUserListUpdates(bool bEnable)
Enables or disable the userlist updates.
Definition KviChannelWindow.h:512
std::map< char, KviMaskEditor * > m_ListEditors
Definition KviChannelWindow.h:161
char getUserFlag(const QString &szNick)
Returns the flag of a user.
Definition KviChannelWindow.h:499
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:77
QString szNick
Definition KviChannelWindow.h:78
int iTemperature
Definition KviChannelWindow.h:81
unsigned int uActionType
Definition KviChannelWindow.h:79
kvi_time_t tTime
Definition KviChannelWindow.h:80
Definition KviChannelWindow.h:89
bool bStatsInaccurate
Definition KviChannelWindow.h:91
unsigned int uHotActionPercent
Definition KviChannelWindow.h:98
unsigned int uActionsInTheLastMinute
Definition KviChannelWindow.h:95
QStringList lTalkingUsers
Definition KviChannelWindow.h:99
unsigned int uHotActionCount
Definition KviChannelWindow.h:97
double dActionsPerMinute
Definition KviChannelWindow.h:94
QStringList lWereTalkingUsers
Definition KviChannelWindow.h:100
unsigned int uLastActionTimeSpan
Definition KviChannelWindow.h:92
unsigned int uFirstActionTimeSpan
Definition KviChannelWindow.h:93
int iAverageActionTemperature
Definition KviChannelWindow.h:96
unsigned int uActionCount
Definition KviChannelWindow.h:90
char szBuffer[4096]
Definition winamp.cpp:77