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

tdeui

tdeactioncollection.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 
00010     This library is free software; you can redistribute it and/or
00011     modify it under the terms of the GNU Library General Public
00012     License version 2 as published by the Free Software Foundation.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Library General Public License for more details.
00018 
00019     You should have received a copy of the GNU Library General Public License
00020     along with this library; see the file COPYING.LIB.  If not, write to
00021     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00022     Boston, MA 02110-1301, USA.
00023 */
00024 
00025 #ifndef __tdeactioncollection_h__
00026 #define __tdeactioncollection_h__
00027 
00028 #include <tdeaction.h>
00029 
00030 #include <tqkeysequence.h>
00031 #include <tqobject.h>
00032 #include <tqvaluelist.h>
00033 #include <tqguardedptr.h>
00034 #include <kguiitem.h>
00035 #include <tdeshortcut.h>
00036 #include <kstdaction.h>
00037 #include <kicontheme.h>
00038 
00039 class TQMenuBar;
00040 class TQPopupMenu;
00041 class TQComboBox;
00042 class TQPoint;
00043 class TQIconSet;
00044 class TQString;
00045 class TDEToolBar;
00046 
00047 class TDEAccel;
00048 class TDEAccelActions;
00049 class TDEConfig;
00050 class TDEConfigBase;
00051 class KURL;
00052 class TDEInstance;
00053 class TDEToolBar;
00054 class TDEActionCollection;
00055 class TDEPopupMenu;
00056 class TDEMainWindow;
00057 class KXMLGUIClient;
00058 
00059 typedef TQValueList<TDEAction *> TDEActionPtrList;
00060 
00078 class TDEUI_EXPORT TDEActionCollection : public TQObject
00079 {
00080   friend class TDEAction;
00081   friend class KXMLGUIClient;
00082 
00083   Q_OBJECT
00084 
00085 public:
00086   TDEActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 );
00092   TDEActionCollection( TQWidget *watch, TQObject* parent, const char *name = 0, TDEInstance *instance = 0 );
00093 #ifndef KDE_NO_COMPAT
00094   TDEActionCollection( const TDEActionCollection &copy );
00095 #endif
00096   virtual ~TDEActionCollection();
00097 
00102   virtual void setWidget( TQWidget *widget );
00103 
00111   void setAutoConnectShortcuts( bool );
00112 
00119   bool isAutoConnectShortcuts();
00120 
00127   //void setDefaultScope( TDEAction::Scope );
00128 
00133   bool addDocCollection( TDEActionCollection* pDoc );
00134 
00136   //uint widgetCount() const;
00137 
00143   //bool ownsTDEAccel() const;
00144 
00146   virtual TDEAccel* accel() KDE_DEPRECATED;
00148   virtual const TDEAccel* accel() const KDE_DEPRECATED;
00149 
00151   TDEAccel* tdeaccel();
00153   const TDEAccel* tdeaccel() const;
00154 
00156   TDEAccel* builderTDEAccel() const;
00158   //TDEAccel* widgetTDEAccel( uint i );
00159   //const TDEAccel* widgetTDEAccel( uint i ) const;
00160 
00162   virtual uint count() const;
00163   bool isEmpty() const { return (count() == 0); }
00168   virtual TDEAction* action( int index ) const;
00176   virtual TDEAction* action( const char* name, const char* classname = 0 ) const;
00177 
00182   virtual TQStringList groups() const;
00187   virtual TDEActionPtrList actions( const TQString& group ) const;
00189   virtual TDEActionPtrList actions() const;
00190 
00194   bool readShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 );
00198   bool writeShortcutSettings( const TQString& sConfigGroup = TQString::null, TDEConfigBase* pConfig = 0 ) const;
00199 
00200   void setInstance( TDEInstance *instance );
00202   TDEInstance *instance() const;
00203 
00207   void setXMLFile( const TQString& );
00211   const TQString& xmlFile() const;
00212 
00213   //TODO FOR KDE4 make this default true
00225   void setHighlightingEnabled( bool enable );
00234   bool highlightingEnabled() const;
00235 
00249   void connectHighlight( TQWidget *container, TDEAction *action );
00263   void disconnectHighlight( TQWidget *container, TDEAction *action );
00264 
00268   const KXMLGUIClient *parentGUIClient() const;
00269 
00270 signals:
00271   void inserted( TDEAction* );
00272   void removed( TDEAction* );
00273 
00282   void actionHighlighted( TDEAction *action );
00291   void actionHighlighted( TDEAction *action, bool highlight );
00301   void actionStatusText( const TQString &text );
00307   void clearStatusText();
00308 
00309 private:
00316   void beginXMLPlug( TQWidget *widget );
00317   void endXMLPlug();
00319   void prepareXMLUnplug();
00320   void unplugShortcuts( TDEAccel* tdeaccel );
00321 
00322   void _clear();
00323   void _insert( TDEAction* );
00324   void _remove( TDEAction* );
00325   TDEAction* _take( TDEAction* );
00326 
00327 private slots:
00328    void slotMenuItemHighlighted( int id );
00329    void slotToolBarButtonHighlighted( int id, bool highlight );
00330    void slotMenuAboutToHide();
00331    void slotDestroyed();
00332 
00333 private:
00334    TDEAction *findAction( TQWidget *container, int id );
00335 
00336 #ifndef KDE_NO_COMPAT
00337 public:
00338   TDEActionCollection( TQObject *parent, const char *name = 0, TDEInstance *instance = 0 );
00339 #endif
00340 
00341 public:
00352   void insert( TDEAction* action);
00353 
00360   void remove( TDEAction* action );
00361 
00369   TDEAction* take( TDEAction* action );
00370 
00371 #ifndef KDE_NO_COMPAT
00372   TDEActionCollection operator+ ( const TDEActionCollection& ) const;
00373   TDEActionCollection& operator= ( const TDEActionCollection& );
00374   TDEActionCollection& operator+= ( const TDEActionCollection& );
00375 #endif // !KDE_NO_COMPAT
00376 
00377   // KDE4: clear() doesn't need to be a slot
00378 public slots:
00383   void clear();
00384 
00385 protected:
00386     virtual void virtual_hook( int id, void* data );
00387 private:
00388     TDEActionCollection( const char* name, const KXMLGUIClient* parent );
00389     class TDEActionCollectionPrivate;
00390     TDEActionCollectionPrivate *d;
00391 };
00392 
00393 #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.