~ubuntu-branches/ubuntu/karmic/muse/karmic-proposed

« back to all changes in this revision

Viewing changes to themes/wood.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
** $Id: wood.h,v 1.2 2001/11/20 15:19:34 muse Exp $
 
3
**
 
4
** Definition of something or other
 
5
**
 
6
** Created : 979899
 
7
**
 
8
** Copyright (C) 1997 by Trolltech AS.  All rights reserved.
 
9
**
 
10
** This file is part of an example program for Qt.  This example
 
11
** program may be used, distributed and modified without limitation.
 
12
**
 
13
*****************************************************************************/
 
14
 
 
15
#ifndef WOOD_H
 
16
#define WOOD_H
 
17
 
 
18
#include <qwindowsstyle.h>
 
19
#include <qpalette.h>
 
20
 
 
21
class NorwegianWoodStyle : public QWindowsStyle
 
22
{
 
23
public:
 
24
    NorwegianWoodStyle();
 
25
    void polish( QApplication*);
 
26
    void polish( QWidget* );
 
27
    void unPolish( QWidget* );
 
28
    void unPolish( QApplication*);
 
29
 
 
30
    void drawPrimitive( PrimitiveElement pe,
 
31
                        QPainter *p,
 
32
                        const QRect &r,
 
33
                        const QColorGroup &cg,
 
34
                        SFlags flags = Style_Default,
 
35
                        const QStyleOption& = QStyleOption::Default ) const;
 
36
 
 
37
    void drawControl( ControlElement element,
 
38
                      QPainter *p,
 
39
                      const QWidget *widget,
 
40
                      const QRect &r,
 
41
                      const QColorGroup &cg,
 
42
                      SFlags how = Style_Default,
 
43
                      const QStyleOption& = QStyleOption::Default ) const;
 
44
 
 
45
    void drawControlMask( ControlElement element,
 
46
                          QPainter *p,
 
47
                          const QWidget *widget,
 
48
                          const QRect &r,
 
49
                          const QStyleOption& = QStyleOption::Default ) const;
 
50
 
 
51
    void drawComplexControl( ComplexControl cc,
 
52
                             QPainter *p,
 
53
                             const QWidget *widget,
 
54
                             const QRect &r,
 
55
                             const QColorGroup &cg,
 
56
                             SFlags how = Style_Default,
 
57
                             SCFlags sub = SC_All,
 
58
                             SCFlags subActive = SC_None,
 
59
                             const QStyleOption& = QStyleOption::Default ) const;
 
60
 
 
61
    void drawComplexControlMask( ComplexControl control,
 
62
                                 QPainter *p,
 
63
                                 const QWidget *widget,
 
64
                                 const QRect &r,
 
65
                                 const QStyleOption& = QStyleOption::Default ) const;
 
66
 
 
67
    QRect querySubControlMetrics( ComplexControl control,
 
68
                                  const QWidget *widget,
 
69
                                  SubControl sc,
 
70
                                  const QStyleOption& = QStyleOption::Default ) const;
 
71
 
 
72
    QRect subRect( SubRect r, const QWidget *widget ) const;
 
73
 
 
74
 
 
75
private:
 
76
    void drawSemicircleButton(QPainter *p, const QRect &r, int dir,
 
77
                              bool sunken, const QColorGroup &g ) const;
 
78
    QPalette oldPalette;
 
79
    QPixmap *sunkenDark;
 
80
    QPixmap *sunkenLight;
 
81
 
 
82
};
 
83
 
 
84
#endif