Diffstat (limited to 'microkde/kdeui/kxmlguiclient.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kxmlguiclient.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/microkde/kdeui/kxmlguiclient.h b/microkde/kdeui/kxmlguiclient.h index cd74c8e..b9d7b09 100644 --- a/microkde/kdeui/kxmlguiclient.h +++ b/microkde/kdeui/kxmlguiclient.h | |||
@@ -1,48 +1,48 @@ | |||
1 | /* This file is part of the KDE libraries | 1 | /* This file is part of the KDE libraries |
2 | Copyright (C) 2000 Simon Hausmann <hausmann@kde.org> | 2 | Copyright (C) 2000 Simon Hausmann <hausmann@kde.org> |
3 | Copyright (C) 2000 Kurt Granroth <granroth@kde.org> | 3 | Copyright (C) 2000 Kurt Granroth <granroth@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License version 2 as published by the Free Software Foundation. | 7 | License version 2 as published by the Free Software Foundation. |
8 | 8 | ||
9 | This library is distributed in the hope that it will be useful, | 9 | This library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | Library General Public License for more details. | 12 | Library General Public License for more details. |
13 | 13 | ||
14 | You should have received a copy of the GNU Library General Public License | 14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to |
16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 16 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
17 | Boston, MA 02111-1307, USA. | 17 | Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #ifndef _KXMLGUICLIENT_H | 19 | #ifndef _KXMLGUICLIENT_H |
20 | #define _KXMLGUICLIENT_H | 20 | #define _KXMLGUICLIENT_H |
21 | 21 | ||
22 | 22 | ||
23 | //US #include <qdom.h> | 23 | //US #include <qdom.h> |
24 | #include <qptrlist.h> | 24 | #include <q3ptrlist.h> |
25 | #include <qmap.h> | 25 | #include <qmap.h> |
26 | #include <qstringlist.h> | 26 | #include <qstringlist.h> |
27 | 27 | ||
28 | class QWidget; | 28 | class QWidget; |
29 | class KAction; | 29 | class KAction; |
30 | class KActionCollection; | 30 | class KActionCollection; |
31 | class KInstance; | 31 | class KInstance; |
32 | 32 | ||
33 | class KXMLGUIClientPrivate; | 33 | class KXMLGUIClientPrivate; |
34 | class KXMLGUIFactory; | 34 | class KXMLGUIFactory; |
35 | class KXMLGUIBuilder; | 35 | class KXMLGUIBuilder; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * | 38 | * |
39 | * A KXMLGUIClient can be used with @ref KXMLGUIFactory to create a | 39 | * A KXMLGUIClient can be used with @ref KXMLGUIFactory to create a |
40 | * GUI from actions and an XML document, and can be dynamically merged | 40 | * GUI from actions and an XML document, and can be dynamically merged |
41 | * with other KXMLGUIClients. | 41 | * with other KXMLGUIClients. |
42 | */ | 42 | */ |
43 | class KXMLGUIClient | 43 | class KXMLGUIClient |
44 | { | 44 | { |
45 | friend class KEditToolbarWidget; // for setXMLFile(3 args) | 45 | friend class KEditToolbarWidget; // for setXMLFile(3 args) |
46 | public: | 46 | public: |
47 | /** | 47 | /** |
48 | * Constructs a KXMLGUIClient which can be used with a | 48 | * Constructs a KXMLGUIClient which can be used with a |
@@ -140,49 +140,49 @@ public: | |||
140 | 140 | ||
141 | /** | 141 | /** |
142 | * KXMLGUIClients can form a simple child/parent object tree. This | 142 | * KXMLGUIClients can form a simple child/parent object tree. This |
143 | * method returns a pointer to the parent client or 0L if it has no | 143 | * method returns a pointer to the parent client or 0L if it has no |
144 | * parent client assigned. | 144 | * parent client assigned. |
145 | */ | 145 | */ |
146 | KXMLGUIClient *parentClient() const; | 146 | KXMLGUIClient *parentClient() const; |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * Use this method to make a client a child client of another client. | 149 | * Use this method to make a client a child client of another client. |
150 | * Usually you don't need to call this method, as it is called | 150 | * Usually you don't need to call this method, as it is called |
151 | * automatically when using the second constructor, which takes a | 151 | * automatically when using the second constructor, which takes a |
152 | * arent argument. | 152 | * arent argument. |
153 | */ | 153 | */ |
154 | void insertChildClient( KXMLGUIClient *child ); | 154 | void insertChildClient( KXMLGUIClient *child ); |
155 | 155 | ||
156 | /** | 156 | /** |
157 | * Removes the given @p child from the client's children list. | 157 | * Removes the given @p child from the client's children list. |
158 | */ | 158 | */ |
159 | void removeChildClient( KXMLGUIClient *child ); | 159 | void removeChildClient( KXMLGUIClient *child ); |
160 | 160 | ||
161 | /** | 161 | /** |
162 | * Retrieves a list of all child clients. | 162 | * Retrieves a list of all child clients. |
163 | */ | 163 | */ |
164 | const QPtrList<KXMLGUIClient> *childClients(); | 164 | const Q3PtrList<KXMLGUIClient> *childClients(); |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * A client can have an own @ref KXMLGUIBuilder. | 167 | * A client can have an own @ref KXMLGUIBuilder. |
168 | * Use this method to assign your builder instance to the client (so that the | 168 | * Use this method to assign your builder instance to the client (so that the |
169 | * @ref KXMLGUIFactory can use it when building the client's GUI) | 169 | * @ref KXMLGUIFactory can use it when building the client's GUI) |
170 | * | 170 | * |
171 | * Client specific guibuilders are useful if you want to create | 171 | * Client specific guibuilders are useful if you want to create |
172 | * custom container widgets for your GUI. | 172 | * custom container widgets for your GUI. |
173 | */ | 173 | */ |
174 | //US void setClientBuilder( KXMLGUIBuilder *builder ); | 174 | //US void setClientBuilder( KXMLGUIBuilder *builder ); |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Retrieves the client's GUI builder or 0L if no client specific | 177 | * Retrieves the client's GUI builder or 0L if no client specific |
178 | * builder has been assigned via @ref #setClientBuilder() | 178 | * builder has been assigned via @ref #setClientBuilder() |
179 | */ | 179 | */ |
180 | //US KXMLGUIBuilder *clientBuilder() const; | 180 | //US KXMLGUIBuilder *clientBuilder() const; |
181 | 181 | ||
182 | /** | 182 | /** |
183 | * Forces this client to re-read its XML resource file. This is | 183 | * Forces this client to re-read its XML resource file. This is |
184 | * intended to be used when you know that the resource file has | 184 | * intended to be used when you know that the resource file has |
185 | * changed and you will soon be rebuilding the GUI. It has no | 185 | * changed and you will soon be rebuilding the GUI. It has no |
186 | * useful effect with non-KParts GUIs, so don't bother using it | 186 | * useful effect with non-KParts GUIs, so don't bother using it |
187 | * unless your app is component based. | 187 | * unless your app is component based. |
188 | */ | 188 | */ |
@@ -207,49 +207,49 @@ public: | |||
207 | * ... | 207 | * ... |
208 | * </MenuBar> | 208 | * </MenuBar> |
209 | * </kpartgui> | 209 | * </kpartgui> |
210 | * \endverbatim | 210 | * \endverbatim |
211 | * | 211 | * |
212 | * This tag will get expanded to a list of actions. In the example | 212 | * This tag will get expanded to a list of actions. In the example |
213 | * above ( a file manager with a dynamic file menu ), you would call | 213 | * above ( a file manager with a dynamic file menu ), you would call |
214 | * \code | 214 | * \code |
215 | * QPtrList<KAction> file_actions; | 215 | * QPtrList<KAction> file_actions; |
216 | * for( ... ) | 216 | * for( ... ) |
217 | * if( ... ) | 217 | * if( ... ) |
218 | * file_actions.append( cool_action ); | 218 | * file_actions.append( cool_action ); |
219 | * unplugActionList( "xxx_file_actionlist" ); | 219 | * unplugActionList( "xxx_file_actionlist" ); |
220 | * plugActionList( "xxx_file_actionlist", file_actions ); | 220 | * plugActionList( "xxx_file_actionlist", file_actions ); |
221 | * \endcode | 221 | * \endcode |
222 | * every time a file is selected, unselected or ... | 222 | * every time a file is selected, unselected or ... |
223 | * | 223 | * |
224 | * \note You should not call createGUI() after calling this | 224 | * \note You should not call createGUI() after calling this |
225 | * function. In fact, that would remove the newly added | 225 | * function. In fact, that would remove the newly added |
226 | * actionlists again... | 226 | * actionlists again... |
227 | * \note Forgetting to call unplugActionList() before | 227 | * \note Forgetting to call unplugActionList() before |
228 | * plugActionList() would leave the previous actions in the | 228 | * plugActionList() would leave the previous actions in the |
229 | * menu too.. | 229 | * menu too.. |
230 | */ | 230 | */ |
231 | void plugActionList( const QString &name, const QPtrList<KAction> &actionList ); | 231 | void plugActionList( const QString &name, const Q3PtrList<KAction> &actionList ); |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * The complement of \ref plugActionList() ... | 234 | * The complement of \ref plugActionList() ... |
235 | */ | 235 | */ |
236 | void unplugActionList( const QString &name ); | 236 | void unplugActionList( const QString &name ); |
237 | 237 | ||
238 | //US static QString findMostRecentXMLFile( const QStringList &files, QString &doc ); | 238 | //US static QString findMostRecentXMLFile( const QStringList &files, QString &doc ); |
239 | 239 | ||
240 | void addStateActionEnabled(const QString& state, const QString& action); | 240 | void addStateActionEnabled(const QString& state, const QString& action); |
241 | 241 | ||
242 | void addStateActionDisabled(const QString& state, const QString& action); | 242 | void addStateActionDisabled(const QString& state, const QString& action); |
243 | 243 | ||
244 | enum ReverseStateChange { StateNoReverse, StateReverse }; | 244 | enum ReverseStateChange { StateNoReverse, StateReverse }; |
245 | struct StateChange | 245 | struct StateChange |
246 | { | 246 | { |
247 | QStringList actionsToEnable; | 247 | QStringList actionsToEnable; |
248 | QStringList actionsToDisable; | 248 | QStringList actionsToDisable; |
249 | }; | 249 | }; |
250 | 250 | ||
251 | StateChange getActionsToChangeForState(const QString& state); | 251 | StateChange getActionsToChangeForState(const QString& state); |
252 | 252 | ||
253 | /// @since 3.1 | 253 | /// @since 3.1 |
254 | //US void beginXMLPlug( QWidget * ); | 254 | //US void beginXMLPlug( QWidget * ); |
255 | /// @since 3.1 | 255 | /// @since 3.1 |