summaryrefslogtreecommitdiff
path: root/noncore/decorations/polished/polished.cpp
Unidiff
Diffstat (limited to 'noncore/decorations/polished/polished.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/decorations/polished/polished.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/decorations/polished/polished.cpp b/noncore/decorations/polished/polished.cpp
index 30f1a84..43179be 100644
--- a/noncore/decorations/polished/polished.cpp
+++ b/noncore/decorations/polished/polished.cpp
@@ -13,25 +13,25 @@
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "polished.h" 21#include "polished.h"
22#include <qpainter.h> 22#include <qpainter.h>
23#include <qapplication.h> 23#include <qapplication.h>
24 24
25PolishedDecoration::PolishedDecoration() : ref(0) 25PolishedDecoration::PolishedDecoration()
26{ 26{
27} 27}
28 28
29PolishedDecoration::~PolishedDecoration() 29PolishedDecoration::~PolishedDecoration()
30{ 30{
31} 31}
32 32
33int PolishedDecoration::metric( Metric m, const WindowData *wd ) const 33int PolishedDecoration::metric( Metric m, const WindowData *wd ) const
34{ 34{
35 switch ( m ) { 35 switch ( m ) {
36 case TopBorder: 36 case TopBorder:
37 return 1; 37 return 1;
@@ -149,23 +149,25 @@ void PolishedDecoration::drawBlend( QPainter *p, const QRect &r, const QColor &c
149 v1 + ((v2-v1)*j)/(r.height()-split-1), QColor::Hsv ) ); 149 v1 + ((v2-v1)*j)/(r.height()-split-1), QColor::Hsv ) );
150 p->drawLine( r.x(), r.bottom()-j, r.right(), r.bottom()-j ); 150 p->drawLine( r.x(), r.bottom()-j, r.right(), r.bottom()-j );
151 } 151 }
152} 152}
153 153
154QRESULT PolishedDecoration::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 154QRESULT PolishedDecoration::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
155{ 155{
156 *iface = 0; 156 *iface = 0;
157 if ( uuid == IID_QUnknown ) 157 if ( uuid == IID_QUnknown )
158 *iface = this; 158 *iface = this;
159 else if ( uuid == IID_WindowDecoration ) 159 else if ( uuid == IID_WindowDecoration )
160 *iface = this; 160 *iface = this;
161 else
162 return QS_FALSE;
161 163
162 if ( *iface ) 164 if ( *iface )
163 (*iface)->addRef(); 165 (*iface)->addRef();
164 return QS_OK; 166 return QS_OK;
165} 167}
166 168
167Q_EXPORT_INTERFACE() 169Q_EXPORT_INTERFACE()
168{ 170{
169 Q_CREATE_INSTANCE( PolishedDecoration ) 171 Q_CREATE_INSTANCE( PolishedDecoration )
170} 172}
171 173