diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-04-27 20:53:25 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-04-27 20:53:25 -0700 |
commit | 4179885da79d4d2ba0a4893331e162235765ad0f (patch) | |
tree | a01a38c68deab7ca159c11658fa053133c15254e /qt-ui/starwidget.h | |
parent | 4bb0cd8cef2bbbbe3df6fc3daa9ccca95f065038 (diff) | |
parent | 2f4d6bbe535a195046b4746fd3a771087ee4a6c4 (diff) | |
download | subsurface-4179885da79d4d2ba0a4893331e162235765ad0f.tar.gz |
Merge branch 'RenderStarsOnTable' of https://github.com/tcanabrava/subsurface into Qt
Diffstat (limited to 'qt-ui/starwidget.h')
-rw-r--r-- | qt-ui/starwidget.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/qt-ui/starwidget.h b/qt-ui/starwidget.h index cdbb3ab5c..d92be5a98 100644 --- a/qt-ui/starwidget.h +++ b/qt-ui/starwidget.h @@ -3,39 +3,34 @@ #include <QWidget> +enum StarConfig {SPACING = 2, IMG_SIZE = 16, TOTALSTARS = 5}; class StarWidget : public QWidget { Q_OBJECT public: explicit StarWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); - - int maxStars() const; int currentStars() const; - bool halfStarsEnabled() const; /*reimp*/ QSize sizeHint() const; - enum {SPACING = 2, IMG_SIZE = 16}; + static QPixmap starActive(); + static QPixmap starInactive(); Q_SIGNALS: void valueChanged(int stars); public Q_SLOTS: void setCurrentStars(int value); - void setMaximumStars(int maximum); - void enableHalfStars(bool enabled); protected: /*reimp*/ void mouseReleaseEvent(QMouseEvent* ); /*reimp*/ void paintEvent(QPaintEvent* ); private: - int stars; int current; - bool halfStar; - QPixmap activeStar; - QPixmap inactiveStar; + static QPixmap* activeStar; + static QPixmap* inactiveStar; QPixmap grayImage(QPixmap *coloredImg); }; |