Diffstat (limited to 'noncore/decorations/liquid/liquid.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/decorations/liquid/liquid.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/decorations/liquid/liquid.cpp b/noncore/decorations/liquid/liquid.cpp index 75b1fc9..ef2ac3c 100644 --- a/noncore/decorations/liquid/liquid.cpp +++ b/noncore/decorations/liquid/liquid.cpp | |||
@@ -1,33 +1,33 @@ | |||
1 | #include "liquid.h" | 1 | #include "liquid.h" |
2 | 2 | ||
3 | #include <qapplication.h> | 3 | #include <qapplication.h> |
4 | #include <qpainter.h> | 4 | #include <qpainter.h> |
5 | #include <qpalette.h> | 5 | #include <qpalette.h> |
6 | #include <qdrawutil.h> | 6 | #include <qdrawutil.h> |
7 | 7 | ||
8 | 8 | ||
9 | LiquidDecoInterface::LiquidDecoInterface ( ) : ref ( 0 ) | 9 | LiquidDecoInterface::LiquidDecoInterface ( ) |
10 | { | 10 | { |
11 | } | 11 | } |
12 | 12 | ||
13 | LiquidDecoInterface::~LiquidDecoInterface ( ) | 13 | LiquidDecoInterface::~LiquidDecoInterface ( ) |
14 | { | 14 | { |
15 | } | 15 | } |
16 | 16 | ||
17 | 17 | ||
18 | 18 | ||
19 | QString LiquidDecoInterface::name ( ) const | 19 | QString LiquidDecoInterface::name ( ) const |
20 | { | 20 | { |
21 | return qApp-> translate ( "Decoration", "Liquid" ); | 21 | return qApp-> translate ( "Decoration", "Liquid" ); |
22 | } | 22 | } |
23 | 23 | ||
24 | 24 | ||
25 | QPixmap LiquidDecoInterface::icon ( ) const | 25 | QPixmap LiquidDecoInterface::icon ( ) const |
26 | { | 26 | { |
27 | return QPixmap ( ); | 27 | return QPixmap ( ); |
28 | } | 28 | } |
29 | 29 | ||
30 | void LiquidDecoInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) const | 30 | void LiquidDecoInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) const |
31 | { | 31 | { |
32 | QRect r = wd-> rect; | 32 | QRect r = wd-> rect; |
33 | int th = metric ( TitleHeight, wd ); | 33 | int th = metric ( TitleHeight, wd ); |
@@ -101,36 +101,38 @@ void LiquidDecoInterface::drawArea( Area a, QPainter *p, const WindowData *wd ) | |||
101 | p-> fillRect ( br.left() - 1, tr. top ( ), br. width ( ) + 2, tr. height ( ), fillcol); | 101 | p-> fillRect ( br.left() - 1, tr. top ( ), br. width ( ) + 2, tr. height ( ), fillcol); |
102 | 102 | ||
103 | p-> setPen ( shadecol ); | 103 | p-> setPen ( shadecol ); |
104 | p-> drawText ( br, align, wd-> caption ); | 104 | p-> drawText ( br, align, wd-> caption ); |
105 | p-> setPen ( textcol ); | 105 | p-> setPen ( textcol ); |
106 | br. moveBy ( -1, -1 ); | 106 | br. moveBy ( -1, -1 ); |
107 | p-> drawText ( br, align, wd-> caption ); | 107 | p-> drawText ( br, align, wd-> caption ); |
108 | break; | 108 | break; |
109 | } | 109 | } |
110 | default: { | 110 | default: { |
111 | WindowDecorationInterface::drawArea ( a, p, wd ); | 111 | WindowDecorationInterface::drawArea ( a, p, wd ); |
112 | break; | 112 | break; |
113 | } | 113 | } |
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | QRESULT LiquidDecoInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) | 117 | QRESULT LiquidDecoInterface::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) |
118 | { | 118 | { |
119 | *iface = 0; | 119 | *iface = 0; |
120 | 120 | ||
121 | if ( uuid == IID_QUnknown ) | 121 | if ( uuid == IID_QUnknown ) |
122 | *iface = this; | 122 | *iface = this; |
123 | else if ( uuid == IID_WindowDecoration ) | 123 | else if ( uuid == IID_WindowDecoration ) |
124 | *iface = this; | 124 | *iface = this; |
125 | else | ||
126 | return QS_FALSE; | ||
125 | 127 | ||
126 | if ( *iface ) | 128 | if ( *iface ) |
127 | (*iface)-> addRef ( ); | 129 | (*iface)-> addRef ( ); |
128 | 130 | ||
129 | return QS_OK; | 131 | return QS_OK; |
130 | } | 132 | } |
131 | 133 | ||
132 | Q_EXPORT_INTERFACE() | 134 | Q_EXPORT_INTERFACE() |
133 | { | 135 | { |
134 | Q_CREATE_INSTANCE( LiquidDecoInterface ) | 136 | Q_CREATE_INSTANCE( LiquidDecoInterface ) |
135 | } | 137 | } |
136 | 138 | ||