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