summaryrefslogtreecommitdiffstats
path: root/src/kvirc/kernel/kvi_coreactions.h
blob: 32a1d5bb91061264ef2c66500addbfd5a54366be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
#ifndef _KVI_COREACTIONS_H_
#define _KVI_COREACTIONS_H_
//=============================================================================
//
//   File : kvi_coreactions.h
//   Created on Mon 22 Nov 2004 02:30:47 by Szymon Stefanek
//
//   This file is part of the KVIrc IRC Client distribution
//   Copyright (C) 2004 Szymon Stefanek <pragma at kvirc dot net>
//
//   This program is FREE software. You can redistribute it and/or
//   modify it under the terms of the GNU General Public License
//   as published by the Free Software Foundation; either version 2
//   of the License, or (at your opinion) any later version.
//
//   This program is distributed in the HOPE that it will be USEFUL,
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//   See the GNU General Public License for more details.
//
//   You should have received a copy of the GNU General Public License
//   along with this program. If not, write to the Free Software Foundation,
//   Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//=============================================================================

#include "kvi_settings.h"
#include "kvi_action.h"
#include "kvi_kvs_action.h"
#include "kvi_pointerlist.h"

#include <tqtoolbutton.h>

class KviConnectAction : public KviAction
{
	Q_OBJECT
  
public:
	KviConnectAction(TQObject * pParent);
protected:
	TQString m_szConnectString;
	TQString m_szAbortConnectionString;
	TQString m_szDisconnectString;
public:
	virtual bool addToPopupMenu(KviTalPopupMenu *p);
	virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t);
protected:
	virtual void setup();
	virtual void reloadImages();
	virtual void activate();
	virtual void activeContextChanged();
	virtual void activeContextStateChanged();
};

class KviSeparatorAction : public KviAction
{
	Q_OBJECT
  
public:
	KviSeparatorAction(TQObject * pParent);
public:
	virtual bool addToPopupMenu(KviTalPopupMenu *p);
	virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t);
};

class KviTalPopupMenu;

class KviSubmenuAction : public KviKvsAction
{
	Q_OBJECT
  
public:
	KviSubmenuAction(TQObject * pParent,
		const TQString &szName,
		const TQString &szScriptCode,
		const TQString &szVisibleName,
		const TQString &szDescription,
		KviActionCategory * pCategory = 0,
		const TQString &szBigIcon = TQString(),
		int iSmallIconId = 0,
		unsigned int uFlags = 0);
	~KviSubmenuAction();
protected:
	KviTalPopupMenu * m_pPopup;
protected:
	virtual void setup();
public:
	virtual bool addToPopupMenu(KviTalPopupMenu *p);
	virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t);
protected slots:
	virtual void popupAboutToShow();
	virtual void popupActivated(int id);
};

class KviJoinChannelAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviJoinChannelAction(TQObject * pParent);
protected slots:
	virtual void popupAboutToShow();
	virtual void popupActivated(int);
};

class KviChangeNickAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviChangeNickAction(TQObject * pParent);
protected slots:
	void popupAboutToShow();
	void popupActivated(int);
};

class KviConnectToServerAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviConnectToServerAction(TQObject * pParent);
protected slots:
	void popupAboutToShow();
	void popupActivated(int);
};

class KviChangeUserModeAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviChangeUserModeAction(TQObject * pParent);
protected slots:
	void popupAboutToShow();
	void popupActivated(int);
};

class KviIrcToolsAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviIrcToolsAction(TQObject * pParent);
protected slots:
	void popupAboutToShow();
	void popupActivated(int);
};


class KviIrcOperationsAction : public KviSubmenuAction
{
	Q_OBJECT
  
public:
	KviIrcOperationsAction(TQObject * pParent);
protected slots:
	void popupAboutToShow();
	void popupActivated(int);
};

#include "kvi_irctoolbar.h"

class KviIrcContextDisplayAction : public KviAction
{
	Q_OBJECT
  
public:
	KviIrcContextDisplayAction(TQObject * pParent);
public:
	virtual bool addToPopupMenu(KviTalPopupMenu *p);
	virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t);
	virtual void activeContextStateChanged();
	virtual void activeContextChanged();
	virtual void setEnabled(bool);
	virtual void setup();
};


class KviGoAwayAction : public KviKvsAction
{
	Q_OBJECT
  
public:
	KviGoAwayAction(TQObject * pParent);
protected:
	TQString m_szAwayString;
	TQString m_szBackString;
public:
	virtual bool addToPopupMenu(KviTalPopupMenu *p);
	virtual TQWidget * addToCustomToolBar(KviCustomToolBar *t);
protected:
	virtual void setup();
	virtual void reloadImages();
	virtual void activeContextChanged();
	virtual void activeContextStateChanged();
};

#endif //!_KVI_COREACTIONS_H_