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

kdeui

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

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |