forked from AdunanzA/Tsunami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsuprogress.h
37 lines (27 loc) · 881 Bytes
/
tsuprogress.h
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
#ifndef TSUPROGRESS_H
#define TSUPROGRESS_H
#include "QSegment/qsegmentwidget.h"
#include <QtMath>
class TsuProgress : public QSegmentWidget
{
Q_OBJECT
public:
TsuProgress(QWidget *parent = 0);
void setValue(qreal qty);
protected:
void createProgress();
// bool SetCylinder(int cyl, qreal angle, int segments, int mode, qreal m_distance);
// void Segment(int cyl, qreal a1, qreal a2);
// void Update();
// typedef QMap<int, SegmentList> SMap;
// SMap m_cylindersIn, m_cylindersOut;
qreal m_oldValue = 0;
qreal m_numSegment = 36;
qreal m_ratio = (360.0 / m_numSegment);
qreal m_distance = 0.3;
qreal m_dAngle = m_ratio * m_distance; // distance
qreal m_eAngle = m_ratio - m_dAngle; // element angle
QColor m_colorOn = QColor(255, 208, 0);
QColor m_colorOff = QColor(100, 100, 100);
};
#endif // TSUPROGRESS_H