# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kactionclasses.h

    00001 /* This file is part of the KDE libraries
    00002     Copyright (C) 1999 Reginald Stadlbauer <reggie@kde.org>
    00003               (C) 1999 Simon Hausmann <hausmann@kde.org>
    00004               (C) 2000 Nicolas Hadacek <haadcek@kde.org>
    00005               (C) 2000 Kurt Granroth <granroth@kde.org>
    00006               (C) 2000 Michael Koch <koch@kde.org>
    00007               (C) 2001 Holger Freyther <freyther@kde.org>
    00008               (C) 2002 Ellis Whitehead <ellis@kde.org>
    00009               (C) 2003 Andras Mantia <amantia@kde.org>
    00010
    00011     This library is free software; you can redistribute it and/or
    00012     modify it under the terms of the GNU Library General Public
    00013     License version 2 as published by the Free Software Foundation.
    00014
    00015     This library is distributed in the hope that it will be useful,
    00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00018     Library General Public License for more details.
    00019
    00020     You should have received a copy of the GNU Library General Public License
    00021     along with this library; see the file COPYING.LIB.  If not, write to
    00022     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00023     Boston, MA 02111-1307, USA.
    00024 */
    00025 //$Id$
    00026
    00027 #ifndef __kactionclasses_h__
    00028 #define __kactionclasses_h__
    00029
    00030 #include <kaction.h>
    00031
    00032 #include <qkeysequence.h>
    00033 #include <qobject.h>
    00034 #include <qvaluelist.h>
    00035 #include <qguardedptr.h>
    00036 #include <kguiitem.h>
    00037 #include <kshortcut.h>
    00038 #include <kstdaction.h>
    00039 #include <kicontheme.h>
    00040
    00041 class QMenuBar;
    00042 class QPopupMenu;
    00043 class QComboBox;
    00044 class QPoint;
    00045 class QIconSet;
    00046 class QString;
    00047 class KToolBar;
    00048
    00049 class KAccel;
    00050 class KAccelActions;
    00051 class KConfig;
    00052 class KConfigBase;
    00053 class KURL;
    00054 class KInstance;
    00055 class KToolBar;
    00056 class KActionCollection;
    00057 class KPopupMenu;
    00058 class KMainWindow;
    00059
    00068 class KDEUI_EXPORT KToggleAction : public KAction
    00069 {
    00070     Q_OBJECT
    00071     Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
    00072     Q_PROPERTY( QString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
    00073 public:
    00074
    00085     KToggleAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
    00086
    00095     KToggleAction( const QString& text, const KShortcut& cut,
    00096                    const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00097
    00105     KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00106              QObject* parent = 0, const char* name = 0 );
    00107
    00115     KToggleAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00116                    QObject* parent = 0, const char* name = 0 );
    00117
    00127     KToggleAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00128                    const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00129
    00139     KToggleAction( const QString& text, const QString& pix, const KShortcut& cut,
    00140                    const QObject* receiver, const char* slot,
    00141                    QObject* parent, const char* name = 0 );
    00142
    00147     KToggleAction( QObject* parent = 0, const char* name = 0 );
    00148
    00152     virtual ~KToggleAction();
    00153
    00165     virtual int plug( QWidget* widget, int index = -1 );
    00166
    00170     bool isChecked() const;
    00171
    00176     QString exclusiveGroup() const;
    00177
    00184     virtual void setExclusiveGroup( const QString& name );
    00185
    00197     void setCheckedState( const KGuiItem& checkedItem );
    00198
    00200     virtual QString toolTip() const;
    00201
    00202 public slots:
    00206     virtual void setChecked( bool );
    00207
    00208 protected slots:
    00209     virtual void slotActivated();
    00210
    00211 protected:
    00212     virtual void updateChecked( int id );
    00213
    00214 signals:
    00215     void toggled( bool );
    00216
    00217 protected:
    00218     virtual void virtual_hook( int id, void* data );
    00219 private:
    00220     class KToggleActionPrivate;
    00221     KToggleActionPrivate *d;
    00222 };
    00223
    00230 class KDEUI_EXPORT KRadioAction : public KToggleAction
    00231 {
    00232   Q_OBJECT
    00233 public:
    00244     KRadioAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
    00245
    00254     KRadioAction( const QString& text, const KShortcut& cut,
    00255                   const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00256
    00264     KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00265                   QObject* parent = 0, const char* name = 0 );
    00266
    00274     KRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00275                   QObject* parent = 0, const char* name = 0 );
    00276
    00286     KRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00287                   const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00288
    00298     KRadioAction( const QString& text, const QString& pix, const KShortcut& cut,
    00299                   const QObject* receiver, const char* slot,
    00300                   QObject* parent, const char* name = 0 );
    00301
    00306     KRadioAction( QObject* parent = 0, const char* name = 0 );
    00307
    00308 protected:
    00309     virtual void slotActivated();
    00310
    00311 protected:
    00312     virtual void virtual_hook( int id, void* data );
    00313 private:
    00314     class KRadioActionPrivate;
    00315     KRadioActionPrivate *d;
    00316 };
    00317
    00329 class KDEUI_EXPORT KSelectAction : public KAction
    00330 {
    00331     Q_OBJECT
    00332     Q_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
    00333     Q_PROPERTY( QStringList items READ items WRITE setItems )
    00334     Q_PROPERTY( bool editable READ isEditable WRITE setEditable )
    00335     Q_PROPERTY( int comboWidth READ comboWidth WRITE setComboWidth )
    00336     Q_PROPERTY( QString currentText READ currentText )
    00337     Q_PROPERTY( bool menuAccelsEnabled READ menuAccelsEnabled WRITE setMenuAccelsEnabled )
    00338 public:
    00339
    00350     KSelectAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
    00351
    00360     KSelectAction( const QString& text, const KShortcut& cut,
    00361                    const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00362
    00370     KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00371              QObject* parent = 0, const char* name = 0 );
    00372
    00380     KSelectAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00381                    QObject* parent = 0, const char* name = 0 );
    00382
    00392     KSelectAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00393                    const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
    00394
    00404     KSelectAction( const QString& text, const QString& pix, const KShortcut& cut,
    00405                    const QObject* receiver, const char* slot,
    00406                    QObject* parent, const char* name = 0 );
    00407
    00412     KSelectAction( QObject* parent = 0, const char* name = 0 );
    00413
    00417     virtual ~KSelectAction();
    00418
    00430     virtual int plug( QWidget* widget, int index = -1 );
    00431
    00436     virtual bool isEditable() const;
    00437
    00442     virtual QStringList items() const;
    00443
    00447     virtual void changeItem( int index, const QString& text );
    00448
    00452     virtual QString currentText() const;
    00453
    00458     virtual int currentItem() const;
    00459
    00464     virtual int comboWidth() const;
    00465
    00469     QPopupMenu* popupMenu() const;
    00470
    00475     void setRemoveAmpersandsInCombo( bool b ) KDE_DEPRECATED;
    00477     bool removeAmpersandsInCombo() const;
    00478
    00485     void setMenuAccelsEnabled( bool b );
    00487     bool menuAccelsEnabled() const;
    00488
    00489 public slots:
    00495     virtual void setCurrentItem( int index );
    00496
    00501     virtual void setItems( const QStringList &lst );
    00502
    00506     virtual void clear();
    00507
    00512     virtual void setEditable( bool );
    00513
    00519     virtual void setComboWidth( int width );
    00520
    00521 protected:
    00522     virtual void changeItem( int id, int index, const QString& text );
    00523
    00530     QStringList comboItems() const;
    00531
    00532 protected slots:
    00533     virtual void slotActivated( int id );
    00534     virtual void slotActivated( const QString &text );
    00535     virtual void slotActivated();
    00536
    00537 signals:
    00542     void activated( int index );
    00547     void activated( const QString& text );
    00548
    00549 protected:
    00550     virtual void updateCurrentItem( int id );
    00551
    00552     virtual void updateComboWidth( int id );
    00553
    00554     virtual void updateItems( int id );
    00555
    00556     virtual void updateClear( int id );
    00557
    00558 protected:
    00559     virtual void virtual_hook( int id, void* data );
    00560 private:
    00561     void setupMenu() const;
    00562     class KSelectActionPrivate;
    00563     KSelectActionPrivate *d;
    00564
    00565 };
    00566
    00568
    00571 class KDEUI_EXPORT_DEPRECATED KListAction : public KSelectAction
    00572 {
    00573     Q_OBJECT
    00574 public:
    00585     KListAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
    00586                   const char* name = 0 );
    00587
    00596     KListAction( const QString& text, const KShortcut& cut, const QObject* receiver,
    00597                   const char* slot, QObject* parent, const char* name = 0 );
    00598
    00606     KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00607                       QObject* parent = 0, const char* name = 0 );
    00608
    00616     KListAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00617                       QObject* parent = 0, const char* name = 0 );
    00618
    00628     KListAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00629                           const QObject* receiver, const char* slot, QObject* parent,
    00630                   const char* name = 0 );
    00631
    00641     KListAction( const QString& text, const QString& pix, const KShortcut& cut,
    00642                  const QObject* receiver, const char* slot, QObject* parent,
    00643                  const char* name = 0 );
    00644
    00649     KListAction( QObject* parent = 0, const char* name = 0 );
    00650
    00654     virtual ~KListAction();
    00655
    00656
    00657     virtual QString currentText() const;
    00658     virtual int currentItem() const;
    00659
    00660
    00661 public slots:
    00667     virtual void setCurrentItem( int index );
    00668
    00669 protected:
    00670     virtual void virtual_hook( int id, void* data );
    00671 private:
    00672     class KListActionPrivate;
    00673     KListActionPrivate *d;
    00674 };
    00675
    00686 class KDEUI_EXPORT KRecentFilesAction : public KListAction  // TODO public KSelectAction
    00687 {
    00688   Q_OBJECT
    00689   Q_PROPERTY( uint maxItems READ maxItems WRITE setMaxItems )
    00690 public:
    00698   KRecentFilesAction( const QString& text, const KShortcut& cut,
    00699                       QObject* parent, const char* name = 0,
    00700                       uint maxItems = 10 );
    00701
    00712   KRecentFilesAction( const QString& text, const KShortcut& cut,
    00713                       const QObject* receiver, const char* slot,
    00714                       QObject* parent, const char* name = 0,
    00715                       uint maxItems = 10 );
    00716
    00725   KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00726                       QObject* parent, const char* name = 0,
    00727                       uint maxItems = 10 );
    00728
    00737   KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
    00738                       QObject* parent, const char* name = 0,
    00739                       uint maxItems = 10 );
    00740
    00752   KRecentFilesAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00753                       const QObject* receiver, const char* slot,
    00754                       QObject* parent, const char* name = 0,
    00755                       uint maxItems = 10 );
    00756
    00768   KRecentFilesAction( const QString& text, const QString& pix, const KShortcut& cut,
    00769                       const QObject* receiver, const char* slot,
    00770                       QObject* parent, const char* name = 0,
    00771                       uint maxItems = 10 );
    00772
    00778   KRecentFilesAction( QObject* parent = 0, const char* name = 0,
    00779                       uint maxItems = 10 );
    00780
    00784   virtual ~KRecentFilesAction();
    00785
    00786   virtual int plug( QWidget *widget, int index = -1 );
    00787
    00791   uint maxItems() const;
    00792
    00793 public slots:
    00802   void setMaxItems( uint maxItems );
    00803
    00811   void loadEntries( KConfig* config, QString groupname=QString::null );
    00812
    00820   void saveEntries( KConfig* config, QString groupname=QString::null );
    00821
    00827   void addURL( const KURL& url );
    00828
    00834   void removeURL( const KURL& url );
    00835
    00839   void clearURLList();
    00840
    00841 signals:
    00842
    00848   void urlSelected( const KURL& url );
    00849
    00850 protected slots:
    00851   void itemSelected( const QString& string );
    00852   void menuAboutToShow();
    00853   void menuItemActivated( int id );
    00854   void slotClicked();
    00855   virtual void slotActivated(int);
    00856   virtual void slotActivated(const QString& );
    00857   virtual void slotActivated();
    00858
    00859 protected:
    00860   virtual void virtual_hook( int id, void* data );
    00861
    00862 private:
    00863   void init();
    00864
    00865   class KRecentFilesActionPrivate;
    00866   KRecentFilesActionPrivate *d;
    00867 };
    00868
    00869 class KDEUI_EXPORT KFontAction : public KSelectAction
    00870 {
    00871     Q_OBJECT
    00872     Q_PROPERTY( QString font READ font WRITE setFont )
    00873 public:
    00874     KFontAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
    00875                  const char* name = 0 );
    00876     KFontAction( const QString& text, const KShortcut& cut,
    00877                  const QObject* receiver, const char* slot, QObject* parent,
    00878                  const char* name = 0 );
    00879     KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00880                  QObject* parent = 0, const char* name = 0 );
    00881     KFontAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00882                  QObject* parent = 0, const char* name = 0 );
    00883     KFontAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00884                  const QObject* receiver, const char* slot, QObject* parent,
    00885                  const char* name = 0 );
    00886     KFontAction( const QString& text, const QString& pix, const KShortcut& cut,
    00887                  const QObject* receiver, const char* slot, QObject* parent,
    00888                  const char* name = 0 );
    00889
    00890 // The ctors with fontListCriteria were added after 3.3-beta1.
    00891 // This define is used in koffice. Remove when koffice has a dependency on kdelibs-3.3 or more.
    00892 #define KFONTACTION_HAS_CRITERIA_ARG
    00893     KFontAction( uint fontListCriteria, const QString& text,
    00894                  const KShortcut& cut = KShortcut(), QObject* parent = 0,
    00895                  const char* name = 0 );
    00896     KFontAction( uint fontListCriteria, const QString& text, const QString& pix,
    00897                  const KShortcut& cut = KShortcut(),
    00898                  QObject* parent = 0, const char* name = 0 );
    00899
    00900     KFontAction( QObject* parent = 0, const char* name = 0 );
    00901     ~KFontAction();
    00902
    00903     QString font() const {
    00904         return currentText();
    00905     }
    00906
    00907     int plug( QWidget*, int index = -1 );
    00908
    00909 public slots:
    00910     void setFont( const QString &family );
    00911
    00912 protected:
    00913     virtual void virtual_hook( int id, void* data );
    00914 private:
    00915     class KFontActionPrivate;
    00916     KFontActionPrivate *d;
    00917 };
    00918
    00919 class KDEUI_EXPORT KFontSizeAction : public KSelectAction
    00920 {
    00921     Q_OBJECT
    00922     Q_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
    00923 public:
    00924     KFontSizeAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0,
    00925                      const char* name = 0 );
    00926     KFontSizeAction( const QString& text, const KShortcut& cut, const QObject* receiver,
    00927                      const char* slot, QObject* parent, const char* name = 0 );
    00928     KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
    00929                      QObject* parent = 0, const char* name = 0 );
    00930     KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
    00931                      QObject* parent = 0, const char* name = 0 );
    00932     KFontSizeAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
    00933                      const QObject* receiver, const char* slot,
    00934                      QObject* parent, const char* name = 0 );
    00935     KFontSizeAction( const QString& text, const QString& pix, const KShortcut& cut,
    00936                      const QObject* receiver, const char* slot,
    00937                      QObject* parent, const char* name = 0 );
    00938     KFontSizeAction( QObject* parent = 0, const char* name = 0 );
    00939
    00940     virtual ~KFontSizeAction();
    00941
    00942     virtual int fontSize() const;
    00943
    00944 public slots:
    00945     virtual void setFontSize( int size );
    00946
    00947 protected slots:
    00948     virtual void slotActivated( int );
    00949     virtual void slotActivated( const QString& );
    00950     virtual void slotActivated() { KAction::slotActivated(); }
    00951
    00952 signals:
    00953     void fontSizeChanged( int );
    00954
    00955 private:
    00956     void init();
    00957
    00958
    00959 protected:
    00960     virtual void virtual_hook( int id, void* data );
    00961 private:
    00962     class KFontSizeActionPrivate;
    00963     KFontSizeActionPrivate *d;
    00964 };
    00965
    00966
    00977 class KDEUI_EXPORT KActionMenu : public KAction
    00978 {
    00979   Q_OBJECT
    00980   Q_PROPERTY( bool delayed READ delayed WRITE setDelayed )
    00981   Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
    00982
    00983 public:
    00984     KActionMenu( const QString& text, QObject* parent = 0,
    00985                  const char* name = 0 );
    00986     KActionMenu( const QString& text, const QIconSet& icon,
    00987                  QObject* parent = 0, const char* name = 0 );
    00988     KActionMenu( const QString& text, const QString& icon,
    00989                  QObject* parent = 0, const char* name = 0 );
    00990     KActionMenu( QObject* parent = 0, const char* name = 0 );
    00991     virtual ~KActionMenu();
    00992
    00993     virtual void insert( KAction*, int index = -1 );
    00994     virtual void remove( KAction* );
    00995
    00996     KPopupMenu* popupMenu() const;
    00997     void popup( const QPoint& global );
    00998
    01003     bool delayed() const;
    01017     void setDelayed(bool _delayed);
    01018
    01023     bool stickyMenu() const;
    01032     void setStickyMenu(bool sticky);
    01033
    01034     virtual int plug( QWidget* widget, int index = -1 );
    01035
    01036 protected:
    01037     virtual void virtual_hook( int id, void* data );
    01038 private:
    01039     class KActionMenuPrivate;
    01040     KActionMenuPrivate *d;
    01041 };
    01042
    01050 class KDEUI_EXPORT KToolBarPopupAction : public KAction
    01051 {
    01052   Q_OBJECT
    01053   Q_PROPERTY( bool delayed READ delayed WRITE setDelayed )
    01054   Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
    01055
    01056 public:
    01057     //Not all constructors - because we need an icon, since this action only makes
    01058     // sense when being plugged at least in a toolbar.
    01069     KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut = KShortcut(),
    01070                          QObject* parent = 0, const char* name = 0 );
    01071
    01087     KToolBarPopupAction( const QString& text, const QString& icon, const KShortcut& cut,
    01088                          const QObject* receiver, const char* slot,
    01089                          QObject* parent = 0, const char* name = 0 );
    01090
    01106     KToolBarPopupAction( const KGuiItem& item, const KShortcut& cut,
    01107                          const QObject* receiver, const char* slot,
    01108                          KActionCollection* parent, const char* name );
    01109
    01110     virtual ~KToolBarPopupAction();
    01111
    01112     virtual int plug( QWidget *widget, int index = -1 );
    01113
    01119     KPopupMenu *popupMenu() const;
    01120
    01125     bool delayed() const;
    01131     void setDelayed(bool delayed);
    01136     bool stickyMenu() const;
    01146     void setStickyMenu(bool sticky);
    01147
    01148 private:
    01149     KPopupMenu *m_popup;
    01150     bool m_delayed:1;
    01151     bool m_stickyMenu:1;
    01152 protected:
    01153     virtual void virtual_hook( int id, void* data );
    01154 private:
    01155     class KToolBarPopupActionPrivate;
    01156     KToolBarPopupActionPrivate *d;
    01157 };
    01158
    01172 class KDEUI_EXPORT KToggleToolBarAction : public KToggleAction
    01173 {
    01174     Q_OBJECT
    01175 public:
    01182     KToggleToolBarAction( const char* toolBarName, const QString& text,
    01183                           KActionCollection* parent, const char* name );
    01184     KToggleToolBarAction( KToolBar *toolBar, const QString &text,
    01185                           KActionCollection *parent, const char *name );
    01186     virtual ~KToggleToolBarAction();
    01187
    01188     virtual int plug( QWidget * widget, int index = -1 );
    01189
    01190     KToolBar *toolBar() { return m_toolBar; }
    01191
    01192 public slots:
    01193     virtual void setChecked( bool );
    01194
    01195 private:
    01196     QCString               m_toolBarName;
    01197     QGuardedPtr<KToolBar>  m_toolBar;
    01198 protected:
    01199     virtual void virtual_hook( int id, void* data );
    01200 private:
    01201     class KToggleToolBarActionPrivate;
    01202     KToggleToolBarActionPrivate *d;
    01203 };
    01204
    01218 class KDEUI_EXPORT KToggleFullScreenAction : public KToggleAction
    01219 {
    01220     Q_OBJECT
    01221 public:
    01231     KToggleFullScreenAction( const KShortcut &cut,
    01232                              const QObject* receiver, const char* slot,
    01233                              QObject* parent, QWidget* window,
    01234                              const char* name );
    01235     virtual ~KToggleFullScreenAction();
    01236
    01240     void setWindow( QWidget* window );
    01241 public slots:
    01242     virtual void setChecked( bool );
    01243 protected:
    01247     virtual bool eventFilter( QObject* o, QEvent* e );
    01248 private:
    01249     QWidget* window;
    01250 protected:
    01251     virtual void virtual_hook( int id, void* data );
    01252 private:
    01253     class KToggleFullScreenActionPrivate;
    01254     KToggleFullScreenActionPrivate *d;
    01255 };
    01256
    01257
    01262 class KDEUI_EXPORT KWidgetAction : public KAction
    01263 {
    01264     Q_OBJECT
    01265 public:
    01271     KWidgetAction( QWidget* widget, const QString& text,
    01272                    const KShortcut& cut,
    01273                    const QObject* receiver, const char* slot,
    01274                    KActionCollection* parent, const char* name );
    01275     virtual ~KWidgetAction();
    01276
    01280     QWidget* widget() { return m_widget; }
    01281
    01282     void setAutoSized( bool );
    01283
    01288     virtual int plug( QWidget* widget, int index = -1 );
    01293     virtual void unplug( QWidget *w );
    01294 protected slots:
    01295     void slotToolbarDestroyed();
    01296 private:
    01297     QGuardedPtr<QWidget> m_widget;
    01298     bool                 m_autoSized;
    01299 protected:
    01300     virtual void virtual_hook( int id, void* data );
    01301 private:
    01302     class KWidgetActionPrivate;
    01303     KWidgetActionPrivate *d;
    01304 };
    01305
    01306 class KDEUI_EXPORT KActionSeparator : public KAction
    01307 {
    01308     Q_OBJECT
    01309 public:
    01310     KActionSeparator( QObject* parent = 0, const char* name = 0 );
    01311     virtual ~KActionSeparator();
    01312
    01313     virtual int plug( QWidget *widget, int index = -1 );
    01314
    01315 protected:
    01316     virtual void virtual_hook( int id, void* data );
    01317 private:
    01318     class KActionSeparatorPrivate;
    01319     KActionSeparatorPrivate *d;
    01320 };
    01321
    01332 class KDEUI_EXPORT KPasteTextAction: public KAction
    01333 {
    01334     Q_OBJECT
    01335 public:
    01351     KPasteTextAction( const QString& text, const QString& icon, const KShortcut& cut,
    01352                   const QObject* receiver, const char* slot,
    01353                   QObject* parent = 0, const char* name = 0 );
    01354
    01355     virtual ~KPasteTextAction();
    01356
    01367     void setMixedMode(bool mode);
    01368
    01369     virtual int plug( QWidget *widget, int index = -1 );
    01370
    01371 protected slots:
    01372     void menuAboutToShow();
    01373     void menuItemActivated( int id);
    01374     virtual void slotActivated();
    01375
    01376 protected:
    01377     virtual void virtual_hook( int id, void* data );
    01378
    01379 private:
    01380     KPopupMenu *m_popup;
    01381     bool m_mixedMode;
    01382     class KPasteTextActionPrivate;
    01383     KPasteTextActionPrivate *d;
    01384 };
    01385
    01386 #endif

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:13 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003