KDEUI
kcharselect.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 kcharselect_h
00022 #define kcharselect_h
00023
00024 #include <QtCore/QString>
00025 #include <QtCore/QStringList>
00026 #include <QtGui/QWidget>
00027 #include <kglobal.h>
00028 #include <kdeui_export.h>
00029
00030 class QFont;
00031 class QUrl;
00032
00059 class KDEUI_EXPORT KCharSelect : public QWidget
00060 {
00061 Q_OBJECT
00062 Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont)
00063 Q_PROPERTY(QChar currentChar READ currentChar WRITE setCurrentChar)
00064 Q_PROPERTY(QList<QChar> displayedChars READ displayedChars)
00065
00066 public:
00070 enum Control {
00074 SearchLine = 0x01,
00078 FontCombo = 0x02,
00082 FontSize = 0x04,
00086 BlockCombos = 0x08,
00090 CharacterTable = 0x10,
00094 DetailBrowser = 0x20,
00098 AllGuiElements = 65535
00099 };
00100 Q_DECLARE_FLAGS(Controls,
00101 Control)
00102
00103
00106 explicit KCharSelect(QWidget *parent, const Controls controls = AllGuiElements);
00107 ~KCharSelect();
00111 virtual QSize sizeHint() const;
00112
00116 QChar currentChar() const;
00117
00121 QFont currentFont() const;
00122
00126 QList<QChar> displayedChars() const;
00127
00128 public Q_SLOTS:
00132 void setCurrentChar(const QChar &c);
00133
00137 void setCurrentFont(const QFont &font);
00138
00139 Q_SIGNALS:
00143 void currentFontChanged(const QFont &_font);
00147 void currentCharChanged(const QChar &c);
00151 void displayedCharsChanged();
00155 void charSelected(const QChar &c);
00156
00157 private:
00158 Q_PRIVATE_SLOT(d, void _k_fontSelected())
00159 Q_PRIVATE_SLOT(d, void _k_updateCurrentChar(const QChar &c))
00160 Q_PRIVATE_SLOT(d, void _k_slotUpdateUnicode(const QChar &c))
00161 Q_PRIVATE_SLOT(d, void _k_sectionSelected(int index))
00162 Q_PRIVATE_SLOT(d, void _k_blockSelected(int index))
00163 Q_PRIVATE_SLOT(d, void _k_searchEditChanged())
00164 Q_PRIVATE_SLOT(d, void _k_search())
00165 Q_PRIVATE_SLOT(d, void _k_linkClicked(QUrl))
00166
00167 class KCharSelectPrivate;
00168 KCharSelectPrivate* const d;
00169 };
00170
00171 Q_DECLARE_OPERATORS_FOR_FLAGS(KCharSelect::Controls)
00172
00173 #endif