summaryrefslogtreecommitdiff
path: root/library/qpestyle.cpp
Unidiff
Diffstat (limited to 'library/qpestyle.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpestyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/qpestyle.cpp b/library/qpestyle.cpp
index b61ada4..0566f6b 100644
--- a/library/qpestyle.cpp
+++ b/library/qpestyle.cpp
@@ -2,49 +2,49 @@
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
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 "qpestyle.h" 21#include "qpestyle.h"
22 22
23 23
24#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2) 24#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
25 25
26#if QT_VERSION >= 300 26#if QT_VERSION >= 0x030000
27 27
28#include <qdrawutil.h> 28#include <qdrawutil.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30#include <qtabbar.h> 30#include <qtabbar.h>
31 31
32QPEStyle::QPEStyle() 32QPEStyle::QPEStyle()
33{ 33{
34} 34}
35 35
36QPEStyle::~QPEStyle() 36QPEStyle::~QPEStyle()
37{ 37{
38} 38}
39 39
40void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, 40void QPEStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r,
41 const QColorGroup &cg, SFlags flags, const QStyleOption &data) const 41 const QColorGroup &cg, SFlags flags, const QStyleOption &data) const
42{ 42{
43 switch ( pe ) { 43 switch ( pe ) {
44 case PE_ButtonTool: 44 case PE_ButtonTool:
45 { 45 {
46 QColorGroup mycg = cg; 46 QColorGroup mycg = cg;
47 if ( flags & Style_On ) { 47 if ( flags & Style_On ) {
48 QBrush fill( cg.mid(), Dense4Pattern ); 48 QBrush fill( cg.mid(), Dense4Pattern );
49 mycg.setBrush( QColorGroup::Button, fill ); 49 mycg.setBrush( QColorGroup::Button, fill );
50 } 50 }
@@ -408,49 +408,49 @@ QSize QPEStyle::sizeFromContents( ContentsType contents, const QWidget *widget,
408 } 408 }
409 default: 409 default:
410 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data ); 410 sz = QWindowsStyle::sizeFromContents( contents, widget, contentsSize, data );
411 break; 411 break;
412 } 412 }
413 413
414 return sz; 414 return sz;
415} 415}
416 416
417#else 417#else
418 418
419#include <qfontmetrics.h> 419#include <qfontmetrics.h>
420#include <qpalette.h> 420#include <qpalette.h>
421#include <qdrawutil.h> 421#include <qdrawutil.h>
422#include <qscrollbar.h> 422#include <qscrollbar.h>
423#include <qbutton.h> 423#include <qbutton.h>
424#include <qframe.h> 424#include <qframe.h>
425#include <qtabbar.h> 425#include <qtabbar.h>
426 426
427#define INCLUDE_MENUITEM_DEF 427#define INCLUDE_MENUITEM_DEF
428#include <qmenudata.h> 428#include <qmenudata.h>
429 429
430QPEStyle::QPEStyle() 430QPEStyle::QPEStyle()
431{ 431{
432#if QT_VERSION < 300 432#if QT_VERSION < 0x030000
433 setButtonMargin(buttonMargin()); 433 setButtonMargin(buttonMargin());
434 setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height()); 434 setScrollBarExtent(scrollBarExtent().width(),scrollBarExtent().height());
435#endif 435#endif
436} 436}
437 437
438QPEStyle::~QPEStyle() 438QPEStyle::~QPEStyle()
439{ 439{
440} 440}
441 441
442int QPEStyle::buttonMargin() const 442int QPEStyle::buttonMargin() const
443{ 443{
444 return 2; 444 return 2;
445} 445}
446 446
447QSize QPEStyle::scrollBarExtent() const 447QSize QPEStyle::scrollBarExtent() const
448{ 448{
449 return QSize(13,13); 449 return QSize(13,13);
450} 450}
451 451
452void QPEStyle::polish ( QPalette & ) 452void QPEStyle::polish ( QPalette & )
453{ 453{
454} 454}
455 455
456void QPEStyle::polish( QWidget *w ) 456void QPEStyle::polish( QWidget *w )