diff options
Diffstat (limited to 'libkdchart/KDChartAxisParams.h')
-rw-r--r-- | libkdchart/KDChartAxisParams.h | 203 |
1 files changed, 102 insertions, 101 deletions
diff --git a/libkdchart/KDChartAxisParams.h b/libkdchart/KDChartAxisParams.h index 5817b37..b581970 100644 --- a/libkdchart/KDChartAxisParams.h +++ b/libkdchart/KDChartAxisParams.h @@ -29,14 +29,14 @@ #ifndef __KDCHARTAXISPARAMS_H__ #define __KDCHARTAXISPARAMS_H__ -#include <qfont.h> -#include <qcolor.h> -#include <qmap.h> -#include <qobject.h> -#include <qtextstream.h> -#include <qstringlist.h> -#include <qdatetime.h> -#include <qvariant.h> +#include <tqfont.h> +#include <tqcolor.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqtextstream.h> +#include <tqstringlist.h> +#include <tqdatetime.h> +#include <tqvariant.h> #include "KDChartGlobal.h" #include "KDChartEnums.h" @@ -49,7 +49,7 @@ class KDChartParams; \sa setAxisValues */ -#define KDCHART_AXIS_LABELS_AUTO_LIMIT QVariant( 140319.64 ) +#define KDCHART_AXIS_LABELS_AUTO_LIMIT TQVariant( 140319.64 ) // If you edit the above, also edit KD Chart.cpp /** @@ -93,7 +93,7 @@ class KDChartParams; */ -#define KDCHART_DEFAULT_AXIS_GRID_COLOR QColor( 0xA0, 0xA0, 0xA0 ) +#define KDCHART_DEFAULT_AXIS_GRID_COLOR TQColor( 0xA0, 0xA0, 0xA0 ) /** Use this to specify that the width of the axis grid lines @@ -129,9 +129,10 @@ class KDChartParams; Use the KDChartAxisParams class to modify parameters of one axis each. */ -class KDCHART_EXPORT KDChartAxisParams : public QObject +class KDCHART_EXPORT KDChartAxisParams : public TQObject { Q_OBJECT + TQ_OBJECT Q_ENUMS(AxisType) Q_ENUMS(AxisPos) Q_ENUMS(AxisAreaMode) @@ -139,7 +140,7 @@ class KDCHART_EXPORT KDChartAxisParams : public QObject Q_ENUMS(LabelsFromDataRow) Q_ENUMS(ValueScale) - // Neede by QSA + // Neede by TQSA Q_ENUMS( PenStyle ) public: @@ -154,8 +155,8 @@ public slots: // PENDING(blackie) Go through this file and reorder, so all slot AxisType axisType() const { return _axisType; } - static QString axisTypeToString( AxisType type ); - static AxisType stringToAxisType( const QString& type ); + static TQString axisTypeToString( AxisType type ); + static AxisType stringToAxisType( const TQString& type ); public: @@ -202,8 +203,8 @@ public: public slots: void setAxisAreaMode( AxisAreaMode axisAreaMode ); AxisAreaMode axisAreaMode() const; - static QString axisAreaModeToString( AxisAreaMode mode ); - static AxisAreaMode stringToAxisAreaMode( const QString& type ); + static TQString axisAreaModeToString( AxisAreaMode mode ); + static AxisAreaMode stringToAxisAreaMode( const TQString& type ); void setAxisAreaMin( int axisAreaMin ); //Returns the axis area minimum width (or height, resp.). @@ -224,52 +225,52 @@ public: public slots: void setAxisCalcMode( AxisCalcMode axisCalcMode ); AxisCalcMode axisCalcMode() const { return _axisCalcMode; } - static QString axisCalcModeToString( AxisCalcMode mode ); - static AxisCalcMode stringToAxisCalcMode( const QString& type ); + static TQString axisCalcModeToString( AxisCalcMode mode ); + static AxisCalcMode stringToAxisCalcMode( const TQString& type ); void setIsometricReferenceAxis( uint isoRefAxis ); uint isometricReferenceAxis() const { return _axisIsoRefAxis; } void setAxisTrueAreaSize( int axisTrueAreaSize ) { _axisTrueAreaSize = axisTrueAreaSize; } int axisTrueAreaSize() const { return _axisTrueAreaSize; } - void setAxisTrueAreaRect( const QRect& axisTrueAreaRect ) { _axisTrueAreaRect = axisTrueAreaRect; } - QRect axisTrueAreaRect() const { return _axisTrueAreaRect; } + void setAxisTrueAreaRect( const TQRect& axisTrueAreaRect ) { _axisTrueAreaRect = axisTrueAreaRect; } + TQRect axisTrueAreaRect() const { return _axisTrueAreaRect; } void setAxisLineVisible( bool axisLineVisible ); bool axisLineVisible() const { return _axisLineVisible; } void setAxisLineWidth( int axisLineWidth ); int axisLineWidth() const { return _axisLineWidth; } void setAxisTrueLineWidth( int axisTrueLineWidth ) { _axisTrueLineWidth = axisTrueLineWidth; } int axisTrueLineWidth() const { return _axisTrueLineWidth; } - void setAxisLineColor( QColor axisLineColor ); - QColor axisLineColor() const { return _axisLineColor; } + void setAxisLineColor( TQColor axisLineColor ); + TQColor axisLineColor() const { return _axisLineColor; } // main grid: void setAxisShowFractionalValuesDelimiters( bool axisShowFractValDelim ); bool axisShowFractionalValuesDelimiters() const { return _axisShowFractionalValuesDelimiters; } void setAxisShowGrid( bool axisShowGrid ); bool axisShowGrid() const { return _axisShowGrid; } - void setAxisGridStyle( PenStyle axisGridStyle ); - PenStyle axisGridStyle() const { return _axisGridStyle; } - void setAxisGridColor( QColor axisGridColor ); - QColor axisGridColor() const { return _axisGridColor; } + void setAxisGridStyle( Qt::PenStyle axisGridStyle ); + Qt::PenStyle axisGridStyle() const { return _axisGridStyle; } + void setAxisGridColor( TQColor axisGridColor ); + TQColor axisGridColor() const { return _axisGridColor; } void setAxisGridLineWidth( int axisGridLineWidth ); int axisGridLineWidth() const { return _axisGridLineWidth; } // sub grid: void setAxisShowSubDelimiters( bool axisShowSubDelimiters ); bool axisShowSubDelimiters() const { return _axisShowSubDelimiters; } - void setAxisGridSubStyle( PenStyle axisGridSubStyle ); - PenStyle axisGridSubStyle() const { return _axisGridSubStyle; } - void setAxisGridSubColor( QColor axisGridSubColor ); - QColor axisGridSubColor() const { return _axisGridSubColor; } + void setAxisGridSubStyle( Qt::PenStyle axisGridSubStyle ); + Qt::PenStyle axisGridSubStyle() const { return _axisGridSubStyle; } + void setAxisGridSubColor( TQColor axisGridSubColor ); + TQColor axisGridSubColor() const { return _axisGridSubColor; } void setAxisGridSubLineWidth( int axisGridSubLineWidth ); int axisGridSubLineWidth() const { return _axisGridSubLineWidth; } - void setAxisZeroLineColor( QColor axisZeroLineColor ); - QColor axisZeroLineColor() const { return _axisZeroLineColor; } + void setAxisZeroLineColor( TQColor axisZeroLineColor ); + TQColor axisZeroLineColor() const { return _axisZeroLineColor; } void setAxisLabelsVisible( bool axisLabelsVisible ); bool axisLabelsVisible() const { return _axisLabelsVisible; } void setAxisLabelsTouchEdges( bool axisLabelsTouchEdges ); bool axisLabelsTouchEdges() const { return _axisLabelsTouchEdges; } - void setAxisLabelsFont( QFont axisLabelsFont, bool useFontSize ); - QFont axisLabelsFont() const { return _axisLabelsFont; } + void setAxisLabelsFont( TQFont axisLabelsFont, bool useFontSize ); + TQFont axisLabelsFont() const { return _axisLabelsFont; } void setAxisLabelsFontUseRelSize( bool axisLabelsFontUseRelSize ); bool axisLabelsFontUseRelSize() const { return _axisLabelsFontUseRelSize; } void setAxisLabelsFontRelSize( int axisLabelsFontRelSize ); @@ -282,30 +283,30 @@ public slots: bool axisLabelsDontAutoRotate() const { return _axisLabelsDontAutoRotate; } void setAxisLabelsRotation( int rotation ) { _axisLabelsRotation = rotation; } int axisLabelsRotation() const { return _axisLabelsRotation; } - void setAxisLabelsColor( QColor axisLabelsColor ); - QColor axisLabelsColor() const { return _axisLabelsColor; } + void setAxisLabelsColor( TQColor axisLabelsColor ); + TQColor axisLabelsColor() const { return _axisLabelsColor; } void setAxisLabelsCalc( int divPow10 = 0, int digitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS ); int axisLabelsDivPow10() const { return _axisLabelsDivPow10; } int axisLabelsDigitsBehindComma() const { return _axisDigitsBehindComma; } - void setAxisLabelsRadix( const QString& decimalPoint, - const QString& thousandsPoint ); - QString axisLabelsDecimalPoint() const { return _axisLabelsDecimalPoint; } - QString axisLabelsThousandsPoint() const { return _axisLabelsThousandsPoint; } + void setAxisLabelsRadix( const TQString& decimalPoint, + const TQString& thousandsPoint ); + TQString axisLabelsDecimalPoint() const { return _axisLabelsDecimalPoint; } + TQString axisLabelsThousandsPoint() const { return _axisLabelsThousandsPoint; } void setAxisLabelsNotation( KDChartEnums::NumberNotation notation ); KDChartEnums::NumberNotation axisLabelsNotation() const { return _axisLabelsNotation; } - void setAxisLabelsFormat( const QString& prefix = "", - const QString& postfix = "", + void setAxisLabelsFormat( const TQString& prefix = "", + const TQString& postfix = "", const int& totalLen = 0, - const QChar& padFill = ' ', + const TQChar& padFill = ' ', const bool& blockAlign = true ); - QString axisLabelsPrefix() const { return _axisLabelsPrefix; } - QString axisLabelsPostfix() const { return _axisLabelsPostfix; } + TQString axisLabelsPrefix() const { return _axisLabelsPrefix; } + TQString axisLabelsPostfix() const { return _axisLabelsPostfix; } int axisLabelsTotalLen() const { return _axisLabelsTotalLen; } - QChar axisLabelsPadFill() const { return _axisLabelsPadFill; } + TQChar axisLabelsPadFill() const { return _axisLabelsPadFill; } bool axisLabelsBlockAlign() const { return _axisLabelsBlockAlign; } public: @@ -314,8 +315,8 @@ public: LabelsFromDataRowGuess }; public slots: - static QString labelsFromDataRowToString( LabelsFromDataRow mode ); - static LabelsFromDataRow stringToLabelsFromDataRow( const QString& type ); + static TQString labelsFromDataRowToString( LabelsFromDataRow mode ); + static LabelsFromDataRow stringToLabelsFromDataRow( const TQString& type ); public: enum ValueScale { ValueScaleNumerical = 0, // have gaps here to allow specifying of additional scaling steps in between @@ -330,25 +331,25 @@ public: public slots: void setAxisValues( bool axisSteadyValueCalc = true, - const QVariant& axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT, - const QVariant& axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT, + const TQVariant& axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT, + const TQVariant& axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT, double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA, int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS, int axisMaxEmptyInnerSpan = KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW, LabelsFromDataRow takeLabelsFromDataRow = LabelsFromDataRowNo, int labelTextsDataRow = 0, - QStringList* axisLabelStringList = 0, - QStringList* axisShortLabelsStringList = 0, + TQStringList* axisLabelStringList = 0, + TQStringList* axisShortLabelsStringList = 0, int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT, ValueScale axisValueDeltaScale = ValueScaleNumerical ); void setAxisValueStartIsExact( bool isExactValue=true ) { _axisValueStartIsExact = isExactValue; } bool axisValueStartIsExact() const { return _axisValueStartIsExact; } - void setAxisValueStart( const QVariant& axisValueStart ) { _axisValueStart = axisValueStart; } - QVariant axisValueStart() const { return _axisValueStart; } - void setAxisValueEnd( const QVariant& axisValueEnd ) {_axisValueEnd = axisValueEnd; } - QVariant axisValueEnd() const { return _axisValueEnd; } + void setAxisValueStart( const TQVariant& axisValueStart ) { _axisValueStart = axisValueStart; } + TQVariant axisValueStart() const { return _axisValueStart; } + void setAxisValueEnd( const TQVariant& axisValueEnd ) {_axisValueEnd = axisValueEnd; } + TQVariant axisValueEnd() const { return _axisValueEnd; } void setAxisValueDelta( const double axisValueDelta, ValueScale scale = ValueScaleNumerical ); double axisValueDelta() const { return _axisValueDelta; } @@ -366,13 +367,13 @@ public slots: double trueAxisLow() const { return _trueLow; } double trueAxisHigh() const { return _trueHigh; } double trueAxisDelta() const { return _trueDelta; } - void setTrueAxisDtLowHighDeltaScale( QDateTime dtLow, QDateTime dtHigh, + void setTrueAxisDtLowHighDeltaScale( TQDateTime dtLow, TQDateTime dtHigh, ValueScale dtDeltaScale ); - void setTrueAxisDtLow( QDateTime dtLow ) { _trueDtLow = dtLow; } - void setTrueAxisDtHigh( QDateTime dtHigh ) { _trueDtHigh = dtHigh; } + void setTrueAxisDtLow( TQDateTime dtLow ) { _trueDtLow = dtLow; } + void setTrueAxisDtHigh( TQDateTime dtHigh ) { _trueDtHigh = dtHigh; } void setTrueAxisDtScale( ValueScale scale ) { _trueDtDeltaScale = scale; } - QDateTime trueAxisDtLow() const { return _trueDtLow; } - QDateTime trueAxisDtHigh() const { return _trueDtHigh; } + TQDateTime trueAxisDtLow() const { return _trueDtLow; } + TQDateTime trueAxisDtHigh() const { return _trueDtHigh; } ValueScale trueAxisDtDeltaScale() const { return _trueDtDeltaScale; } void setAxisZeroLineStart( double x, double y ); double axisZeroLineStartX() const { return _axisZeroLineStartX; } @@ -385,29 +386,29 @@ public slots: double axisDtHighPosY() const { return _axisDtHighPosY; } void setAxisDigitsBehindComma( const int digits ) { _axisDigitsBehindComma = digits; } int axisDigitsBehindComma() const { return _axisDigitsBehindComma; } - void setAxisLabelsDateTimeFormat( const QString& format ) { _axisLabelsDateTimeFormat = format; } - QString axisLabelsDateTimeFormat() const { return _axisLabelsDateTimeFormat; } + void setAxisLabelsDateTimeFormat( const TQString& format ) { _axisLabelsDateTimeFormat = format; } + TQString axisLabelsDateTimeFormat() const { return _axisLabelsDateTimeFormat; } void setAxisMaxEmptyInnerSpan( const int maxEmpty ) { _axisMaxEmptyInnerSpan = maxEmpty; } int axisMaxEmptyInnerSpan() const { return _axisMaxEmptyInnerSpan; } void setLabelTextsFormDataRow( int row, LabelsFromDataRow mode ); LabelsFromDataRow axisLabelTextsFormDataRow() const { return _takeLabelsFromDataRow; } int labelTextsDataRow() const { return _labelTextsDataRow; } - void setAxisLabelStringLists( QStringList* axisLabelStringList, - QStringList* axisShortLabelStringList, - const QString& valueStart = QString::null, - const QString& valueEnd = QString::null ); - QStringList axisLabelStringList() const { return _axisLabelStringList; } + void setAxisLabelStringLists( TQStringList* axisLabelStringList, + TQStringList* axisShortLabelStringList, + const TQString& valueStart = TQString(), + const TQString& valueEnd = TQString() ); + TQStringList axisLabelStringList() const { return _axisLabelStringList; } uint axisLabelStringCount() const { return _axisLabelStringList.count(); } - QStringList axisShortLabelsStringList() const { return _axisShortLabelsStringList; } + TQStringList axisShortLabelsStringList() const { return _axisShortLabelsStringList; } uint axisShortLabelsStringCount() const { return _axisShortLabelsStringList.count(); } - const QStringList* axisLabelTexts() const { return _axisLabelTextsDirty ? 0 : &_axisLabelTexts; } - void setAxisLabelTexts( const QStringList* axisLabelTexts ); + const TQStringList* axisLabelTexts() const { return _axisLabelTextsDirty ? 0 : &_axisLabelTexts; } + void setAxisLabelTexts( const TQStringList* axisLabelTexts ); void setAxisLabelTextsDirty( bool axisLabelTextsDirty ) { _axisLabelTextsDirty = axisLabelTextsDirty; } bool axisLabelTextsDirty() const { return _axisLabelTextsDirty; } - void setAxisFirstLabelText( const QString& axisFirstLabelText = QString() ); - void setAxisLastLabelText( const QString& axisLastLabelText = QString() ); - QString axisFirstLabelText() const { return _axisFirstLabelText; } - QString axisLastLabelText() const { return _axisLastLabelText; } + void setAxisFirstLabelText( const TQString& axisFirstLabelText = TQString() ); + void setAxisLastLabelText( const TQString& axisLastLabelText = TQString() ); + TQString axisFirstLabelText() const { return _axisFirstLabelText; } + TQString axisLastLabelText() const { return _axisLastLabelText; } bool hasAxisFirstLabelText() const { return !_axisFirstLabelText.isNull(); } bool hasAxisLastLabelText() const { return !_axisLastLabelText.isNull(); } void setAxisSteadyValueCalc( bool axisSteadyValueCalc ) { _axisSteadyValueCalc = axisSteadyValueCalc; } @@ -418,8 +419,8 @@ public: virtual ~KDChartAxisParams(); KDChartAxisParams& operator=( const KDChartAxisParams& R ); static void deepCopy( KDChartAxisParams& D, const KDChartAxisParams& R ); - friend QTextStream& operator<<( QTextStream& s, const KDChartParams& p ); - friend QTextStream& operator>>( QTextStream& s, KDChartParams& p ); + friend TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p ); + friend TQTextStream& operator>>( TQTextStream& s, KDChartParams& p ); friend class KDChartParams; signals: @@ -440,38 +441,38 @@ private: AxisCalcMode _axisCalcMode; uint _axisIsoRefAxis; int _axisTrueAreaSize; - QRect _axisTrueAreaRect; + TQRect _axisTrueAreaRect; bool _axisLineVisible; int _axisLineWidth; int _axisTrueLineWidth; - QColor _axisLineColor; + TQColor _axisLineColor; bool _axisShowFractionalValuesDelimiters; bool _axisShowGrid; - QColor _axisGridColor; + TQColor _axisGridColor; int _axisGridLineWidth; - PenStyle _axisGridStyle; + Qt::PenStyle _axisGridStyle; bool _axisShowSubDelimiters; - QColor _axisGridSubColor; + TQColor _axisGridSubColor; int _axisGridSubLineWidth; - PenStyle _axisGridSubStyle; + Qt::PenStyle _axisGridSubStyle; - QColor _axisZeroLineColor; + TQColor _axisZeroLineColor; bool _axisLabelsVisible; - QFont _axisLabelsFont; + TQFont _axisLabelsFont; bool _axisLabelsFontUseRelSize; int _axisLabelsFontRelSize; int _axisLabelsFontMinSize; bool _axisLabelsDontShrinkFont; bool _axisLabelsDontAutoRotate; int _axisLabelsRotation; - QColor _axisLabelsColor; + TQColor _axisLabelsColor; bool _axisSteadyValueCalc; bool _axisValueStartIsExact; - QVariant _axisValueStart; - QVariant _axisValueEnd; + TQVariant _axisValueStart; + TQVariant _axisValueEnd; double _axisValueDelta; ValueScale _axisValueDeltaScale; int _axisValueLeaveOut; @@ -480,8 +481,8 @@ private: double _trueLow; double _trueHigh; double _trueDelta; - QDateTime _trueDtLow; - QDateTime _trueDtHigh; + TQDateTime _trueDtLow; + TQDateTime _trueDtHigh; ValueScale _trueDtDeltaScale; double _axisZeroLineStartX; double _axisZeroLineStartY; @@ -490,25 +491,25 @@ private: double _axisDtHighPosX; double _axisDtHighPosY; int _axisDigitsBehindComma; - QString _axisLabelsDateTimeFormat; + TQString _axisLabelsDateTimeFormat; int _axisMaxEmptyInnerSpan; LabelsFromDataRow _takeLabelsFromDataRow; int _labelTextsDataRow; - QStringList _axisLabelStringList; - QStringList _axisShortLabelsStringList; - QStringList _axisLabelTexts; + TQStringList _axisLabelStringList; + TQStringList _axisShortLabelsStringList; + TQStringList _axisLabelTexts; bool _axisLabelTextsDirty; - QString _axisFirstLabelText; - QString _axisLastLabelText; + TQString _axisFirstLabelText; + TQString _axisLastLabelText; int _axisLabelsDivPow10; - QString _axisLabelsDecimalPoint; - QString _axisLabelsThousandsPoint; + TQString _axisLabelsDecimalPoint; + TQString _axisLabelsThousandsPoint; KDChartEnums::NumberNotation _axisLabelsNotation; - QString _axisLabelsPrefix; - QString _axisLabelsPostfix; + TQString _axisLabelsPrefix; + TQString _axisLabelsPostfix; int _axisLabelsTotalLen; - QChar _axisLabelsPadFill; + TQChar _axisLabelsPadFill; bool _axisLabelsBlockAlign; }; |