PieChartDataModel 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:
    MainWindow();

protected:
    Qtitan::Chart* createChart();
    QWidget* createDataBindingWidget();
    void createSeriesParametrs();
    void createSelectionModelSeries();
    void createEditModelSeries();

    void fillPieDataTable();
    void initSelectionRange();

protected:
    virtual void updateValueParameters();

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

protected:
    QComboBox* m_seriesSwitcher;
    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)
};