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

KDEUI

  • 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
28class QAction;
29class KXMLGUIFactoryPrivate;
30class KXMLGUIClient;
31class KXMLGUIBuilder;
32class KComponentData;
33
34class QDomAttr;
35class QDomDocument;
36class QDomElement;
37class QDomNode;
38class QDomNamedNodeMap;
39
40namespace KXMLGUI
41{
42struct MergingIndex;
43struct ContainerNode;
44struct ContainerClient;
45class BuildHelper;
46}
47
65class 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
202Q_SIGNALS:
203 void clientAdded( KXMLGUIClient *client );
204 void clientRemoved( KXMLGUIClient *client );
205
216 void makingChanges(bool);
217
218private:
219 friend class KXMLGUIClient;
221 void forgetClient(KXMLGUIClient *client);
222
223 KXMLGUIFactoryPrivate *const d;
224};
225
226#endif
227/* vim: et sw=4
228 */
KComponentData
KXMLGUIBuilder
Implements the creation of the GUI (menubar, menus and toolbars) as requested by the GUI factory.
Definition: kxmlguibuilder.h:42
KXMLGUIClient
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document,...
Definition: kxmlguiclient.h:47
KXMLGUIFactory
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Definition: kxmlguifactory.h:66
KXMLGUIFactory::clientRemoved
void clientRemoved(KXMLGUIClient *client)
KXMLGUIFactory::clientAdded
void clientAdded(KXMLGUIClient *client)
KXMLGUIFactory::makingChanges
void makingChanges(bool)
Emitted when the factory is currently making changes to the GUI, i.e.
QAction
QList
QObject
QWidget
kcomponentdata.h
kdeui_export.h
KXMLGUI
Definition: kxmlguifactory.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
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