From 981dcbb0d17d317cb181efa75f6cf39f52fb84cb 2012-01-19 07:27:35 From: Michal Klocek Date: 2012-01-19 07:27:35 Subject: [PATCH] Cleanup not used classes * chartview * qchartgraphicswidget --- diff --git a/example/linechart/chartview.cpp b/example/linechart/chartview.cpp deleted file mode 100644 index 78b8fdf..0000000 --- a/example/linechart/chartview.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include "chartview.h" - -ChartView::ChartView(QChartWidget* chartWidget,QWidget* parent):QGraphicsView(parent), -m_chartWidget(chartWidget), -m_scene(new QGraphicsScene(parent)) -{ - setScene(m_scene); - m_scene->addItem(chartWidget); - setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - // get rid off ugly default 1 pixel border - setStyleSheet( "QGraphicsView { border-style: none; }" ); -} - -ChartView::~ChartView() { - // TODO Auto-generated destructor stub -} - -void ChartView::resizeEvent(QResizeEvent *event){ - m_chartWidget->resize(size()); - QGraphicsView::resizeEvent(event); -} diff --git a/example/linechart/chartview.h b/example/linechart/chartview.h deleted file mode 100644 index 48f62b6..0000000 --- a/example/linechart/chartview.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CHARTVIEW_H_ -#define CHARTVIEW_H_ -#include -#include - -class QGraphicsScene; - -QCHART_USE_NAMESPACE - -class ChartView: public QGraphicsView -{ -public: - ChartView (QChartWidget* chartWidget,QWidget* parent=0); - virtual ~ChartView(); - void resizeEvent(QResizeEvent *event); - -private: - QChartWidget* m_chartWidget; - QGraphicsScene* m_scene; -}; - -#endif /* CHARTVIEW_H_ */ diff --git a/src/xylinechart/qchartgraphicswidget.cpp b/src/xylinechart/qchartgraphicswidget.cpp deleted file mode 100644 index 0fa6065..0000000 --- a/src/xylinechart/qchartgraphicswidget.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "qchartgraphicswidget.h" -#include "qchart.h" - -QCHART_BEGIN_NAMESPACE - - -class QChartGraphicsWidgetPrivate -{ -public: - QChart* chart; - //Q_DECLARE_PUBLIC(ChartWidget) - QChartGraphicsWidgetPrivate() {} -}; - -//////////////////////////////////////////////////////////////////////////// - -QChartGraphicsWidget::QChartGraphicsWidget(QGraphicsItem *parent,Qt::WindowFlags wFlags) - : QGraphicsWidget(parent,wFlags), - d_ptr(new QChartGraphicsWidgetPrivate()) -{ -} - -QChartGraphicsWidget::~QChartGraphicsWidget() -{ - delete d_ptr; -} - - -void QChartGraphicsWidget::addChart(QChart *chart) -{ - d_ptr->chart=chart; - chart->setParentItem(this); -} - -void QChartGraphicsWidget::setGeometry(const QRectF & rect) -{ - d_ptr->chart->setSize(rect.size()); - QGraphicsWidget::setGeometry(rect); -} - -QCHART_END_NAMESPACE diff --git a/src/xylinechart/qchartgraphicswidget.h b/src/xylinechart/qchartgraphicswidget.h deleted file mode 100644 index 94b9373..0000000 --- a/src/xylinechart/qchartgraphicswidget.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef QCHARTGRAPHICSWIDGET_H -#define QCHARTGRAPHICSWIDGET_H - -#include -#include - -class QGraphicsItem; - -QCHART_BEGIN_NAMESPACE - -class QChart; -class QChartGraphicsWidgetPrivate; - -class QCHART_EXPORT QChartGraphicsWidget : public QGraphicsWidget -{ - -public: - explicit QChartGraphicsWidget(QGraphicsItem *parent = 0,Qt::WindowFlags wFlags = 0); - ~QChartGraphicsWidget(); - - QChart* chart() const; - void addChart(QChart* chart); - - virtual void setGeometry(const QRectF & rect); - -private: - Q_DISABLE_COPY(QChartGraphicsWidget) - Q_DECLARE_PRIVATE(QChartGraphicsWidget) - QChartGraphicsWidgetPrivate * const d_ptr; -}; - -QCHART_END_NAMESPACE - -#endif