kdeui
kfontrequester.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 #ifndef KFONTREQUESTER_H
00021 #define KFONTREQUESTER_H
00022
00023 #include <qwidget.h>
00024 #include <qfont.h>
00025 #include <qstring.h>
00026
00027 #include <kdelibs_export.h>
00028
00029 class QLabel;
00030 class QPushButton;
00031
00044 class KDEUI_EXPORT KFontRequester : public QWidget
00045 {
00046 Q_OBJECT
00047
00048 Q_PROPERTY( QString title READ title WRITE setTitle )
00049 Q_PROPERTY( QString sampleText READ sampleText WRITE setSampleText )
00050 Q_PROPERTY( QFont font READ font WRITE setFont )
00051
00052 public:
00053
00062 KFontRequester( QWidget *parent=0L, const char *name=0L,
00063 bool onlyFixed=false );
00064
00068 QFont font() const { return m_selFont; }
00069
00073 bool isFixedOnly() const { return m_onlyFixed; }
00074
00078 QString sampleText() const { return m_sampleText; }
00079
00083 QString title() const { return m_title; }
00084
00088 QLabel *label() const { return m_sampleLabel; }
00089
00093 QPushButton *button() const { return m_button; }
00094
00102 virtual void setFont( const QFont &font, bool onlyFixed=false );
00103
00115 virtual void setSampleText( const QString &text );
00116
00123 virtual void setTitle( const QString & title );
00124
00125 signals:
00129 void fontSelected( const QFont &font );
00130
00131 protected:
00132
00133 void displaySampleText();
00134 void setToolTip();
00135
00136 protected slots:
00137
00138 virtual void buttonClicked();
00139
00140 protected:
00141
00142 bool m_onlyFixed;
00143 QString m_sampleText, m_title;
00144 QLabel *m_sampleLabel;
00145 QPushButton *m_button;
00146 QFont m_selFont;
00147
00148 private:
00149
00150 class KFontRequesterPrivate;
00151 KFontRequesterPrivate *d;
00152 };
00153
00154 #endif // KFONTREQUESTER_H
00155
00156
00157