1
/* This file is part of the KDE project
3
Copyright (C) 2007 Fredrik Höglund <fredrik@kde.org>
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
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.
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.
21
#ifndef CFONTFILTERPROXYSTYLE_H
22
#define CFONTFILTERPROXYSTYLE_H
23
#include <QtGui/QStyle>
28
class CFontFilterProxyStyle : public QStyle
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);