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

webstyle.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org>
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License as published by the Free Software Foundation; either
00007  *  version 2 of the License, or (at your option) any later version.
00008  *
00009  *  This library is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  *  Library General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU Library General Public License
00015  *  along with this library; see the file COPYING.LIB.  If not, write to
00016  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017  *  Boston, MA 02111-1307, USA.
00018  */
00019 
00020 #ifndef WEB_STYLE_H
00021 #define WEB_STYLE_H
00022 
00023 #include <qstyle.h>
00024 #include <qwindowsstyle.h>
00025 #include <qpalette.h>
00026 
00027 class QPainter;
00028 class QScrollBar;
00029 class QPushButton;
00030 class QWidget;
00031 
00032 class WebStyle : public QWindowsStyle {
00033   public:
00034 
00035     WebStyle();
00036 
00037     ~WebStyle();
00038 
00039     void polish(QApplication *);
00040 
00041     void unPolish(QWidget *);
00042 
00043     void polish(QWidget *);
00044 
00045     void polish(QPalette &);
00046 
00047     void unPolish(QApplication *);
00048 
00049     void drawButton
00050       (
00051        QPainter * p,
00052        int x,
00053        int y,
00054        int w,
00055        int h,
00056        const QColorGroup & g,
00057        bool sunken = false,
00058        const QBrush * fill = 0
00059       );
00060 
00061     QRect buttonRect(int x, int y, int w, int h);
00062 
00063     void drawBevelButton
00064       (
00065        QPainter *,
00066        int x,
00067        int y,
00068        int w,
00069        int h,
00070        const QColorGroup &,
00071        bool sunken = false,
00072        const QBrush * fill = 0
00073       );
00074 
00075     void drawPushButton(QPushButton *, QPainter *);
00076 
00077     virtual void drawPushButtonLabel(QPushButton *, QPainter *);
00078 
00079     void drawScrollBarControls
00080       (
00081        QPainter *,
00082        const QScrollBar *,
00083        int sliderStart,
00084        uint controls,
00085        uint activeControl
00086       );
00087 
00088     QStyle::ScrollControl scrollBarPointOver
00089       (
00090        const QScrollBar *,
00091        int sliderStart,
00092        const QPoint &
00093       );
00094 
00095     void scrollBarMetrics
00096       (
00097        const QScrollBar *,
00098        int & sliderMin,
00099        int & sliderMax,
00100        int & sliderLength,
00101        int & buttonDim
00102       );
00103 
00104     QSize indicatorSize() const;
00105 
00106     void drawIndicator
00107       (
00108        QPainter *,
00109        int x,
00110        int y,
00111        int w,
00112        int h,
00113        const QColorGroup &,
00114        int state,
00115        bool down = false,
00116        bool enabled = true
00117       );
00118 
00119     QSize exclusiveIndicatorSize() const;
00120 
00121     void drawExclusiveIndicator
00122       (
00123        QPainter *,
00124        int x,
00125        int y,
00126        int w,
00127        int h,
00128        const QColorGroup &,
00129        bool on,
00130        bool down = false,
00131        bool enabled = true
00132       );
00133 
00134     void drawIndicatorMask
00135       (
00136        QPainter *,
00137        int x,
00138        int y,
00139        int w,
00140        int h,
00141        int state
00142       );
00143 
00144     void drawExclusiveIndicatorMask
00145       (
00146        QPainter *,
00147        int x,
00148        int y,
00149        int w,
00150        int h,
00151        bool on
00152       );
00153 
00154     void drawComboButton
00155       (
00156        QPainter *,
00157        int x,
00158        int y,
00159        int w,
00160        int h,
00161        const QColorGroup &,
00162        bool sunken = false,
00163        bool editable = false,
00164        bool enabled = true,
00165        const QBrush * fill = 0
00166       );
00167 
00168     QRect comboButtonRect(int x, int y, int w, int h);
00169 
00170     QRect comboButtonFocusRect(int x, int y, int w, int h);
00171 
00172     int sliderLength() const;
00173 
00174     void drawSliderGroove
00175       (
00176        QPainter *,
00177        int x,
00178        int y,
00179        int w,
00180        int h,
00181        const QColorGroup &,
00182        QCOORD,
00183        Orientation
00184       );
00185 
00186     void drawArrow
00187       (
00188        QPainter *,
00189        Qt::ArrowType,
00190        bool down,
00191        int x,
00192        int y,
00193        int w,
00194        int h,
00195        const QColorGroup &,
00196        bool enabled = true,
00197        const QBrush * fill = 0
00198       );
00199 
00200     void drawSlider
00201       (
00202        QPainter *,
00203        int x,
00204        int y,
00205        int w,
00206        int h,
00207        const QColorGroup &,
00208        Orientation,
00209        bool tickAbove,
00210        bool tickBelow
00211       );
00212 
00213     void drawPopupMenuItem
00214       (
00215        QPainter *,
00216        bool checkable,
00217        int maxpmw,
00218        int tabwidth,
00219        QMenuItem *,
00220        const QPalette &,
00221        bool act,
00222        bool enabled,
00223        int x,
00224        int y,
00225        int w,
00226        int h
00227       );
00228 
00229     void drawFocusRect
00230       (
00231        QPainter *,
00232        const QRect &,
00233        const QColorGroup &,
00234        const QColor * pen,
00235        bool atBorder
00236       );
00237 
00238     void drawPanel
00239       (
00240        QPainter *,
00241        int x,
00242        int y,
00243        int w,
00244        int h,
00245        const QColorGroup &,
00246        bool sunken,
00247        int lineWidth = 1,
00248        const QBrush * = 0
00249       );
00250 
00251     void drawPopupPanel
00252       (
00253        QPainter *,
00254        int x,
00255        int y,
00256        int w,
00257        int h,
00258        const QColorGroup &,
00259        int lineWidth = 2,
00260        const QBrush * = 0
00261       );
00262 
00263     void drawSeparator
00264       (
00265        QPainter *,
00266        int x,
00267        int y,
00268        int w,
00269        int h,
00270        const QColorGroup &,
00271        bool sunken = true,
00272        int lineWidth = 1,
00273        int midLineWidth = 0
00274       );
00275 
00276     void drawTab
00277       (
00278        QPainter * p,
00279        const QTabBar * tabBar,
00280        QTab * tab,
00281        bool selected
00282       );
00283 
00284     void drawTabMask
00285       (
00286        QPainter * p,
00287        const QTabBar *,
00288        QTab * tab,
00289        bool
00290       );
00291 
00292     int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &);
00293 
00294     GUIStyle guiStyle() const { return Qt::MotifStyle; }
00295 
00296     bool eventFilter(QObject *, QEvent *);
00297 };
00298 
00299 #endif

Generated on Sat Nov 5 16:18:00 2005 for OPIE by  doxygen 1.4.2