qcolorbaraxis_p.h
66 lines
| 2.2 KiB
| text/x-c
|
CLexer
r2899 | /*------------------------------------------------------------------------------ | |||
-- 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 | ||||
----------------------------------------------------------------------------*/ | ||||
#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: | ||||
QColorBarAxisPrivate(QRectF plotArea, QLinearGradient gradient, qreal min, qreal max,QColorBarAxis *q); | ||||
~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; | ||||
int m_tickCount; | ||||
int m_minorTickCount; | ||||
QString m_format; | ||||
// bool m_applying; | ||||
QLinearGradient m_gradient; | ||||
QRectF m_plotArea; | ||||
Q_DECLARE_PUBLIC(QColorBarAxis) | ||||
}; | ||||
QT_CHARTS_END_NAMESPACE | ||||
#endif // QCOLORBARAXIS_P_H | ||||