• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • kdeui
  • xmlgui
kxmlguifactory.h
Go to the documentation of this file.
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 <kdeui_export.h>
24 #include <kcomponentdata.h>
25 
26 #include <QtCore/QObject>
27 
28 class QAction;
29 class KXMLGUIFactoryPrivate;
30 class KXMLGUIClient;
31 class KXMLGUIBuilder;
32 class KComponentData;
33 
34 class QDomAttr;
35 class QDomDocument;
36 class QDomElement;
37 class QDomNode;
38 class QDomNamedNodeMap;
39 
40 namespace KXMLGUI
41 {
42 struct MergingIndex;
43 struct ContainerNode;
44 struct ContainerClient;
45 class BuildHelper;
46 }
47 
65 class KDEUI_EXPORT KXMLGUIFactory : public QObject
66 {
67  friend class KXMLGUI::BuildHelper;
68  Q_OBJECT
69  public:
77  explicit KXMLGUIFactory( KXMLGUIBuilder *builder, QObject *parent = 0 );
78 
82  ~KXMLGUIFactory();
83 
84  // XXX move to somewhere else? (Simon)
86  static QString readConfigFile(const QString &filename,
87  const KComponentData &componentData = KComponentData());
89  static bool saveConfigFile(const QDomDocument& doc, const QString& filename,
90  const KComponentData &componentData = KComponentData());
91 
96  static QDomElement actionPropertiesElement( QDomDocument& doc );
97 
103  static QDomElement findActionByName( QDomElement& elem, const QString& sName, bool create );
104 
115  void addClient( KXMLGUIClient *client );
116 
122  void removeClient( KXMLGUIClient *client );
123 
124  void plugActionList( KXMLGUIClient *client, const QString &name, const QList<QAction*> &actionList );
125  void unplugActionList( KXMLGUIClient *client, const QString &name );
126 
130  QList<KXMLGUIClient*> clients() const;
131 
152  QWidget *container( const QString &containerName, KXMLGUIClient *client, bool useTagName = false );
153 
154  QList<QWidget*> containers( const QString &tagName );
155 
164  void reset();
165 
175  void resetContainer( const QString &containerName, bool useTagName = false );
176 
181  void refreshActionProperties();
182 
183  public Q_SLOTS:
198  int configureShortcuts(bool bAllowLetterShortcuts = true, bool bSaveSettings = true);
199 
200  void changeShortcutScheme(const QString &scheme);
201 
202 Q_SIGNALS:
203  void clientAdded( KXMLGUIClient *client );
204  void clientRemoved( KXMLGUIClient *client );
205 
216  void makingChanges(bool);
217 
218 private:
219  friend class KXMLGUIClient;
221  void forgetClient(KXMLGUIClient *client);
222 
223  KXMLGUIFactoryPrivate *const d;
224 };
225 
226 #endif
227 /* vim: et sw=4
228  */
QWidget
KXMLGUIClient
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document...
Definition: kxmlguiclient.h:46
KStandardAction::name
const char * name(StandardAction id)
This will return the internal name of a given standard action.
Definition: kstandardaction.cpp:223
QDomNode
QDomNamedNodeMap
KXMLGUIBuilder
Implements the creation of the GUI (menubar, menus and toolbars) as requested by the GUI factory...
Definition: kxmlguibuilder.h:41
QDomAttr
QObject
QString
QList< QAction * >
KXMLGUIFactory
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition: kxmlguifactory.h:65
QDomDocument
QAction
KStandardAction::create
KAction * create(StandardAction id, const QObject *recvr, const char *slot, QObject *parent)
Creates an action corresponding to one of the KStandardAction::StandardAction actions, which is connected to the given object and slot, and is owned by parent.
Definition: kstandardaction.cpp:82
kdeui_export.h
KStandardGuiItem::reset
KGuiItem reset()
Returns the 'Reset' gui item.
Definition: kstandardguiitem.cpp:258
kcomponentdata.h
QDomElement
KComponentData
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal