KDELibs4Support

kfontcombobox.h
1 /* This file is part of the KDE libraries
2 
3  Copyright (C) 2008 Chusslove Illich <[email protected]>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 #ifndef KFONTCOMBOBOX_P_H
21 #define KFONTCOMBOBOX_P_H
22 
23 #include <kdelibs4support_export.h>
24 
25 #include <kcombobox.h>
26 
27 class KFontComboBoxPrivate;
28 
51 class KDELIBS4SUPPORT_DEPRECATED_EXPORT KFontComboBox : public KComboBox
52 {
53  Q_OBJECT
54 
55  Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged USER true)
56 
57 public:
58 
64  KDELIBS4SUPPORT_DEPRECATED explicit KFontComboBox(QWidget *parent = nullptr);
65 
74  void setOnlyFixed(bool onlyFixed);
75 
84  void setFontList(const QStringList &fontList);
85 
89  virtual ~KFontComboBox();
90 
96  QFont currentFont() const;
97 
105  QSize sizeHint() const override;
106 
107 public Q_SLOTS:
113  void setCurrentFont(const QFont &font);
114 
115 Q_SIGNALS:
122  void currentFontChanged(const QFont &font);
123 
124 protected:
125  bool event(QEvent *e) override;
126 
127 private:
128 
129  friend class KFontComboBoxPrivate;
130  KFontComboBoxPrivate *const d;
131 
132  Q_DISABLE_COPY(KFontComboBox)
133 
134  Q_PRIVATE_SLOT(d, void _k_currentFontChanged(int))
135 };
136 
137 #endif
A lightweight font selection widget.
Definition: kfontcombobox.h:51
virtual bool event(QEvent *event) override
Q_PROPERTY(...)
Q_DISABLE_COPY(Class)
virtual QSize sizeHint() const const override
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Nov 30 2020 22:59:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.