KWidgetsAddons

ktoolbarspaceraction.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2006 Hamish Rodda <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-only
6 */
7 
8 #ifndef KTOOLBARSPACERACTION_H
9 #define KTOOLBARSPACERACTION_H
10 
11 #include <QWidgetAction>
12 #include <memory>
13 
14 #include <kwidgetsaddons_export.h>
15 
16 class QWidget;
17 
18 /**
19  * @class KToolBarSpacerAction ktoolbarspaceraction.h KToolBarSpacerAction
20  *
21  * An extension to QAction which allows for adding a spacer item into a
22  * QToolBar / KToolBar.
23  *
24  * This is useful if you want to align at the right (or left if RTL) and
25  * need something that pushes the element to the end of the tool bar.
26  *
27  * @author Hamish Rodda <[email protected]>
28  */
29 class KWIDGETSADDONS_EXPORT KToolBarSpacerAction : public QWidgetAction
30 {
31  Q_OBJECT
32 
33 public:
34  /**
35  * Creates a new toolbar spacer action.
36  *
37  * @param parent The action's parent object.
38  */
39  explicit KToolBarSpacerAction(QObject *parent);
40 
41  ~KToolBarSpacerAction() override;
42 
43  /**
44  * Reimplemented from QWidgetAction.
45  */
46  QWidget *createWidget(QWidget *parent) override;
47 
48 private:
49  std::unique_ptr<class KToolBarSpacerActionPrivate> const d;
50 };
51 
52 #endif
virtual QWidget * createWidget(QWidget *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:03:41 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.