• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

tdeactionclasses.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., 51 Franklin Street, Fifth Floor,
00023     Boston, MA 02110-1301, USA.
00024 */
00025 //$Id$
00026 
00027 #ifndef __tdeactionclasses_h__
00028 #define __tdeactionclasses_h__
00029 
00030 #include <tdeaction.h>
00031 
00032 #include <tqkeysequence.h>
00033 #include <tqobject.h>
00034 #include <tqvaluelist.h>
00035 #include <tqguardedptr.h>
00036 #include <kguiitem.h>
00037 #include <tdeshortcut.h>
00038 #include <kstdaction.h>
00039 #include <kicontheme.h>
00040 
00041 class TQMenuBar;
00042 class TQPopupMenu;
00043 class TQComboBox;
00044 class TQPoint;
00045 class TQIconSet;
00046 class TQString;
00047 class TDEToolBar;
00048 
00049 class TDEAccel;
00050 class TDEAccelActions;
00051 class TDEConfig;
00052 class TDEConfigBase;
00053 class KURL;
00054 class TDEInstance;
00055 class TDEToolBar;
00056 class TDEActionCollection;
00057 class TDEPopupMenu;
00058 class TDEMainWindow;
00059 
00068 class TDEUI_EXPORT TDEToggleAction : public TDEAction
00069 {
00070     Q_OBJECT
00071     
00072     TQ_PROPERTY( bool checked READ isChecked WRITE setChecked )
00073     TQ_PROPERTY( TQString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup )
00074 public:
00075 
00086     TDEToggleAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 );
00087 
00096     TDEToggleAction( const TQString& text, const TDEShortcut& cut,
00097                    const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00098 
00106     TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00107              TQObject* parent = 0, const char* name = 0 );
00108 
00116     TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00117                    TQObject* parent = 0, const char* name = 0 );
00118 
00128     TDEToggleAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00129                    const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00130 
00140     TDEToggleAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00141                    const TQObject* receiver, const char* slot,
00142                    TQObject* parent, const char* name = 0 );
00143 
00148     TDEToggleAction( TQObject* parent = 0, const char* name = 0 );
00149 
00153     virtual ~TDEToggleAction();
00154 
00166     virtual int plug( TQWidget* widget, int index = -1 );
00167 
00171     bool isChecked() const;
00172 
00177     TQString exclusiveGroup() const;
00178 
00185     virtual void setExclusiveGroup( const TQString& name );
00186 
00198     void setCheckedState( const KGuiItem& checkedItem );
00199 
00201     virtual TQString toolTip() const;
00202 
00203 public slots:
00207     virtual void setChecked( bool );
00208 
00209 protected slots:
00210     virtual void slotActivated();
00211 
00212 protected:
00213     virtual void updateChecked( int id );
00214 
00215 signals:
00216     void toggled( bool );
00217 
00218 protected:
00219     virtual void virtual_hook( int id, void* data );
00220 private:
00221     class TDEToggleActionPrivate;
00222     TDEToggleActionPrivate *d;
00223 };
00224 
00231 class TDEUI_EXPORT TDERadioAction : public TDEToggleAction
00232 {
00233   Q_OBJECT
00234   
00235 public:
00246     TDERadioAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 );
00247 
00256     TDERadioAction( const TQString& text, const TDEShortcut& cut,
00257                   const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00258 
00266     TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00267                   TQObject* parent = 0, const char* name = 0 );
00268 
00276     TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00277                   TQObject* parent = 0, const char* name = 0 );
00278 
00288     TDERadioAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00289                   const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00290 
00300     TDERadioAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00301                   const TQObject* receiver, const char* slot,
00302                   TQObject* parent, const char* name = 0 );
00303 
00308     TDERadioAction( TQObject* parent = 0, const char* name = 0 );
00309 
00310 protected:
00311     virtual void slotActivated();
00312 
00313 protected:
00314     virtual void virtual_hook( int id, void* data );
00315 private:
00316     class TDERadioActionPrivate;
00317     TDERadioActionPrivate *d;
00318 };
00319 
00331 class TDEUI_EXPORT TDESelectAction : public TDEAction
00332 {
00333     Q_OBJECT
00334     
00335     TQ_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem )
00336     TQ_PROPERTY( TQStringList items READ items WRITE setItems )
00337     TQ_PROPERTY( bool editable READ isEditable WRITE setEditable )
00338     TQ_PROPERTY( int comboWidth READ comboWidth WRITE setComboWidth )
00339     TQ_PROPERTY( TQString currentText READ currentText )
00340     TQ_PROPERTY( bool menuAccelsEnabled READ menuAccelsEnabled WRITE setMenuAccelsEnabled )
00341 public:
00342 
00353     TDESelectAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0, const char* name = 0 );
00354 
00363     TDESelectAction( const TQString& text, const TDEShortcut& cut,
00364                    const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00365 
00373     TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00374              TQObject* parent = 0, const char* name = 0 );
00375 
00383     TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00384                    TQObject* parent = 0, const char* name = 0 );
00385 
00395     TDESelectAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00396                    const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 );
00397 
00407     TDESelectAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00408                    const TQObject* receiver, const char* slot,
00409                    TQObject* parent, const char* name = 0 );
00410 
00415     TDESelectAction( TQObject* parent = 0, const char* name = 0 );
00416 
00420     virtual ~TDESelectAction();
00421 
00433     virtual int plug( TQWidget* widget, int index = -1 );
00434 
00439     virtual bool isEditable() const;
00440 
00445     virtual TQStringList items() const;
00446 
00450     virtual void changeItem( int index, const TQString& text );
00451 
00455     virtual TQString currentText() const;
00456 
00461     virtual int currentItem() const;
00462 
00467     virtual int comboWidth() const;
00468 
00475     void setMaxComboViewCount( int n );
00476 
00480     TQPopupMenu* popupMenu() const;
00481 
00486     void setRemoveAmpersandsInCombo( bool b ) KDE_DEPRECATED;
00488     bool removeAmpersandsInCombo() const;
00489 
00496     void setMenuAccelsEnabled( bool b );
00498     bool menuAccelsEnabled() const;
00499 
00500     virtual bool isShortcutConfigurable() const { return false; }
00501 
00502 public slots:
00508     virtual void setCurrentItem( int index );
00509 
00514     virtual void setItems( const TQStringList &lst );
00515 
00519     virtual void clear();
00520 
00525     virtual void setEditable( bool );
00526 
00532     virtual void setComboWidth( int width );
00533 
00534 protected:
00535     virtual void changeItem( int id, int index, const TQString& text );
00536 
00543     TQStringList comboItems() const;
00544 
00545 protected slots:
00546     virtual void slotActivated( int id );
00547     virtual void slotActivated( const TQString &text );
00548     virtual void slotActivated();
00549 
00550 signals:
00555     void activated( int index );
00560     void activated( const TQString& text );
00561 
00562 protected:
00563     virtual void updateCurrentItem( int id );
00564 
00565     virtual void updateComboWidth( int id );
00566 
00567     virtual void updateItems( int id );
00568 
00569     virtual void updateClear( int id );
00570 
00571 protected:
00572     virtual void virtual_hook( int id, void* data );
00573 private:
00574     void setupMenu() const;
00575     class TDESelectActionPrivate;
00576     TDESelectActionPrivate *d;
00577 
00578 };
00579 
00581 
00584 class TDEUI_EXPORT_DEPRECATED TDEListAction : public TDESelectAction
00585 {
00586     Q_OBJECT
00587     
00588 public:
00599     TDEListAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
00600                   const char* name = 0 );
00601 
00610     TDEListAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver,
00611                   const char* slot, TQObject* parent, const char* name = 0 );
00612 
00620     TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00621                       TQObject* parent = 0, const char* name = 0 );
00622 
00630     TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00631                       TQObject* parent = 0, const char* name = 0 );
00632 
00642     TDEListAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00643                           const TQObject* receiver, const char* slot, TQObject* parent,
00644                   const char* name = 0 );
00645 
00655     TDEListAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00656                  const TQObject* receiver, const char* slot, TQObject* parent,
00657                  const char* name = 0 );
00658 
00663     TDEListAction( TQObject* parent = 0, const char* name = 0 );
00664 
00668     virtual ~TDEListAction();
00669 
00670 
00671     virtual TQString currentText() const;
00672     virtual int currentItem() const;
00673 
00674 
00675 public slots:
00681     virtual void setCurrentItem( int index );
00682 
00683 protected:
00684     virtual void virtual_hook( int id, void* data );
00685 private:
00686     class TDEListActionPrivate;
00687     TDEListActionPrivate *d;
00688 };
00689 
00700 class TDEUI_EXPORT TDERecentFilesAction : public TDEListAction  // TODO public TDESelectAction
00701 {
00702   Q_OBJECT
00703   
00704   TQ_PROPERTY( uint maxItems READ maxItems WRITE setMaxItems )
00705 public:
00713   TDERecentFilesAction( const TQString& text, const TDEShortcut& cut,
00714                       TQObject* parent, const char* name = 0,
00715                       uint maxItems = 10 );
00716 
00727   TDERecentFilesAction( const TQString& text, const TDEShortcut& cut,
00728                       const TQObject* receiver, const char* slot,
00729                       TQObject* parent, const char* name = 0,
00730                       uint maxItems = 10 );
00731 
00740   TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00741                       TQObject* parent, const char* name = 0,
00742                       uint maxItems = 10 );
00743 
00752   TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00753                       TQObject* parent, const char* name = 0,
00754                       uint maxItems = 10 );
00755 
00767   TDERecentFilesAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00768                       const TQObject* receiver, const char* slot,
00769                       TQObject* parent, const char* name = 0,
00770                       uint maxItems = 10 );
00771 
00783   TDERecentFilesAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00784                       const TQObject* receiver, const char* slot,
00785                       TQObject* parent, const char* name = 0,
00786                       uint maxItems = 10 );
00787 
00793   TDERecentFilesAction( TQObject* parent = 0, const char* name = 0,
00794                       uint maxItems = 10 );
00795 
00799   virtual ~TDERecentFilesAction();
00800 
00801   virtual int plug( TQWidget *widget, int index = -1 );
00802 
00806   uint maxItems() const;
00807 
00808 //KDE4: remove completeItems() and rename items() to urls(), to get the list of URLs added to
00809 //      the action.
00816   virtual TQStringList items() const;
00817 
00823   TQStringList completeItems() const;
00824 
00825 public slots:
00834   void setMaxItems( uint maxItems );
00835 
00843   void loadEntries( TDEConfig* config, TQString groupname=TQString::null );
00844 
00852   void saveEntries( TDEConfig* config, TQString groupname=TQString::null );
00853 
00859   void addURL( const KURL& url );
00860 
00868   void addURL( const KURL& url, const TQString& name ); //KDE4: Combine the above two methods
00869 
00875   void removeURL( const KURL& url );
00876 
00880   void clearURLList();
00881 
00882 signals:
00883 
00889   void urlSelected( const KURL& url );
00890 
00891 protected slots:
00892   void itemSelected( const TQString& string );
00893   void menuAboutToShow();
00894   void menuItemActivated( int id );
00895   void slotClicked();
00896   virtual void slotActivated(int);
00897   virtual void slotActivated(const TQString& );
00898   virtual void slotActivated();
00899 
00900 protected:
00901   virtual void virtual_hook( int id, void* data );
00902 
00903 private:
00904   void init();
00905 
00906   class TDERecentFilesActionPrivate;
00907   TDERecentFilesActionPrivate *d;
00908 };
00909 
00910 class TDEUI_EXPORT TDEFontAction : public TDESelectAction
00911 {
00912     Q_OBJECT
00913     
00914     TQ_PROPERTY( TQString font READ font WRITE setFont )
00915 public:
00916     TDEFontAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
00917                  const char* name = 0 );
00918     TDEFontAction( const TQString& text, const TDEShortcut& cut,
00919                  const TQObject* receiver, const char* slot, TQObject* parent,
00920                  const char* name = 0 );
00921     TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00922                  TQObject* parent = 0, const char* name = 0 );
00923     TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00924                  TQObject* parent = 0, const char* name = 0 );
00925     TDEFontAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00926                  const TQObject* receiver, const char* slot, TQObject* parent,
00927                  const char* name = 0 );
00928     TDEFontAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00929                  const TQObject* receiver, const char* slot, TQObject* parent,
00930                  const char* name = 0 );
00931 
00932 // The ctors with fontListCriteria were added after 3.3-beta1.
00933 // This define is used in koffice. Remove when koffice has a dependency on tdelibs-3.3 or more.
00934 #define KFONTACTION_HAS_CRITERIA_ARG
00935     TDEFontAction( uint fontListCriteria, const TQString& text,
00936                  const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
00937                  const char* name = 0 );
00938     TDEFontAction( uint fontListCriteria, const TQString& text, const TQString& pix,
00939                  const TDEShortcut& cut = TDEShortcut(),
00940                  TQObject* parent = 0, const char* name = 0 );
00941 
00942     TDEFontAction( TQObject* parent = 0, const char* name = 0 );
00943     ~TDEFontAction();
00944 
00945     TQString font() const {
00946         return currentText();
00947     }
00948 
00949     int plug( TQWidget*widget, int index = -1 );
00950 
00951 public slots:
00952     void setFont( const TQString &family );
00953 
00954 protected:
00955     virtual void virtual_hook( int id, void* data );
00956 private:
00957     class TDEFontActionPrivate;
00958     TDEFontActionPrivate *d;
00959 };
00960 
00961 class TDEUI_EXPORT TDEFontSizeAction : public TDESelectAction
00962 {
00963     Q_OBJECT
00964     
00965     TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize )
00966 public:
00967     TDEFontSizeAction( const TQString& text, const TDEShortcut& cut = TDEShortcut(), TQObject* parent = 0,
00968                      const char* name = 0 );
00969     TDEFontSizeAction( const TQString& text, const TDEShortcut& cut, const TQObject* receiver,
00970                      const char* slot, TQObject* parent, const char* name = 0 );
00971     TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut = TDEShortcut(),
00972                      TQObject* parent = 0, const char* name = 0 );
00973     TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut = TDEShortcut(),
00974                      TQObject* parent = 0, const char* name = 0 );
00975     TDEFontSizeAction( const TQString& text, const TQIconSet& pix, const TDEShortcut& cut,
00976                      const TQObject* receiver, const char* slot,
00977                      TQObject* parent, const char* name = 0 );
00978     TDEFontSizeAction( const TQString& text, const TQString& pix, const TDEShortcut& cut,
00979                      const TQObject* receiver, const char* slot,
00980                      TQObject* parent, const char* name = 0 );
00981     TDEFontSizeAction( TQObject* parent = 0, const char* name = 0 );
00982 
00983     virtual ~TDEFontSizeAction();
00984 
00985     virtual int fontSize() const;
00986 
00987 public slots:
00988     virtual void setFontSize( int size );
00989 
00990 protected slots:
00991     virtual void slotActivated( int );
00992     virtual void slotActivated( const TQString& );
00993     virtual void slotActivated() { TDEAction::slotActivated(); }
00994 
00995 signals:
00996     void fontSizeChanged( int );
00997 
00998 private:
00999     void init();
01000 
01001 
01002 protected:
01003     virtual void virtual_hook( int id, void* data );
01004 private:
01005     class TDEFontSizeActionPrivate;
01006     TDEFontSizeActionPrivate *d;
01007 };
01008 
01009 
01020 class TDEUI_EXPORT TDEActionMenu : public TDEAction
01021 {
01022   Q_OBJECT
01023   
01024   TQ_PROPERTY( bool delayed READ delayed WRITE setDelayed )
01025   TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
01026 
01027 public:
01028     TDEActionMenu( const TQString& text, TQObject* parent = 0,
01029                  const char* name = 0 );
01030     TDEActionMenu( const TQString& text, const TQIconSet& icon,
01031                  TQObject* parent = 0, const char* name = 0 );
01032     TDEActionMenu( const TQString& text, const TQString& icon,
01033                  TQObject* parent = 0, const char* name = 0 );
01034     TDEActionMenu( TQObject* parent = 0, const char* name = 0 );
01035     virtual ~TDEActionMenu();
01036 
01037     virtual void insert( TDEAction*, int index = -1 );
01038     virtual void remove( TDEAction* );
01039 
01040     TDEPopupMenu* popupMenu() const;
01041     void popup( const TQPoint& global );
01042 
01047     bool delayed() const;
01061     void setDelayed(bool _delayed);
01062 
01067     bool stickyMenu() const;
01076     void setStickyMenu(bool sticky);
01077 
01078     virtual int plug( TQWidget* widget, int index = -1 );
01079 
01080 protected:
01081     virtual void virtual_hook( int id, void* data );
01082 private:
01083     class TDEActionMenuPrivate;
01084     TDEActionMenuPrivate *d;
01085 };
01086 
01094 class TDEUI_EXPORT TDEToolBarPopupAction : public TDEAction
01095 {
01096   Q_OBJECT
01097   
01098   TQ_PROPERTY( bool delayed READ delayed WRITE setDelayed )
01099   TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu )
01100 
01101 public:
01102     //Not all constructors - because we need an icon, since this action only makes
01103     // sense when being plugged at least in a toolbar.
01114     TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut = TDEShortcut(),
01115                          TQObject* parent = 0, const char* name = 0 );
01116 
01132     TDEToolBarPopupAction( const TQString& text, const TQString& icon, const TDEShortcut& cut,
01133                          const TQObject* receiver, const char* slot,
01134                          TQObject* parent = 0, const char* name = 0 );
01135 
01151     TDEToolBarPopupAction( const KGuiItem& item, const TDEShortcut& cut,
01152                          const TQObject* receiver, const char* slot,
01153                          TDEActionCollection* parent, const char* name );
01154 
01155     virtual ~TDEToolBarPopupAction();
01156 
01157     virtual int plug( TQWidget *widget, int index = -1 );
01158 
01164     TDEPopupMenu *popupMenu() const;
01165 
01170     bool delayed() const;
01176     void setDelayed(bool delayed);
01181     bool stickyMenu() const;
01191     void setStickyMenu(bool sticky);
01192 
01193 private:
01194     TDEPopupMenu *m_popup;
01195     bool m_delayed:1;
01196     bool m_stickyMenu:1;
01197 protected:
01198     virtual void virtual_hook( int id, void* data );
01199 private:
01200     class TDEToolBarPopupActionPrivate;
01201     TDEToolBarPopupActionPrivate *d;
01202 };
01203 
01217 class TDEUI_EXPORT TDEToggleToolBarAction : public TDEToggleAction
01218 {
01219     Q_OBJECT
01220     
01221 public:
01228     TDEToggleToolBarAction( const char* toolBarName, const TQString& text,
01229                           TDEActionCollection* parent, const char* name );
01230     TDEToggleToolBarAction( TDEToolBar *toolBar, const TQString &text,
01231                           TDEActionCollection *parent, const char *name );
01232     virtual ~TDEToggleToolBarAction();
01233 
01234     virtual int plug( TQWidget * widget, int index = -1 );
01235 
01236     TDEToolBar *toolBar() { return m_toolBar; }
01237 
01238 public slots:
01239     virtual void setChecked( bool );
01240 
01241 private:
01242     TQCString               m_toolBarName;
01243     TQGuardedPtr<TDEToolBar>  m_toolBar;
01244 protected:
01245     virtual void virtual_hook( int id, void* data );
01246 private:
01247     class TDEToggleToolBarActionPrivate;
01248     TDEToggleToolBarActionPrivate *d;
01249 };
01250 
01264 class TDEUI_EXPORT TDEToggleFullScreenAction : public TDEToggleAction
01265 {
01266     Q_OBJECT
01267     
01268 public:
01278     TDEToggleFullScreenAction( const TDEShortcut &cut,
01279                              const TQObject* receiver, const char* slot,
01280                              TQObject* parent, TQWidget* window,
01281                              const char* name );
01282     virtual ~TDEToggleFullScreenAction();
01283 
01287     void setWindow( TQWidget* window );
01288 public slots:
01289     virtual void setChecked( bool );
01290 protected:
01294     virtual bool eventFilter( TQObject* o, TQEvent* e );
01295 private:
01296     TQWidget* window;
01297 protected:
01298     virtual void virtual_hook( int id, void* data );
01299 private:
01300     class TDEToggleFullScreenActionPrivate;
01301     TDEToggleFullScreenActionPrivate *d;
01302 };
01303 
01304 
01309 class TDEUI_EXPORT KWidgetAction : public TDEAction
01310 {
01311     Q_OBJECT
01312     
01313 public:
01319     KWidgetAction( TQWidget* widget, const TQString& text,
01320                    const TDEShortcut& cut,
01321                    const TQObject* receiver, const char* slot,
01322                    TDEActionCollection* parent, const char* name );
01323     virtual ~KWidgetAction();
01324 
01328     TQWidget* widget() { return m_widget; }
01329 
01330     void setAutoSized( bool );
01331 
01336     virtual int plug( TQWidget* widget, int index = -1 );
01341     virtual void unplug( TQWidget *w );
01342 protected slots:
01343     void slotToolbarDestroyed();
01344 private:
01345     TQGuardedPtr<TQWidget> m_widget;
01346     bool                 m_autoSized;
01347 protected:
01348     virtual void virtual_hook( int id, void* data );
01349 private:
01350     class KWidgetActionPrivate;
01351     KWidgetActionPrivate *d;
01352 };
01353 
01354 class TDEUI_EXPORT TDEActionSeparator : public TDEAction
01355 {
01356     Q_OBJECT
01357     
01358 public:
01359     TDEActionSeparator( TQObject* parent = 0, const char* name = 0 );
01360     virtual ~TDEActionSeparator();
01361 
01362     virtual int plug( TQWidget *widget, int index = -1 );
01363 
01364 protected:
01365     virtual void virtual_hook( int id, void* data );
01366 private:
01367     class TDEActionSeparatorPrivate;
01368     TDEActionSeparatorPrivate *d;
01369 };
01370 
01381 class TDEUI_EXPORT TDEPasteTextAction: public TDEAction
01382 {
01383     Q_OBJECT
01384     
01385 public:
01401     TDEPasteTextAction( const TQString& text, const TQString& icon, const TDEShortcut& cut,
01402                   const TQObject* receiver, const char* slot,
01403                   TQObject* parent = 0, const char* name = 0 );
01404 
01405     virtual ~TDEPasteTextAction();
01406 
01417     void setMixedMode(bool mode);
01418 
01419     virtual int plug( TQWidget *widget, int index = -1 );
01420 
01421 protected slots:
01422     void menuAboutToShow();
01423     void menuItemActivated( int id);
01424     virtual void slotActivated();
01425 
01426 protected:
01427     virtual void virtual_hook( int id, void* data );
01428 
01429 private:
01430     TDEPopupMenu *m_popup;
01431     bool m_mixedMode;
01432     class TDEPasteTextActionPrivate;
01433     TDEPasteTextActionPrivate *d;
01434 };
01435 
01436 #endif

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.