LineChartDataModel Example

#include <QtitanChart.h>
#include "DemoChartWindow.h"

class QComboBox;
class QTableWidget;
class QToolBar;
class QAction;

/* MainWindow */
class MainWindow : public DemoChartWindow
{
    Q_OBJECT
protected:
    enum SeriesType
    {
        SelectionDataModel,
        EditDataModel,
    };
public:
    explicit MainWindow();

protected:
    Qtitan::Chart* createChart();
    QWidget* createDataBindingWidget();

    void createSeriesParametrs();
    void createSelectionModelSeries();
    void createEditModelSeries();

    void fill2DDataTable();
    void initOrientationChanged();

protected:
    virtual void updateValueParameters();

protected slots:
    void seriesChanged(int);
    void orientationChanged(int);
    void setSelectionData();
    void appendRow();
    void deleteRow();
    void updateEnableButtons();

protected:
    QComboBox* m_seriesSwitcher;
    QLabel* m_seriesOrientationLabel;
    QComboBox* m_seriesOrientationSwitcher;
    QToolBar* m_toolBar;
    QTableWidget* m_tableWidget;

    QAction* m_actDeleteRow;
    QAction* m_actAppendRow;

    int m_columnCount;
    int m_rowCount;
    Qt::Orientation m_orientation;

private:
    Q_DISABLE_COPY(MainWindow)
};