KXmlGui

kedittoolbar.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Kurt Granroth <[email protected]>
3  Copyright (C) 2006 Hamish Rodda <[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 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 #ifndef KEDITTOOLBAR_H
20 #define KEDITTOOLBAR_H
21 
22 #include <QDialog>
23 
24 #include <kxmlgui_export.h>
25 
26 class KActionCollection;
27 
28 class KEditToolBarPrivate;
29 class KXMLGUIFactory;
71 class KXMLGUI_EXPORT KEditToolBar : public QDialog
72 {
73  Q_OBJECT
74 public:
86  explicit KEditToolBar(KActionCollection *collection,
87  QWidget *parent = nullptr);
88 
107  explicit KEditToolBar(KXMLGUIFactory *factory,
108  QWidget *parent = nullptr);
109 
111  ~KEditToolBar() override;
112 
120  void setDefaultToolBar(const QString &toolBarName);
121 
139  void setResourceFile(const QString &file, bool global = true);
140 
148  static void setGlobalDefaultToolBar(const char *toolBarName); // TODO should be const QString&
149 
150 Q_SIGNALS:
156  void newToolBarConfig();
157 
158 #if KXMLGUI_ENABLE_DEPRECATED_SINCE(4, 0)
159 
162  KXMLGUI_DEPRECATED_VERSION(4, 0, "Use KEditToolBar::newToolBarConfig()")
163  QT_MOC_COMPAT void newToolbarConfig();
164 #endif
165 
166 protected:
167  void showEvent(QShowEvent *event) override;
168  void hideEvent(QHideEvent *event) override;
169 
170 private:
171  friend class KEditToolBarPrivate;
172  KEditToolBarPrivate *const d;
173 
174  Q_PRIVATE_SLOT(d, void _k_slotButtonClicked(QAbstractButton *))
175  Q_PRIVATE_SLOT(d, void _k_acceptOK(bool))
176  Q_PRIVATE_SLOT(d, void _k_enableApply(bool))
177 
179 };
180 
181 #endif // _KEDITTOOLBAR_H
A container for a set of QAction objects.
virtual void hideEvent(QHideEvent *event)
A dialog used to customize or configure toolbars.
Definition: kedittoolbar.h:71
KXMLGUIFactory, together with KXMLGUIClient objects, can be used to create a GUI of container widgets...
Q_DISABLE_COPY(Class)
virtual void showEvent(QShowEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Aug 3 2020 22:50:04 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.