defuze.me  Client
playerlabel.hpp
00001 #ifndef PLAYERLABEL_HPP
00002 #define PLAYERLABEL_HPP
00003 
00004 #include <QWidget>
00005 #include <QPainter>
00006 #include <QStyledItemDelegate>
00007 
00008 namespace Player
00009 {
00010     class PlayerLabel : public QWidget
00011     {
00012         Q_OBJECT
00013     public:
00014         explicit PlayerLabel(QWidget *parent = 0);
00015         void    paintEvent(QPaintEvent *);
00016         void    setRight();
00017         void    setCurrent();
00018         void    setNext();
00019 
00020         static QColor   currentColor();
00021         static QColor   nextColor();
00022     signals:
00023 
00024     public slots:
00025 
00026     private:
00027         QColor          color;
00028         QString         text;
00029         bool            right;
00030         QPainter        painter;
00031         QPolygon    letterPolygonA, textPolygonA;
00032         QPolygon    letterPolygonB, textPolygonB;
00033 
00034     };
00035 }
00036 
00037 #endif // PLAYERLABEL_HPP