~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to kalarm/fontcolour.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef FONTCOLOUR_H
22
22
#define FONTCOLOUR_H
23
23
 
 
24
#include <klocale.h>
24
25
#include <QWidget>
25
26
#include <QStringList>
26
 
#include <klocale.h>
27
27
 
28
28
class KFontChooser;
29
29
class CheckBox;
32
32
 
33
33
class FontColourChooser : public QWidget
34
34
{
35
 
        Q_OBJECT
36
 
public:
37
 
        explicit FontColourChooser(QWidget* parent = 0,
38
 
               const QStringList& fontList = QStringList(),
39
 
               const QString& frameLabel = i18n("Requested font"),
40
 
               bool fg = true, bool defaultFont = false, int visibleListSize = 8);
41
 
 
42
 
        void              setDefaultFont();
43
 
        void              setFont(const QFont&, bool onlyFixed = false);
44
 
        bool              defaultFont() const;
45
 
        QFont             font() const;
46
 
        QColor            fgColour() const;
47
 
        QColor            bgColour() const;
48
 
        void              setFgColour(const QColor&);
49
 
        void              setBgColour(const QColor&);
50
 
        QString           sampleText() const;
51
 
        void              setSampleText(const QString& text);
52
 
        bool              isReadOnly() const     { return mReadOnly; }
53
 
        void              setReadOnly(bool);
54
 
        virtual bool      eventFilter(QObject*, QEvent*);
55
 
 
56
 
private slots:
57
 
        void              setSampleColour();
58
 
        void              slotDefaultFontToggled(bool);
59
 
 
60
 
private:
61
 
        ColourButton*    mFgColourButton;       // or null
62
 
        ColourButton*    mBgColourButton;
63
 
        KFontChooser*    mFontChooser;
64
 
        CheckBox*        mDefaultFont;          // or null
65
 
        bool             mReadOnly;
 
35
        Q_OBJECT
 
36
    public:
 
37
        explicit FontColourChooser(QWidget* parent = 0,
 
38
               const QStringList& fontList = QStringList(),
 
39
               const QString& frameLabel = i18n("Requested font"),
 
40
               bool fg = true, bool defaultFont = false, int visibleListSize = 8);
 
41
 
 
42
        void              setDefaultFont();
 
43
        void              setFont(const QFont&, bool onlyFixed = false);
 
44
        bool              defaultFont() const;
 
45
        QFont             font() const;
 
46
        QColor            fgColour() const;
 
47
        QColor            bgColour() const;
 
48
        void              setFgColour(const QColor&);
 
49
        void              setBgColour(const QColor&);
 
50
        QString           sampleText() const;
 
51
        void              setSampleText(const QString& text);
 
52
        bool              isReadOnly() const     { return mReadOnly; }
 
53
        void              setReadOnly(bool);
 
54
        virtual bool      eventFilter(QObject*, QEvent*);
 
55
 
 
56
    private slots:
 
57
        void              setSampleColour();
 
58
        void              slotDefaultFontToggled(bool);
 
59
 
 
60
    private:
 
61
        ColourButton*    mFgColourButton;       // or null
 
62
        ColourButton*    mBgColourButton;
 
63
        KFontChooser*    mFontChooser;
 
64
        CheckBox*        mDefaultFont;          // or null
 
65
        bool             mReadOnly;
66
66
};
67
67
 
68
68
#endif
 
69
 
 
70
// vim: et sw=4: