kchart

kchart_view.h
1
6#ifndef KCHART_VIEW
7#define KCHART_VIEW
8
9
10#include <KoView.h>
12
13class TDEAction;
14class TDEToggleAction;
15class TQPaintEvent;
16
17class DCOPObject;
18
19namespace KChart
20{
21
22class KChartPart;
23class kchartDataEditor;
24
25class KChartView : public KoView
26{
27 TQ_OBJECT
28
29public:
30 KChartView( KChartPart* part, TQWidget* parent = 0, const char* name = 0 );
31 ~KChartView();
32
33 void updateGuiTypeOfChart();
34 virtual DCOPObject* dcopObject();
35
36 void config(int flag);
37
38public slots:
39 void editData();
40 void applyEdit(kchartDataEditor *ed);
41 void slotConfig();
42 void wizard();
43 void saveConfig();
44 void loadConfig();
45 void defaultConfig();
46
47 void pieChart();
48 void barsChart();
49 void lineChart();
50 void areasChart();
51 void hiLoChart();
52 void ringChart();
53 void polarChart();
54 void bwChart();
55 void print(KPrinter &);
56 void setupPrinter(KPrinter &);
57
58 void slotRepaint();
59 void slotConfigBack();
60 void slotConfigFont();
61 void slotConfigColor();
62 void slotConfigLegend();
63 void slotConfigHeaderFooterChart();
64 void slotConfigSubTypeChart();
65 void slotConfigDataFormat();
66
67 void slotConfigPageLayout();
68 void importData();
69 void extraCreateTemplate();
70
71protected:
72 void paintEvent( TQPaintEvent* );
73
74 virtual void updateReadWrite( bool readwrite );
75
76 virtual void mousePressEvent ( TQMouseEvent * );
77 void updateButton();
78
79private:
80 TDEAction *m_importData;
81 TDEAction *m_wizard;
82 TDEAction *m_edit;
83 TDEAction *m_config;
84 TDEAction *m_saveconfig;
85 TDEAction *m_loadconfig;
86 TDEAction *m_defaultconfig;
87 TDEAction *m_colorConfig;
88 TDEAction *m_fontConfig;
89 TDEAction *m_backConfig;
90 TDEAction *m_legendConfig;
91 TDEAction *m_dataFormatConfig;
92 TDEAction *m_subTypeChartConfig;
93 TDEAction *m_headerFooterConfig;
94 TDEAction *m_pageLayoutConfig;
95
96 TDEToggleAction *m_chartpie;
97 TDEToggleAction *m_chartareas;
98 TDEToggleAction *m_chartbars;
99 TDEToggleAction *m_chartline;
100 TDEToggleAction *m_charthilo;
101 TDEToggleAction *m_chartring;
102 TDEToggleAction *m_chartpolar;
103 TDEToggleAction *m_chartbw;
104
105 DCOPObject *m_dcop;
106
107 // This is used for a workaround for a bug in the kdchart code, see #101490.
108 bool m_logarithmicScale;
109 void forceAxisParams(bool lineMode);
110};
111
112} //KChart namespace
113
114#endif
Provide access to the chart axis parameters.