diff options
Diffstat (limited to 'examples/themes/wood.h')
-rw-r--r-- | examples/themes/wood.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/examples/themes/wood.h b/examples/themes/wood.h new file mode 100644 index 000000000..c05efb10c --- /dev/null +++ b/examples/themes/wood.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Definition of something or other +** +** Created : 979899 +** +** Copyright (C) 1997-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#ifndef WOOD_H +#define WOOD_H + + +#include <qpalette.h> + +#ifndef QT_NO_STYLE_WINDOWS + +#include <qwindowsstyle.h> + + +class NorwegianWoodStyle : public TQWindowsStyle +{ +public: + NorwegianWoodStyle(); + void polish( TQApplication*); + void polish( TQWidget* ); + void unPolish( TQWidget* ); + void unPolish( TQApplication*); + + void drawPrimitive( PrimitiveElement pe, + TQPainter *p, + const TQRect &r, + const TQColorGroup &cg, + SFlags flags = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const; + + void drawControl( ControlElement element, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, + const TQStyleOption& = TQStyleOption::Default ) const; + + void drawControlMask( ControlElement element, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default ) const; + + void drawComplexControl( ComplexControl cc, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQColorGroup &cg, + SFlags how = Style_Default, + SCFlags sub = SC_All, + SCFlags subActive = SC_None, + const TQStyleOption& = TQStyleOption::Default ) const; + + void drawComplexControlMask( ComplexControl control, + TQPainter *p, + const TQWidget *widget, + const TQRect &r, + const TQStyleOption& = TQStyleOption::Default ) const; + + TQRect querySubControlMetrics( ComplexControl control, + const TQWidget *widget, + SubControl sc, + const TQStyleOption& = TQStyleOption::Default ) const; + + TQRect subRect( SubRect r, const TQWidget *widget ) const; + + +private: + void drawSemicircleButton(TQPainter *p, const TQRect &r, int dir, + bool sunken, const TQColorGroup &g ) const; + TQPalette oldPalette; + TQPixmap *sunkenDark; + TQPixmap *sunkenLight; + +}; + +#endif + +#endif |