KXmlGui

kxmlguibuilder.h
1 /* This file is part of the KDE project
2  Copyright (C) 2000 Simon Hausmann <[email protected]>
3  David Faure <[email protected]>
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 as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 #ifndef kxmlguibuilder_h
21 #define kxmlguibuilder_h
22 
23 #include <kxmlgui_export.h>
24 
25 class KXMLGUIBuilderPrivate;
26 class KXMLGUIClient;
27 
28 class QAction;
29 class QDomElement;
30 class QStringList;
31 class QWidget;
32 
42 class KXMLGUI_EXPORT KXMLGUIBuilder
43 {
44 public:
45 
46  explicit KXMLGUIBuilder(QWidget *widget);
47  virtual ~KXMLGUIBuilder();
48 
49  /* @internal */
50  KXMLGUIClient *builderClient() const;
51  /* @internal */
52  void setBuilderClient(KXMLGUIClient *client);
53  /* @internal */
54  QWidget *widget();
55 
56  virtual QStringList containerTags() const;
57 
70  virtual QWidget *createContainer(QWidget *parent, int index,
71  const QDomElement &element, QAction *&containerAction);
72 
78  virtual void removeContainer(QWidget *container, QWidget *parent,
79  QDomElement &element, QAction *containerAction);
80 
81  virtual QStringList customTags() const;
82 
83  virtual QAction *createCustomElement(QWidget *parent, int index, const QDomElement &element);
84 
85 #if KXMLGUI_BUILD_DEPRECATED_SINCE(5, 0)
86  // KF6 TODO: REMOVE
89  KXMLGUI_DEPRECATED_VERSION(5, 0, "Do not use")
90  virtual void removeCustomElement(QWidget *parent, QAction *action);
91 #endif
92 
93  virtual void finalizeGUI(KXMLGUIClient *client);
94 
95 protected:
96  virtual void virtual_hook(int id, void *data);
97 private:
98  KXMLGUIBuilderPrivate *const d;
99 };
100 
101 #endif
102 
A KXMLGUIClient can be used with KXMLGUIFactory to create a GUI from actions and an XML document...
Definition: kxmlguiclient.h:48
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-2020 The KDE developers.
Generated on Thu Aug 6 2020 22:49:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.