KVIrc 5.2.4
Developer APIs
KviQueryWindow.h
Go to the documentation of this file.
1#ifndef _KVI_QUERY_H_
2#define _KVI_QUERY_H_
3//=============================================================================
4//
5// File : KviQueryWindow.h
6// Creation date : Mon Aug 7 2000 14:19:00 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2000-2010 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 "KviWindow.h"
35#include "KviIrcUserDataBase.h"
36#include "KviUserListView.h"
37#include "KviThemedLabel.h"
38#include "KviPointerHashTable.h"
39
43class QString;
44
50{
51 Q_OBJECT
52public:
57 enum Flag
58 {
59 Dead = 1
60 };
61
68 KviQueryWindow(KviConsoleWindow * lpConsole, const QString & szNick);
69
74
75protected:
80 QFrame * m_pButtonGrid;
82
83public:
88 KviUserListView * userListView() { return m_pUserListView; };
89
94 void setDeadQuery();
95
100 void setAliveQuery();
101
106 bool isDeadQuery() { return m_iFlags & Dead; };
107
112 QSize sizeHint() const override;
113
118 const QString & target() override { return windowName(); }
119
127 KviUserListEntry * setTarget(const QString & szNick, const QString & szUser, const QString & szHost);
128
133 QFrame * buttonContainer() override { return (QFrame *)m_pButtonGrid; }
134
139 void applyOptions() override;
140
147 void userAction(KviIrcMask * user, unsigned int uActionType);
148
155 void userAction(const QString & szNick, unsigned int uActionType);
156
165 void userAction(const QString & szNick, const QString & szUser, const QString & szHost, unsigned int uActionType);
166
173 bool nickChange(const QString & szOldNick, const QString & szNewNick);
174
181 void ownMessage(const QString & szBuffer, bool bUserFeedback = true) override;
182
188 void ownAction(const QString & szBuffer) override;
189
194 int selectedCount() { return m_pUserListView->selectedCount(); };
195
201 bool avatarChanged(const QString & szNick) { return m_pUserListView->avatarChanged(szNick); };
202
212 void notifyCommonChannels(const QString & szNick, const QString & szUser, const QString & szHost, int iChans, const QString & szChans);
213
220 void showListView(bool bShow, bool bIgnoreSizeChange = false);
221
227 void mergeQuery(KviQueryWindow * pQuery);
228
233 void updateLabelText();
234
235protected:
246 void notifyTargetChange(const QString & szOldNick, const QString & szOldUser, const QString & szOldHost, const QString & szNick, const QString & szUser, const QString & szHost);
247
252 QString getInfoLabelText();
253
258 void getWindowListTipText(QString & szBuffer) override;
259
264 QPixmap * myIconPtr() override;
265
270 void fillCaptionBuffers() override;
271
277 void loadProperties(KviConfigurationFile * pCfg) override;
278
284 void saveProperties(KviConfigurationFile * pCfg) override;
285
291 void getBaseLogFileName(QString & szBuffer) override;
292
297 void triggerCreationEvents() override;
298
299 void resizeEvent(QResizeEvent *) override;
300protected slots:
305 void textViewRightClicked();
306
311 void toggleListView();
312
318 void slotDndEvents(const QString & szFile);
319};
320
321#endif //_KVI_CHANNEL_H_
User DB handling.
Pointer Hash Table.
User list view management.
Contains the KviWindow class.
Definition KviConfigurationFile.h:50
Definition KviConsoleWindow.h:74
Irc user mask handling.
Definition KviIrcMask.h:48
The class which manages a query.
Definition KviQueryWindow.h:50
QFrame * m_pButtonGrid
Definition KviQueryWindow.h:80
KviThemedLabel * m_pLabel
Definition KviQueryWindow.h:79
QFrame * buttonContainer() override
Returns the button container.
Definition KviQueryWindow.h:133
Flag
Holds the flags of a query.
Definition KviQueryWindow.h:58
KviUserListView * userListView()
Returns the userlist of the query (the remote peer)
Definition KviQueryWindow.h:88
const QString & target() override
Returns the name of the query target.
Definition KviQueryWindow.h:118
KviWindowToolPageButton * m_pListViewButton
Definition KviQueryWindow.h:77
KviUserListView * m_pUserListView
Definition KviQueryWindow.h:76
int m_iFlags
Definition KviQueryWindow.h:78
int selectedCount()
Returns the number of selected users in the userlist.
Definition KviQueryWindow.h:194
QList< int > m_SplitterSizesList
Definition KviQueryWindow.h:81
bool isDeadQuery()
Returns true if the query is dead.
Definition KviQueryWindow.h:106
bool avatarChanged(const QString &szNick)
Called when the target changes the avatar.
Definition KviQueryWindow.h:201
Definition KviThemedLabel.h:34
Userlist entry management class.
Definition KviUserListView.h:134
User list view management class.
Definition KviUserListView.h:226
int selectedCount()
Returns the number of selected entries in the userlist.
Definition KviUserListView.h:348
bool avatarChanged(const QString &szNick)
Returns true if the avatar of a user is changed.
Definition KviUserListView.cpp:889
Definition KviWindowToolWidget.h:47
Base class for all windows in KVIrc.
Definition KviWindow.h:75
virtual void loadProperties(KviConfigurationFile *pCfg)
Definition KviWindow.cpp:596
const QString & windowName() const
Returns the name of this window.
Definition KviWindow.h:228
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 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
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
QString szHost
Definition libkvisetup.cpp:48
char szBuffer[4096]
Definition winamp.cpp:77