• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KStyles

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., 51 Franklin Street, Fifth Floor,
00017  *  Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef WEB_STYLE_H
00021 #define WEB_STYLE_H
00022 
00023 #include <kstyle.h>
00024 #include <QtGui/QPalette>
00025 
00026 class QPainter;
00027 class QScrollBar;
00028 class QPushButton;
00029 class QWidget;
00030 
00031 class WebStyle : public KStyle
00032 {
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        Qt::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        Qt::Orientation,
00209        bool tickAbove,
00210        bool tickBelow
00211       );
00212 
00213     void drawKToolBar
00214       (
00215        QPainter *,
00216        int x,
00217        int y,
00218        int w,
00219        int h,
00220        const QColorGroup &,
00221        KToolBarPos,
00222        QBrush * fill = 0
00223       );
00224 
00225     void drawKBarHandle
00226       (
00227        QPainter *,
00228        int x,
00229        int y,
00230        int w,
00231        int h,
00232        const QColorGroup &,
00233        KToolBarPos,
00234        QBrush * fill = 0
00235       );
00236 
00237     void drawKMenuBar
00238       (
00239        QPainter *,
00240        int x,
00241        int y,
00242        int w,
00243        int h,
00244        const QColorGroup &,
00245        bool macMode,
00246        QBrush * fill = 0
00247       );
00248 
00249     void drawKToolBarButton
00250       (
00251        QPainter * p,
00252        int x,
00253        int y,
00254        int w,
00255        int h,
00256        const QColorGroup & g,
00257        bool sunken = false,
00258        bool raised = true,
00259        bool enabled = true,
00260        bool popup = false,
00261        KToolButtonType = Icon,
00262        const QString & btext = QString(),
00263        const QPixmap * = 0,
00264        QFont * = 0,
00265        QWidget * button = 0
00266       );
00267 
00268     void drawKMenuItem
00269       (
00270        QPainter *,
00271        int x,
00272        int y,
00273        int w,
00274        int h,
00275        const QColorGroup &,
00276        bool active,
00277        QMenuItem *,
00278        QBrush * fill = 0
00279       );
00280 
00281     void drawPopupMenuItem
00282       (
00283        QPainter *,
00284        bool checkable,
00285        int maxpmw,
00286        int tab,
00287        QMenuItem *,
00288        const QPalette &,
00289        bool act,
00290        bool enabled,
00291        int x,
00292        int y,
00293        int w,
00294        int h
00295       );
00296 
00297     void drawKProgressBlock
00298       (
00299        QPainter *,
00300        int x,
00301        int y,
00302        int w,
00303        int h,
00304        const QColorGroup &,
00305        QBrush * fill
00306       );
00307 
00308     void drawFocusRect
00309       (
00310        QPainter *,
00311        const QRect &,
00312        const QColorGroup &,
00313        const QColor * pen,
00314        bool atBorder
00315       );
00316 
00317     void drawPanel
00318       (
00319        QPainter *,
00320        int x,
00321        int y,
00322        int w,
00323        int h,
00324        const QColorGroup &,
00325        bool sunken,
00326        int lineWidth = 1,
00327        const QBrush * = 0
00328       );
00329 
00330     void drawPopupPanel
00331       (
00332        QPainter *,
00333        int x,
00334        int y,
00335        int w,
00336        int h,
00337        const QColorGroup &,
00338        int lineWidth = 2,
00339        const QBrush * = 0
00340       );
00341 
00342     void drawSeparator
00343       (
00344        QPainter *,
00345        int x,
00346        int y,
00347        int w,
00348        int h,
00349        const QColorGroup &,
00350        bool sunken = true,
00351        int lineWidth = 1,
00352        int midLineWidth = 0
00353       );
00354 
00355     void drawTab
00356       (
00357        QPainter * p,
00358        const QTabBar * tabBar,
00359        QTab * tab,
00360        bool selected
00361       );
00362 
00363     void drawTabMask
00364       (
00365        QPainter * p,
00366        const QTabBar *,
00367        QTab * tab,
00368        bool
00369       );
00370 
00371     void drawKickerHandle
00372       (
00373        QPainter * p,
00374        int x,
00375        int y,
00376        int w,
00377        int h,
00378        const QColorGroup & g,
00379        QBrush *
00380       );
00381 
00382     void drawKickerAppletHandle
00383       (
00384        QPainter * p,
00385        int x,
00386        int y,
00387        int w,
00388        int h,
00389        const QColorGroup & g,
00390        QBrush *
00391       );
00392 
00393     void drawKickerTaskButton
00394       (
00395        QPainter * p,
00396        int x,
00397        int y,
00398        int w,
00399        int h,
00400        const QColorGroup & g,
00401        const QString & title,
00402        bool active,
00403        QPixmap * icon,
00404        QBrush *
00405       );
00406 
00407     int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &);
00408 
00409     Qt::GUIStyle guiStyle() const { return Qt::MotifStyle; }
00410 
00411     bool eventFilter(QObject *, QEvent *);
00412 };
00413 
00414 #endif

KStyles

Skip menu "KStyles"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KCMShell
  • KNotify
  • KStyles
  • Nepomuk Daemons
Generated for API Reference by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal