Blame view

app/gui/oven_control/bulletindicator.h 726 Bytes
a366f320c   김태훈   자동 요리 후속 공정 동작 개선
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  #ifndef BULLETINDICATOR_H
  #define BULLETINDICATOR_H
  
  #include <QWidget>
  #include <QLabel>
  
  class BulletIndicator : public QWidget
  {
      Q_OBJECT
  public:
      explicit BulletIndicator(QWidget *parent = 0);
  
      void setBulletPixmap(QPixmap &pixmap);
      void setCurrentBulletPixmap(QPixmap &pixmap);
  
      int maximum() { return max; }
      int currentIndex() { return cur; }
  
  signals:
  
  public slots:
      void setCurrentIndex(int index);
      void setMaximum(int maximum);
  
  protected:
      void resizeEvent(QResizeEvent *event);
  
  private:
      int max;
      int cur;
  
      int padding;
      QPixmap bulletPixmap;
      QPixmap currentBulletPixmap;
  
      QList<QLabel *> bullets;
  
      void updatePosition();
  };
  
  #endif // BULLETINDICATOR_H