git-svn-id: svn://db.shs.com.ru/libs@547 a8b55f48-bf90-11e4-a774-851b48703e85
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
#ifndef LADYBUGSSTYLE_H
|
|
#define LADYBUGSSTYLE_H
|
|
|
|
#include <QProxyStyle>
|
|
#include <QPalette>
|
|
|
|
class QPainterPath;
|
|
|
|
class LadybugsStyle : public QProxyStyle
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LadybugsStyle();
|
|
|
|
void polish(QPalette &palette) override;
|
|
void polish(QWidget *widget) override;
|
|
void unpolish(QWidget *widget) override;
|
|
int pixelMetric(PixelMetric metric, const QStyleOption *option,
|
|
const QWidget *widget) const override;
|
|
int styleHint(StyleHint hint, const QStyleOption *option,
|
|
const QWidget *widget, QStyleHintReturn *returnData) const override;
|
|
void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
|
|
QPainter *painter, const QWidget *widget) const override;
|
|
void drawControl(ControlElement control, const QStyleOption *option,
|
|
QPainter *painter, const QWidget *widget) const override;
|
|
|
|
private:
|
|
static void setTexture(QPalette &palette, QPalette::ColorRole role,
|
|
const QPixmap &pixmap);
|
|
static QPainterPath roundRectPath(const QRect &rect);
|
|
};
|
|
|
|
#endif //LADYBUGSSTYLE_H
|