Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QFONTCOMBOBOX_H
00043 #define QFONTCOMBOBOX_H
00044
00045 #include <QtGui/qcombobox.h>
00046 #include <QtGui/qfontdatabase.h>
00047
00048 #ifndef QT_NO_FONTCOMBOBOX
00049
00050 QT_BEGIN_HEADER
00051
00052 QT_BEGIN_NAMESPACE
00053
00054 QT_MODULE(Gui)
00055
00056 class QFontComboBoxPrivate;
00057
00058 class Q_GUI_EXPORT QFontComboBox : public QComboBox
00059 {
00060 Q_OBJECT
00061 Q_FLAGS(FontFilters)
00062 Q_PROPERTY(QFontDatabase::WritingSystem writingSystem READ writingSystem WRITE setWritingSystem)
00063 Q_PROPERTY(FontFilters fontFilters READ fontFilters WRITE setFontFilters)
00064 Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged)
00065 Q_ENUMS(FontSelection)
00066
00067 public:
00068 explicit QFontComboBox(QWidget *parent = 0);
00069 ~QFontComboBox();
00070
00071 void setWritingSystem(QFontDatabase::WritingSystem);
00072 QFontDatabase::WritingSystem writingSystem() const;
00073
00074 enum FontFilter {
00075 AllFonts = 0,
00076 ScalableFonts = 0x1,
00077 NonScalableFonts = 0x2,
00078 MonospacedFonts = 0x4,
00079 ProportionalFonts = 0x8
00080 };
00081 Q_DECLARE_FLAGS(FontFilters, FontFilter)
00082
00083 void setFontFilters(FontFilters filters);
00084 FontFilters fontFilters() const;
00085
00086 QFont currentFont() const;
00087 QSize sizeHint() const;
00088
00089 public Q_SLOTS:
00090 void setCurrentFont(const QFont &f);
00091
00092 Q_SIGNALS:
00093 void currentFontChanged(const QFont &f);
00094
00095 protected:
00096 bool event(QEvent *e);
00097
00098 private:
00099 Q_DISABLE_COPY(QFontComboBox)
00100 Q_DECLARE_PRIVATE(QFontComboBox)
00101 Q_PRIVATE_SLOT(d_func(), void _q_currentChanged(const QString &))
00102 Q_PRIVATE_SLOT(d_func(), void _q_updateModel())
00103 };
00104
00105 Q_DECLARE_OPERATORS_FOR_FLAGS(QFontComboBox::FontFilters)
00106
00107 QT_END_NAMESPACE
00108
00109 QT_END_HEADER
00110
00111 #endif // QT_NO_FONTCOMBOBOX
00112 #endif