mainwidget.h
80 lines
| 2.3 KiB
| text/x-c
|
CLexer
Jani Honkonen
|
r830 | /**************************************************************************** | ||
** | ||||
** Copyright (C) 2012 Digia Plc | ||||
** All rights reserved. | ||||
** For any questions to Digia, please use contact form at http://qt.digia.com | ||||
** | ||||
** This file is part of the Qt Commercial Charts Add-on. | ||||
** | ||||
** $QT_BEGIN_LICENSE$ | ||||
** Licensees holding valid Qt Commercial licenses may use this file in | ||||
** accordance with the Qt Commercial License Agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and Digia. | ||||
** | ||||
** If you have questions regarding the use of this file, please use | ||||
** contact form at http://qt.digia.com | ||||
** $QT_END_LICENSE$ | ||||
** | ||||
****************************************************************************/ | ||||
Tero Ahola
|
r5 | #ifndef MAINWIDGET_H | ||
#define MAINWIDGET_H | ||||
Tero Ahola
|
r815 | #include "qchartglobal.h" | ||
#include "qchart.h" | ||||
#include "qchartview.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
|
r278 | #define RealList QList<qreal> | ||
Tero Ahola
|
r376 | class DataSerieDialog; | ||
Tero Ahola
|
r278 | |||
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); | ||||
Tero Ahola
|
r379 | void initCheckboxes(QGridLayout *grid); | ||
Tero Ahola
|
r110 | |||
Tero Ahola
|
r5 | private slots: | ||
Tero Ahola
|
r19 | void addSeries(); | ||
Tero Ahola
|
r278 | void addSeries(QString series, int columnCount, int rowCount, QString dataCharacteristics, bool labelsEnabled); | ||
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
|
r379 | void antiAliasToggled(bool enabled); | ||
Tero Ahola
|
r1778 | void openGLToggled(bool enabled); | ||
Tero Ahola
|
r64 | void changeChartTheme(int themeIndex); | ||
Tero Ahola
|
r278 | QList<RealList> generateTestData(int columnCount, int rowCount, QString dataCharacteristics); | ||
QStringList generateLabels(int count); | ||||
Tero Ahola
|
r5 | |||
private: | ||||
Tero Ahola
|
r376 | DataSerieDialog *m_addSerieDialog; | ||
Tero Ahola
|
r815 | QChart *m_chart; | ||
Tero Ahola
|
r379 | QChartView *m_chartView; | ||
Tero Ahola
|
r8 | QCheckBox *m_autoScaleCheck; | ||
Tero Ahola
|
r6 | QSpinBox *m_xMinSpin; | ||
QSpinBox *m_xMaxSpin; | ||||
QSpinBox *m_yMinSpin; | ||||
QSpinBox *m_yMaxSpin; | ||||
Tero Ahola
|
r60 | QString m_defaultSeriesName; | ||
QGridLayout *m_scatterLayout; | ||||
Tero Ahola
|
r5 | }; | ||
#endif // MAINWIDGET_H | ||||