kdeui
kfontcombo.h
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 #ifndef _KFONTCOMBO_H_
00022 #define _KFONTCOMBO_H_
00023
00024 #include <kcombobox.h>
00025
00035 class KDEUI_EXPORT KFontCombo : public KComboBox
00036 {
00037 Q_OBJECT
00038 Q_PROPERTY(QString family READ currentFont WRITE setCurrentFont)
00039 Q_PROPERTY(bool bold READ bold WRITE setBold DESIGNABLE true)
00040 Q_PROPERTY(bool italic READ italic WRITE setItalic DESIGNABLE true)
00041 Q_PROPERTY(bool underline READ underline WRITE setUnderline DESIGNABLE true)
00042 Q_PROPERTY(bool strikeOut READ strikeOut WRITE setStrikeOut DESIGNABLE true)
00043 Q_PROPERTY(int fontSize READ size WRITE setSize DESIGNABLE true)
00044 public:
00051 KFontCombo(QWidget *parent, const char *name = 0);
00059 KFontCombo(const QStringList &fonts, QWidget *parent, const char *name = 0);
00063 virtual ~KFontCombo();
00064
00070 void setFonts(const QStringList &fonts);
00076 void setCurrentFont(const QString &family);
00080 QString currentFont() const;
00081
00087 void setBold(bool bold);
00093 bool bold() const;
00099 void setItalic(bool italic);
00105 bool italic() const;
00111 void setUnderline(bool underline);
00117 bool underline() const;
00123 void setStrikeOut(bool strikeOut);
00129 bool strikeOut() const;
00135 void setSize(int size);
00141 int size() const;
00142
00149 static bool displayFonts();
00150
00151 virtual void setCurrentItem(int i);
00152
00153 protected slots:
00158 void slotModified( int i );
00159
00160 protected:
00165 void updateFonts();
00166
00167 private:
00168 void init();
00169
00170 private:
00171 friend class KFontListItem;
00172 protected:
00173 virtual void virtual_hook( int id, void* data );
00174 private:
00175 struct KFontComboPrivate *d;
00176 };
00177
00178 #endif
00179