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 KActionCollection;
00031
00032 class QFont;
00033 class QUrl;
00034
00061 class KDEUI_EXPORT KCharSelect : public QWidget
00062 {
00063 Q_OBJECT
00064 Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont)
00065 Q_PROPERTY(QChar currentChar READ currentChar WRITE setCurrentChar)
00066 Q_PROPERTY(QList<QChar> displayedChars READ displayedChars)
00067
00068 public:
00072 enum Control {
00076 SearchLine = 0x01,
00080 FontCombo = 0x02,
00084 FontSize = 0x04,
00088 BlockCombos = 0x08,
00092 CharacterTable = 0x10,
00096 DetailBrowser = 0x20,
00100 HistoryButtons = 0x40,
00104 AllGuiElements = 65535
00105 };
00106 Q_DECLARE_FLAGS(Controls,
00107 Control)
00108
00109
00110 KDE_CONSTRUCTOR_DEPRECATED explicit KCharSelect(
00111 QWidget *parent,
00112 const Controls controls = AllGuiElements);
00113
00132 explicit KCharSelect(
00133 QWidget *parent,
00134 KActionCollection *collection,
00135 const Controls controls = AllGuiElements);
00136
00137 ~KCharSelect();
00138
00142 virtual QSize sizeHint() const;
00143
00147 QChar currentChar() const;
00148
00152 QFont currentFont() const;
00153
00157 QList<QChar> displayedChars() const;
00158
00159 public Q_SLOTS:
00165 void setCurrentChar(const QChar &c);
00166
00172 void setCurrentFont(const QFont &font);
00173
00174 Q_SIGNALS:
00180 void currentFontChanged(const QFont &font);
00186 void currentCharChanged(const QChar &c);
00190 void displayedCharsChanged();
00196 void charSelected(const QChar &c);
00197
00198 private:
00199 Q_PRIVATE_SLOT(d, void _k_activateSearchLine())
00200 Q_PRIVATE_SLOT(d, void _k_back())
00201 Q_PRIVATE_SLOT(d, void _k_forward())
00202 Q_PRIVATE_SLOT(d, void _k_fontSelected())
00203 Q_PRIVATE_SLOT(d, void _k_updateCurrentChar(const QChar &c))
00204 Q_PRIVATE_SLOT(d, void _k_slotUpdateUnicode(const QChar &c))
00205 Q_PRIVATE_SLOT(d, void _k_sectionSelected(int index))
00206 Q_PRIVATE_SLOT(d, void _k_blockSelected(int index))
00207 Q_PRIVATE_SLOT(d, void _k_searchEditChanged())
00208 Q_PRIVATE_SLOT(d, void _k_search())
00209 Q_PRIVATE_SLOT(d, void _k_linkClicked(QUrl))
00210
00211 class KCharSelectPrivate;
00212 KCharSelectPrivate* const d;
00213
00214 void init(const Controls, KActionCollection *);
00215 };
00216
00217 Q_DECLARE_OPERATORS_FOR_FLAGS(KCharSelect::Controls)
00218
00219 #endif