qlegendmarker_p.h
83 lines
| 2.1 KiB
| text/x-c
|
CLexer
|
r2845 | /****************************************************************************** | ||
|
r2163 | ** | ||
|
r2845 | ** Copyright (C) 2015 The Qt Company Ltd. | ||
** Contact: http://www.qt.io/licensing/ | ||||
|
r2163 | ** | ||
|
r2740 | ** This file is part of the Qt Charts module. | ||
|
r2163 | ** | ||
|
r2845 | ** $QT_BEGIN_LICENSE:COMM$ | ||
|
r2163 | ** | ||
|
r2845 | ** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||||
** accordance with the commercial license agreement provided with the | ||||
** Software or, alternatively, in accordance with the terms contained in | ||||
** a written agreement between you and The Qt Company. For licensing terms | ||||
** and conditions see http://www.qt.io/terms-conditions. For further | ||||
** information use the contact form at http://www.qt.io/contact-us. | ||||
|
r2163 | ** | ||
|
r2845 | ** $QT_END_LICENSE$ | ||
** | ||||
******************************************************************************/ | ||||
|
r2163 | |||
// W A R N I N G | ||||
// ------------- | ||||
// | ||||
|
r2807 | // This file is not part of the Qt 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 | ||||