mainwidget.h
56 lines
| 1.4 KiB
| text/x-c
|
CLexer
Tero Ahola
|
r5 | #ifndef MAINWIDGET_H | ||
#define MAINWIDGET_H | ||||
Tero Ahola
|
r30 | #include <qchartglobal.h> | ||
Tero Ahola
|
r19 | #include <qchartwidget.h> | ||
Tero Ahola
|
r5 | #include <QWidget> | ||
Tero Ahola
|
r6 | class QSpinBox; | ||
Tero Ahola
|
r8 | class QCheckBox; | ||
Tero Ahola
|
r60 | class QGridLayout; | ||
Tero Ahola
|
r5 | |||
Tero Ahola
|
r30 | QTCOMMERCIALCHART_USE_NAMESPACE | ||
Tero Ahola
|
r19 | |||
Tero Ahola
|
r5 | class MainWidget : public QWidget | ||
{ | ||||
Q_OBJECT | ||||
public: | ||||
explicit MainWidget(QWidget *parent = 0); | ||||
signals: | ||||
Tero Ahola
|
r110 | private: | ||
void initBackroundCombo(QGridLayout *grid); | ||||
void initScaleControls(QGridLayout *grid); | ||||
void initThemeCombo(QGridLayout *grid); | ||||
void initPieControls(); | ||||
Tero Ahola
|
r5 | private slots: | ||
Tero Ahola
|
r19 | void addSeries(); | ||
Tero Ahola
|
r20 | void addSeries(QString series, QString data); | ||
Tero Ahola
|
r16 | void testDataChanged(int itemIndex); | ||
Tero Ahola
|
r5 | void backgroundChanged(int itemIndex); | ||
Tero Ahola
|
r6 | void autoScaleChanged(int value); | ||
Tero Ahola
|
r5 | void xMinChanged(int value); | ||
void xMaxChanged(int value); | ||||
void yMinChanged(int value); | ||||
void yMaxChanged(int value); | ||||
Tero Ahola
|
r60 | void setCurrentSeries(QChartSeries *series); | ||
Tero Ahola
|
r64 | void changeChartTheme(int themeIndex); | ||
Tero Ahola
|
r60 | void setPieSizeFactor(double margin); | ||
Tero Ahola
|
r77 | void setPiePosition(int position); | ||
Tero Ahola
|
r5 | |||
private: | ||||
Tero Ahola
|
r8 | QChartWidget *m_chartWidget; | ||
QCheckBox *m_autoScaleCheck; | ||||
Tero Ahola
|
r6 | QSpinBox *m_xMinSpin; | ||
QSpinBox *m_xMaxSpin; | ||||
QSpinBox *m_yMinSpin; | ||||
QSpinBox *m_yMaxSpin; | ||||
Tero Ahola
|
r60 | QString m_defaultSeriesName; | ||
QChartSeries *m_currentSeries; | ||||
QGridLayout *m_scatterLayout; | ||||
QGridLayout *m_pieLayout; | ||||
Tero Ahola
|
r5 | }; | ||
#endif // MAINWIDGET_H | ||||