fontcolour.h
00001
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 <qwidget.h>
00025 #include <qsize.h>
00026
00027 #include <kfontdialog.h>
00028
00029 #include "colourcombo.h"
00030
00031
00032
00033 class FontColourChooser : public QWidget
00034 {
00035 Q_OBJECT
00036 public:
00037 FontColourChooser(QWidget* parent = 0L, const char* name = 0L,
00038 bool onlyFixed = false,
00039 const QStringList& fontList = QStringList(),
00040 bool makeFrame = true, const QString& frameLabel = i18n("Requested font"),
00041 bool fg = true, int visibleListSize=8);
00042 ~FontColourChooser();
00043
00044 void setFont(const QFont& font, bool onlyFixed = false) { m_fontChooser->setFont(font, onlyFixed); }
00045 QFont font() const { return m_fontChooser->font(); }
00046 QColor fgColour() const;
00047 QColor bgColour() const { return m_bgColourButton->color(); }
00048 void setFgColour(const QColor&);
00049 void setBgColour(const QColor&);
00050 #if QT_VERSION < 300
00051 void setCharset(const QString& charset) { m_fontChooser->setCharset(charset); }
00052 QString charset() const { return m_fontChooser->charset(); }
00053 #endif
00054 QString sampleText() const { return m_fontChooser->sampleText(); }
00055 void setSampleText(const QString& text) { m_fontChooser->setSampleText(text); }
00056
00057 private:
00058 ColourCombo* m_fgColourButton;
00059 ColourCombo* m_bgColourButton;
00060 KFontChooser* m_fontChooser;
00061
00062 private slots:
00063 void setSampleColour();
00064 };
00065
00066 #endif
This file is part of the documentation for kdelibs Version 3.1.4.