KWidgetsAddons

ktoolbarlabelaction.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2004 Felix Berger <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef KTOOLBARLABELACTION_H
20 #define KTOOLBARLABELACTION_H
21 
22 #include <QWidgetAction>
23 
24 #include <kwidgetsaddons_export.h>
25 
53 class KWIDGETSADDONS_EXPORT KToolBarLabelAction : public QWidgetAction
54 {
55  Q_OBJECT
56 
57 public:
64  KToolBarLabelAction(const QString &text, QObject *parent);
65 
74  KToolBarLabelAction(QAction *buddy, const QString &text, QObject *parent);
75 
79  ~KToolBarLabelAction() override;
80 
86  void setBuddy(QAction *buddy);
87 
93  QAction *buddy() const;
94 
98  QWidget *createWidget(QWidget *parent) override;
99 
100 Q_SIGNALS:
105  void textChanged(const QString &newText);
106 
107 protected:
108  bool event(QEvent *) override;
109  bool eventFilter(QObject *watched, QEvent *event) override;
110 
111 private:
112  class Private;
113  Private *const d;
114 };
115 
116 #endif
Class to display a label in a toolbar.
virtual QWidget * createWidget(QWidget *parent)
virtual bool event(QEvent *event) override
virtual bool eventFilter(QObject *obj, QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Jul 1 2020 22:42:38 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.