KStyles
scrollbar.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __OXYGEN_STYLE_SCROLLBAR_H
00020 #define __OXYGEN_STYLE_SCROLLBAR_H
00021
00022 #include "tileset.h"
00023
00024 class QPainter;
00025 class QLinearGradient;
00026
00027 class OxygenScrollbar {
00028 public:
00029 OxygenScrollbar(const QColor&, double contrast);
00030
00031 TileSet* horizontal(int size, int width, int offset) const;
00032 TileSet* vertical(int size, int width, int offset) const;
00033
00034 private:
00035 void mask(QPainter &p, const QRectF &rect) const;
00036
00037 QLinearGradient baseGradient(double width, Qt::Orientation orient) const;
00038 QLinearGradient shineGradient(double width, Qt::Orientation orient) const;
00039 QLinearGradient shimmerGradient(double offset, Qt::Orientation orient) const;
00040 QLinearGradient dimGradient(Qt::Orientation orient) const;
00041
00042 QPixmap bevel(int width, int height, double w, double h, int rx, int ry) const;
00043
00044 QColor color;
00045 QColor light;
00046 QColor mid;
00047 QColor dark;
00048 QColor shadow;
00049 QColor highlight;
00050 };
00051
00052 #endif // __OXYGEN_STYLE_SCROLLBAR_H