KWidgetsAddons

kfontsizeaction.h
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 1999 Reginald Stadlbauer <reggie@kde.org>
4 SPDX-FileCopyrightText: 1999 Simon Hausmann <hausmann@kde.org>
5 SPDX-FileCopyrightText: 2000 Nicolas Hadacek <haadcek@kde.org>
6 SPDX-FileCopyrightText: 2000 Kurt Granroth <granroth@kde.org>
7 SPDX-FileCopyrightText: 2000 Michael Koch <koch@kde.org>
8 SPDX-FileCopyrightText: 2001 Holger Freyther <freyther@kde.org>
9 SPDX-FileCopyrightText: 2002 Ellis Whitehead <ellis@kde.org>
10 SPDX-FileCopyrightText: 2003 Andras Mantia <amantia@kde.org>
11 SPDX-FileCopyrightText: 2005-2006 Hamish Rodda <rodda@kde.org>
12
13 SPDX-License-Identifier: LGPL-2.0-only
14*/
15
16#ifndef KFONTSIZEACTION_H
17#define KFONTSIZEACTION_H
18
19#include <kselectaction.h>
20
21class KFontSizeActionPrivate;
22
23/**
24 * @class KFontSizeAction kfontsizeaction.h KFontSizeAction
25 *
26 * An action to allow changing of the font size.
27 * This action will be shown as a combobox on a toolbar with a proper set of font sizes.
28 */
29class KWIDGETSADDONS_EXPORT KFontSizeAction : public KSelectAction
30{
31 Q_OBJECT
32 Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize)
33
34public:
35 explicit KFontSizeAction(QObject *parent);
36 KFontSizeAction(const QString &text, QObject *parent);
37 KFontSizeAction(const QIcon &icon, const QString &text, QObject *parent);
38
39 ~KFontSizeAction() override;
40
41 int fontSize() const;
42
43 void setFontSize(int size);
44
46 void fontSizeChanged(int);
47
48protected Q_SLOTS:
49 /**
50 * This function is called whenever an action from the selections is triggered.
51 */
52 void slotActionTriggered(QAction *action) override;
53
54private:
55 Q_DECLARE_PRIVATE(KFontSizeAction)
56};
57
58#endif
An action to allow changing of the font size.
Action for selecting one of several items.
virtual void slotActionTriggered(QAction *action)
This function is called whenever an action from the selections is triggered.
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:05:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.