qlegendmarker_p.h
80 lines
| 2.0 KiB
| text/x-c
|
CLexer
|
r2163 | /**************************************************************************** | ||
** | ||||
|
r2688 | ** Copyright (C) 2014 Digia Plc | ||
|
r2163 | ** All rights reserved. | ||
|
r2740 | ** For any questions to Digia, please use contact form at http://qt.io | ||
|
r2163 | ** | ||
|
r2740 | ** This file is part of the Qt Charts module. | ||
|
r2163 | ** | ||
|
r2740 | ** Licensees holding valid commercial license for Qt may use this file in | ||
** accordance with the Qt License Agreement provided with the Software | ||||
** or, alternatively, in accordance with the terms contained in a written | ||||
** agreement between you and Digia. | ||||
|
r2163 | ** | ||
** If you have questions regarding the use of this file, please use | ||||
|
r2740 | ** contact form at http://qt.io | ||
|
r2163 | ** | ||
****************************************************************************/ | ||||
// W A R N I N G | ||||
// ------------- | ||||
// | ||||
|
r2574 | // This file is not part of the Qt Enterprise Chart API. It exists purely as an | ||
|
r2163 | // implementation detail. This header file may change from version to | ||
// version without notice, or even be removed. | ||||
// | ||||
// We mean it. | ||||
#ifndef QLEGENDMARKERPRIVATE_H | ||||
#define QLEGENDMARKERPRIVATE_H | ||||
|
r2714 | #include <QtCharts/QChartGlobal> | ||
|
r2163 | #include <QGraphicsObject> | ||
|
r2714 | #include <QtGui/QBrush> | ||
#include <QtGui/QPen> | ||||
#include <QtWidgets/QGraphicsLayoutItem> | ||||
|
r2163 | |||
|
r2712 | QT_CHARTS_BEGIN_NAMESPACE | ||
|
r2163 | |||
class QAbstractSeries; | ||||
class QLegend; | ||||
class QLegendMarker; | ||||
|
r2164 | class LegendMarkerItem; | ||
|
r2163 | |||
|
r2165 | class QLegendMarkerPrivate : public QObject | ||
|
r2163 | { | ||
Q_OBJECT | ||||
public: | ||||
|
r2171 | explicit QLegendMarkerPrivate(QLegendMarker *q, QLegend *legend); | ||
|
r2166 | virtual ~QLegendMarkerPrivate(); | ||
|
r2168 | |||
|
r2192 | // Helper for now. (or declare LegendLayout as friend) | ||
|
r2167 | LegendMarkerItem* item() const { return m_item; } | ||
|
r2182 | virtual QAbstractSeries* series() = 0; | ||
virtual QObject* relatedObject() = 0; | ||||
|
r2194 | void invalidateLegend(); | ||
|
r2163 | public Q_SLOTS: | ||
|
r2227 | virtual void updated() = 0; | ||
|
r2163 | |||
|
r2167 | protected: | ||
|
r2164 | LegendMarkerItem *m_item; | ||
|
r2193 | QLegend *m_legend; | ||
|
r2429 | bool m_customLabel; | ||
bool m_customBrush; | ||||
bool m_customPen; | ||||
|
r2164 | |||
|
r2167 | private: | ||
QLegendMarker *q_ptr; | ||||
|
r2163 | |||
|
r2183 | friend class QLegendPrivate; | ||
friend class LegendMarkerItem; | ||||
|
r2163 | Q_DECLARE_PUBLIC(QLegendMarker) | ||
}; | ||||
|
r2712 | QT_CHARTS_END_NAMESPACE | ||
|
r2163 | |||
#endif // QLEGENDMARKERPRIVATE_H | ||||