KVIrc 5.2.0
Developer APIs
KviCoreActions.h
Go to the documentation of this file.
1#ifndef _KVI_COREACTIONS_H_
2#define _KVI_COREACTIONS_H_
3//=============================================================================
4//
5// File : KviCoreActions.h
6// Creation date : Mon 22 Nov 2004 02:30:47 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC Client distribution
9// Copyright (C) 2004-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
27#include "kvi_settings.h"
28#include "KviAction.h"
29#include "KviKvsAction.h"
30
32{
33 Q_OBJECT
34public:
35 KviConnectAction(QObject * pParent);
36
37protected:
41
42public:
43 bool addToPopupMenu(QMenu * pMenu) override;
44 QAction * addToCustomToolBar(KviCustomToolBar * pTool) override;
45
46protected:
47 void setup() override;
48 void reloadImages() override;
49 void activate() override;
50 void activeContextChanged() override;
51 void activeContextStateChanged() override;
52};
53
55{
56 Q_OBJECT
57public:
58 KviSeparatorAction(QObject * pParent);
59
60public:
61 bool addToPopupMenu(QMenu * pMenu) override;
62 QAction * addToCustomToolBar(KviCustomToolBar * pTool) override;
63};
64
65class QMenu;
66
68{
69 Q_OBJECT
70public:
72 QObject * pParent,
73 const QString & szName,
74 const QString & szScriptCode,
75 const QString & szVisibleName,
76 const QString & szDescription,
77 KviActionCategory * pCategory = nullptr,
78 const QString & szBigIconId = QString(),
80 unsigned int uFlags = 0);
82
83protected:
84 QMenu * m_pPopup;
85
86protected:
87 void setup() override;
88
89public:
90 bool addToPopupMenu(QMenu * pMenu) override;
91 QAction * addToCustomToolBar(KviCustomToolBar * pTool) override;
92protected slots:
93 virtual void popupAboutToShow();
94 virtual void popupActivated(QAction * pAction);
95};
96
98{
99 Q_OBJECT
100public:
101 KviJoinChannelAction(QObject * pParent);
102protected slots:
103 virtual void popupAboutToShow();
104 virtual void popupActivated(QAction * pAction);
105};
106
108{
109 Q_OBJECT
110public:
111 KviChangeNickAction(QObject * pParent);
112protected slots:
113 virtual void popupAboutToShow();
114 virtual void popupActivated(QAction * pAction);
115};
116
118{
119 Q_OBJECT
120public:
121 KviConnectToServerAction(QObject * pParent);
122protected slots:
123 virtual void popupAboutToShow();
124 virtual void popupActivated(QAction * pAction);
125};
126
128{
129 Q_OBJECT
130public:
131 KviChangeUserModeAction(QObject * pParent);
132protected slots:
133 virtual void popupAboutToShow();
134 virtual void popupActivated(QAction * pAction);
135};
136
138{
139 Q_OBJECT
140public:
141 KviIrcToolsAction(QObject * pParent);
142protected slots:
143 virtual void popupAboutToShow();
144 virtual void popupActivated(QAction * pAction);
145};
146
148{
149 Q_OBJECT
150public:
151 KviIrcOperationsAction(QObject * pParent);
152protected slots:
153 virtual void popupAboutToShow();
154 virtual void popupActivated(QAction * pAction);
155};
156
157#include "KviIrcToolBar.h"
158
160{
161 Q_OBJECT
162public:
163 KviIrcContextDisplayAction(QObject * pParent);
164
165public:
166 bool addToPopupMenu(QMenu * pMenu) override;
167 QAction * addToCustomToolBar(KviCustomToolBar * pTool) override;
168 void activeContextStateChanged() override;
169 void activeContextChanged() override;
170 void setEnabled(bool) override;
171 void setup() override;
172};
173
175{
176 Q_OBJECT
177public:
178 KviGoAwayAction(QObject * pParent);
179
180protected:
183
184public:
185 bool addToPopupMenu(QMenu * pMenu) override;
186 QAction * addToCustomToolBar(KviCustomToolBar * pTool) override;
187
188protected:
189 void setup() override;
190 void reloadImages() override;
191 void activeContextChanged() override;
193};
194
195#endif //_KVI_COREACTIONS_H_
Actions handling.
Actions handling.
Holds the categories of an action.
Definition KviAction.h:59
Defines an action inside KVIrc.
Definition KviAction.h:105
Definition KviCoreActions.h:108
virtual void popupActivated(QAction *pAction)
KviChangeNickAction(QObject *pParent)
virtual void popupAboutToShow()
Definition KviCoreActions.h:128
virtual void popupAboutToShow()
virtual void popupActivated(QAction *pAction)
KviChangeUserModeAction(QObject *pParent)
Definition KviCoreActions.h:32
void activate() override
Activates the action.
Definition KviCoreActions.cpp:620
void activeContextStateChanged() override
Enables or disables the action upon checking the active context.
Definition KviCoreActions.cpp:551
QAction * addToCustomToolBar(KviCustomToolBar *pTool) override
Adds the action to the given toolbar.
Definition KviCoreActions.cpp:678
QString m_szConnectString
Definition KviCoreActions.h:38
void reloadImages() override
Reloads the images.
Definition KviCoreActions.cpp:541
QString m_szAbortConnectionString
Definition KviCoreActions.h:39
void activeContextChanged() override
Enables or disables the action upon checking the active context.
Definition KviCoreActions.cpp:546
void setup() override
Enables or disables the action upon starting KVIrc.
Definition KviCoreActions.cpp:612
bool addToPopupMenu(QMenu *pMenu) override
Adds the action to the given popup.
Definition KviCoreActions.cpp:627
QString m_szDisconnectString
Definition KviCoreActions.h:40
Definition KviCoreActions.h:118
virtual void popupActivated(QAction *pAction)
KviConnectToServerAction(QObject *pParent)
virtual void popupAboutToShow()
Definition KviCustomToolBar.h:38
Definition KviCoreActions.h:175
void reloadImages() override
Reloads the images.
void activeContextChanged() override
Enables or disables the action upon checking the active context.
void activeContextStateChanged() override
Enables or disables the action upon checking the active context.
KviGoAwayAction(QObject *pParent)
QString m_szBackString
Definition KviCoreActions.h:182
QAction * addToCustomToolBar(KviCustomToolBar *pTool) override
Adds the action to the given toolbar.
QString m_szAwayString
Definition KviCoreActions.h:181
bool addToPopupMenu(QMenu *pMenu) override
Adds the action to the given popup.
void setup() override
Enables or disables the action upon starting KVIrc.
SmallIcon
Contains all KVIrc's small icons.
Definition KviIconManager.h:170
@ None
Definition KviIconManager.h:171
Definition KviCoreActions.h:160
QAction * addToCustomToolBar(KviCustomToolBar *pTool) override
Adds the action to the given toolbar.
Definition KviCoreActions.cpp:451
void setup() override
Enables or disables the action upon starting KVIrc.
Definition KviCoreActions.cpp:435
void activeContextChanged() override
Enables or disables the action upon checking the active context.
Definition KviCoreActions.cpp:463
void setEnabled(bool) override
Enables the action.
Definition KviCoreActions.cpp:491
bool addToPopupMenu(QMenu *pMenu) override
Adds the action to the given popup.
Definition KviCoreActions.cpp:445
void activeContextStateChanged() override
Enables or disables the action upon checking the active context.
Definition KviCoreActions.cpp:477
Definition KviCoreActions.h:148
virtual void popupActivated(QAction *pAction)
virtual void popupAboutToShow()
KviIrcOperationsAction(QObject *pParent)
Definition KviCoreActions.h:138
virtual void popupAboutToShow()
KviIrcToolsAction(QObject *pParent)
virtual void popupActivated(QAction *pAction)
Definition KviCoreActions.h:98
virtual void popupActivated(QAction *pAction)
Definition KviCoreActions.cpp:802
virtual void popupAboutToShow()
Definition KviCoreActions.cpp:788
This class handles the actions.
Definition KviKvsAction.h:44
Definition KviCoreActions.h:55
QAction * addToCustomToolBar(KviCustomToolBar *pTool) override
Adds the action to the given toolbar.
Definition KviCoreActions.cpp:516
bool addToPopupMenu(QMenu *pMenu) override
Adds the action to the given popup.
Definition KviCoreActions.cpp:508
Definition KviCoreActions.h:68
virtual void popupAboutToShow()
Definition KviCoreActions.cpp:733
virtual void popupActivated(QAction *pAction)
Definition KviCoreActions.cpp:737
QAction * addToCustomToolBar(KviCustomToolBar *pTool) override
Adds the action to the given toolbar.
Definition KviCoreActions.cpp:752
bool addToPopupMenu(QMenu *pMenu) override
Adds the action to the given popup.
Definition KviCoreActions.cpp:741
void setup() override
Enables or disables the action upon starting KVIrc.
Definition KviCoreActions.cpp:722
~KviSubmenuAction()
Definition KviCoreActions.cpp:716
QMenu * m_pPopup
Definition KviCoreActions.h:84
This file contains compile time settings.