author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdeui/kactionclasses.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kdeui/kactionclasses.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/kactionclasses.h | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/microkde/kdeui/kactionclasses.h b/microkde/kdeui/kactionclasses.h index f6e7a0f..a9b9104 100644 --- a/microkde/kdeui/kactionclasses.h +++ b/microkde/kdeui/kactionclasses.h | |||
@@ -25,45 +25,48 @@ | |||
25 | 25 | ||
26 | #ifndef __kactionclasses_h__ | 26 | #ifndef __kactionclasses_h__ |
27 | #define __kactionclasses_h__ | 27 | #define __kactionclasses_h__ |
28 | 28 | ||
29 | #include <kaction.h> | 29 | #include <kaction.h> |
30 | 30 | ||
31 | //US#include <qkeysequence.h> | 31 | //US#include <qkeysequence.h> |
32 | //US#include <qobject.h> | 32 | //US#include <qobject.h> |
33 | //US#include <qvaluelist.h> | 33 | //US#include <qvaluelist.h> |
34 | //US#include <qguardedptr.h> | 34 | //US#include <qguardedptr.h> |
35 | //US#include <kguiitem.h> | 35 | //US#include <kguiitem.h> |
36 | #include <kshortcut.h> | 36 | #include <kshortcut.h> |
37 | //Added by qt3to4: | ||
38 | #include <Q3CString> | ||
39 | #include <Q3PopupMenu> | ||
37 | //US#include <kstdaction.h> | 40 | //US#include <kstdaction.h> |
38 | //US#include <kicontheme.h> | 41 | //US#include <kicontheme.h> |
39 | 42 | ||
40 | class QMenuBar; | 43 | class QMenuBar; |
41 | class QPopupMenu; | 44 | class Q3PopupMenu; |
42 | //USclass QComboBox; | 45 | //USclass QComboBox; |
43 | //USclass QPoint; | 46 | //USclass QPoint; |
44 | //USclass QIconSet; | 47 | //USclass QIconSet; |
45 | //USclass QString; | 48 | //USclass QString; |
46 | //USclass KToolBar; | 49 | //USclass KToolBar; |
47 | 50 | ||
48 | //USclass KAccel; | 51 | //USclass KAccel; |
49 | //USclass KAccelActions; | 52 | //USclass KAccelActions; |
50 | class KConfig; | 53 | class KConfig; |
51 | //USclass KConfigBase; | 54 | //USclass KConfigBase; |
52 | class KURL; | 55 | class KURL; |
53 | //USclass KInstance; | 56 | //USclass KInstance; |
54 | 57 | ||
55 | 58 | ||
56 | //US class KToolBar needs to be replaced | 59 | //US class KToolBar needs to be replaced |
57 | class KToolBar; | 60 | #include "ktoolbar.h" |
58 | class KActionCollection; | 61 | class KActionCollection; |
59 | 62 | ||
60 | //US class KPopupMenu needs to be replaced | 63 | //US class KPopupMenu needs to be replaced |
61 | //US class KPopupMenu; | 64 | //US class KPopupMenu; |
62 | //USclass KMainWindow; | 65 | //USclass KMainWindow; |
63 | 66 | ||
64 | /** | 67 | /** |
65 | * Checkbox like action. | 68 | * Checkbox like action. |
66 | * | 69 | * |
67 | * This action provides two states: checked or not. | 70 | * This action provides two states: checked or not. |
68 | * | 71 | * |
69 | * @short Checkbox like action. | 72 | * @short Checkbox like action. |
@@ -96,47 +99,47 @@ public: | |||
96 | * @param name An internal name for this action. | 99 | * @param name An internal name for this action. |
97 | */ | 100 | */ |
98 | KToggleAction( const QString& text, const KShortcut& cut, | 101 | KToggleAction( const QString& text, const KShortcut& cut, |
99 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 102 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
100 | 103 | ||
101 | /** | 104 | /** |
102 | * @param text The text that will be displayed. | 105 | * @param text The text that will be displayed. |
103 | * @param pix The icons that go with this action. | 106 | * @param pix The icons that go with this action. |
104 | * @param cut The corresponding keyboard accelerator (shortcut). | 107 | * @param cut The corresponding keyboard accelerator (shortcut). |
105 | * @param parent This action's parent. | 108 | * @param parent This action's parent. |
106 | * @param name An internal name for this action. | 109 | * @param name An internal name for this action. |
107 | */ | 110 | */ |
108 | KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 111 | KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
109 | QObject* parent = 0, const char* name = 0 ); | 112 | QObject* parent = 0, const char* name = 0 ); |
110 | 113 | ||
111 | /** | 114 | /** |
112 | * @param text The text that will be displayed. | 115 | * @param text The text that will be displayed. |
113 | * @param pix The dynamically loaded icon that goes with this action. | 116 | * @param pix The dynamically loaded icon that goes with this action. |
114 | * @param cut The corresponding keyboard accelerator (shortcut). | 117 | * @param cut The corresponding keyboard accelerator (shortcut). |
115 | * @param parent This action's parent. | 118 | * @param parent This action's parent. |
116 | * @param name An internal name for this action. | 119 | * @param name An internal name for this action. |
117 | */ | 120 | */ |
118 | KToggleAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 121 | KToggleAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
119 | QObject* parent = 0, const char* name = 0 ); | 122 | QObject* parent = 0, const char* name = 0 ); |
120 | 123 | ||
121 | /** | 124 | /** |
122 | * @param text The text that will be displayed. | 125 | * @param text The text that will be displayed. |
123 | * @param pix The icons that go with this action. | 126 | * @param pix The icons that go with this action. |
124 | * @param cut The corresponding keyboard accelerator (shortcut). | 127 | * @param cut The corresponding keyboard accelerator (shortcut). |
125 | * @param receiver The SLOT's parent. | 128 | * @param receiver The SLOT's parent. |
126 | * @param slot The SLOT to invoke to execute this action. | 129 | * @param slot The SLOT to invoke to execute this action. |
127 | * @param parent This action's parent. | 130 | * @param parent This action's parent. |
128 | * @param name An internal name for this action. | 131 | * @param name An internal name for this action. |
129 | */ | 132 | */ |
130 | KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 133 | KToggleAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
131 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 134 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
132 | 135 | ||
133 | /** | 136 | /** |
134 | * @param text The text that will be displayed. | 137 | * @param text The text that will be displayed. |
135 | * @param pix The dynamically loaded icon that goes with this action. | 138 | * @param pix The dynamically loaded icon that goes with this action. |
136 | * @param cut The corresponding keyboard accelerator (shortcut). | 139 | * @param cut The corresponding keyboard accelerator (shortcut). |
137 | * @param receiver The SLOT's parent. | 140 | * @param receiver The SLOT's parent. |
138 | * @param slot The SLOT to invoke to execute this action. | 141 | * @param slot The SLOT to invoke to execute this action. |
139 | * @param parent This action's parent. | 142 | * @param parent This action's parent. |
140 | * @param name An internal name for this action. | 143 | * @param name An internal name for this action. |
141 | */ | 144 | */ |
142 | KToggleAction( const QString& text, const QString& pix, const KShortcut& cut, | 145 | KToggleAction( const QString& text, const QString& pix, const KShortcut& cut, |
@@ -237,47 +240,47 @@ public: | |||
237 | * @param name An internal name for this action. | 240 | * @param name An internal name for this action. |
238 | */ | 241 | */ |
239 | KRadioAction( const QString& text, const KShortcut& cut, | 242 | KRadioAction( const QString& text, const KShortcut& cut, |
240 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 243 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
241 | 244 | ||
242 | /** | 245 | /** |
243 | * @param text The text that will be displayed. | 246 | * @param text The text that will be displayed. |
244 | * @param pix The icons that go with this action. | 247 | * @param pix The icons that go with this action. |
245 | * @param cut The corresponding keyboard accelerator (shortcut). | 248 | * @param cut The corresponding keyboard accelerator (shortcut). |
246 | * @param parent This action's parent. | 249 | * @param parent This action's parent. |
247 | * @param name An internal name for this action. | 250 | * @param name An internal name for this action. |
248 | */ | 251 | */ |
249 | KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 252 | KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
250 | QObject* parent = 0, const char* name = 0 ); | 253 | QObject* parent = 0, const char* name = 0 ); |
251 | 254 | ||
252 | /** | 255 | /** |
253 | * @param text The text that will be displayed. | 256 | * @param text The text that will be displayed. |
254 | * @param pix The dynamically loaded icon that goes with this action. | 257 | * @param pix The dynamically loaded icon that goes with this action. |
255 | * @param cut The corresponding keyboard accelerator (shortcut). | 258 | * @param cut The corresponding keyboard accelerator (shortcut). |
256 | * @param parent This action's parent. | 259 | * @param parent This action's parent. |
257 | * @param name An internal name for this action. | 260 | * @param name An internal name for this action. |
258 | */ | 261 | */ |
259 | KRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 262 | KRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
260 | QObject* parent = 0, const char* name = 0 ); | 263 | QObject* parent = 0, const char* name = 0 ); |
261 | 264 | ||
262 | /** | 265 | /** |
263 | * @param text The text that will be displayed. | 266 | * @param text The text that will be displayed. |
264 | * @param pix The icons that go with this action. | 267 | * @param pix The icons that go with this action. |
265 | * @param cut The corresponding keyboard accelerator (shortcut). | 268 | * @param cut The corresponding keyboard accelerator (shortcut). |
266 | * @param receiver The SLOT's parent. | 269 | * @param receiver The SLOT's parent. |
267 | * @param slot The SLOT to invoke to execute this action. | 270 | * @param slot The SLOT to invoke to execute this action. |
268 | * @param parent This action's parent. | 271 | * @param parent This action's parent. |
269 | * @param name An internal name for this action. | 272 | * @param name An internal name for this action. |
270 | */ | 273 | */ |
271 | KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 274 | KRadioAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
272 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 275 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
273 | 276 | ||
274 | /** | 277 | /** |
275 | * @param text The text that will be displayed. | 278 | * @param text The text that will be displayed. |
276 | * @param pix The dynamically loaded icon that goes with this action. | 279 | * @param pix The dynamically loaded icon that goes with this action. |
277 | * @param cut The corresponding keyboard accelerator (shortcut). | 280 | * @param cut The corresponding keyboard accelerator (shortcut). |
278 | * @param receiver The SLOT's parent. | 281 | * @param receiver The SLOT's parent. |
279 | * @param slot The SLOT to invoke to execute this action. | 282 | * @param slot The SLOT to invoke to execute this action. |
280 | * @param parent This action's parent. | 283 | * @param parent This action's parent. |
281 | * @param name An internal name for this action. | 284 | * @param name An internal name for this action. |
282 | */ | 285 | */ |
283 | KRadioAction( const QString& text, const QString& pix, const KShortcut& cut, | 286 | KRadioAction( const QString& text, const QString& pix, const KShortcut& cut, |
@@ -343,47 +346,47 @@ public: | |||
343 | * @param name An internal name for this action. | 346 | * @param name An internal name for this action. |
344 | */ | 347 | */ |
345 | KSelectAction( const QString& text, const KShortcut& cut, | 348 | KSelectAction( const QString& text, const KShortcut& cut, |
346 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 349 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
347 | 350 | ||
348 | /** | 351 | /** |
349 | * @param text The text that will be displayed. | 352 | * @param text The text that will be displayed. |
350 | * @param pix The icons that go with this action. | 353 | * @param pix The icons that go with this action. |
351 | * @param cut The corresponding keyboard accelerator (shortcut). | 354 | * @param cut The corresponding keyboard accelerator (shortcut). |
352 | * @param parent This action's parent. | 355 | * @param parent This action's parent. |
353 | * @param name An internal name for this action. | 356 | * @param name An internal name for this action. |
354 | */ | 357 | */ |
355 | KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 358 | KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
356 | QObject* parent = 0, const char* name = 0 ); | 359 | QObject* parent = 0, const char* name = 0 ); |
357 | 360 | ||
358 | /** | 361 | /** |
359 | * @param text The text that will be displayed. | 362 | * @param text The text that will be displayed. |
360 | * @param pix The dynamically loaded icon that goes with this action. | 363 | * @param pix The dynamically loaded icon that goes with this action. |
361 | * @param cut The corresponding keyboard accelerator (shortcut). | 364 | * @param cut The corresponding keyboard accelerator (shortcut). |
362 | * @param parent This action's parent. | 365 | * @param parent This action's parent. |
363 | * @param name An internal name for this action. | 366 | * @param name An internal name for this action. |
364 | */ | 367 | */ |
365 | KSelectAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 368 | KSelectAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
366 | QObject* parent = 0, const char* name = 0 ); | 369 | QObject* parent = 0, const char* name = 0 ); |
367 | 370 | ||
368 | /** | 371 | /** |
369 | * @param text The text that will be displayed. | 372 | * @param text The text that will be displayed. |
370 | * @param pix The icons that go with this action. | 373 | * @param pix The icons that go with this action. |
371 | * @param cut The corresponding keyboard accelerator (shortcut). | 374 | * @param cut The corresponding keyboard accelerator (shortcut). |
372 | * @param receiver The SLOT's parent. | 375 | * @param receiver The SLOT's parent. |
373 | * @param slot The SLOT to invoke to execute this action. | 376 | * @param slot The SLOT to invoke to execute this action. |
374 | * @param parent This action's parent. | 377 | * @param parent This action's parent. |
375 | * @param name An internal name for this action. | 378 | * @param name An internal name for this action. |
376 | */ | 379 | */ |
377 | KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 380 | KSelectAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
378 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); | 381 | const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 ); |
379 | 382 | ||
380 | /** | 383 | /** |
381 | * @param text The text that will be displayed. | 384 | * @param text The text that will be displayed. |
382 | * @param pix The dynamically loaded icon that goes with this action. | 385 | * @param pix The dynamically loaded icon that goes with this action. |
383 | * @param cut The corresponding keyboard accelerator (shortcut). | 386 | * @param cut The corresponding keyboard accelerator (shortcut). |
384 | * @param receiver The SLOT's parent. | 387 | * @param receiver The SLOT's parent. |
385 | * @param slot The SLOT to invoke to execute this action. | 388 | * @param slot The SLOT to invoke to execute this action. |
386 | * @param parent This action's parent. | 389 | * @param parent This action's parent. |
387 | * @param name An internal name for this action. | 390 | * @param name An internal name for this action. |
388 | */ | 391 | */ |
389 | KSelectAction( const QString& text, const QString& pix, const KShortcut& cut, | 392 | KSelectAction( const QString& text, const QString& pix, const KShortcut& cut, |
@@ -429,25 +432,25 @@ public: | |||
429 | virtual void changeItem( int index, const QString& text ); | 432 | virtual void changeItem( int index, const QString& text ); |
430 | 433 | ||
431 | virtual QString currentText() const; | 434 | virtual QString currentText() const; |
432 | 435 | ||
433 | virtual int currentItem() const; | 436 | virtual int currentItem() const; |
434 | 437 | ||
435 | /** | 438 | /** |
436 | * When this action is plugged into a toolbar, it creates a combobox. | 439 | * When this action is plugged into a toolbar, it creates a combobox. |
437 | * This returns the maximum width set by setComboWidth | 440 | * This returns the maximum width set by setComboWidth |
438 | */ | 441 | */ |
439 | virtual int comboWidth() const; | 442 | virtual int comboWidth() const; |
440 | 443 | ||
441 | QPopupMenu* popupMenu() const; | 444 | Q3PopupMenu* popupMenu() const; |
442 | 445 | ||
443 | /** | 446 | /** |
444 | * Deprecated. See @ref setMenuAccelsEnabled . | 447 | * Deprecated. See @ref setMenuAccelsEnabled . |
445 | * @since 3.1 | 448 | * @since 3.1 |
446 | */ | 449 | */ |
447 | void setRemoveAmpersandsInCombo( bool b ); | 450 | void setRemoveAmpersandsInCombo( bool b ); |
448 | /// @since 3.1 | 451 | /// @since 3.1 |
449 | bool removeAmpersandsInCombo() const; | 452 | bool removeAmpersandsInCombo() const; |
450 | 453 | ||
451 | /** | 454 | /** |
452 | * Sets whether any occurence of the ampersand character ( & ) in items | 455 | * Sets whether any occurence of the ampersand character ( & ) in items |
453 | * should be interpreted as keyboard accelerator for items displayed in a | 456 | * should be interpreted as keyboard accelerator for items displayed in a |
@@ -558,47 +561,47 @@ public: | |||
558 | * @param name An internal name for this action. | 561 | * @param name An internal name for this action. |
559 | */ | 562 | */ |
560 | KListAction( const QString& text, const KShortcut& cut, const QObject* receiver, | 563 | KListAction( const QString& text, const KShortcut& cut, const QObject* receiver, |
561 | const char* slot, QObject* parent, const char* name = 0 ); | 564 | const char* slot, QObject* parent, const char* name = 0 ); |
562 | 565 | ||
563 | /** | 566 | /** |
564 | * @param text The text that will be displayed. | 567 | * @param text The text that will be displayed. |
565 | * @param pix The icons that go with this action. | 568 | * @param pix The icons that go with this action. |
566 | * @param cut The corresponding keyboard accelerator (shortcut). | 569 | * @param cut The corresponding keyboard accelerator (shortcut). |
567 | * @param parent This action's parent. | 570 | * @param parent This action's parent. |
568 | * @param name An internal name for this action. | 571 | * @param name An internal name for this action. |
569 | */ | 572 | */ |
570 | KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 573 | KListAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
571 | QObject* parent = 0, const char* name = 0 ); | 574 | QObject* parent = 0, const char* name = 0 ); |
572 | 575 | ||
573 | /** | 576 | /** |
574 | * @param text The text that will be displayed. | 577 | * @param text The text that will be displayed. |
575 | * @param pix The dynamically loaded icon that goes with this action. | 578 | * @param pix The dynamically loaded icon that goes with this action. |
576 | * @param cut The corresponding keyboard accelerator (shortcut). | 579 | * @param cut The corresponding keyboard accelerator (shortcut). |
577 | * @param parent This action's parent. | 580 | * @param parent This action's parent. |
578 | * @param name An internal name for this action. | 581 | * @param name An internal name for this action. |
579 | */ | 582 | */ |
580 | KListAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 583 | KListAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
581 | QObject* parent = 0, const char* name = 0 ); | 584 | QObject* parent = 0, const char* name = 0 ); |
582 | 585 | ||
583 | /** | 586 | /** |
584 | * @param text The text that will be displayed. | 587 | * @param text The text that will be displayed. |
585 | * @param pix The icons that go with this action. | 588 | * @param pix The icons that go with this action. |
586 | * @param cut The corresponding keyboard accelerator (shortcut). | 589 | * @param cut The corresponding keyboard accelerator (shortcut). |
587 | * @param receiver The SLOT's parent. | 590 | * @param receiver The SLOT's parent. |
588 | * @param slot The SLOT to invoke to execute this action. | 591 | * @param slot The SLOT to invoke to execute this action. |
589 | * @param parent This action's parent. | 592 | * @param parent This action's parent. |
590 | * @param name An internal name for this action. | 593 | * @param name An internal name for this action. |
591 | */ | 594 | */ |
592 | KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 595 | KListAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
593 | const QObject* receiver, const char* slot, QObject* parent, | 596 | const QObject* receiver, const char* slot, QObject* parent, |
594 | const char* name = 0 ); | 597 | const char* name = 0 ); |
595 | 598 | ||
596 | /** | 599 | /** |
597 | * @param text The text that will be displayed. | 600 | * @param text The text that will be displayed. |
598 | * @param pix The dynamically loaded icon that goes with this action. | 601 | * @param pix The dynamically loaded icon that goes with this action. |
599 | * @param cut The corresponding keyboard accelerator (shortcut). | 602 | * @param cut The corresponding keyboard accelerator (shortcut). |
600 | * @param receiver The SLOT's parent. | 603 | * @param receiver The SLOT's parent. |
601 | * @param slot The SLOT to invoke to execute this action. | 604 | * @param slot The SLOT to invoke to execute this action. |
602 | * @param parent This action's parent. | 605 | * @param parent This action's parent. |
603 | * @param name An internal name for this action. | 606 | * @param name An internal name for this action. |
604 | */ | 607 | */ |
@@ -676,25 +679,25 @@ public: | |||
676 | const QObject* receiver, const char* slot, | 679 | const QObject* receiver, const char* slot, |
677 | QObject* parent, const char* name = 0, | 680 | QObject* parent, const char* name = 0, |
678 | uint maxItems = 10 ); | 681 | uint maxItems = 10 ); |
679 | 682 | ||
680 | /** | 683 | /** |
681 | * @param text The text that will be displayed. | 684 | * @param text The text that will be displayed. |
682 | * @param pix The icons that go with this action. | 685 | * @param pix The icons that go with this action. |
683 | * @param cut The corresponding keyboard accelerator (shortcut). | 686 | * @param cut The corresponding keyboard accelerator (shortcut). |
684 | * @param parent This action's parent. | 687 | * @param parent This action's parent. |
685 | * @param name An internal name for this action. | 688 | * @param name An internal name for this action. |
686 | * @param maxItems The maximum number of files to display | 689 | * @param maxItems The maximum number of files to display |
687 | */ | 690 | */ |
688 | KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 691 | KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
689 | QObject* parent, const char* name = 0, | 692 | QObject* parent, const char* name = 0, |
690 | uint maxItems = 10 ); | 693 | uint maxItems = 10 ); |
691 | 694 | ||
692 | /** | 695 | /** |
693 | * @param text The text that will be displayed. | 696 | * @param text The text that will be displayed. |
694 | * @param pix The dynamically loaded icon that goes with this action. | 697 | * @param pix The dynamically loaded icon that goes with this action. |
695 | * @param cut The corresponding keyboard accelerator (shortcut). | 698 | * @param cut The corresponding keyboard accelerator (shortcut). |
696 | * @param parent This action's parent. | 699 | * @param parent This action's parent. |
697 | * @param name An internal name for this action. | 700 | * @param name An internal name for this action. |
698 | * @param maxItems The maximum number of files to display | 701 | * @param maxItems The maximum number of files to display |
699 | */ | 702 | */ |
700 | KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut, | 703 | KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut, |
@@ -703,25 +706,25 @@ public: | |||
703 | 706 | ||
704 | /** | 707 | /** |
705 | * @param text The text that will be displayed. | 708 | * @param text The text that will be displayed. |
706 | * @param pix The icons that go with this action. | 709 | * @param pix The icons that go with this action. |
707 | * @param cut The corresponding keyboard accelerator (shortcut). | 710 | * @param cut The corresponding keyboard accelerator (shortcut). |
708 | * @param receiver The SLOT's parent. | 711 | * @param receiver The SLOT's parent. |
709 | * @param slot The SLOT to invoke when a URL is selected. | 712 | * @param slot The SLOT to invoke when a URL is selected. |
710 | * Its signature is of the form slotURLSelected( const KURL & ). | 713 | * Its signature is of the form slotURLSelected( const KURL & ). |
711 | * @param parent This action's parent. | 714 | * @param parent This action's parent. |
712 | * @param name An internal name for this action. | 715 | * @param name An internal name for this action. |
713 | * @param maxItems The maximum number of files to display | 716 | * @param maxItems The maximum number of files to display |
714 | */ | 717 | */ |
715 | KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 718 | KRecentFilesAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
716 | const QObject* receiver, const char* slot, | 719 | const QObject* receiver, const char* slot, |
717 | QObject* parent, const char* name = 0, | 720 | QObject* parent, const char* name = 0, |
718 | uint maxItems = 10 ); | 721 | uint maxItems = 10 ); |
719 | 722 | ||
720 | /** | 723 | /** |
721 | * @param text The text that will be displayed. | 724 | * @param text The text that will be displayed. |
722 | * @param pix The dynamically loaded icon that goes with this action. | 725 | * @param pix The dynamically loaded icon that goes with this action. |
723 | * @param cut The corresponding keyboard accelerator (shortcut). | 726 | * @param cut The corresponding keyboard accelerator (shortcut). |
724 | * @param receiver The SLOT's parent. | 727 | * @param receiver The SLOT's parent. |
725 | * @param slot The SLOT to invoke when a URL is selected. | 728 | * @param slot The SLOT to invoke when a URL is selected. |
726 | * Its signature is of the form slotURLSelected( const KURL & ). | 729 | * Its signature is of the form slotURLSelected( const KURL & ). |
727 | * @param parent This action's parent. | 730 | * @param parent This action's parent. |
@@ -825,29 +828,29 @@ private: | |||
825 | }; | 828 | }; |
826 | 829 | ||
827 | class KFontAction : public KSelectAction | 830 | class KFontAction : public KSelectAction |
828 | { | 831 | { |
829 | Q_OBJECT | 832 | Q_OBJECT |
830 | Q_PROPERTY( QString font READ font WRITE setFont ) | 833 | Q_PROPERTY( QString font READ font WRITE setFont ) |
831 | public: | 834 | public: |
832 | KFontAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, | 835 | KFontAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, |
833 | const char* name = 0 ); | 836 | const char* name = 0 ); |
834 | KFontAction( const QString& text, const KShortcut& cut, | 837 | KFontAction( const QString& text, const KShortcut& cut, |
835 | const QObject* receiver, const char* slot, QObject* parent, | 838 | const QObject* receiver, const char* slot, QObject* parent, |
836 | const char* name = 0 ); | 839 | const char* name = 0 ); |
837 | KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 840 | KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
838 | QObject* parent = 0, const char* name = 0 ); | 841 | QObject* parent = 0, const char* name = 0 ); |
839 | KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 842 | KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
840 | QObject* parent = 0, const char* name = 0 ); | 843 | QObject* parent = 0, const char* name = 0 ); |
841 | KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 844 | KFontAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
842 | const QObject* receiver, const char* slot, QObject* parent, | 845 | const QObject* receiver, const char* slot, QObject* parent, |
843 | const char* name = 0 ); | 846 | const char* name = 0 ); |
844 | KFontAction( const QString& text, const QString& pix, const KShortcut& cut, | 847 | KFontAction( const QString& text, const QString& pix, const KShortcut& cut, |
845 | const QObject* receiver, const char* slot, QObject* parent, | 848 | const QObject* receiver, const char* slot, QObject* parent, |
846 | const char* name = 0 ); | 849 | const char* name = 0 ); |
847 | 850 | ||
848 | KFontAction( QObject* parent = 0, const char* name = 0 ); | 851 | KFontAction( QObject* parent = 0, const char* name = 0 ); |
849 | ~KFontAction(); | 852 | ~KFontAction(); |
850 | 853 | ||
851 | QString font() const { | 854 | QString font() const { |
852 | return currentText(); | 855 | return currentText(); |
853 | } | 856 | } |
@@ -864,29 +867,29 @@ private: | |||
864 | KFontActionPrivate *d; | 867 | KFontActionPrivate *d; |
865 | }; | 868 | }; |
866 | 869 | ||
867 | class KFontSizeAction : public KSelectAction | 870 | class KFontSizeAction : public KSelectAction |
868 | { | 871 | { |
869 | Q_OBJECT | 872 | Q_OBJECT |
870 | Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) | 873 | Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) |
871 | public: | 874 | public: |
872 | KFontSizeAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, | 875 | KFontSizeAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, |
873 | const char* name = 0 ); | 876 | const char* name = 0 ); |
874 | KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver, | 877 | KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver, |
875 | const char* slot, QObject* parent, const char* name = 0 ); | 878 | const char* slot, QObject* parent, const char* name = 0 ); |
876 | KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(), | 879 | KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut = KShortcut(), |
877 | QObject* parent = 0, const char* name = 0 ); | 880 | QObject* parent = 0, const char* name = 0 ); |
878 | KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), | 881 | KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(), |
879 | QObject* parent = 0, const char* name = 0 ); | 882 | QObject* parent = 0, const char* name = 0 ); |
880 | KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut, | 883 | KFontSizeAction( const QString& text, const QIcon& pix, const KShortcut& cut, |
881 | const QObject* receiver, const char* slot, | 884 | const QObject* receiver, const char* slot, |
882 | QObject* parent, const char* name = 0 ); | 885 | QObject* parent, const char* name = 0 ); |
883 | KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut, | 886 | KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut, |
884 | const QObject* receiver, const char* slot, | 887 | const QObject* receiver, const char* slot, |
885 | QObject* parent, const char* name = 0 ); | 888 | QObject* parent, const char* name = 0 ); |
886 | KFontSizeAction( QObject* parent = 0, const char* name = 0 ); | 889 | KFontSizeAction( QObject* parent = 0, const char* name = 0 ); |
887 | 890 | ||
888 | virtual ~KFontSizeAction(); | 891 | virtual ~KFontSizeAction(); |
889 | 892 | ||
890 | virtual int fontSize() const; | 893 | virtual int fontSize() const; |
891 | 894 | ||
892 | public slots: | 895 | public slots: |
@@ -922,36 +925,36 @@ private: | |||
922 | * If you want a submenu for selecting one tool among many (without icons), see KSelectAction. | 925 | * If you want a submenu for selecting one tool among many (without icons), see KSelectAction. |
923 | * See also setDelayed about the main action. | 926 | * See also setDelayed about the main action. |
924 | */ | 927 | */ |
925 | class KActionMenu : public KAction | 928 | class KActionMenu : public KAction |
926 | { | 929 | { |
927 | Q_OBJECT | 930 | Q_OBJECT |
928 | Q_PROPERTY( bool delayed READ delayed WRITE setDelayed ) | 931 | Q_PROPERTY( bool delayed READ delayed WRITE setDelayed ) |
929 | Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) | 932 | Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) |
930 | 933 | ||
931 | public: | 934 | public: |
932 | KActionMenu( const QString& text, QObject* parent = 0, | 935 | KActionMenu( const QString& text, QObject* parent = 0, |
933 | const char* name = 0 ); | 936 | const char* name = 0 ); |
934 | KActionMenu( const QString& text, const QIconSet& icon, | 937 | KActionMenu( const QString& text, const QIcon& icon, |
935 | QObject* parent = 0, const char* name = 0 ); | 938 | QObject* parent = 0, const char* name = 0 ); |
936 | KActionMenu( const QString& text, const QString& icon, | 939 | KActionMenu( const QString& text, const QString& icon, |
937 | QObject* parent = 0, const char* name = 0 ); | 940 | QObject* parent = 0, const char* name = 0 ); |
938 | KActionMenu( QObject* parent = 0, const char* name = 0 ); | 941 | KActionMenu( QObject* parent = 0, const char* name = 0 ); |
939 | virtual ~KActionMenu(); | 942 | virtual ~KActionMenu(); |
940 | 943 | ||
941 | virtual void insert( KAction*, int index = -1 ); | 944 | virtual void insert( KAction*, int index = -1 ); |
942 | virtual void remove( KAction* ); | 945 | virtual void remove( KAction* ); |
943 | 946 | ||
944 | //US KPopupMenu* popupMenu() const; | 947 | //US KPopupMenu* popupMenu() const; |
945 | QPopupMenu* popupMenu() const; | 948 | Q3PopupMenu* popupMenu() const; |
946 | void popup( const QPoint& global ); | 949 | void popup( const QPoint& global ); |
947 | 950 | ||
948 | /** | 951 | /** |
949 | * Returns true if this action creates a delayed popup menu | 952 | * Returns true if this action creates a delayed popup menu |
950 | * when plugged in a KToolbar. | 953 | * when plugged in a KToolbar. |
951 | */ | 954 | */ |
952 | bool delayed() const; | 955 | bool delayed() const; |
953 | /** | 956 | /** |
954 | * If set to true, this action will create a delayed popup menu | 957 | * If set to true, this action will create a delayed popup menu |
955 | * when plugged in a KToolbar. Otherwise it creates a normal popup. | 958 | * when plugged in a KToolbar. Otherwise it creates a normal popup. |
956 | * Default: delayed | 959 | * Default: delayed |
957 | * | 960 | * |
@@ -1058,25 +1061,25 @@ public: | |||
1058 | KActionCollection* parent, const char* name ); | 1061 | KActionCollection* parent, const char* name ); |
1059 | 1062 | ||
1060 | virtual ~KToolBarPopupAction(); | 1063 | virtual ~KToolBarPopupAction(); |
1061 | 1064 | ||
1062 | virtual int plug( QWidget *widget, int index = -1 ); | 1065 | virtual int plug( QWidget *widget, int index = -1 ); |
1063 | 1066 | ||
1064 | /** | 1067 | /** |
1065 | * The popup menu that is shown when clicking (some time) on the toolbar | 1068 | * The popup menu that is shown when clicking (some time) on the toolbar |
1066 | * button. You may want to plug items into it on creation, or connect to | 1069 | * button. You may want to plug items into it on creation, or connect to |
1067 | * aboutToShow for a more dynamic menu. | 1070 | * aboutToShow for a more dynamic menu. |
1068 | */ | 1071 | */ |
1069 | //US KPopupMenu *popupMenu() const; | 1072 | //US KPopupMenu *popupMenu() const; |
1070 | QPopupMenu *popupMenu() const; | 1073 | Q3PopupMenu *popupMenu() const; |
1071 | 1074 | ||
1072 | /** | 1075 | /** |
1073 | * Returns true if this action creates a delayed popup menu | 1076 | * Returns true if this action creates a delayed popup menu |
1074 | * when plugged in a KToolbar. | 1077 | * when plugged in a KToolbar. |
1075 | */ | 1078 | */ |
1076 | bool delayed() const; | 1079 | bool delayed() const; |
1077 | /** | 1080 | /** |
1078 | * If set to true, this action will create a delayed popup menu | 1081 | * If set to true, this action will create a delayed popup menu |
1079 | * when plugged in a KToolbar. Otherwise it creates a normal popup. | 1082 | * when plugged in a KToolbar. Otherwise it creates a normal popup. |
1080 | * Default: delayed. | 1083 | * Default: delayed. |
1081 | */ | 1084 | */ |
1082 | void setDelayed(bool delayed); | 1085 | void setDelayed(bool delayed); |
@@ -1089,25 +1092,25 @@ public: | |||
1089 | * If set to true, this action will create a sticky popup menu | 1092 | * If set to true, this action will create a sticky popup menu |
1090 | * when plugged in a KToolbar. | 1093 | * when plugged in a KToolbar. |
1091 | * "Sticky", means it's visible until a selection is made or the mouse is | 1094 | * "Sticky", means it's visible until a selection is made or the mouse is |
1092 | * clicked elsewhere. This feature allows you to make a selection without | 1095 | * clicked elsewhere. This feature allows you to make a selection without |
1093 | * having to press and hold down the mouse while making a selection. | 1096 | * having to press and hold down the mouse while making a selection. |
1094 | * Only available if delayed() is true. | 1097 | * Only available if delayed() is true. |
1095 | * Default: sticky. | 1098 | * Default: sticky. |
1096 | */ | 1099 | */ |
1097 | void setStickyMenu(bool sticky); | 1100 | void setStickyMenu(bool sticky); |
1098 | 1101 | ||
1099 | private: | 1102 | private: |
1100 | //US KPopupMenu *m_popup; | 1103 | //US KPopupMenu *m_popup; |
1101 | QPopupMenu *m_popup; | 1104 | Q3PopupMenu *m_popup; |
1102 | bool m_delayed:1; | 1105 | bool m_delayed:1; |
1103 | bool m_stickyMenu:1; | 1106 | bool m_stickyMenu:1; |
1104 | protected: | 1107 | protected: |
1105 | virtual void virtual_hook( int id, void* data ); | 1108 | virtual void virtual_hook( int id, void* data ); |
1106 | private: | 1109 | private: |
1107 | class KToolBarPopupActionPrivate; | 1110 | class KToolBarPopupActionPrivate; |
1108 | KToolBarPopupActionPrivate *d; | 1111 | KToolBarPopupActionPrivate *d; |
1109 | }; | 1112 | }; |
1110 | 1113 | ||
1111 | /** | 1114 | /** |
1112 | * An action that takes care of everything associated with | 1115 | * An action that takes care of everything associated with |
1113 | * showing or hiding a toolbar by a menu action. It will | 1116 | * showing or hiding a toolbar by a menu action. It will |
@@ -1138,26 +1141,26 @@ public: | |||
1138 | virtual ~KToggleToolBarAction(); | 1141 | virtual ~KToggleToolBarAction(); |
1139 | 1142 | ||
1140 | virtual int plug( QWidget*, int index = -1 ); | 1143 | virtual int plug( QWidget*, int index = -1 ); |
1141 | 1144 | ||
1142 | KToolBar *toolBar() { | 1145 | KToolBar *toolBar() { |
1143 | return m_toolBar; | 1146 | return m_toolBar; |
1144 | } | 1147 | } |
1145 | 1148 | ||
1146 | public slots: | 1149 | public slots: |
1147 | virtual void setChecked( bool ); | 1150 | virtual void setChecked( bool ); |
1148 | 1151 | ||
1149 | private: | 1152 | private: |
1150 | QCString m_toolBarName; | 1153 | Q3CString m_toolBarName; |
1151 | QGuardedPtr<KToolBar> m_toolBar; | 1154 | QPointer<KToolBar> m_toolBar; |
1152 | protected: | 1155 | protected: |
1153 | virtual void virtual_hook( int id, void* data ); | 1156 | virtual void virtual_hook( int id, void* data ); |
1154 | private: | 1157 | private: |
1155 | class KToggleToolBarActionPrivate; | 1158 | class KToggleToolBarActionPrivate; |
1156 | KToggleToolBarActionPrivate *d; | 1159 | KToggleToolBarActionPrivate *d; |
1157 | }; | 1160 | }; |
1158 | 1161 | ||
1159 | /** | 1162 | /** |
1160 | * An action that automatically embeds a widget into a | 1163 | * An action that automatically embeds a widget into a |
1161 | * toolbar. | 1164 | * toolbar. |
1162 | */ | 1165 | */ |
1163 | class KWidgetAction : public KAction | 1166 | class KWidgetAction : public KAction |
@@ -1186,25 +1189,25 @@ public: | |||
1186 | * Plug the action. The widget passed to the constructor | 1189 | * Plug the action. The widget passed to the constructor |
1187 | * will be reparented to w, which must inherit KToolBar. | 1190 | * will be reparented to w, which must inherit KToolBar. |
1188 | */ | 1191 | */ |
1189 | virtual int plug( QWidget* w, int index = -1 ); | 1192 | virtual int plug( QWidget* w, int index = -1 ); |
1190 | /** | 1193 | /** |
1191 | * Unplug the action. Ensures that the action is not | 1194 | * Unplug the action. Ensures that the action is not |
1192 | * destroyed. It will be hidden and reparented to 0L instead. | 1195 | * destroyed. It will be hidden and reparented to 0L instead. |
1193 | */ | 1196 | */ |
1194 | virtual void unplug( QWidget *w ); | 1197 | virtual void unplug( QWidget *w ); |
1195 | protected slots: | 1198 | protected slots: |
1196 | void slotToolbarDestroyed(); | 1199 | void slotToolbarDestroyed(); |
1197 | private: | 1200 | private: |
1198 | QGuardedPtr<QWidget> m_widget; | 1201 | QPointer<QWidget> m_widget; |
1199 | bool m_autoSized; | 1202 | bool m_autoSized; |
1200 | protected: | 1203 | protected: |
1201 | virtual void virtual_hook( int id, void* data ); | 1204 | virtual void virtual_hook( int id, void* data ); |
1202 | private: | 1205 | private: |
1203 | class KWidgetActionPrivate; | 1206 | class KWidgetActionPrivate; |
1204 | KWidgetActionPrivate *d; | 1207 | KWidgetActionPrivate *d; |
1205 | }; | 1208 | }; |
1206 | 1209 | ||
1207 | class KActionSeparator : public KAction | 1210 | class KActionSeparator : public KAction |
1208 | { | 1211 | { |
1209 | Q_OBJECT | 1212 | Q_OBJECT |
1210 | public: | 1213 | public: |