kchart

KDChartAxisParams.h
Go to the documentation of this file.
1/*
2 KDChart - a multi-platform charting engine
3 */
4
5/****************************************************************************
6 ** Copyright (C) 2001-2003 Klarälvdalens Datakonsult AB. All rights reserved.
7 **
8 ** This file is part of the KDChart library.
9 **
10 ** This file may be distributed and/or modified under the terms of the
11 ** GNU General Public License version 2 as published by the Free Software
12 ** Foundation and appearing in the file LICENSE.GPL included in the
13 ** packaging of this file.
14 **
15 ** Licensees holding valid commercial KDChart licenses may use this file in
16 ** accordance with the KDChart Commercial License Agreement provided with
17 ** the Software.
18 **
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
21 **
22 ** See http://www.klaralvdalens-datakonsult.se/?page=products for
23 ** information about KDChart Commercial License Agreements.
24 **
25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26 ** licensing are not clear to you.
27 **
28 **********************************************************************/
29#ifndef __KDCHARTAXISPARAMS_H__
30#define __KDCHARTAXISPARAMS_H__
31
32#include <tqfont.h>
33#include <tqcolor.h>
34#include <tqmap.h>
35#include <tqobject.h>
36#include <tqtextstream.h>
37#include <tqstringlist.h>
38#include <tqdatetime.h>
39#include <tqvariant.h>
40
41#include "KDChartGlobal.h"
42#include "KDChartEnums.h"
43
44class KDChartParams;
45
52#define KDCHART_AXIS_LABELS_AUTO_LIMIT TQVariant( 140319.64 )
53// If you edit the above, also edit KD Chart.cpp
54
61#define KDCHART_AXIS_LABELS_AUTO_DELTA 140319.64
62
71#define KDCHART_AXIS_LABELS_AUTO_LEAVEOUT 14364
72
77#define KDCHART_AXIS_LABELS_AUTO_DATETIME_FORMAT "AUTO"
78
86#define KDCHART_AXIS_LABELS_AUTO_DIGITS 14364
87
94
95
96#define KDCHART_DEFAULT_AXIS_GRID_COLOR TQColor( 0xA0, 0xA0, 0xA0 )
97
104#define KDCHART_AXIS_GRID_AUTO_LINEWIDTH 14364
105
112#define KDCHART_AXIS_IGNORE_EMPTY_INNER_SPAN 1
113
120
121#define KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW -2
122
123
124
125
131
132class KDCHART_EXPORT KDChartAxisParams : public TQObject
133{
134 TQ_OBJECT
135
136 TQ_ENUMS(AxisType)
137 TQ_ENUMS(AxisPos)
138 TQ_ENUMS(AxisAreaMode)
139 TQ_ENUMS(AxisCalcMode)
140 TQ_ENUMS(LabelsFromDataRow)
141 TQ_ENUMS(ValueScale)
142
143 // Neede by TQSA
144 TQ_ENUMS( PenStyle )
145
146public:
147
148 enum AxisType { AxisTypeUnknown,
149 AxisTypeEAST,
150 AxisTypeNORTH,
151 AxisUP };
152
153public slots: // PENDING(blackie) Go through this file and reorder, so all slots are in one section
154 void setAxisType( AxisType axisType );
155
156
157 AxisType axisType() const { return _axisType; }
158 static TQString axisTypeToString( AxisType type );
159 static AxisType stringToAxisType( const TQString& type );
160
161public:
162
163 // Attention: In case you extent AxisPos, make sure to also
164 // increase MAX_AXES and AxisPosEND.
165 enum AxisPos { AxisPosSTART = 0,
166
167 AxisPosBottom = 0,
168 AxisPosSagittal = 0, // <-- for POLAR charts
169 AxisPosSaggital = 0, // <-- wrong spelling kept for backward compatibility
170 AxisPosLeft = 1,
171 AxisPosCircular = 1, // <-- for POLAR charts
172 AxisPosLowerRightEdge = 2,
173
174 AxisPosTop = 3,
175 AxisPosRight = 4,
176 AxisPosLowerLeftEdge = 5,
177
178 // diese Markierung muss jeweils mitgepflegt werden,
179 // wenn AxisPos erweitert werden sollte.
180 AxisPosAdditionalsSTART = 6,
181
182 AxisPosBottom2 = 6,
183 AxisPosLeft2 = 7,
184 AxisPosLowerRightEdge2 = 8,
185
186 AxisPosTop2 = 9,
187 AxisPosRight2 = 10,
188 AxisPosLowerLeftEdge2 = 11,
189 // auch diese Markierung muss jeweils mitgepflegt werden,
190 // wenn AxisPos erweitert werden sollte.
191 AxisPosEND = 11 };
192
193public slots:
194 static AxisPos basicAxisPos( uint pos );
195 void setAxisVisible( bool axisVisible );
196 bool axisVisible() const;
197
198public:
199 enum AxisAreaMode { AxisAreaModeFixedSize,
200 AxisAreaModeAutoSize,
201 AxisAreaModeMinMaxSize };
202
203public slots:
204 void setAxisAreaMode( AxisAreaMode axisAreaMode );
205 AxisAreaMode axisAreaMode() const;
206 static TQString axisAreaModeToString( AxisAreaMode mode );
207 static AxisAreaMode stringToAxisAreaMode( const TQString& type );
208 void setAxisAreaMin( int axisAreaMin );
209
210 //Returns the axis area minimum width (or height, resp.).
211 int axisAreaMin() const { return _axisAreaMin; }
212 void setAxisUseAvailableSpace( int axisUseAvailableSpaceFrom,
213 int axisUseAvailableSpaceTo );
214 int axisUseAvailableSpaceFrom() const { return _axisUseAvailableSpaceFrom; }
215 int axisUseAvailableSpaceTo() const { return _axisUseAvailableSpaceTo; }
216 void setAxisAreaMax( int axisAreaMax );
217 int axisAreaMax() const { return _axisAreaMax; }
218 void setAxisArea( AxisAreaMode axisAreaMode,
219 int axisAreaMin,
220 int axisAreaMax );
221
222public:
223 enum AxisCalcMode { AxisCalcLinear, AxisCalcLogarithmic };
224
225public slots:
226 void setAxisCalcMode( AxisCalcMode axisCalcMode );
227 AxisCalcMode axisCalcMode() const { return _axisCalcMode; }
228 static TQString axisCalcModeToString( AxisCalcMode mode );
229 static AxisCalcMode stringToAxisCalcMode( const TQString& type );
230 void setIsometricReferenceAxis( uint isoRefAxis );
231 uint isometricReferenceAxis() const { return _axisIsoRefAxis; }
232 void setAxisTrueAreaSize( int axisTrueAreaSize ) { _axisTrueAreaSize = axisTrueAreaSize; }
233 int axisTrueAreaSize() const { return _axisTrueAreaSize; }
234 void setAxisTrueAreaRect( const TQRect& axisTrueAreaRect ) { _axisTrueAreaRect = axisTrueAreaRect; }
235 TQRect axisTrueAreaRect() const { return _axisTrueAreaRect; }
236 void setAxisLineVisible( bool axisLineVisible );
237 bool axisLineVisible() const { return _axisLineVisible; }
238 void setAxisLineWidth( int axisLineWidth );
239 int axisLineWidth() const { return _axisLineWidth; }
240 void setAxisTrueLineWidth( int axisTrueLineWidth ) { _axisTrueLineWidth = axisTrueLineWidth; }
241 int axisTrueLineWidth() const { return _axisTrueLineWidth; }
242 void setAxisLineColor( TQColor axisLineColor );
243 TQColor axisLineColor() const { return _axisLineColor; }
244 // main grid:
245 void setAxisShowFractionalValuesDelimiters( bool axisShowFractValDelim );
246 bool axisShowFractionalValuesDelimiters() const { return _axisShowFractionalValuesDelimiters; }
247 void setAxisShowGrid( bool axisShowGrid );
248 bool axisShowGrid() const { return _axisShowGrid; }
249 void setAxisGridStyle( TQt::PenStyle axisGridStyle );
250 TQt::PenStyle axisGridStyle() const { return _axisGridStyle; }
251 void setAxisGridColor( TQColor axisGridColor );
252 TQColor axisGridColor() const { return _axisGridColor; }
253 void setAxisGridLineWidth( int axisGridLineWidth );
254 int axisGridLineWidth() const { return _axisGridLineWidth; }
255 // sub grid:
256 void setAxisShowSubDelimiters( bool axisShowSubDelimiters );
257 bool axisShowSubDelimiters() const { return _axisShowSubDelimiters; }
258 void setAxisGridSubStyle( TQt::PenStyle axisGridSubStyle );
259 TQt::PenStyle axisGridSubStyle() const { return _axisGridSubStyle; }
260 void setAxisGridSubColor( TQColor axisGridSubColor );
261 TQColor axisGridSubColor() const { return _axisGridSubColor; }
262 void setAxisGridSubLineWidth( int axisGridSubLineWidth );
263 int axisGridSubLineWidth() const { return _axisGridSubLineWidth; }
264
265 void setAxisZeroLineColor( TQColor axisZeroLineColor );
266 TQColor axisZeroLineColor() const { return _axisZeroLineColor; }
267
268 void setAxisLabelsVisible( bool axisLabelsVisible );
269 bool axisLabelsVisible() const { return _axisLabelsVisible; }
270 void setAxisLabelsTouchEdges( bool axisLabelsTouchEdges );
271 bool axisLabelsTouchEdges() const { return _axisLabelsTouchEdges; }
272 void setAxisLabelsFont( TQFont axisLabelsFont, bool useFontSize );
273 TQFont axisLabelsFont() const { return _axisLabelsFont; }
274 void setAxisLabelsFontUseRelSize( bool axisLabelsFontUseRelSize );
275 bool axisLabelsFontUseRelSize() const { return _axisLabelsFontUseRelSize; }
276 void setAxisLabelsFontRelSize( int axisLabelsFontRelSize );
277 int axisLabelsFontRelSize() const { return _axisLabelsFontRelSize; }
278 void setAxisLabelsFontMinSize( int axisLabelsFontMinSize ) { _axisLabelsFontMinSize = axisLabelsFontMinSize; }
279 int axisLabelsFontMinSize() const { return _axisLabelsFontMinSize; }
280 void setAxisLabelsDontShrinkFont( bool labelsDontShrinkFont ) { _axisLabelsDontShrinkFont = labelsDontShrinkFont; }
281 bool axisLabelsDontShrinkFont() const { return _axisLabelsDontShrinkFont; }
282 void setAxisLabelsDontAutoRotate( bool labelsDontAutoRotate ) { _axisLabelsDontAutoRotate = labelsDontAutoRotate; }
283 bool axisLabelsDontAutoRotate() const { return _axisLabelsDontAutoRotate; }
284 void setAxisLabelsRotation( int rotation ) { _axisLabelsRotation = rotation; }
285 int axisLabelsRotation() const { return _axisLabelsRotation; }
286 void setAxisLabelsColor( TQColor axisLabelsColor );
287 TQColor axisLabelsColor() const { return _axisLabelsColor; }
288
289 void setAxisLabelsCalc( int divPow10 = 0,
290 int digitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS );
291 int axisLabelsDivPow10() const { return _axisLabelsDivPow10; }
292 int axisLabelsDigitsBehindComma() const { return _axisDigitsBehindComma; }
293 void setAxisLabelsRadix( const TQString& decimalPoint,
294 const TQString& thousandsPoint );
295 TQString axisLabelsDecimalPoint() const { return _axisLabelsDecimalPoint; }
296 TQString axisLabelsThousandsPoint() const { return _axisLabelsThousandsPoint; }
297
298 void setAxisLabelsNotation( KDChartEnums::NumberNotation notation );
299 KDChartEnums::NumberNotation axisLabelsNotation() const { return _axisLabelsNotation; }
300
301 void setAxisLabelsFormat( const TQString& prefix = "",
302 const TQString& postfix = "",
303 const int& totalLen = 0,
304 const TQChar& padFill = ' ',
305 const bool& blockAlign = true );
306 TQString axisLabelsPrefix() const { return _axisLabelsPrefix; }
307 TQString axisLabelsPostfix() const { return _axisLabelsPostfix; }
308 int axisLabelsTotalLen() const { return _axisLabelsTotalLen; }
309 TQChar axisLabelsPadFill() const { return _axisLabelsPadFill; }
310 bool axisLabelsBlockAlign() const { return _axisLabelsBlockAlign; }
311
312public:
313 enum LabelsFromDataRow { LabelsFromDataRowYes,
314 LabelsFromDataRowNo,
315 LabelsFromDataRowGuess };
316
317public slots:
318 static TQString labelsFromDataRowToString( LabelsFromDataRow mode );
319 static LabelsFromDataRow stringToLabelsFromDataRow( const TQString& type );
320
321public:
322 enum ValueScale { ValueScaleNumerical = 0, // have gaps here to allow specifying of additional scaling steps in between
323 ValueScaleSecond = 20,
324 ValueScaleMinute = 30,
325 ValueScaleHour = 40,
326 ValueScaleDay = 50,
327 ValueScaleWeek = 60,
328 ValueScaleMonth = 70,
329 ValueScaleQuarter = 80,
330 ValueScaleYear = 90 };
331
332public slots:
333 void setAxisValues( bool axisSteadyValueCalc = true,
334 const TQVariant& axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
335 const TQVariant& axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
336 double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
337 int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
338 int axisMaxEmptyInnerSpan = KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW,
339 LabelsFromDataRow takeLabelsFromDataRow = LabelsFromDataRowNo,
340 int labelTextsDataRow = 0,
341 TQStringList* axisLabelStringList = 0,
342 TQStringList* axisShortLabelsStringList = 0,
343 int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
344 ValueScale axisValueDeltaScale = ValueScaleNumerical );
345
346
347 void setAxisValueStartIsExact( bool isExactValue=true ) { _axisValueStartIsExact = isExactValue; }
348 bool axisValueStartIsExact() const { return _axisValueStartIsExact; }
349 void setAxisValueStart( const TQVariant& axisValueStart ) { _axisValueStart = axisValueStart; }
350 TQVariant axisValueStart() const { return _axisValueStart; }
351 void setAxisValueEnd( const TQVariant& axisValueEnd ) {_axisValueEnd = axisValueEnd; }
352 TQVariant axisValueEnd() const { return _axisValueEnd; }
353 void setAxisValueDelta( const double axisValueDelta,
354 ValueScale scale = ValueScaleNumerical );
355 double axisValueDelta() const { return _axisValueDelta; }
356 ValueScale axisValueDeltaScale() const { return _axisValueDeltaScale; }
357 void setAxisValueLeaveOut( const int leaveOut ) { _axisValueLeaveOut = leaveOut; }
358 int axisValueLeaveOut() const { return _axisValueLeaveOut; }
359 void setAxisValuesDecreasing( bool valuesDecreasing = true )
360 {
361 _axisValuesDecreasing = valuesDecreasing;
362 }
363 bool axisValuesDecreasing() const { return _axisValuesDecreasing; }
364 void setTrueAxisDeltaPixels( double nDeltaPixels ) { _trueAxisDeltaPixels = nDeltaPixels; }
365 double trueAxisDeltaPixels() const { return _trueAxisDeltaPixels; }
366 void setTrueAxisLowHighDelta( double nLow, double nHigh, double nDelta );
367 double trueAxisLow() const { return _trueLow; }
368 double trueAxisHigh() const { return _trueHigh; }
369 double trueAxisDelta() const { return _trueDelta; }
370 void setTrueAxisDtLowHighDeltaScale( TQDateTime dtLow, TQDateTime dtHigh,
371 ValueScale dtDeltaScale );
372 void setTrueAxisDtLow( TQDateTime dtLow ) { _trueDtLow = dtLow; }
373 void setTrueAxisDtHigh( TQDateTime dtHigh ) { _trueDtHigh = dtHigh; }
374 void setTrueAxisDtScale( ValueScale scale ) { _trueDtDeltaScale = scale; }
375 TQDateTime trueAxisDtLow() const { return _trueDtLow; }
376 TQDateTime trueAxisDtHigh() const { return _trueDtHigh; }
377 ValueScale trueAxisDtDeltaScale() const { return _trueDtDeltaScale; }
378 void setAxisZeroLineStart( double x, double y );
379 double axisZeroLineStartX() const { return _axisZeroLineStartX; }
380 double axisZeroLineStartY() const { return _axisZeroLineStartY; }
381 void setAxisDtLowPos( double x, double y );
382 double axisDtLowPosX() const { return _axisDtLowPosX; }
383 double axisDtLowPosY() const { return _axisDtLowPosY; }
384 void setAxisDtHighPos( double x, double y );
385 double axisDtHighPosX() const { return _axisDtHighPosX; }
386 double axisDtHighPosY() const { return _axisDtHighPosY; }
387 void setAxisDigitsBehindComma( const int digits ) { _axisDigitsBehindComma = digits; }
388 int axisDigitsBehindComma() const { return _axisDigitsBehindComma; }
389 void setAxisLabelsDateTimeFormat( const TQString& format ) { _axisLabelsDateTimeFormat = format; }
390 TQString axisLabelsDateTimeFormat() const { return _axisLabelsDateTimeFormat; }
391 void setAxisMaxEmptyInnerSpan( const int maxEmpty ) { _axisMaxEmptyInnerSpan = maxEmpty; }
392 int axisMaxEmptyInnerSpan() const { return _axisMaxEmptyInnerSpan; }
393 void setLabelTextsFormDataRow( int row, LabelsFromDataRow mode );
394 LabelsFromDataRow axisLabelTextsFormDataRow() const { return _takeLabelsFromDataRow; }
395 int labelTextsDataRow() const { return _labelTextsDataRow; }
396 void setAxisLabelStringLists( TQStringList* axisLabelStringList,
397 TQStringList* axisShortLabelStringList,
398 const TQString& valueStart = TQString(),
399 const TQString& valueEnd = TQString() );
400 TQStringList axisLabelStringList() const { return _axisLabelStringList; }
401 uint axisLabelStringCount() const { return _axisLabelStringList.count(); }
402 TQStringList axisShortLabelsStringList() const { return _axisShortLabelsStringList; }
403 uint axisShortLabelsStringCount() const { return _axisShortLabelsStringList.count(); }
404 const TQStringList* axisLabelTexts() const { return _axisLabelTextsDirty ? 0 : &_axisLabelTexts; }
405 void setAxisLabelTexts( const TQStringList* axisLabelTexts );
406 void setAxisLabelTextsDirty( bool axisLabelTextsDirty ) { _axisLabelTextsDirty = axisLabelTextsDirty; }
407 bool axisLabelTextsDirty() const { return _axisLabelTextsDirty; }
408 void setAxisFirstLabelText( const TQString& axisFirstLabelText = TQString() );
409 void setAxisLastLabelText( const TQString& axisLastLabelText = TQString() );
410 TQString axisFirstLabelText() const { return _axisFirstLabelText; }
411 TQString axisLastLabelText() const { return _axisLastLabelText; }
412 bool hasAxisFirstLabelText() const { return !_axisFirstLabelText.isNull(); }
413 bool hasAxisLastLabelText() const { return !_axisLastLabelText.isNull(); }
414 void setAxisSteadyValueCalc( bool axisSteadyValueCalc ) { _axisSteadyValueCalc = axisSteadyValueCalc; }
415 bool axisSteadyValueCalc() const { return _axisSteadyValueCalc; }
416
417public:
419 virtual ~KDChartAxisParams();
420 KDChartAxisParams& operator=( const KDChartAxisParams& R );
421 static void deepCopy( KDChartAxisParams& D, const KDChartAxisParams& R );
422 friend TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
423 friend TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
424 friend class KDChartParams;
425
426signals:
427
428 // emitted when any of the chart axis parameters have changed.
429 void changed();
430
431private:
432
433 AxisType _axisType;
434 bool _axisVisible;
435 bool _axisLabelsTouchEdges;
436 AxisAreaMode _axisAreaMode;
437 int _axisUseAvailableSpaceFrom;
438 int _axisUseAvailableSpaceTo;
439 int _axisAreaMin;
440 int _axisAreaMax;
441 AxisCalcMode _axisCalcMode;
442 uint _axisIsoRefAxis;
443 int _axisTrueAreaSize;
444 TQRect _axisTrueAreaRect;
445 bool _axisLineVisible;
446 int _axisLineWidth;
447 int _axisTrueLineWidth;
448 TQColor _axisLineColor;
449
450 bool _axisShowFractionalValuesDelimiters;
451 bool _axisShowGrid;
452 TQColor _axisGridColor;
453 int _axisGridLineWidth;
454 TQt::PenStyle _axisGridStyle;
455
456 bool _axisShowSubDelimiters;
457 TQColor _axisGridSubColor;
458 int _axisGridSubLineWidth;
459 TQt::PenStyle _axisGridSubStyle;
460
461 TQColor _axisZeroLineColor;
462 bool _axisLabelsVisible;
463 TQFont _axisLabelsFont;
464 bool _axisLabelsFontUseRelSize;
465 int _axisLabelsFontRelSize;
466 int _axisLabelsFontMinSize;
467 bool _axisLabelsDontShrinkFont;
468 bool _axisLabelsDontAutoRotate;
469 int _axisLabelsRotation;
470 TQColor _axisLabelsColor;
471
472 bool _axisSteadyValueCalc;
473 bool _axisValueStartIsExact;
474 TQVariant _axisValueStart;
475 TQVariant _axisValueEnd;
476 double _axisValueDelta;
477 ValueScale _axisValueDeltaScale;
478 int _axisValueLeaveOut;
479 bool _axisValuesDecreasing;
480 double _trueAxisDeltaPixels;
481 double _trueLow;
482 double _trueHigh;
483 double _trueDelta;
484 TQDateTime _trueDtLow;
485 TQDateTime _trueDtHigh;
486 ValueScale _trueDtDeltaScale;
487 double _axisZeroLineStartX;
488 double _axisZeroLineStartY;
489 double _axisDtLowPosX;
490 double _axisDtLowPosY;
491 double _axisDtHighPosX;
492 double _axisDtHighPosY;
493 int _axisDigitsBehindComma;
494 TQString _axisLabelsDateTimeFormat;
495 int _axisMaxEmptyInnerSpan;
496 LabelsFromDataRow _takeLabelsFromDataRow;
497 int _labelTextsDataRow;
498 TQStringList _axisLabelStringList;
499 TQStringList _axisShortLabelsStringList;
500 TQStringList _axisLabelTexts;
501 bool _axisLabelTextsDirty;
502 TQString _axisFirstLabelText;
503 TQString _axisLastLabelText;
504
505 int _axisLabelsDivPow10;
506 TQString _axisLabelsDecimalPoint;
507 TQString _axisLabelsThousandsPoint;
508 KDChartEnums::NumberNotation _axisLabelsNotation;
509 TQString _axisLabelsPrefix;
510 TQString _axisLabelsPostfix;
511 int _axisLabelsTotalLen;
512 TQChar _axisLabelsPadFill;
513 bool _axisLabelsBlockAlign;
514};
515
516#endif
#define KDCHART_AXIS_LABELS_AUTO_LIMIT
Use this to specify that the axis label limits are to be calculated automatically.
#define KDCHART_AXIS_LABELS_AUTO_DELTA
Use this to specify that the step-width from one label to the other shall be calculated automatically...
#define KDCHART_DONT_CHANGE_EMPTY_INNER_SPAN_NOW
Use this to prevent setAxisValues from changing the current setting of _axisMaxEmptyInnerSpan.
#define KDCHART_AXIS_LABELS_AUTO_LEAVEOUT
Use this to specify that an automatically computed amount of axis labels are to be skipped if there i...
#define KDCHART_AXIS_LABELS_AUTO_DIGITS
Use this to specify that the number of digits to be shown on the axis labels behind the comma is to b...
Definition of global enums.
TQTextStream & operator>>(TQTextStream &s, KDChartParams &p)
Reads the an XML document from the text stream s into the KDChartParams object p.
TQTextStream & operator<<(TQTextStream &s, const KDChartParams &p)
Writes the KDChartParams object p as an XML document to the text stream s.
access the chart axis parameters.
TQColor axisLabelsColor() const
Returns the axis labels colour.
TQStringList axisShortLabelsStringList() const
Returns a TQStringList containing the label texts to be used in case the axis area size is too small ...
void setAxisLabelsDontAutoRotate(bool labelsDontAutoRotate)
Specifies whether the axis labels may be rotated to avoid overwriting neighboring areas.
TQColor axisGridColor() const
Returns the axis grid color.
TQt::PenStyle axisGridStyle() const
Returns the axis grid line pattern.
double trueAxisHigh() const
Returns the true end value of the ordinate axis labels as is was calculated and set by setTrueAxisLow...
void setAxisValueLeaveOut(const int leaveOut)
Specifies how many axis labels are to be skipped if there is not enough space for displaying all of t...
double axisDtLowPosY() const
Returns the not-rounded y-position where drawing of this axis low date/time value could be done.
TQVariant axisValueEnd() const
Returns the upper limit for the axis labels: the end value.
int axisTrueLineWidth() const
Returns the axis true line width, as calculated and drawn.
bool axisValuesDecreasing() const
Returns whether axis values should be printed in reverted order: starting with the highest label and ...
double axisDtLowPosX() const
Returns the not-rounded x-position where drawing of this axis low date/time value could be done.
int axisAreaMax() const
Returns the axis area maximum width (or height, resp.).
void changed()
Signals: This signal is emitted when any of the chart axis parameters have changed.
double trueAxisLow() const
Returns the true start value of the ordinate axis labels as is was calculated and set by setTrueAxisL...
int axisGridSubLineWidth() const
Returns the axis grid sub line width.
TQRect axisTrueAreaRect() const
Returns the true axis area rectangle as calculated and drawn.
int axisLabelsRotation() const
Returns by how many degrees the axis labels will be rotated.
double trueAxisDeltaPixels() const
Returns the true delimiter delta pixel value of the axis labels as is was calculated and set by setTr...
TQt::PenStyle axisGridSubStyle() const
Returns the axis grid line pattern for the thin lines showing the sub-delimiter values.
void setAxisLabelsDateTimeFormat(const TQString &format)
Specifies the format to be used for displaying abscissa axis TQDateTime item labels.
void setAxisType(AxisType axisType)
Specifies the axis type.
uint isometricReferenceAxis() const
Returns which axis this axis shall be isometric with, this will be either the axis position - see KDC...
int axisGridLineWidth() const
Returns the width of the axis grid lines.
int axisTrueAreaSize() const
Returns the true axis area width (or height, resp.) as calculated and drawn.
void setTrueAxisDeltaPixels(double nDeltaPixels)
Specifies the true axis pixel distance between two label delimiters.
void setAxisLabelsRotation(int rotation)
Specifies by how many degrees the axis labels shall be rotated.
TQFont axisLabelsFont() const
Returns the axis labels font.
bool axisShowSubDelimiters() const
Returns whether the axis sub-delimiters will be drawn.
int axisMaxEmptyInnerSpan() const
Returns the percentage of the y-axis range that may to contain NO data entries, if - and only if - ax...
double axisDtHighPosX() const
Returns the not-rounded x-position where drawing of this axis high date/time value could be done.
double axisValueDelta() const
Returns the DELTA value for the axis labels: the distance between two labels.
KDChartAxisParams()
enum KDChartAxisParams::Axistype { AxisTypeUnknown, AxisTypeEAST, AxisTypeNORTH, AxisUP }...
void setAxisDigitsBehindComma(const int digits)
Specifies the number of digits to be printed behind the comma on the axis labels.
int axisLabelsFontRelSize() const
Returns the axis labels relative font size.
TQString axisLabelsDateTimeFormat() const
Returns the format to be used for displaying abscissa axis TQDateTime item labels.
bool axisLabelsFontUseRelSize() const
Returns whether the fix axis font size is used.
AxisType axisType() const
int labelTextsDataRow() const
Returns the number of the data row that contains (or might contain, resp.) the texts to be taken for ...
double axisZeroLineStartX() const
Returns the not-rounded x-position where drawing of this axis zero line started.
void setAxisSteadyValueCalc(bool axisSteadyValueCalc)
Specifies whether label values shall be calculated based upon the associated dataset values (normally...
uint axisLabelStringCount() const
Returns the number of strings stored as label texts, the texts can be retrieved by calling axisLabelS...
bool axisShowGrid() const
Returns whether a grid should be drawn at the chart data area.
void setAxisTrueAreaRect(const TQRect &axisTrueAreaRect)
Specifies the true axis area rectangle.
int axisDigitsBehindComma() const
Returns the number of digits to be printed behind the comma on the axis labels.
bool axisSteadyValueCalc() const
Returns whether label values shall be calculataed based upon the associated dataset values (normally ...
int axisLineWidth() const
Returns the axis line width.
void setAxisMaxEmptyInnerSpan(const int maxEmpty)
Specifies the percentage of the y-axis range that may to contain NO data entries, if - and only if - ...
int axisUseAvailableSpaceFrom() const
Returns the beginning offset of the space used by this axis in comparison to the available space that...
bool axisLabelsDontShrinkFont() const
Specifies whether the axis labels' font size may be shrinked to avoid overwriting neighboring areas.
void setAxisValueEnd(const TQVariant &axisValueEnd)
Specifies the upper limit for the axis labels: the end value.
void setAxisLabelsFontMinSize(int axisLabelsFontMinSize)
Specifies the minimal font size to be used for displaying the axis labels.
double axisZeroLineStartY() const
Returns the not-rounded y-position where drawing of this axis zero line started.
void setAxisTrueAreaSize(int axisTrueAreaSize)
Specifies the true axis area width (or height, resp.).
TQStringList axisLabelStringList() const
Returns a TQStringList containing the label texts to be used.
AxisCalcMode axisCalcMode() const
Returns the axis calculation mode configured in this params object.
TQColor axisLineColor() const
Returns the axis line colour.
void setAxisTrueLineWidth(int axisTrueLineWidth)
Specifies the actual axis line width, as calculated and drawn.
bool axisLabelsDontAutoRotate() const
Returns whether the axis labels may not be rotated to avoid overwriting neighboring areas.
ValueScale axisValueDeltaScale() const
Returns the DELTA value scaling mode for the axis labels.
TQColor axisGridSubColor() const
Returns the axis grid sub color.
int axisUseAvailableSpaceTo() const
Returns the ending offset of the space used by this axis in comparison to the available space that co...
TQVariant axisValueStart() const
Returns the lower limit for the axis labels: the start value.
void setAxisValuesDecreasing(bool valuesDecreasing=true)
Specifies whether axis values should be printed in reverted order: starting with the highest label an...
double trueAxisDelta() const
Returns the true delta value of the ordinate axis labels as is was calculated and set by setTrueAxisL...
void setAxisValueStart(const TQVariant &axisValueStart)
Specifies the lower limit for the axis labels: the start value.
int axisAreaMin() const
Returns the axis area minimum width (or height, resp.).
int axisValueLeaveOut() const
Returns how many axis labels are to be skipped if there is not enough space for displaying all of the...
bool axisLabelsVisible() const
Returns whether the axis labels should be drawn.
TQColor axisZeroLineColor() const
Returns the colour used for the zero-value line that is drawn if zero is not at the lower edge of the...
bool axisLineVisible() const
Returns whether the axis line should be drawn.
double axisDtHighPosY() const
Returns the not-rounded y-position where drawing of this axis high date/time value could be done.
bool axisLabelTextsDirty() const
Returns whether the label texts that are actually drawn at the axis labels are unknown.
bool axisLabelsTouchEdges() const
Returns whether the axis labels start and end at the edges of the charts instead being positioned in ...
NumberNotation
Number notation specifies the general way, how a number is to be shown.
Bundles the display parameters of a chart.