KVIrc 5.2.6
Developer APIs
KviModeWidget.h
Go to the documentation of this file.
1#ifndef _KVI_MODEWIDGET_H_
2#define _KVI_MODEWIDGET_H_
3//============================================================================
4//
5// File : KviModeWidget.h
6// Creation date : Sat Nov 12 2005 23:50:12 by Alexey Uzhva
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2005-2008 Alexey Uzhva (wizard at opendoor dot ru)
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
27#include "KviThemedLineEdit.h"
28
29#include <map>
30
33
35{
36 Q_OBJECT
37public:
38 KviModeWidget(QWidget * par, KviChannelWindow & chan, const char * name = nullptr);
40
41 void reset();
42 void refreshModes();
43
44private:
46
47 std::map<QChar, QString> parseChannelModeString(const QString& szModes);
48 void sendModeChanges(const QString szModeString, const QStringList params);
49
50protected:
51 void mouseDoubleClickEvent(QMouseEvent * e) override;
52 void keyReleaseEvent(QKeyEvent * e) override;
53
54 bool isParameterOnlyNeededWhenModeIsSet(const QChar & cMode);
55
56public slots:
57 void processModeChanges();
58
59signals:
60 void setMode(const QString & szMode);
61};
62
63#endif //_KVI_MODEWIDGET_H_
The class which manages a channel.
Definition KviChannelWindow.h:108
Definition KviIrcConnectionServerInfo.h:300
void sendModeChanges(const QString szModeString, const QStringList params)
Definition KviModeWidget.cpp:194
void keyReleaseEvent(QKeyEvent *e) override
Definition KviModeWidget.cpp:65
void mouseDoubleClickEvent(QMouseEvent *e) override
Definition KviModeWidget.cpp:57
void refreshModes()
Definition KviModeWidget.cpp:52
KviModeWidget(QWidget *par, KviChannelWindow &chan, const char *name=nullptr)
Definition KviModeWidget.cpp:34
bool isParameterOnlyNeededWhenModeIsSet(const QChar &cMode)
Definition KviModeWidget.cpp:165
void reset()
Definition KviModeWidget.cpp:43
void processModeChanges()
Definition KviModeWidget.cpp:82
KviChannelWindow & m_Channel
Definition KviModeWidget.h:45
std::map< QChar, QString > parseChannelModeString(const QString &szModes)
Definition KviModeWidget.cpp:173
void setMode(const QString &szMode)
KviThemedLineEdit(QWidget *par, KviWindow *pWindow, const char *name)
Definition KviThemedLineEdit.cpp:44
#define e
Definition detector.cpp:70
#define KVIRC_API
Definition kvi_settings.h:127