Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

fresh.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000-2002 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of the Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #ifndef FRESHSTYLE_H
00022 #define FRESHSTYLE_H
00023 
00024 #include <qwindowsstyle.h>
00025 #include <qpe/styleinterface.h>
00026 
00027 class Q_EXPORT FreshStyle : public QWindowsStyle
00028 {
00029 public:
00030     FreshStyle();
00031     virtual ~FreshStyle();
00032     virtual void polish( QPalette &p );
00033     virtual void polish( QWidget *w );
00034     virtual void unPolish( QWidget *w );
00035 
00036     int defaultFrameWidth () const;
00037     void drawPanel ( QPainter * p, int x, int y, int w, int h,
00038                     const QColorGroup &, bool sunken=FALSE, int lineWidth = 1, const QBrush * fill = 0 );
00039     void drawButton( QPainter *p, int x, int y, int w, int h,
00040                     const QColorGroup &g, bool sunken, const QBrush* fill );
00041     void drawButtonMask ( QPainter * p, int x, int y, int w, int h );
00042     void drawBevelButton( QPainter *p, int x, int y, int w, int h,
00043                     const QColorGroup &g, bool sunken=FALSE, const QBrush* fill=0 );
00044     QRect comboButtonRect( int x, int y, int w, int h);
00045     QRect comboButtonFocusRect( int x, int y, int w, int h);
00046     void drawComboButton( QPainter *p, int x, int y, int w, int h,
00047                     const QColorGroup &g, bool sunken, bool, bool enabled,
00048                     const QBrush *fill );
00049     void drawExclusiveIndicator ( QPainter * p, int x, int y, int w, int h,
00050                     const QColorGroup & g, bool on, bool down = FALSE, bool enabled = TRUE );
00051     void drawIndicator ( QPainter * p, int x, int y, int w, int h,
00052                     const QColorGroup & g, int state, bool down = FALSE, bool enabled = TRUE );
00053     void scrollBarMetrics( const QScrollBar*, int&, int&, int&, int&);
00054     void drawScrollBarControls( QPainter*,  const QScrollBar*, int sliderStart, uint controls, uint activeControl );
00055     ScrollControl scrollBarPointOver( const QScrollBar* sb, int sliderStart, const QPoint& p );
00056     void drawRiffles( QPainter* p,  int x, int y, int w, int h,
00057                           const QColorGroup &g, bool horizontal );
00058     int sliderLength() const;
00059     void drawSlider( QPainter *p, int x, int y, int w, int h,
00060                     const QColorGroup &g, Orientation, bool tickAbove, bool tickBelow );
00061     void drawSliderMask( QPainter *p, int x, int y, int w, int h,
00062                     Orientation, bool tickAbove, bool tickBelow );
00063     void drawSliderGrooveMask( QPainter *p, int x, int y, int w, int h,
00064                     const QColorGroup& , QCOORD c, Orientation orient );
00065     void drawTab( QPainter *, const QTabBar *, QTab *, bool selected );
00066     int extraPopupMenuItemWidth( bool checkable, int maxpmw, QMenuItem*, const QFontMetrics& );
00067     int popupMenuItemHeight( bool checkable, QMenuItem*, const QFontMetrics& );
00068     void drawPopupMenuItem( QPainter* p, bool checkable, int maxpmw, int tab, QMenuItem* mi,
00069                                        const QPalette& pal,
00070                                        bool act, bool enabled, int x, int y, int w, int h);
00071 
00072     int buttonMargin() const;
00073     QSize scrollBarExtent() const;
00074 
00075 private:        // Disabled copy constructor and operator=
00076 #if defined(Q_DISABLE_COPY)
00077     FreshStyle( const FreshStyle & );
00078     FreshStyle& operator=( const FreshStyle & );
00079 #endif
00080 };
00081 
00082 
00083 class FreshStyleImpl : public StyleInterface
00084 {
00085 public:
00086     FreshStyleImpl();
00087     virtual ~FreshStyleImpl();
00088 
00089     QRESULT queryInterface( const QUuid&, QUnknownInterface** );
00090     Q_REFCOUNT
00091 
00092     virtual QStyle *style();
00093     virtual QString name() const;
00094 
00095 private:
00096     FreshStyle *fresh;
00097 };
00098 
00099 #endif // FRESHSTYLE_H

Generated on Sat Nov 5 16:17:58 2005 for OPIE by  doxygen 1.4.2