KWidgetsAddons

kfontsizeaction.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Reginald Stadlbauer <[email protected]>
3  (C) 1999 Simon Hausmann <[email protected]>
4  (C) 2000 Nicolas Hadacek <[email protected]>
5  (C) 2000 Kurt Granroth <[email protected]>
6  (C) 2000 Michael Koch <[email protected]>
7  (C) 2001 Holger Freyther <[email protected]>
8  (C) 2002 Ellis Whitehead <[email protected]>
9  (C) 2003 Andras Mantia <[email protected]>
10  (C) 2005-2006 Hamish Rodda <[email protected]>
11 
12  This library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU Library General Public
14  License version 2 as published by the Free Software Foundation.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 */
26 
27 #ifndef KFONTSIZEACTION_H
28 #define KFONTSIZEACTION_H
29 
30 #include <kselectaction.h>
31 
38 class KWIDGETSADDONS_EXPORT KFontSizeAction : public KSelectAction
39 {
40  Q_OBJECT
41  Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize)
42 
43 public:
44  explicit KFontSizeAction(QObject *parent);
45  KFontSizeAction(const QString &text, QObject *parent);
46  KFontSizeAction(const QIcon &icon, const QString &text, QObject *parent);
47 
48  ~KFontSizeAction() override;
49 
50  int fontSize() const;
51 
52  void setFontSize(int size);
53 
54 Q_SIGNALS:
55  void fontSizeChanged(int);
56 
57 protected Q_SLOTS:
61  void actionTriggered(QAction *action) override;
62 
63 private:
64  class Private;
65  Private *const d;
66 };
67 
68 #endif
An action to allow changing of the font size.
Action for selecting one of several items.
Definition: kselectaction.h:54
Q_PROPERTY(...)
virtual void actionTriggered(QAction *action)
This function is called whenever an action from the selections is triggered.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed May 27 2020 22:47:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.