Krita Source Code Documentation
Loading...
Searching...
No Matches
KisKXMLGUIFactory Class Reference

#include <kxmlguifactory.h>

+ Inheritance diagram for KisKXMLGUIFactory:

Signals

void clientAdded (KisKXMLGUIClient *client)
 
void clientRemoved (KisKXMLGUIClient *client)
 
void makingChanges (bool)
 

Public Member Functions

void addClient (KisKXMLGUIClient *client)
 
QList< KisKXMLGUIClient * > clients () const
 
QWidget * container (const QString &containerName, KisKXMLGUIClient *client, bool useTagName=false)
 
QList< QWidget * > containers (const QString &tagName)
 
 KisKXMLGUIFactory (KisKXMLGUIBuilder *builder, QObject *parent=0)
 
void plugActionList (KisKXMLGUIClient *client, const QString &name, const QList< QAction * > &actionList)
 
void removeClient (KisKXMLGUIClient *client)
 
void reset ()
 
void resetContainer (const QString &containerName, bool useTagName=false)
 
void unplugActionList (KisKXMLGUIClient *client, const QString &name)
 
 ~KisKXMLGUIFactory () override
 

Static Public Member Functions

static QDomElement actionPropertiesElement (QDomDocument &doc)
 
static QDomElement findActionByName (QDomElement &elem, const QString &sName, bool create)
 
static QString readConfigFile (const QString &filename, const QString &componentName=QString())
 
static bool saveConfigFile (const QDomDocument &doc, const QString &filename, const QString &componentName=QString())
 

Private Member Functions

void forgetClient (KisKXMLGUIClient *client)
 Internal, called by KisKXMLGUIClient destructor.
 

Private Attributes

KisKXMLGUIFactoryPrivate *const d
 

Friends

class KisKXMLGUI::BuildHelper
 
class KisKXMLGUIClient
 

Detailed Description

KisKXMLGUIFactory, together with KisKXMLGUIClient objects, can be used to create a GUI of container widgets (like menus, toolbars, etc.) and container items (menu items, toolbar buttons, etc.) from an XML document and action objects.

Each KisKXMLGUIClient represents a part of the GUI, composed from containers and actions. KisKXMLGUIFactory takes care of building (with the help of a KisKXMLGUIBuilder) and merging the GUI from an unlimited number of clients.

Each client provides XML through a QDomDocument and actions through a KisKActionCollection . The XML document contains the rules for how to merge the GUI.

KisKXMLGUIFactory processes the DOM tree provided by a client and plugs in the client's actions, according to the XML and the merging rules of previously inserted clients. Container widgets are built via a KisKXMLGUIBuilder , which has to be provided with the KisKXMLGUIFactory constructor.

Definition at line 51 of file kxmlguifactory.h.

Constructor & Destructor Documentation

◆ KisKXMLGUIFactory()

KisKXMLGUIFactory::KisKXMLGUIFactory ( KisKXMLGUIBuilder * builder,
QObject * parent = 0 )
explicit

Constructs a KisKXMLGUIFactory. The provided builder KisKXMLGUIBuilder will be called for creating and removing container widgets, when clients are added/removed from the GUI.

Note that the ownership of the given KisKXMLGUIBuilder object won't be transferred to this KisKXMLGUIFactory, so you have to take care of deleting it properly.

Removes all QDomComment objects from the specified node and all its children.

Definition at line 202 of file kxmlguifactory.cpp.

203 : QObject(parent), d(new KisKXMLGUIFactoryPrivate)
204{
205 d->builder = builder;
206 d->guiClient = 0;
207 if (d->builder) {
210 }
211}
virtual QStringList customTags() const
virtual QStringList containerTags() const
KisKXMLGUIFactoryPrivate *const d
KisKXMLGUIBuilder * builder
KisKXMLGUIClient * guiClient

References KisKXMLGUI::BuildState::builder, KisKXMLGUI::BuildState::builderContainerTags, KisKXMLGUI::BuildState::builderCustomTags, KisKXMLGUIBuilder::containerTags(), KisKXMLGUIBuilder::customTags(), d, and KisKXMLGUI::BuildState::guiClient.

◆ ~KisKXMLGUIFactory()

KisKXMLGUIFactory::~KisKXMLGUIFactory ( )
override

Destructor

Definition at line 213 of file kxmlguifactory.cpp.

214{
215 Q_FOREACH (KisKXMLGUIClient *client, d->m_clients) {
216 client->setFactory(0L);
217 }
218 delete d;
219}
void setFactory(KisKXMLGUIFactory *factory)
QList< KisKXMLGUIClient * > m_clients

References d, KisKXMLGUIFactoryPrivate::m_clients, and KisKXMLGUIClient::setFactory().

Member Function Documentation

◆ actionPropertiesElement()

QDomElement KisKXMLGUIFactory::actionPropertiesElement ( QDomDocument & doc)
static

Definition at line 653 of file kxmlguifactory.cpp.

654{
655 // first, lets see if we have existing properties
656 QDomElement elem = findActionPropertiesElement(doc);
657
658 // if there was none, create one
659 if (elem.isNull()) {
660 elem = doc.createElement(QStringLiteral("ActionProperties"));
661 doc.documentElement().appendChild(elem);
662 }
663 return elem;
664}
static QDomElement findActionPropertiesElement(const QDomDocument &doc)

References findActionPropertiesElement().

◆ addClient()

void KisKXMLGUIFactory::addClient ( KisKXMLGUIClient * client)

Creates the GUI described by the QDomDocument of the client, using the client's actions, and merges it with the previously created GUI. This also means that the order in which clients are added to the factory is relevant; assuming that your application supports plugins, you should first add your application to the factory and then the plugin, so that the plugin's UI is merged into the UI of your application, and not the other way round.

Definition at line 221 of file kxmlguifactory.cpp.

222{
223 debugWidgetUtils << client;
224 if (client->factory()) {
225 if (client->factory() == this) {
226 return;
227 } else {
228 client->factory()->removeClient(client); //just in case someone does stupid things ;-)
229 }
230 }
231
232 if (d->emptyState()) {
233 Q_EMIT makingChanges(true);
234 }
235 d->pushState();
236
237// QTime dt; dt.start();
238
239 d->guiClient = client;
240
241 // add this client to our client list
242 if (!d->m_clients.contains(client)) {
243 d->m_clients.append(client);
244 }
245 else {
246 debugWidgetUtils << "XMLGUI client already added " << client;
247 }
248 // Tell the client that plugging in is process and
249 // let it know what builder widget its mainwindow shortcuts
250 // should be attached to.
251 client->beginXMLPlug(d->builder->widget());
252
253 // try to use the build document for building the client's GUI, as the build document
254 // contains the correct container state information (like toolbar positions, sizes, etc.) .
255 // if there is non available, then use the "real" document.
256 QDomDocument doc = client->xmlguiBuildDocument();
257 if (doc.documentElement().isNull()) {
258 doc = client->domDocument();
259 }
260
261 QDomElement docElement = doc.documentElement();
262
263 d->m_rootNode->index = -1;
264
265 // cache some variables
266
267 d->clientName = docElement.attribute(d->attrName);
268 d->clientBuilder = client->clientBuilder();
269
270 if (d->clientBuilder) {
273 } else {
275 d->clientBuilderCustomTags.clear();
276 }
277
278 // load user-defined shortcuts and other action properties
279 d->saveDefaultActionProperties(client->actionCollection()->actions());
280 if (!doc.isNull()) {
281 d->refreshActionProperties(client, client->actionCollection()->actions(), doc);
282 }
283
284 BuildHelper(*d, d->m_rootNode).build(docElement);
285
286 // let the client know that we built its GUI.
287 client->setFactory(this);
288
289 // call the finalizeGUI method, to fix up the positions of toolbars for example.
290 // ### FIXME : obey client builder
291 // --- Well, toolbars have a bool "positioned", so it doesn't really matter,
292 // if we call positionYourself on all of them each time. (David)
294
295 // reset some variables, for safety
296 d->BuildState::reset();
297
298 client->endXMLPlug();
299
300 d->popState();
301
302 Q_EMIT clientAdded(client);
303
304 // build child clients
305 Q_FOREACH (KisKXMLGUIClient *child, client->childClients()) {
306 addClient(child);
307 }
308
309 if (d->emptyState()) {
310 Q_EMIT makingChanges(false);
311 }
312 /*
313 QString unaddedActions;
314 Q_FOREACH (KisKActionCollection* ac, KisKActionCollection::allCollections())
315 Q_FOREACH (QAction* action, ac->actions())
316 if (action->associatedWidgets().isEmpty())
317 unaddedActions += action->objectName() + ' ';
318
319 if (!unaddedActions.isEmpty())
320 qWarning() << "The following actions are not plugged into the gui (shortcuts will not work): " << unaddedActions;
321 */
322
323// qDebug() << "addClient took " << dt.elapsed();
324}
#define debugWidgetUtils
virtual void finalizeGUI(KisKXMLGUIClient *client)
KisKXMLGUIFactory * factory() const
QList< KisKXMLGUIClient * > childClients()
void saveDefaultActionProperties(const QList< QAction * > &actions)
void refreshActionProperties(KisKXMLGUIClient *client, const QList< QAction * > &actions, const QDomDocument &doc)
friend class KisKXMLGUI::BuildHelper
void removeClient(KisKXMLGUIClient *client)
void addClient(KisKXMLGUIClient *client)
void clientAdded(KisKXMLGUIClient *client)
void makingChanges(bool)
QStringList clientBuilderContainerTags
QStringList clientBuilderCustomTags
KisKXMLGUIBuilder * clientBuilder

References KisKXMLGUIClient::actionCollection(), KisKActionCollection::actions(), addClient(), KisKXMLGUIFactoryPrivate::attrName, KisKXMLGUIClient::beginXMLPlug(), KisKXMLGUI::BuildState::builder, KisKXMLGUIClient::childClients(), clientAdded(), KisKXMLGUIClient::clientBuilder(), KisKXMLGUI::BuildState::clientBuilder, KisKXMLGUI::BuildState::clientBuilderContainerTags, KisKXMLGUI::BuildState::clientBuilderCustomTags, KisKXMLGUI::BuildState::clientName, KisKXMLGUIBuilder::containerTags(), KisKXMLGUIBuilder::customTags(), d, debugWidgetUtils, KisKXMLGUIClient::domDocument(), KisKXMLGUIFactoryPrivate::emptyState(), KisKXMLGUIClient::endXMLPlug(), KisKXMLGUIClient::factory(), KisKXMLGUIBuilder::finalizeGUI(), KisKXMLGUI::BuildState::guiClient, KisKXMLGUI::ContainerNode::index, KisKXMLGUI::BuildHelper, KisKXMLGUIFactoryPrivate::m_clients, KisKXMLGUIFactoryPrivate::m_rootNode, makingChanges(), KisKXMLGUIFactoryPrivate::popState(), KisKXMLGUIFactoryPrivate::pushState(), KisKXMLGUIFactoryPrivate::refreshActionProperties(), removeClient(), KisKXMLGUIFactoryPrivate::saveDefaultActionProperties(), KisKXMLGUIClient::setFactory(), KisKXMLGUIBuilder::widget(), and KisKXMLGUIClient::xmlguiBuildDocument().

◆ clientAdded

void KisKXMLGUIFactory::clientAdded ( KisKXMLGUIClient * client)
signal

◆ clientRemoved

void KisKXMLGUIFactory::clientRemoved ( KisKXMLGUIClient * client)
signal

◆ clients()

QList< KisKXMLGUIClient * > KisKXMLGUIFactory::clients ( ) const

Returns a list of all clients currently added to this factory

Definition at line 445 of file kxmlguifactory.cpp.

446{
447 return d->m_clients;
448}

References d, and KisKXMLGUIFactoryPrivate::m_clients.

◆ container()

QWidget * KisKXMLGUIFactory::container ( const QString & containerName,
KisKXMLGUIClient * client,
bool useTagName = false )

Use this method to get access to a container widget with the name specified with containerName and which is owned by the client. The container name is specified with a "name" attribute in the XML document.

This function is particularly useful for getting hold of a popupmenu defined in an XMLUI file. For instance:

QMenu *popup = static_cast<QMenu*>(guiFactory()->container("my_popup",this));

where "my_popup" is the name of the menu in the XMLUI file, and "this" is XMLGUIClient which owns the popupmenu (e.g. the mainwindow, or the part, or the plugin...)

Parameters
containerNameName of the container widget
clientOwner of the container widget
useTagNameSpecifies whether to compare the specified name with the name attribute or the tag name.

This method may return 0 if no container with the given name exists or is not owned by the client.

Definition at line 450 of file kxmlguifactory.cpp.

452{
453 d->pushState();
454 d->m_containerName = containerName;
455 d->guiClient = client;
456
457 QWidget *result = d->findRecursive(d->m_rootNode, useTagName);
458
459 d->guiClient = 0L;
460 d->m_containerName.clear();
461
462 d->popState();
463
464 return result;
465}
QWidget * findRecursive(KisKXMLGUI::ContainerNode *node, bool tag)

References d, KisKXMLGUIFactoryPrivate::findRecursive(), KisKXMLGUI::BuildState::guiClient, KisKXMLGUIFactoryPrivate::m_containerName, KisKXMLGUIFactoryPrivate::m_rootNode, KisKXMLGUIFactoryPrivate::popState(), and KisKXMLGUIFactoryPrivate::pushState().

◆ containers()

QList< QWidget * > KisKXMLGUIFactory::containers ( const QString & tagName)

Definition at line 467 of file kxmlguifactory.cpp.

468{
469 return d->findRecursive(d->m_rootNode, tagName);
470}

References d, KisKXMLGUIFactoryPrivate::findRecursive(), and KisKXMLGUIFactoryPrivate::m_rootNode.

◆ findActionByName()

QDomElement KisKXMLGUIFactory::findActionByName ( QDomElement & elem,
const QString & sName,
bool create )
static

Definition at line 666 of file kxmlguifactory.cpp.

667{
668 const QLatin1String attrName("name");
669 for (QDomNode it = elem.firstChild(); !it.isNull(); it = it.nextSibling()) {
670 QDomElement e = it.toElement();
671 if (e.attribute(attrName) == sName) {
672 return e;
673 }
674 }
675
676 if (create) {
677 QDomElement act_elem = elem.ownerDocument().createElement(QStringLiteral("Action"));
678 act_elem.setAttribute(attrName, sName);
679 elem.appendChild(act_elem);
680 return act_elem;
681 }
682 return QDomElement();
683}

◆ forgetClient()

void KisKXMLGUIFactory::forgetClient ( KisKXMLGUIClient * client)
private

Internal, called by KisKXMLGUIClient destructor.

Definition at line 379 of file kxmlguifactory.cpp.

380{
381 d->m_clients.removeAll(client);
382}

References d, and KisKXMLGUIFactoryPrivate::m_clients.

◆ makingChanges

void KisKXMLGUIFactory::makingChanges ( bool )
signal

Emitted when the factory is currently making changes to the GUI, i.e. adding or removing clients. makingChanges(true) is emitted before any change happens, and makingChanges(false) is emitted after the change is done. This allows e.g. KisKMainWindow to know that the GUI is being changed programmatically and not by the user (so there is no reason to save toolbar settings afterwards).

Since
4.1.3

◆ plugActionList()

void KisKXMLGUIFactory::plugActionList ( KisKXMLGUIClient * client,
const QString & name,
const QList< QAction * > & actionList )

Definition at line 545 of file kxmlguifactory.cpp.

547{
548 d->pushState();
549 d->guiClient = client;
551 d->actionList = actionList;
552 d->clientName = client->domDocument().documentElement().attribute(d->attrName);
553
555
556 // Load shortcuts for these new actions
557 d->saveDefaultActionProperties(actionList);
558 d->refreshActionProperties(client, actionList, client->domDocument());
559
560 d->BuildState::reset();
561 d->popState();
562}
virtual QDomDocument domDocument() const
const char * name(StandardAction id)
void plugActionList(BuildState &state)

References KisKXMLGUI::BuildState::actionList, KisKXMLGUI::BuildState::actionListName, KisKXMLGUIFactoryPrivate::attrName, KisKXMLGUI::BuildState::clientName, d, KisKXMLGUIClient::domDocument(), KisKXMLGUI::BuildState::guiClient, KisKXMLGUIFactoryPrivate::m_rootNode, KisKXMLGUI::ContainerNode::plugActionList(), KisKXMLGUIFactoryPrivate::popState(), KisKXMLGUIFactoryPrivate::pushState(), KisKXMLGUIFactoryPrivate::refreshActionProperties(), and KisKXMLGUIFactoryPrivate::saveDefaultActionProperties().

◆ readConfigFile()

QString KisKXMLGUIFactory::readConfigFile ( const QString & filename,
const QString & componentName = QString() )
static

Definition at line 109 of file kxmlguifactory.cpp.

110{
111 QString componentName = _componentName.isEmpty() ? QCoreApplication::applicationName() : _componentName;
112 QString xml_file;
113
114 if (!QDir::isRelativePath(filename)) {
115 xml_file = filename;
116 } else {
117 // KF >= 5.1 (KisKXMLGUI_INSTALL_DIR)
118 xml_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, QStringLiteral("kxmlgui5/") + componentName + QLatin1Char('/') + filename);
119 if (!QFile::exists(xml_file)) {
120 // KF >= 5.4 (resource file)
121 xml_file = QStringLiteral(":/kxmlgui5/") + componentName + QLatin1Char('/') + filename;
122 }
123
124 bool warn = false;
125 if (!QFile::exists(xml_file)) {
126 // kdelibs4 / KF 5.0 solution
127 xml_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, componentName + QLatin1Char('/') + filename);
128 warn = true;
129 }
130
131 if (!QFile::exists(xml_file)) {
132 // kdelibs4 / KF 5.0 solution, and the caller includes the component name
133 // This was broken (lead to component/component/ in kdehome) and unnecessary
134 // (they can specify it with setComponentName instead)
135 xml_file = QStandardPaths::locate(QStandardPaths::AppDataLocation, filename);
136 warn = true;
137 }
138
139 if (warn) {
140 qWarning() << "kxmlguifactory: KisKXMLGUI file found at deprecated location" << xml_file << "-- please use ${KisKXMLGUI_INSTALL_DIR} to install these files instead.";
141 }
142 }
143
144 QFile file(xml_file);
145 if (xml_file.isEmpty() || !file.open(QIODevice::ReadOnly)) {
146 qCritical() << "No such XML file" << filename;
147 return QString();
148 }
149
150 QByteArray buffer(file.readAll());
151 return QString::fromUtf8(buffer.constData(), buffer.size());
152}

◆ removeClient()

void KisKXMLGUIFactory::removeClient ( KisKXMLGUIClient * client)

Removes the GUI described by the client, by unplugging all provided actions and removing all owned containers (and storing container state information in the given client)

Definition at line 384 of file kxmlguifactory.cpp.

385{
386 //qDebug(260) << client;
387
388 // don't try to remove the client's GUI if we didn't build it
389 if (!client || client->factory() != this) {
390 return;
391 }
392
393 if (d->emptyState()) {
394 Q_EMIT makingChanges(true);
395 }
396
397 // remove this client from our client list
398 d->m_clients.removeAll(client);
399
400 // remove child clients first (create a copy of the list just in case the
401 // original list is modified directly or indirectly in removeClient())
402 const QList<KisKXMLGUIClient *> childClients(client->childClients());
403 Q_FOREACH (KisKXMLGUIClient *child, childClients) {
404 removeClient(child);
405 }
406
407 //qDebug(260) << "calling removeRecursive";
408
409 d->pushState();
410
411 // cache some variables
412
413 d->guiClient = client;
414 d->clientName = client->domDocument().documentElement().attribute(d->attrName);
415 d->clientBuilder = client->clientBuilder();
416
417 client->setFactory(0L);
418
419 // if we don't have a build document for that client, yet, then create one by
420 // cloning the original document, so that saving container information in the
421 // DOM tree does not touch the original document.
422 QDomDocument doc = client->xmlguiBuildDocument();
423 if (doc.documentElement().isNull()) {
424 doc = client->domDocument().cloneNode(true).toDocument();
425 client->setXMLGUIBuildDocument(doc);
426 }
427
428 d->m_rootNode->destruct(doc.documentElement(), *d);
429
430 // reset some variables
431 d->BuildState::reset();
432
433 // This will destruct the KAccel object built around the given widget.
434 client->prepareXMLUnplug(d->builder->widget());
435
436 d->popState();
437
438 if (d->emptyState()) {
439 Q_EMIT makingChanges(false);
440 }
441
442 Q_EMIT clientRemoved(client);
443}
QDomDocument xmlguiBuildDocument() const
void setXMLGUIBuildDocument(const QDomDocument &doc)
KisKXMLGUIBuilder * clientBuilder() const
void prepareXMLUnplug(QWidget *)
void clientRemoved(KisKXMLGUIClient *client)
bool destruct(QDomElement element, BuildState &state)

References KisKXMLGUIFactoryPrivate::attrName, KisKXMLGUI::BuildState::builder, KisKXMLGUIClient::childClients(), KisKXMLGUIClient::clientBuilder(), KisKXMLGUI::BuildState::clientBuilder, KisKXMLGUI::BuildState::clientName, clientRemoved(), d, KisKXMLGUI::ContainerNode::destruct(), KisKXMLGUIClient::domDocument(), KisKXMLGUIFactoryPrivate::emptyState(), KisKXMLGUIClient::factory(), KisKXMLGUI::BuildState::guiClient, KisKXMLGUIFactoryPrivate::m_clients, KisKXMLGUIFactoryPrivate::m_rootNode, makingChanges(), KisKXMLGUIFactoryPrivate::popState(), KisKXMLGUIClient::prepareXMLUnplug(), KisKXMLGUIFactoryPrivate::pushState(), removeClient(), KisKXMLGUIClient::setFactory(), KisKXMLGUIClient::setXMLGUIBuildDocument(), KisKXMLGUIBuilder::widget(), and KisKXMLGUIClient::xmlguiBuildDocument().

◆ reset()

void KisKXMLGUIFactory::reset ( )

Use this method to free all memory allocated by the KisKXMLGUIFactory. This deletes the internal node tree and therefore resets the internal state of the class. Please note that the actual GUI is NOT touched at all, meaning no containers are deleted nor any actions unplugged. That is something you have to do on your own. So use this method only if you know what you are doing :-)

(also note that this will call KisKXMLGUIClient::setFactory( 0 ) for all inserted clients)

Definition at line 472 of file kxmlguifactory.cpp.

References KisKXMLGUI::ContainerNode::clearChildren(), d, KisKXMLGUIFactoryPrivate::m_rootNode, and KisKXMLGUI::ContainerNode::reset().

◆ resetContainer()

void KisKXMLGUIFactory::resetContainer ( const QString & containerName,
bool useTagName = false )

Use this method to free all memory allocated by the KisKXMLGUIFactory for a specific container, including all child containers and actions. This deletes the internal node subtree for the specified container. The actual GUI is not touched, no containers are deleted or any actions unplugged. Use this method only if you know what you are doing :-)

(also note that this will call KisKXMLGUIClient::setFactory( 0 ) for all clients of the container)

Definition at line 479 of file kxmlguifactory.cpp.

480{
481 if (containerName.isEmpty()) {
482 return;
483 }
484
485 ContainerNode *container = d->m_rootNode->findContainer(containerName, useTagName);
486
487 if (!container) {
488 return;
489 }
490
491 ContainerNode *parent = container->parent;
492 if (!parent) {
493 return;
494 }
495
496 // resetInternal( container );
497
498 parent->removeChild(container);
499}
QWidget * container(const QString &containerName, KisKXMLGUIClient *client, bool useTagName=false)
ChildIterator< value_type, is_const > parent(const ChildIterator< value_type, is_const > &it)
Definition KisForest.h:327
ContainerNode * findContainer(const QString &_name, bool tag)

References container(), d, KisKXMLGUI::ContainerNode::findContainer(), and KisKXMLGUIFactoryPrivate::m_rootNode.

◆ saveConfigFile()

bool KisKXMLGUIFactory::saveConfigFile ( const QDomDocument & doc,
const QString & filename,
const QString & componentName = QString() )
static

Definition at line 154 of file kxmlguifactory.cpp.

156{
157 QString componentName = _componentName.isEmpty() ? QCoreApplication::applicationName() : _componentName;
158 QString xml_file(filename);
159
160 if (QDir::isRelativePath(xml_file))
161 xml_file = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) +
162 QStringLiteral("/kxmlgui5/") + componentName + QLatin1Char('/') + filename;
163
164 QFileInfo fileInfo(xml_file);
165 QDir().mkpath(fileInfo.absolutePath());
166 QFile file(xml_file);
167 if (xml_file.isEmpty() || !file.open(QIODevice::WriteOnly)) {
168 qCritical() << "Could not write to" << filename;
169 return false;
170 }
171
172 // write out our document
173
174 QTextStream ts(&file);
176 ts << doc;
177
178 file.close();
179 return true;
180}
void setUtf8OnStream(QTextStream &stream)

References KisPortingUtils::setUtf8OnStream().

◆ unplugActionList()

Friends And Related Symbol Documentation

◆ KisKXMLGUI::BuildHelper

friend class KisKXMLGUI::BuildHelper
friend

Definition at line 53 of file kxmlguifactory.h.

◆ KisKXMLGUIClient

friend class KisKXMLGUIClient
friend

Definition at line 180 of file kxmlguifactory.h.

Member Data Documentation

◆ d

KisKXMLGUIFactoryPrivate* const KisKXMLGUIFactory::d
private

Definition at line 184 of file kxmlguifactory.h.


The documentation for this class was generated from the following files: