delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / kstyles / light / lightstyle-v3.h
blob4d277d3989f74fb72ef4fe4e826335f63ec8413a
1 /*
2 Copyright (c) 2000-2001 Trolltech AS (info@trolltech.com)
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files (the "Software"),
6 to deal in the Software without restriction, including without limitation
7 the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 and/or sell copies of the Software, and to permit persons to whom the
9 Software is furnished to do so, subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 DEALINGS IN THE SOFTWARE.
23 #ifndef LIGHTSTYLE_V3_H
24 #define LIGHTSTYLE_V3_H
27 #ifndef QT_H
28 #include <qcommonstyle.h>
29 #endif // QT_H
31 #include <kstyle.h>
32 #include <QtGui/QStyleOption>
34 #ifdef QT_PLUGIN
35 # define Q_EXPORT_STYLE_LIGHT_V3
36 #else
37 # define Q_EXPORT_STYLE_LIGHT_V3 Q_EXPORT
38 #endif // QT_PLUGIN
41 class Q_EXPORT_STYLE_LIGHT_V3 LightStyleV3 : public KStyle
43 Q_OBJECT
44 QStyle *basestyle;
46 public:
47 LightStyleV3();
48 virtual ~LightStyleV3();
50 void polishPopupMenu( Q3PopupMenu * );
52 void drawPrimitive(PrimitiveElement, QPainter *, const QRect & ) const;
54 void drawControl(ControlElement, QPainter *, const QWidget * ) const;
55 void drawControlMask(ControlElement, QPainter *, const QWidget * ) const;
57 QRect subElementRect(SubElement, const QWidget *) const;
59 void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
60 SCFlags = SC_All, SCFlags = SC_None ) const;
62 QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
63 const QStyleOption & = QStyleOption::SO_Default ) const;
65 SubControl querySubControl(ComplexControl, const QWidget *, const QPoint &,
66 const QStyleOption &data = QStyleOption::SO_Default ) const;
68 int pixelMetric(PixelMetric, const QWidget * = 0 ) const;
70 QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
71 const QStyleOption & = QStyleOption::SO_Default ) const;
73 int styleHint(StyleHint, const QWidget * = 0,
74 const QStyleOption & = QStyleOption::SO_Default,
75 QStyleHintReturn * = 0 ) const;
77 QPixmap standardPixmap( StandardPixmap standardpixmap,
78 const QWidget* widget = 0,
79 const QStyleOption& = QStyleOption::SO_Default ) const;
83 #endif // LIGHTSTYLE_V3_H