KXmlGui

kxmlguibuilder.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 2000 Simon Hausmann <[email protected]>
4  SPDX-FileCopyrightText: 2000 David Faure <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef kxmlguibuilder_h
10 #define kxmlguibuilder_h
11 
12 #include <kxmlgui_export.h>
13 #include <memory>
14 
15 class KXMLGUIBuilderPrivate;
16 class KXMLGUIClient;
17 
18 class QAction;
19 class QDomElement;
20 class QStringList;
21 class QWidget;
22 
32 class KXMLGUI_EXPORT KXMLGUIBuilder
33 {
34 public:
35 
36  explicit KXMLGUIBuilder(QWidget *widget);
37  virtual ~KXMLGUIBuilder();
38 
39  /* @internal */
40  KXMLGUIClient *builderClient() const;
41  /* @internal */
42  void setBuilderClient(KXMLGUIClient *client);
43  /* @internal */
44  QWidget *widget();
45 
46  virtual QStringList containerTags() const;
47 
60  virtual QWidget *createContainer(QWidget *parent, int index,
61  const QDomElement &element, QAction *&containerAction);
62 
68  virtual void removeContainer(QWidget *container, QWidget *parent,
69  QDomElement &element, QAction *containerAction);
70 
71  virtual QStringList customTags() const;
72 
73  virtual QAction *createCustomElement(QWidget *parent, int index, const QDomElement &element);
74 
75 #if KXMLGUI_BUILD_DEPRECATED_SINCE(5, 0)
76  // KF6 TODO: REMOVE
79  KXMLGUI_DEPRECATED_VERSION(5, 0, "Do not use")
80  virtual void removeCustomElement(QWidget *parent, QAction *action);
81 #endif
82 
83  virtual void finalizeGUI(KXMLGUIClient *client);
84 
85 protected:
86  virtual void virtual_hook(int id, void *data);
87 
88 private:
89  std::unique_ptr<KXMLGUIBuilderPrivate> const d;
90 };
91 
92 #endif
93 
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document...
Definition: kxmlguiclient.h:39
Implements the creation of the GUI (menubar, menus and toolbars) as requested by the GUI factory...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 27 2021 22:50:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.