KVIrc  4.9.2
DeveloperAPIs
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 #include "KviPointerList.h"
31 
33 {
34  Q_OBJECT
35 public:
36  KviConnectAction(QObject * pParent);
37 
38 protected:
42 
43 public:
44  virtual bool addToPopupMenu(QMenu * pMenu);
45  virtual QAction * addToCustomToolBar(KviCustomToolBar * pTool);
46 
47 protected:
48  virtual void setup();
49  virtual void reloadImages();
50  virtual void activate();
51  virtual void activeContextChanged();
52  virtual void activeContextStateChanged();
53 };
54 
56 {
57  Q_OBJECT
58 public:
59  KviSeparatorAction(QObject * pParent);
60 
61 public:
62  virtual bool addToPopupMenu(QMenu * pMenu);
63  virtual QAction * addToCustomToolBar(KviCustomToolBar * pTool);
64 };
65 
66 class QMenu;
67 
69 {
70  Q_OBJECT
71 public:
73  QObject * pParent,
74  const QString & szName,
75  const QString & szScriptCode,
76  const QString & szVisibleName,
77  const QString & szDescription,
78  KviActionCategory * pCategory = NULL,
79  const QString & szBigIconId = QString(),
81  unsigned int uFlags = 0);
83 
84 protected:
85  QMenu * m_pPopup;
86 
87 protected:
88  virtual void setup();
89 
90 public:
91  virtual bool addToPopupMenu(QMenu * pMenu);
92  virtual QAction * addToCustomToolBar(KviCustomToolBar * pTool);
93 protected slots:
94  virtual void popupAboutToShow();
95  virtual void popupActivated(QAction * pAction);
96 };
97 
99 {
100  Q_OBJECT
101 public:
102  KviJoinChannelAction(QObject * pParent);
103 protected slots:
104  virtual void popupAboutToShow();
105  virtual void popupActivated(QAction * pAction);
106 };
107 
109 {
110  Q_OBJECT
111 public:
112  KviChangeNickAction(QObject * pParent);
113 protected slots:
114  void popupAboutToShow();
115  void popupActivated(QAction * pAction);
116 };
117 
119 {
120  Q_OBJECT
121 public:
122  KviConnectToServerAction(QObject * pParent);
123 protected slots:
124  void popupAboutToShow();
125  void popupActivated(QAction * pAction);
126 };
127 
129 {
130  Q_OBJECT
131 public:
132  KviChangeUserModeAction(QObject * pParent);
133 protected slots:
134  void popupAboutToShow();
135  void popupActivated(QAction * pAction);
136 };
137 
139 {
140  Q_OBJECT
141 public:
142  KviIrcToolsAction(QObject * pParent);
143 protected slots:
144  void popupAboutToShow();
145  void popupActivated(QAction * pAction);
146 };
147 
149 {
150  Q_OBJECT
151 public:
152  KviIrcOperationsAction(QObject * pParent);
153 protected slots:
154  void popupAboutToShow();
155  void popupActivated(QAction * pAction);
156 };
157 
158 #include "KviIrcToolBar.h"
159 
161 {
162  Q_OBJECT
163 public:
164  KviIrcContextDisplayAction(QObject * pParent);
165 
166 public:
167  virtual bool addToPopupMenu(QMenu * pMenu);
168  virtual QAction * addToCustomToolBar(KviCustomToolBar * pTool);
169  virtual void activeContextStateChanged();
170  virtual void activeContextChanged();
171  virtual void setEnabled(bool);
172  virtual void setup();
173 };
174 
176 {
177  Q_OBJECT
178 public:
179  KviGoAwayAction(QObject * pParent);
180 
181 protected:
182  QString m_szAwayString;
183  QString m_szBackString;
184 
185 public:
186  virtual bool addToPopupMenu(QMenu * pMenu);
187  virtual QAction * addToCustomToolBar(KviCustomToolBar * pTool);
188 
189 protected:
190  virtual void setup();
191  virtual void reloadImages();
192  virtual void activeContextChanged();
193  virtual void activeContextStateChanged();
194 };
195 
196 #endif //_KVI_COREACTIONS_H_
virtual QAction * addToCustomToolBar(KviCustomToolBar *pTool)
Adds the action to the given toolbar.
Definition: KviCoreActions.cpp:1198
QString m_szConnectString
Definition: KviCoreActions.h:39
Definition: KviCoreActions.h:32
QString m_szBackString
Definition: KviCoreActions.h:183
Definition: KviCoreActions.h:138
Definition: KviCoreActions.h:55
Definition: KviCoreActions.h:128
Definition: KviCustomToolBar.h:37
QString m_szAwayString
Definition: KviCoreActions.h:182
char * NULL
Definition: KviIrcNumericCodes.h:391
Holds the categories of an action.
Definition: KviAction.h:54
virtual void activeContextChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:485
virtual void activeContextChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:1078
KviConnectToServerAction(QObject *pParent)
Definition: KviCoreActions.cpp:913
void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:886
~KviSubmenuAction()
Definition: KviCoreActions.cpp:744
QString m_szDisconnectString
Definition: KviCoreActions.h:41
virtual QAction * addToCustomToolBar(KviCustomToolBar *pTool)
Adds the action to the given toolbar.
Definition: KviCoreActions.cpp:780
virtual void popupAboutToShow()
Definition: KviCoreActions.cpp:816
Definition: KviCoreActions.h:108
KviChangeUserModeAction(QObject *pParent)
Definition: KviCoreActions.cpp:965
void popupAboutToShow()
Definition: KviCoreActions.cpp:979
Defines an action inside KVIrc.
Definition: KviAction.h:100
Definition: KviCoreActions.h:175
QString m_szAbortConnectionString
Definition: KviCoreActions.h:40
void popupAboutToShow()
Definition: KviCoreActions.cpp:871
void popupAboutToShow()
Definition: KviCoreActions.cpp:927
virtual void setup()
Enables or disables the action upon starting KVIrc.
Definition: KviCoreActions.cpp:457
KviChangeNickAction(QObject *pParent)
Definition: KviCoreActions.cpp:857
KviIrcToolsAction(QObject *pParent)
Definition: KviCoreActions.cpp:1214
virtual void activate()
Activates the action.
Definition: KviCoreActions.cpp:648
virtual void setEnabled(bool)
Enables the action.
Definition: KviCoreActions.cpp:519
SmallIcon
Contains all KVIrc's small icons.
Definition: KviIconManager.h:168
virtual void activeContextStateChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:502
QMenu * m_pPopup
Definition: KviCoreActions.h:85
virtual void popupAboutToShow()
Definition: KviCoreActions.cpp:761
void popupAboutToShow()
Definition: KviCoreActions.cpp:1264
virtual bool addToPopupMenu(QMenu *pMenu)
Adds the action to the given popup.
Definition: KviCoreActions.cpp:769
virtual void reloadImages()
Reloads the images.
Definition: KviCoreActions.cpp:569
virtual QAction * addToCustomToolBar(KviCustomToolBar *pTool)
Adds the action to the given toolbar.
Definition: KviCoreActions.cpp:473
virtual bool addToPopupMenu(QMenu *pMenu)
Adds the action to the given popup.
Definition: KviCoreActions.cpp:1152
Definition: KviCoreActions.h:148
void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:1291
KviIrcContextDisplayAction(QObject *pParent)
Definition: KviCoreActions.cpp:445
void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:936
virtual void activeContextStateChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:1083
Definition: KviIconManager.h:170
virtual void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:765
Definition: KviCoreActions.h:98
void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:1246
KviJoinChannelAction(QObject *pParent)
Definition: KviCoreActions.cpp:803
C++ Template based double linked pointer list class.
Definition: KviCoreActions.h:68
virtual QAction * addToCustomToolBar(KviCustomToolBar *pTool)
Adds the action to the given toolbar.
Definition: KviCoreActions.cpp:544
virtual void activeContextStateChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:579
void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:1036
KviGoAwayAction(QObject *pParent)
Definition: KviCoreActions.cpp:1058
virtual void activeContextChanged()
Enables or disables the action upon checking the active context.
Definition: KviCoreActions.cpp:574
KviSubmenuAction(QObject *pParent, const QString &szName, const QString &szScriptCode, const QString &szVisibleName, const QString &szDescription, KviActionCategory *pCategory=NULL, const QString &szBigIconId=QString(), KviIconManager::SmallIcon eSmallIcon=KviIconManager::None, unsigned int uFlags=0)
Definition: KviCoreActions.cpp:720
Actions handling.
virtual bool addToPopupMenu(QMenu *pMenu)
Adds the action to the given popup.
Definition: KviCoreActions.cpp:467
virtual void setup()
Enables or disables the action upon starting KVIrc.
Definition: KviCoreActions.cpp:750
virtual void setup()
Enables or disables the action upon starting KVIrc.
Definition: KviCoreActions.cpp:640
KviSeparatorAction(QObject *pParent)
Definition: KviCoreActions.cpp:524
void popupAboutToShow()
Definition: KviCoreActions.cpp:1228
virtual void reloadImages()
Reloads the images.
Definition: KviCoreActions.cpp:1073
virtual void setup()
Enables or disables the action upon starting KVIrc.
Definition: KviCoreActions.cpp:1144
Definition: KviCoreActions.h:118
This file contains compile time settings.
KviIrcOperationsAction(QObject *pParent)
Definition: KviCoreActions.cpp:1250
KviConnectAction(QObject *pParent)
Definition: KviCoreActions.cpp:556
virtual void popupActivated(QAction *pAction)
Definition: KviCoreActions.cpp:830
Definition: KviCoreActions.h:160
virtual QAction * addToCustomToolBar(KviCustomToolBar *pTool)
Adds the action to the given toolbar.
Definition: KviCoreActions.cpp:706
Actions handling.
virtual bool addToPopupMenu(QMenu *pMenu)
Adds the action to the given popup.
Definition: KviCoreActions.cpp:655
This class handles the actions.
Definition: KviKvsAction.h:43
virtual bool addToPopupMenu(QMenu *pMenu)
Adds the action to the given popup.
Definition: KviCoreActions.cpp:536