Krita Source Code Documentation
Loading...
Searching...
No Matches
kxmlguifactory.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org>
3 SPDX-FileCopyrightText: 2000 Kurt Granroth <granroth@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#ifndef kxmlguifactory_h
9#define kxmlguifactory_h
10
11#include <kritawidgetutils_export.h>
12
13#include <QObject>
14
15class QAction;
19
20class QDomAttr;
21class QDomDocument;
22class QDomElement;
23class QDomNode;
24class QDomNamedNodeMap;
25
26namespace KisKXMLGUI
27{
28struct MergingIndex;
29struct ContainerNode;
30struct ContainerClient;
31class BuildHelper;
32}
33
51class KRITAWIDGETUTILS_EXPORT KisKXMLGUIFactory : public QObject
52{
54 Q_OBJECT
55public:
63 explicit KisKXMLGUIFactory(KisKXMLGUIBuilder *builder, QObject *parent = 0);
64
68 ~KisKXMLGUIFactory() override;
69
70 // XXX move to somewhere else? (Simon)
72 static QString readConfigFile(const QString &filename,
73 const QString &componentName = QString());
75 static bool saveConfigFile(const QDomDocument &doc, const QString &filename,
76 const QString &componentName = QString());
77
82 static QDomElement actionPropertiesElement(QDomDocument &doc);
83
89 static QDomElement findActionByName(QDomElement &elem, const QString &sName, bool create);
90
101 void addClient(KisKXMLGUIClient *client);
102
108 void removeClient(KisKXMLGUIClient *client);
109
110 void plugActionList(KisKXMLGUIClient *client, const QString &name, const QList<QAction *> &actionList);
111 void unplugActionList(KisKXMLGUIClient *client, const QString &name);
112
116 QList<KisKXMLGUIClient *> clients() const;
117
138 QWidget *container(const QString &containerName, KisKXMLGUIClient *client, bool useTagName = false);
139
140 QList<QWidget *> containers(const QString &tagName);
141
150 void reset();
151
161 void resetContainer(const QString &containerName, bool useTagName = false);
162
163Q_SIGNALS:
166
177 void makingChanges(bool);
178
179private:
180 friend class KisKXMLGUIClient;
182 void forgetClient(KisKXMLGUIClient *client);
183
185};
186
187#endif
188
void clientRemoved(KisKXMLGUIClient *client)
void clientAdded(KisKXMLGUIClient *client)
KisKXMLGUIFactoryPrivate *const d
void makingChanges(bool)