qcolorbaraxis_p.h
66 lines
| 2.2 KiB
| text/x-c
|
CLexer
|
r7 | /*------------------------------------------------------------------------------ | ||
-- This file is a part of the ColorMapChart API | ||||
-- Copyright (C) 2016, Plasma Physics Laboratory - CNRS | ||||
-- | ||||
-- 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. | ||||
-- | ||||
-- This program is distributed in the hope that it will be useful, | ||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
-- GNU General Public License for more details. | ||||
-- | ||||
-- You should have received a copy of the GNU General Public License | ||||
-- along with this program; if not, write to the Free Software | ||||
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||||
-------------------------------------------------------------------------------*/ | ||||
/*-- Author : Hugo Winter | ||||
-- Mail : hugo.winter@lpp.polytechnique.fr | ||||
----------------------------------------------------------------------------*/ | ||||
|
r1 | #ifndef QCOLORBARAXIS_P_H | ||
#define QCOLORBARAXIS_P_H | ||||
//#include <QtCharts/QColorBarAxis> //TODO : fix this | ||||
#include "colorbaraxis/qcolorbaraxis.h" | ||||
#include <private/qabstractaxis_p.h> | ||||
QT_CHARTS_BEGIN_NAMESPACE | ||||
class QColorBarAxisPrivate : public QAbstractAxisPrivate | ||||
{ | ||||
Q_OBJECT | ||||
public: | ||||
|
r3 | QColorBarAxisPrivate(QRectF plotArea, QLinearGradient gradient, qreal min, qreal max,QColorBarAxis *q); | ||
|
r1 | ~QColorBarAxisPrivate(); | ||
public: | ||||
void initializeGraphics(QGraphicsItem* parent); | ||||
void initializeDomain(AbstractDomain *domain); | ||||
qreal min() { return m_min; } | ||||
qreal max() { return m_max; } | ||||
void setRange(qreal min,qreal max); | ||||
protected: | ||||
void setMin(const QVariant &min); | ||||
void setMax(const QVariant &max); | ||||
void setRange(const QVariant &min, const QVariant &max); | ||||
private: | ||||
qreal m_min; | ||||
qreal m_max; | ||||
|
r2 | int m_tickCount; | ||
int m_minorTickCount; | ||||
|
r1 | QString m_format; | ||
// bool m_applying; | ||||
QLinearGradient m_gradient; | ||||
|
r3 | QRectF m_plotArea; | ||
|
r1 | Q_DECLARE_PUBLIC(QColorBarAxis) | ||
}; | ||||
|
r2 | QT_CHARTS_END_NAMESPACE | ||
|
r1 | #endif // QCOLORBARAXIS_P_H | ||