diff options
Diffstat (limited to 'src/BarDisplay.h')
| -rw-r--r-- | src/BarDisplay.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/BarDisplay.h b/src/BarDisplay.h new file mode 100644 index 0000000..4980f8b --- /dev/null +++ b/src/BarDisplay.h @@ -0,0 +1,33 @@ +#ifndef BarDisplay_h +#define BarDisplay_h + +#include <QGraphicsItem> + +class BarDisplay : public QGraphicsItem +{ +public: + BarDisplay(QGraphicsItem* parent = 0); + virtual ~BarDisplay(); + + virtual QRectF boundingRect() const; + virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + + void collected(int); + void consumed(int); + void setDisplayColor(QColor col); + +signals: + +public slots: + +private: + int m_partCount; + int m_value; + int m_maxValue; + QColor m_displayColor; + + void updateDisplay(); + +}; + +#endif // BarDisplay_h |
