00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00023
00024 #ifndef _vtkQtChartAxisDomain_h
00025 #define _vtkQtChartAxisDomain_h
00026
00027 #include "vtkQtChartExport.h"
00028 #include "vtkQtChartAxis.h"
00029 #include <QList>
00030 #include <QVariant>
00031
00032
00037 class VTKQTCHART_EXPORT vtkQtChartAxisDomain
00038 {
00039 public:
00040 vtkQtChartAxisDomain();
00041 vtkQtChartAxisDomain(const vtkQtChartAxisDomain &other);
00042 ~vtkQtChartAxisDomain() {}
00043
00045
00046
00047
00048
00049
00050
00051
00052
00053 bool isEmpty() const;
00054
00059 bool isRangeInList() const;
00060
00065 vtkQtChartAxis::AxisDomain getDomainType() const;
00066
00071 QVariant::Type getVariantType() const;
00072
00079 bool isTypeCompatible(QVariant::Type domain) const;
00080
00086 const QList<QVariant> &getDomain(bool &isRange) const;
00087
00091 void setRange(const QList<QVariant> &range);
00092
00098 void setDomain(const QList<QVariant> &domain);
00099
00105 bool mergeRange(const QList<QVariant> &range);
00106
00114 bool mergeDomain(const QList<QVariant> &domain);
00115
00125 bool mergeDomain(const vtkQtChartAxisDomain &other);
00126
00128 void clear();
00130
00132
00133
00134
00135
00136
00137 bool isRangePaddingUsed() const {return this->PadRange;}
00138
00142 void setRangePaddingUsed(bool padRange) {this->PadRange = padRange;}
00143
00148 bool isExpansionToZeroUsed() const {return this->ExpandToZero;}
00149
00153 void setExpansionToZeroUsed(bool expand) {this->ExpandToZero = expand;}
00154
00159 bool isExtraSpaceUsed() const {return this->AddSpace;}
00160
00164 void setExtraSpaceUsed(bool addSpace) {this->AddSpace = addSpace;}
00165
00171 void setPreferences(bool padRange, bool expandToZero, bool addSpace);
00173
00174 vtkQtChartAxisDomain &operator=(const vtkQtChartAxisDomain &other);
00175
00176 public:
00182 static vtkQtChartAxis::AxisDomain getAxisDomain(QVariant::Type domain);
00183
00191 static void sort(QList<QVariant> &list);
00192
00193 private:
00203 bool mergeNumberRange(const QList<QVariant> &range);
00204
00210 bool mergeNumberDomain(const QList<QVariant> &domain);
00211
00221 bool mergeStringDomain(const QList<QVariant> &domain);
00222
00232 bool mergeDateRange(const QList<QVariant> &range);
00233
00239 bool mergeDateDomain(const QList<QVariant> &domain);
00240
00246 bool mergeTimeRange(const QList<QVariant> &range);
00247
00253 bool mergeTimeDomain(const QList<QVariant> &domain);
00254
00255 private:
00256 QList<QVariant> List;
00257 QList<QVariant> Range;
00258 bool PadRange;
00259 bool ExpandToZero;
00260 bool AddSpace;
00261 };
00262
00263 #endif