-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathqcpl_axis_factor.h
55 lines (38 loc) · 1.03 KB
/
qcpl_axis_factor.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef QCPL_AXIS_FACTOR_H
#define QCPL_AXIS_FACTOR_H
#include "qcustomplot/qcustomplot.h"
#include "qcpl_types.h"
QT_BEGIN_NAMESPACE
class QComboBox;
class QGroupBox;
QT_END_NAMESPACE
namespace Ori::Widgets {
class ValueEdit;
}
namespace QCPL {
class FactorAxisTicker : public QCPAxisTicker
{
public:
FactorAxisTicker(QSharedPointer<QCPAxisTicker> prevTicker);
void generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision,
QVector<double> &ticks, QVector<double> *subTicks, QVector<QString> *tickLabels) override;
AxisFactor factor;
QSharedPointer<QCPAxisTicker> prevTicker;
};
class AxisFactorWidget : public QWidget
{
Q_OBJECT
public:
struct Props
{
};
AxisFactorWidget(QCPAxis *axis, const Props& props);
AxisFactor selectedFactor() const;
private:
QGroupBox *_groupMetric, *_groupCustom;
QComboBox *_comboMetric;
Ori::Widgets::ValueEdit *_editorCustom;
void updateFocus();
};
} // namespace QCPL
#endif // QCPL_AXIS_FACTOR_H