kalarm
fontcolour.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FONTCOLOUR_H
00022 #define FONTCOLOUR_H
00023
00024 #include <kdeversion.h>
00025 #include <tqwidget.h>
00026 #include <tqstringlist.h>
00027 #include <kfontdialog.h>
00028 #include "colourlist.h"
00029
00030 class ColourCombo;
00031 class TQPushButton;
00032 class CheckBox;
00033
00034
00035 class FontColourChooser : public QWidget
00036 {
00037 Q_OBJECT
00038 public:
00039 explicit FontColourChooser(TQWidget* parent = 0, const char* name = 0,
00040 bool onlyFixed = false,
00041 const TQStringList& fontList = TQStringList(),
00042 const TQString& frameLabel = i18n("Requested font"),
00043 bool editColours = false, bool fg = true, bool defaultFont = false,
00044 int visibleListSize = 8);
00045
00046 void setDefaultFont();
00047 void setFont(const TQFont&, bool onlyFixed = false);
00048 bool defaultFont() const;
00049 TQFont font() const;
00050 TQColor fgColour() const;
00051 TQColor bgColour() const;
00052 const ColourList& colours() const { return mColourList; }
00053 void setFgColour(const TQColor&);
00054 void setBgColour(const TQColor&);
00055 void setColours(const ColourList&);
00056 TQString sampleText() const;
00057 void setSampleText(const TQString& text);
00058 bool isReadOnly() const { return mReadOnly; }
00059 void setReadOnly(bool);
00060 virtual bool eventFilter(TQObject*, TQEvent*);
00061
00062 private slots:
00063 void setSampleColour();
00064 void slotDefaultFontToggled(bool);
00065 void slotAddColour();
00066 void slotRemoveColour();
00067
00068 private:
00069 ColourCombo* mFgColourButton;
00070 ColourCombo* mBgColourButton;
00071 TQPushButton* mRemoveColourButton;
00072 KFontChooser* mFontChooser;
00073 CheckBox* mDefaultFont;
00074 ColourList mColourList;
00075 bool mReadOnly;
00076 };
00077
00078 #endif
|