File indexing completed on 2024-11-24 03:57:45
0001 /** 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KD Chart library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef ADJUSTED_CARTESIAN_AXIS_H 0010 #define ADJUSTED_CARTESIAN_AXIS_H 0011 0012 #include <KChartCartesianAxis> 0013 #include <KChartGlobal> 0014 0015 0016 class AdjustedCartesianAxis: public KChart::CartesianAxis 0017 { 0018 Q_OBJECT 0019 0020 Q_DISABLE_COPY( AdjustedCartesianAxis ) 0021 0022 public: 0023 explicit AdjustedCartesianAxis( KChart::AbstractCartesianDiagram* diagram = nullptr ); 0024 0025 const QString customizedLabel( const QString& label ) const override; 0026 0027 void setBounds( qreal lower, qreal upper ) { 0028 m_lowerBound = lower; 0029 m_upperBound = upper; 0030 } 0031 qreal lowerBound() const { return m_lowerBound; } 0032 qreal upperBound() const { return m_upperBound; } 0033 0034 private: 0035 qreal m_lowerBound; 0036 qreal m_upperBound; 0037 }; 0038 0039 #endif // ADJUSTED_CARTESIAN_AXIS_H