1 // Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 #ifndef KIG_MISC_GUIACTION_H
19 #define KIG_MISC_GUIACTION_H
23 #ifdef KIG_ENABLE_PYTHON_SCRIPTING
24 #include "../scripting/script-common.h"
41 KigGUIAction( GUIAction
* act
,
46 GUIAction
* guiAction();
48 void plug( KigPart
* doc
);
56 virtual QString
description() const = 0;
57 virtual QCString
iconFileName() const = 0;
58 virtual QString
descriptiveName() const = 0;
59 virtual const char* actionName() const = 0;
60 virtual int shortcut() const = 0;
61 virtual void act( KigPart
& ) = 0;
63 virtual void plug( KigPart
* doc
, KigGUIAction
* kact
);
66 class ObjectConstructor
;
68 class ConstructibleAction
71 ObjectConstructor
* mctor
;
75 ConstructibleAction( ObjectConstructor
* ctor
, const QCString
& actionname
,
77 ~ConstructibleAction();
78 QString
description() const;
79 QCString
iconFileName() const;
80 QString
descriptiveName() const;
81 const char* actionName() const;
84 void plug( KigPart
* doc
, KigGUIAction
* kact
);
87 class ConstructPointAction
90 const char* mactionname
;
92 ConstructPointAction( const char* actionname
);
93 ~ConstructPointAction();
95 QString
description() const;
96 QCString
iconFileName() const;
97 QString
descriptiveName() const;
98 const char* actionName() const;
100 void act( KigPart
& );
103 class ConstructTextLabelAction
106 const char* mactionname
;
108 ConstructTextLabelAction( const char* actionname
);
110 QString
description() const;
111 QCString
iconFileName() const;
112 QString
descriptiveName() const;
113 const char* actionName() const;
114 int shortcut() const;
115 void act( KigPart
& );
118 class AddFixedPointAction
121 const char* mactionname
;
123 AddFixedPointAction( const char* actionname
);
124 ~AddFixedPointAction();
125 QString
description() const;
126 QCString
iconFileName() const;
127 QString
descriptiveName() const;
128 const char* actionName() const;
129 int shortcut() const;
130 void act( KigPart
& );
137 const char* mactionname
;
139 TestAction( const char* actionname
);
141 QString
description() const;
142 QCString
iconFileName() const;
143 QString
descriptiveName() const;
144 const char* actionName() const;
145 void act( KigPart
& );
149 #ifdef KIG_ENABLE_PYTHON_SCRIPTING
151 class NewScriptAction
154 const char* mactionname
;
155 const char* mdescname
;
156 const char* mdescription
;
158 const ScriptType::Type mtype
;
160 NewScriptAction( const char* descname
, const char* description
,
161 const char* actionname
, const ScriptType::Type type
,
162 const char* icon
= "" );
164 QString
description() const;
165 QCString
iconFileName() const;
166 QString
descriptiveName() const;
167 const char* actionName() const;
168 void act( KigPart
& );
169 int shortcut() const;
172 #endif // KIG_ENABLE_PYTHON_SCRIPTING