~ubuntu-branches/ubuntu/utopic/kde-workspace/utopic-proposed

« back to all changes in this revision

Viewing changes to kcontrol/kfontinst/kcmfontinst/FontFilterProxyStyle.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-07-09 08:31:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110709083115-ohyxn6z93mily9fc
Tags: upstream-4.6.90
Import upstream version 4.6.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  This file is part of the KDE project
 
2
 
 
3
    Copyright (C) 2007 Fredrik Höglund <fredrik@kde.org>
 
4
 
 
5
    This library is free software; you can redistribute it and/or
 
6
    modify it under the terms of the GNU Lesser General Public
 
7
    License (LGPL) as published by the Free Software Foundation;
 
8
    either version 2 of the License, or (at your option) any later
 
9
    version.
 
10
 
 
11
    This library is distributed in the hope that it will be useful,
 
12
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
    Lesser General Public License for more details.
 
15
 
 
16
    You should have received a copy of the GNU Lesser General Public License
 
17
    along with this library; see the file COPYING.LIB.  If not, write to
 
18
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
19
    Boston, MA 02110-1301, USA.
 
20
*/
 
21
#ifndef CFONTFILTERPROXYSTYLE_H
 
22
#define CFONTFILTERPROXYSTYLE_H
 
23
#include <QtGui/QStyle>
 
24
 
 
25
namespace KFI
 
26
{
 
27
 
 
28
class CFontFilterProxyStyle : public QStyle
 
29
{
 
30
public:
 
31
    CFontFilterProxyStyle(QWidget *parent);
 
32
    QStyle *style() const;
 
33
    void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter,
 
34
                            const QWidget *widget) const;
 
35
    void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const;
 
36
    void drawItemPixmap(QPainter *painter, const QRect &rectangle, int alignment, const QPixmap &pixmap) const;
 
37
    void drawItemText(QPainter *painter, const QRect &rectangle, int alignment, const QPalette &palette, bool enabled,
 
38
                      const QString &text, QPalette::ColorRole textRole) const;
 
39
    void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter,
 
40
                       const QWidget *widget) const;
 
41
    QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *option) const;
 
42
    SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, const QPoint &position,
 
43
                                     const QWidget *widget) const;
 
44
    QRect itemPixmapRect(const QRect &rectangle, int alignment, const QPixmap &pixmap) const;
 
45
    QRect itemTextRect(const QFontMetrics &metrics, const QRect &rectangle, int alignment,
 
46
                       bool enabled, const QString &text) const;
 
47
    int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const;
 
48
    void polish(QWidget *widget);
 
49
    void polish(QApplication *application);
 
50
    void polish(QPalette &palette);
 
51
    QSize sizeFromContents(ContentsType type, const QStyleOption *option, const QSize &contentsSize,
 
52
                           const QWidget *widget) const;
 
53
    QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const;
 
54
    QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *option, const QWidget *widget) const;
 
55
    QPalette standardPalette() const;
 
56
    int styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const;
 
57
    QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl,
 
58
                         const QWidget *widget) const;
 
59
    QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const;
 
60
    void unpolish(QWidget *widget);
 
61
    void unpolish(QApplication *application);
 
62
 
 
63
protected:
 
64
    QWidget *parent;
 
65
};
 
66
 
 
67
}
 
68
#endif
 
69