Moving unmaintained icon themes to unmaintained/3.
[kdeartwork.git] / styles / dotnet / dotnet.h
blob25900b6470dc85c588650020f92788b00bec936b
1 /*
2 * $Id$
4 * Copyright 2001, Chris Lee <lee@azsites.com>
5 * Originally copied from the KDE3 HighColor style, modified to fit mine.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License version 2 as published by the Free Software Foundation.
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 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library 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.
22 #ifndef __DOTNET_H
23 #define __DOTNET_H
25 #include <kstyle.h>
26 #include <qbitmap.h>
27 //Added by qt3to4:
28 #include <Q3ValueList>
29 #include <QEvent>
30 #include <Q3PopupMenu>
32 #define u_arrow -4,1, 2,1, -3,0, 1,0, -2,-1, 0,-1, -1,-2
33 #define d_arrow -4,-2, 2,-2, -3,-1, 1,-1, -2,0, 0,0, -1,1
34 #define l_arrow 0,-3, 0,3,-1,-2,-1,2,-2,-1,-2,1,-3,0
35 #define r_arrow -2,-3,-2,3,-1,-2, -1,2,0,-1,0,1,1,0
37 #define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
39 class dotNETstyle : public KStyle
41 Q_OBJECT
43 public:
44 dotNETstyle();
45 virtual ~dotNETstyle();
47 bool inheritsKHTML( const QWidget* widget ) const;
48 void polish( QWidget* widget );
49 void unPolish( QWidget* widget );
51 void renderMenuBlendPixmap( QPixmap&, const QColorGroup&, const Q3PopupMenu * ) const;
53 void drawKStylePrimitive(WidgetType widgetType, int primitive,
54 const QStyleOption* opt,const QRect &r, const QPalette &pal, State flags,QPainter* p,const QWidget* widget = 0, Option* kOpt = 0) const;
56 void drawPrimitive( PrimitiveElement element, const QStyleOption * option, QPainter * painter, const QWidget * widget = 0 ) const;
58 void drawControl( ControlElement element,
59 QPainter *p,
60 const QWidget *widget,
61 const QRect &r,
62 const QColorGroup &cg,
63 SFlags flags = Style_Default,
64 const QStyleOption& = QStyleOption::Default ) const;
66 void drawControlMask( ControlElement, QPainter *, const QWidget *, const QRect &, const QStyleOption &) const;
68 void drawComplexControl( ComplexControl control,
69 QPainter *p,
70 const QWidget *widget,
71 const QRect &r,
72 const QColorGroup &cg,
73 SFlags flags = Style_Default,
74 SCFlags controls = SC_All,
75 SCFlags active = SC_None,
76 const QStyleOption& = QStyleOption::Default ) const;
78 int pixelMetric( PixelMetric m,
79 const QWidget *widget = 0 ) const;
81 QRect subRect( SubRect r,
82 const QWidget *widget ) const;
84 QRect querySubControlMetrics( ComplexControl control,
85 const QWidget *widget,
86 SubControl subcontrol,
87 const QStyleOption &opt = QStyleOption::Default ) const;
89 void drawComplexControlMask(QStyle::ComplexControl c,
90 QPainter *p,
91 const QWidget *w,
92 const QRect &r,
93 const QStyleOption &o=QStyleOption::Default) const;
95 QSize sizeFromContents(QStyle::ContentsType t,
96 const QWidget *w,
97 const QSize &s,
98 const QStyleOption &o) const;
100 protected:
101 void renderButton(QPainter *p,
102 const QRect &r,
103 const QColorGroup &g,
104 bool sunken = false,
105 bool corners = false) const;
107 void renderPanel(QPainter *p,
108 const QRect &r,
109 const QColorGroup &g,
110 bool sunken = true,
111 bool thick = true) const;
113 void renderSlider(QPainter *p,
114 const QRect &r,
115 const QColorGroup &g) const;
116 bool eventFilter(QObject *, QEvent *);
118 void updatePalette( QComboBox * );
119 void updatePalette( Q3ToolBar * );
120 void updatePalette( QMenuBar * );
122 protected slots:
123 void slotDestroyed();
124 void paletteChanged();
126 private:
127 // Disable copy constructor and = operator
128 dotNETstyle( const dotNETstyle & );
129 dotNETstyle& operator=( const dotNETstyle & );
130 QStyle *winstyle;
132 bool pseudo3D, useTextShadows, roundedCorners, reverseLayout, kickerMode;
134 Q3ValueList<QWidget*> m_widgets;
137 #endif
139 // vim: set noet ts=4 sw=4: