kreportchartview.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KREPORTCHARTVIEW_H
00020 #define KREPORTCHARTVIEW_H
00021
00022 #ifdef HAVE_CONFIG_H
00023 #include "../../config.h"
00024 #endif
00025 #ifdef HAVE_KDCHART
00026
00027
00028
00029
00030
00031
00032
00033 #ifdef _CHECK_MEMORY
00034 #undef new
00035 #endif
00036
00037 #include <qlabel.h>
00038 #include <KDChartWidget.h>
00039 #include <KDChartTable.h>
00040 #include <KDChartParams.h>
00041 #include <KDChartAxisParams.h>
00042
00043
00044
00045 #ifdef _CHECK_MEMORY
00046 #include <kmymoney/mymoneyutils.h>
00047 #endif
00048
00049 namespace reports {
00050
00051 class KReportChartView: public KDChartWidget
00052 {
00053 public:
00054 KReportChartView( QWidget* parent, const char* name );
00055 ~KReportChartView() {}
00056 static bool implemented(void) { return true; }
00057 void setNewData( const KDChartTableData& newdata ) { this->setData(new KDChartTableData(newdata)); }
00058 QStringList& abscissaNames(void) { return m_abscissaNames; }
00059 void refreshLabels(void) { this->params()->setAxisLabelStringParams( KDChartAxisParams::AxisPosBottom,&m_abscissaNames,0); }
00060 void setProperty(int row, int col, int id);
00061
00062
00063 void setAccountSeries(bool accountSeries) {_accountSeries = accountSeries; }
00064 bool getAccountSeries(void) {return _accountSeries; }
00065
00066 protected:
00067 virtual void mouseMoveEvent( QMouseEvent* event );
00068
00069 private:
00070 QStringList m_abscissaNames;
00071 bool _accountSeries;
00072
00073
00074 QLabel *label;
00075 };
00076
00077 }
00078
00079 #else
00080
00081 namespace reports {
00082
00083 class KReportChartView : public QWidget
00084 {
00085 public:
00086 KReportChartView( QWidget* parent, const char* name ): QWidget(parent,name) {}
00087 ~KReportChartView() {}
00088 static bool implemented(void) { return false; }
00089 };
00090
00091 }
00092
00093 #endif
00094
00095 #endif // KREPORTCHARTVIEW_H