From dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 22:38:03 +0000 Subject: Added kmymoney git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/reports/kreportchartview.h | 95 ++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 kmymoney2/reports/kreportchartview.h (limited to 'kmymoney2/reports/kreportchartview.h') diff --git a/kmymoney2/reports/kreportchartview.h b/kmymoney2/reports/kreportchartview.h new file mode 100644 index 0000000..a1bf786 --- /dev/null +++ b/kmymoney2/reports/kreportchartview.h @@ -0,0 +1,95 @@ +/*************************************************************************** + kreportchartview.h + ------------------- + begin : Sat May 22 2004 + copyright : (C) 2004-2005 by Ace Jones + email : + Thomas Baumgart + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KREPORTCHARTVIEW_H +#define KREPORTCHARTVIEW_H + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif +#ifdef HAVE_KDCHART + +// ---------------------------------------------------------------------------- +// QT Includes + +// ---------------------------------------------------------------------------- +// KDE Includes +// Some STL headers in GCC4.3 contain operator new. Memory checker mangles these +#ifdef _CHECK_MEMORY + #undef new +#endif + +#include +#include +#include +#include +#include + +// ---------------------------------------------------------------------------- +// Project Includes +#ifdef _CHECK_MEMORY + #include +#endif + +namespace reports { + +class KReportChartView: public KDChartWidget +{ +public: + KReportChartView( QWidget* parent, const char* name ); + ~KReportChartView() {} + static bool implemented(void) { return true; } + void setNewData( const KDChartTableData& newdata ) { this->setData(new KDChartTableData(newdata)); } + QStringList& abscissaNames(void) { return m_abscissaNames; } + void refreshLabels(void) { this->params()->setAxisLabelStringParams( KDChartAxisParams::AxisPosBottom,&m_abscissaNames,0); } + void setProperty(int row, int col, int id); +// void setCircularLabels(void) { this->params()->setAxisLabelStringParams( KDChartAxisParams::AxisPosCircular,&m_abscissaNames,0); } + + void setAccountSeries(bool accountSeries) {_accountSeries = accountSeries; } + bool getAccountSeries(void) {return _accountSeries; } + +protected: + virtual void mouseMoveEvent( QMouseEvent* event ); + +private: + QStringList m_abscissaNames; + bool _accountSeries; + + // label to display when hovering on a data region + QLabel *label; +}; + +} // end namespace reports + +#else + +namespace reports { + +class KReportChartView : public QWidget +{ +public: + KReportChartView( QWidget* parent, const char* name ): QWidget(parent,name) {} + ~KReportChartView() {} + static bool implemented(void) { return false; } +}; + +} // end namespace reports + +#endif + +#endif // KREPORTCHARTVIEW_H -- cgit v1.2.1