diff --git a/src/legend/legend.pri b/src/legend/legend.pri index 77813ba..c3e3c72 100644 --- a/src/legend/legend.pri +++ b/src/legend/legend.pri @@ -15,7 +15,8 @@ PRIVATE_HEADERS += \ $$PWD/qlegend_p.h \ $$PWD/legendlayout_p.h \ $$PWD/qlegendmarker_p.h \ - $$PWD/legendmarkeritem_p.h + $$PWD/legendmarkeritem_p.h \ + $$PWD/qpielegendmarker_p.h PUBLIC_HEADERS += \ diff --git a/src/legend/qlegendmarker.cpp b/src/legend/qlegendmarker.cpp index e2be6e3..ccc0336 100644 --- a/src/legend/qlegendmarker.cpp +++ b/src/legend/qlegendmarker.cpp @@ -110,6 +110,11 @@ QLegendMarkerPrivate::QLegendMarkerPrivate(QAbstractSeries *series, QLegendMarke m_item = new LegendMarkerItem(m_series); } +QLegendMarkerPrivate::~QLegendMarkerPrivate() +{ +} + + #include "moc_qlegendmarker.cpp" #include "moc_qlegendmarker_p.cpp" diff --git a/src/legend/qlegendmarker_p.h b/src/legend/qlegendmarker_p.h index 2db9f69..23f1528 100644 --- a/src/legend/qlegendmarker_p.h +++ b/src/legend/qlegendmarker_p.h @@ -57,6 +57,7 @@ class QLegendMarkerPrivate : public QObject Q_OBJECT public: explicit QLegendMarkerPrivate(QAbstractSeries *series, QLegendMarker *q); + virtual ~QLegendMarkerPrivate(); /* void setPen(const QPen &pen); QPen pen() const; diff --git a/src/legend/qpielegendmarker.cpp b/src/legend/qpielegendmarker.cpp index fe32a43..cb7d144 100644 --- a/src/legend/qpielegendmarker.cpp +++ b/src/legend/qpielegendmarker.cpp @@ -19,6 +19,7 @@ ****************************************************************************/ #include "qpielegendmarker.h" +#include "qpielegendmarker_p.h" #include QTCOMMERCIALCHART_BEGIN_NAMESPACE @@ -44,7 +45,18 @@ void QPieLegendMarker::updated() setLabel(m_slice->label()); } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +QPieLegendMarkerPrivate::QPieLegendMarkerPrivate(QAbstractSeries *series, QPieLegendMarker *q) : + QLegendMarkerPrivate(series, q) +{ +} + +QPieLegendMarkerPrivate::~QPieLegendMarkerPrivate() +{ +} + #include "moc_qpielegendmarker.cpp" -//#include "moc_qpielegendmarker_p.cpp" +#include "moc_qpielegendmarker_p.cpp" QTCOMMERCIALCHART_END_NAMESPACE diff --git a/src/legend/qpielegendmarker.h b/src/legend/qpielegendmarker.h index 1d56e8e..a97c312 100644 --- a/src/legend/qpielegendmarker.h +++ b/src/legend/qpielegendmarker.h @@ -24,6 +24,7 @@ #include #include #include +#include "qpielegendmarker_p.h" QTCOMMERCIALCHART_BEGIN_NAMESPACE @@ -44,8 +45,7 @@ public: //public Q_SLOTS: private: -// TODO: -// QScopedPointer d_ptr; + QScopedPointer d_ptr; Q_DISABLE_COPY(QPieLegendMarker) // TODO: PIMPL diff --git a/src/legend/qpielegendmarker_p.h b/src/legend/qpielegendmarker_p.h new file mode 100644 index 0000000..72cfb2d --- /dev/null +++ b/src/legend/qpielegendmarker_p.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the Qt Commercial Charts Add-on. +** +** $QT_BEGIN_LICENSE$ +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// W A R N I N G +// ------------- +// +// This file is not part of the QtCommercial Chart API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +#ifndef QPIELEGENDMARKER_P_H +#define QPIELEGENDMARKER_P_H + +#include "qchartglobal.h" +#include "qlegendmarker_p.h" +#include "legendmarkeritem_p.h" + +QTCOMMERCIALCHART_BEGIN_NAMESPACE + +class QPieLegendMarker; + +class QPieLegendMarkerPrivate : public QLegendMarkerPrivate +{ + Q_OBJECT +public: + explicit QPieLegendMarkerPrivate(QAbstractSeries *series, QPieLegendMarker *q); + virtual ~QPieLegendMarkerPrivate(); + +public Q_SLOTS: + virtual void updated() {}; + +private: + QPieLegendMarker *q_ptr; + PieLegendMarkerItem *m_item; + + friend class QLegendPrivate; // TODO: Is this needed? + Q_DECLARE_PUBLIC(QPieLegendMarker) +}; + +QTCOMMERCIALCHART_END_NAMESPACE + +#endif // QPIELEGENDMARKER_P_H