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

tdeui

  • tdeui
kxmlguifactory.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
3  Copyright (C) 2000 Kurt Granroth <granroth@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __kxmlguifactory_h__
21 #define __kxmlguifactory_h__
22 
23 #include <tqobject.h>
24 #include <tqptrlist.h>
25 #include <tqdom.h>
26 #include <tqvaluelist.h>
27 
28 #include <tdelibs_export.h>
29 
30 class TDEAction;
31 class KXMLGUIFactoryPrivate;
32 class KXMLGUIClient;
33 class KXMLGUIBuilder;
34 class TDEInstance;
35 
36 namespace KXMLGUI
37 {
38 struct MergingIndex;
39 struct ContainerNode;
40 struct ContainerClient;
41 class BuildHelper;
42 }
43 
61 class TDEUI_EXPORT KXMLGUIFactory : public TQObject
62 {
63  friend class KXMLGUI::BuildHelper;
64  TQ_OBJECT
65  public:
73  KXMLGUIFactory( KXMLGUIBuilder *builder, TQObject *parent = 0, const char *name = 0 );
74 
78  ~KXMLGUIFactory();
79 
80  // XXX move to somewhere else? (Simon)
81  static TQString readConfigFile( const TQString &filename, bool never_null, const TDEInstance *instance = 0 );
82  static TQString readConfigFile( const TQString &filename, const TDEInstance *instance = 0 );
83  static bool saveConfigFile( const TQDomDocument& doc, const TQString& filename,
84  const TDEInstance *instance = 0 );
85 
86  static TQString documentToXML( const TQDomDocument& doc );
87  static TQString elementToXML( const TQDomElement& elem );
88 
92  static void removeDOMComments( TQDomNode &node );
93 
98  static TQDomElement actionPropertiesElement( TQDomDocument& doc );
99 
105  static TQDomElement findActionByName( TQDomElement& elem, const TQString& sName, bool create );
106 
117  void addClient( KXMLGUIClient *client );
118 
124  void removeClient( KXMLGUIClient *client );
125 
126  void plugActionList( KXMLGUIClient *client, const TQString &name, const TQPtrList<TDEAction> &actionList );
127  void unplugActionList( KXMLGUIClient *client, const TQString &name );
128 
132  TQPtrList<KXMLGUIClient> clients() const;
133 
154  TQWidget *container( const TQString &containerName, KXMLGUIClient *client, bool useTagName = false );
155 
156  TQPtrList<TQWidget> containers( const TQString &tagName );
157 
166  void reset();
167 
177  void resetContainer( const TQString &containerName, bool useTagName = false );
178 
179  public slots:
195  int configureShortcuts(bool bAllowLetterShortcuts = true, bool bSaveSettings = true);
196 
197  signals:
198  void clientAdded( KXMLGUIClient *client );
199  void clientRemoved( KXMLGUIClient *client );
200 
201  private:
202 
203  TQWidget *findRecursive( KXMLGUI::ContainerNode *node, bool tag );
204 
205  TQPtrList<TQWidget> findRecursive( KXMLGUI::ContainerNode *node, const TQString &tagName );
206 
207  void applyActionProperties( const TQDomElement &element );
208  void configureAction( TDEAction *action, const TQDomNamedNodeMap &attributes );
209  void configureAction( TDEAction *action, const TQDomAttr &attribute );
210 
211 protected:
212  virtual void virtual_hook( int id, void* data );
213 private:
214  KXMLGUIFactoryPrivate *d;
215 };
216 
217 #endif
KXMLGUIBuilder
Abstract interface for a "GUI builder", used by the GUIFactory This interface is implemented by TDEMa...
Definition: kxmlguibuilder.h:40
KXMLGUIClient
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition: kxmlguiclient.h:44
KXMLGUIFactory
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition: kxmlguifactory.h:62
TDEAction
Class to encapsulate user-driven action or event.
Definition: tdeaction.h:203
TDEInstance

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.9.1
This website is maintained by Timothy Pearson.