kfontrequester.h
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 class QLabel;
00028 class QPushButton;
00029
00042 class KFontRequester : public QWidget
00043 {
00044 Q_OBJECT
00045
00046 Q_PROPERTY( QString title READ title WRITE setTitle )
00047 Q_PROPERTY( QString sampleText READ sampleText WRITE setSampleText )
00048 Q_PROPERTY( QFont font READ font WRITE setFont )
00049
00050 public:
00051
00060 KFontRequester( QWidget *parent=0L, const char *name=0L,
00061 bool onlyFixed=false );
00062
00066 QFont font() const { return m_selFont; }
00067
00071 bool isFixedOnly() const { return m_onlyFixed; }
00072
00076 QString sampleText() const { return m_sampleText; }
00077
00081 QString title() const { return m_title; }
00082
00086 QLabel *label() const { return m_sampleLabel; }
00087
00091 QPushButton *button() const { return m_button; }
00092
00100 virtual void setFont( const QFont &font, bool onlyFixed=false );
00101
00113 virtual void setSampleText( const QString &text );
00114
00121 virtual void setTitle( const QString & title );
00122
00123 signals:
00124
00125 void fontSelected( const QFont &font );
00126
00127 protected:
00128
00129 void displaySampleText();
00130 void setToolTip();
00131
00132 protected slots:
00133
00134 virtual void buttonClicked();
00135
00136 protected:
00137
00138 bool m_onlyFixed;
00139 QString m_sampleText, m_title;
00140 QLabel *m_sampleLabel;
00141 QPushButton *m_button;
00142 QFont m_selFont;
00143
00144 private:
00145
00146 class KFontRequesterPrivate;
00147 KFontRequesterPrivate *d;
00148 };
00149
00150 #endif // KFONTREQUESTER_H
00151
00152
00153
This file is part of the documentation for kdeui Library Version 3.2.3.