summaryrefslogtreecommitdiffstats
path: root/kchart/kchartWizard.h
blob: 88d309acc949cfc17604253c067c7ab77e452f0e (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef kchartWIZARD_H
#define kchartWIZARD_H

#include <klocale.h>
#include "kwizard.h"
#include "kchart_part.h"

namespace KChart
{

class KChartPart;
class KChartWizardSetupAxesPage;
class KChartWizardLabelsLegendPage;
class KChartWizardSelectChartSubTypePage;
class KChartWizardSelectDataPage;
class KChartWizardSetupDataPage;
class KChartWizardSelectChartTypePage;
class KChartWizardSelectDataFormatPage;

class KChartWizard : public KWizard
{
    Q_OBJECT
public:
    KChartWizard ( KChartPart* chart, QWidget *parent, const char* name,
		   bool modal = true, WFlags f = 0 );
    ~KChartWizard();

    KChartPart* chart() const { return m_chart; };

    // Set and get the string for the data area.
    void setDataArea( const QString &dataArea );
    QString dataArea() const;

    enum RowCol { Row, Col };

    void emitNeedNewData( const char* area, int rowcol, 
			  bool firstRowIsLegend, bool firstColIsLabel );

    virtual bool appropriate( QWidget * w ) const;

signals:
    // valid values for rowcol: Row: data is in rows, Col: data is in cols
    void needNewData( const char* area, int rowcol, 
		      bool firstRowIsLegend, bool firstColIsLabel );
    void finished();
    void cancelled();

protected slots:
    virtual void next();
    virtual void reject();
    virtual void accept();
    virtual void subType(int);

private:
    // The chart itself.
    KChartPart                          *m_chart;

    //KChartWizardSelectDataPage          *_selectdatapage;
    KChartWizardSelectDataFormatPage    *m_dataFormatPage;
    KChartWizardSelectChartTypePage     *m_chartTypePage;
    KChartWizardSelectChartSubTypePage  *m_chartSubtypePage;
    //KChartWizardSetupDataPage           *_setupdatapage;
    KChartWizardLabelsLegendPage        *m_labelsLegendPage;
    KChartWizardSetupAxesPage           *m_axespage;
};

}  //KChart namespace

#endif