diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch) | |
tree | 5ac38a06f3dde268dc7927dc155896926aaf7012 /kstyles/web/webstyle.h | |
download | tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles/web/webstyle.h')
-rw-r--r-- | kstyles/web/webstyle.h | 414 |
1 files changed, 414 insertions, 0 deletions
diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h new file mode 100644 index 000000000..b0a6a7a87 --- /dev/null +++ b/kstyles/web/webstyle.h @@ -0,0 +1,414 @@ +/* + * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef WEB_STYLE_H +#define WEB_STYLE_H + +#include <kstyle.h> +#include <qpalette.h> + +class QPainter; +class QScrollBar; +class QPushButton; +class QWidget; + +class WebStyle : public KStyle +{ + public: + + WebStyle(); + + ~WebStyle(); + + void polish(QApplication *); + + void unPolish(QWidget *); + + void polish(QWidget *); + + void polish(QPalette &); + + void unPolish(QApplication *); + + void drawButton + ( + QPainter * p, + int x, + int y, + int w, + int h, + const QColorGroup & g, + bool sunken = false, + const QBrush * fill = 0 + ); + + QRect buttonRect(int x, int y, int w, int h); + + void drawBevelButton + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool sunken = false, + const QBrush * fill = 0 + ); + + void drawPushButton(QPushButton *, QPainter *); + + virtual void drawPushButtonLabel(QPushButton *, QPainter *); + + void drawScrollBarControls + ( + QPainter *, + const QScrollBar *, + int sliderStart, + uint controls, + uint activeControl + ); + + QStyle::ScrollControl scrollBarPointOver + ( + const QScrollBar *, + int sliderStart, + const QPoint & + ); + + void scrollBarMetrics + ( + const QScrollBar *, + int & sliderMin, + int & sliderMax, + int & sliderLength, + int & buttonDim + ); + + QSize indicatorSize() const; + + void drawIndicator + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + int state, + bool down = false, + bool enabled = true + ); + + QSize exclusiveIndicatorSize() const; + + void drawExclusiveIndicator + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool on, + bool down = false, + bool enabled = true + ); + + void drawIndicatorMask + ( + QPainter *, + int x, + int y, + int w, + int h, + int state + ); + + void drawExclusiveIndicatorMask + ( + QPainter *, + int x, + int y, + int w, + int h, + bool on + ); + + void drawComboButton + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool sunken = false, + bool editable = false, + bool enabled = true, + const QBrush * fill = 0 + ); + + QRect comboButtonRect(int x, int y, int w, int h); + + QRect comboButtonFocusRect(int x, int y, int w, int h); + + int sliderLength() const; + + void drawSliderGroove + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + QCOORD, + Orientation + ); + + void drawArrow + ( + QPainter *, + Qt::ArrowType, + bool down, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool enabled = true, + const QBrush * fill = 0 + ); + + void drawSlider + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + Orientation, + bool tickAbove, + bool tickBelow + ); + + void drawKToolBar + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + KToolBarPos, + QBrush * fill = 0 + ); + + void drawKBarHandle + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + KToolBarPos, + QBrush * fill = 0 + ); + + void drawKMenuBar + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool macMode, + QBrush * fill = 0 + ); + + void drawKToolBarButton + ( + QPainter * p, + int x, + int y, + int w, + int h, + const QColorGroup & g, + bool sunken = false, + bool raised = true, + bool enabled = true, + bool popup = false, + KToolButtonType = Icon, + const QString & btext = QString::null, + const QPixmap * = 0, + QFont * = 0, + QWidget * button = 0 + ); + + void drawKMenuItem + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool active, + QMenuItem *, + QBrush * fill = 0 + ); + + void drawPopupMenuItem + ( + QPainter *, + bool checkable, + int maxpmw, + int tab, + QMenuItem *, + const QPalette &, + bool act, + bool enabled, + int x, + int y, + int w, + int h + ); + + void drawKProgressBlock + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + QBrush * fill + ); + + void drawFocusRect + ( + QPainter *, + const QRect &, + const QColorGroup &, + const QColor * pen, + bool atBorder + ); + + void drawPanel + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool sunken, + int lineWidth = 1, + const QBrush * = 0 + ); + + void drawPopupPanel + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + int lineWidth = 2, + const QBrush * = 0 + ); + + void drawSeparator + ( + QPainter *, + int x, + int y, + int w, + int h, + const QColorGroup &, + bool sunken = true, + int lineWidth = 1, + int midLineWidth = 0 + ); + + void drawTab + ( + QPainter * p, + const QTabBar * tabBar, + QTab * tab, + bool selected + ); + + void drawTabMask + ( + QPainter * p, + const QTabBar *, + QTab * tab, + bool + ); + + void drawKickerHandle + ( + QPainter * p, + int x, + int y, + int w, + int h, + const QColorGroup & g, + QBrush * + ); + + void drawKickerAppletHandle + ( + QPainter * p, + int x, + int y, + int w, + int h, + const QColorGroup & g, + QBrush * + ); + + void drawKickerTaskButton + ( + QPainter * p, + int x, + int y, + int w, + int h, + const QColorGroup & g, + const QString & title, + bool active, + QPixmap * icon, + QBrush * + ); + + int popupMenuItemHeight(bool, QMenuItem *, const QFontMetrics &); + + GUIStyle guiStyle() const { return Qt::MotifStyle; } + + bool eventFilter(QObject *, QEvent *); +}; + +#endif |