KWidgetsAddons

ktoolbarspaceraction.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2006 Hamish Rodda <rodda@kde.org>
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
16class 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 <rodda@kde.org>
28 */
29class KWIDGETSADDONS_EXPORT KToolBarSpacerAction : public QWidgetAction
30{
31 Q_OBJECT
32
33public:
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
48private:
49 std::unique_ptr<class KToolBarSpacerActionPrivate> const d;
50};
51
52#endif
An extension to QAction which allows for adding a spacer item into a QToolBar / KToolBar.
virtual QWidget * createWidget(QWidget *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.