kchart

KDChartParams.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 __KDCHARTPARAMS_H__
30#define __KDCHARTPARAMS_H__
31
32#include <tqapplication.h>
33#include <tqfont.h>
34#include <tqcolor.h>
35#include <tqpen.h>
36#include <tqmap.h>
37#include <tqdict.h>
38#include <tqintdict.h>
39#include <tqobject.h>
40#include <tqtextstream.h>
41#include <tqsimplerichtext.h>
42#include <tqdom.h>
43#include <tqvaluevector.h>
44#include <limits.h>
45
46#include <math.h>
47#ifdef TQ_WS_WIN
48#define M_PI 3.14159265358979323846
49#endif
50
51#include "KDChartGlobal.h"
52#include "KDChartEnums.h"
53#include "KDChartCustomBox.h"
54#include "KDFrame.h"
55#include "KDChartAxisParams.h"
56#include "KDChartPropertySet.h"
57
58
69typedef TQIntDict<KDChartPropertySet> KDChartPropertySetList;
70
71#define KDCHART_ALL_AXES UINT_MAX-1
72
73// PENDING(blackie) KHZ, please clean up here. I guess this defined can be removed now.
74// Note: The following specification matches the UINT_MAX value used
75// in KDChartAxisParams::KDChartAxisParams() to initialize the
76// axis' _axisIsoRefAxis member.
77// OK, this is a dirty hack but is avoids circular dependency
78// between KDChartParams and KDChartAxisParams
79#define KDCHART_NO_AXIS UINT_MAX
80#define KDCHART_ALL_DATASETS UINT_MAX - 1
81
82#define KDCHART_NO_DATASET UINT_MAX
83#define KDCHART_UNKNOWN_CHART UINT_MAX - 2
84#define KDCHART_ALL_CHARTS UINT_MAX - 1
85#define KDCHART_NO_CHART UINT_MAX
86#define KDCHART_GLOBAL_LINE_STYLE UINT_MAX
87#define KDCHART_AUTO_SIZE INT_MAX
88#define KDCHART_DATA_VALUE_AUTO_DIGITS INT_MAX
89#define KDCHART_SAGITTAL_ROTATION INT_MAX
90#define KDCHART_TANGENTIAL_ROTATION INT_MAX - 1
91#define KDCHART_PROPSET_NORMAL_DATA 0
92#define KDCHART_PROPSET_TRANSPARENT_DATA 1
93#define KDCHART_PROPSET_HORI_LINE 2
94#define KDCHART_PROPSET_VERT_LINE 3
95
96// #define KDCHART_DATA_VALUE_AUTO_COLOR KDChartAutoColor::instance()->color()
97
98// PENDING(blackie) Can we delete this now?
99/* we must keep this wrongly spelled value for backward compatibility reasons */
100#define KDCHART_SAGGITAL_ROTATION INT_MAX
101
106#define KDCHART_CNT_ORDINATES 4
107
108#define KDCHART_MAX_POLAR_DELIMS_AND_LABELS_POS 8
109#define KDCHART_MAX_AXES 12
110
111
112#define KDCHART_DATA_VALUE_AUTO_COLOR (KDChartAutoColor::instance()->color())
113
114class KDCHART_EXPORT KDChartAutoColor {
115public:
116 static const KDChartAutoColor* instance();
117 static void freeInstance();
118 const TQColor* color() const
119 {
120 return &mColor;
121 }
122private:
123 KDChartAutoColor();
124 KDChartAutoColor( KDChartAutoColor const& );
125 ~KDChartAutoColor();
126 TQColor mColor;
127 static KDChartAutoColor *mInstance;
128};
129
130/*
131// #define KDCHART_DATA_VALUE_AUTO_COLOR KDChartParams_KDChartAutoColor
132*/
133
134
135class KDCHART_EXPORT KDChartParams : public TQObject
136{
137
138 TQ_OBJECT
139
140 TQ_ENUMS(ChartType)
141 TQ_ENUMS(SourceMode)
142 TQ_ENUMS(BarChartSubType)
143 TQ_ENUMS(LineChartSubType)
144 TQ_ENUMS(LineMarkerStyle)
145 TQ_ENUMS(AreaChartSubType)
146 TQ_ENUMS(AreaLocation)
147 TQ_ENUMS(PolarChartSubType)
148 TQ_ENUMS(PolarMarkerStyle)
149 TQ_ENUMS(HiLoChartSubType)
150 TQ_ENUMS(BWChartSubType)
151 TQ_ENUMS(BWStatVal)
152 TQ_ENUMS(LegendPosition)
153 TQ_ENUMS(LegendSource)
154 TQ_ENUMS(HdFtPos)
155
156 // Needed for TQSA
157 TQ_ENUMS( BrushStyle )
158 TQ_ENUMS( PenStyle )
159 TQ_ENUMS( Orientation )
160
161
162public slots: // PENDING(blackie) merge public slots into one section.
163 void setOptimizeOutputForScreen( bool screenOutput )
164 {
165 _optimizeOutputForScreen = screenOutput;
166 }
167
168
170 {
171 return _optimizeOutputForScreen;
172 }
173
174 void setGlobalLeading( int left, int top, int right, int bottom );
175
176 void setGlobalLeadingLeft( int leading )
177 {
178 _globalLeadingLeft = leading;
179 emit changed();
180 }
181 void setGlobalLeadingTop( int leading )
182 {
183 _globalLeadingTop = leading;
184 emit changed();
185 }
186 void setGlobalLeadingRight( int leading )
187 {
188 _globalLeadingRight = leading;
189 emit changed();
190 }
191 void setGlobalLeadingBottom( int leading )
192 {
193 _globalLeadingBottom = leading;
194 emit changed();
195 }
197 {
198 return _globalLeadingLeft;
199 }
201 {
202 return _globalLeadingTop;
203 }
205 {
206 return _globalLeadingRight;
207 }
209 {
210 return _globalLeadingBottom;
211 }
212
213 int registerProperties( KDChartPropertySet& rSet );
214 void setProperties( int id, KDChartPropertySet& rSet );
215 bool removeProperties( int id );
216 bool properties( int id, KDChartPropertySet& rSet ) const;
217 KDChartPropertySet* properties( int id );
218 bool calculateProperties( int startId, KDChartPropertySet& rSet ) const;
219
220public:
221
222// MOC_SKIP_BEGIN
223 class KDCHART_EXPORT KDChartFrameSettings
224 {
225 // TQ_OBJECT
226 //
227 public:
229 KDChartFrameSettings( uint dataRow,
230 uint dataCol,
231 uint data3rd,
232 const KDFrame& frame,
233 int outerGapX,
234 int outerGapY,
235 int innerGapX,
236 int innerGapY,
237 bool addFrameWidthToLayout = true,
238 bool addFrameHeightToLayout = true );
239
240 // public slots:
241 uint dataRow() const
242 {
243 return _dataRow;
244 }
245 uint dataCol() const
246 {
247 return _dataCol;
248 }
249 uint data3rd() const
250 {
251 return _data3rd;
252 }
253
254 void setDataRow( uint dataRow )
255 {
256 _dataRow = dataRow;
257 }
258 void setDataCol( uint dataCol )
259 {
260 _dataCol = dataCol;
261 }
262 void setData3rd( uint data3rd )
263 {
264 _data3rd = data3rd;
265 }
266
267
268 void resetFrame()
269 {
270 if( _frame )
271 delete _frame;
272 _frame = new KDFrame();
273 }
274
275
276 const KDFrame* framePtr() const
277 {
278 return _frame;
279 }
280
281
282 const KDFrame& frame() const
283 {
284 return *_frame;
285 }
286
287
288 int innerGapX() const
289 {
290 return _innerGapX;
291 }
292
293
294 int innerGapY() const
295 {
296 return _innerGapY;
297 }
298
299
300 int outerGapX() const
301 {
302 return _outerGapX;
303 }
304
305
306 int outerGapY() const
307 {
308 return _outerGapY;
309 }
310
311
313 {
314 return _addFrameWidthToLayout;
315 }
316
317
319 {
320 return _addFrameHeightToLayout;
321 }
322
323 // public:
324 virtual ~KDChartFrameSettings();
325
326
327 static void createFrameSettingsNode( TQDomDocument& document,
328 TQDomNode& parent,
329 const TQString& elementName,
330 const KDChartFrameSettings* settings,
331 uint areaId );
332
333 static bool readFrameSettingsNode( const TQDomElement& element,
334 KDChartFrameSettings& settings,
335 uint& areaId );
336
337
338 static void deepCopy( KDChartFrameSettings& D, const KDChartFrameSettings& R ) {
339 D._dataRow = R._dataRow;
340 D._dataCol = R._dataCol;
341 D._data3rd = R._data3rd;
342
343 delete D._frame;
344 if( R._frame ){
345 D._frame = new KDFrame();
346 KDFrame::deepCopy(*D._frame, *R._frame);
347 }else{
348 D._frame = 0;
349 }
350
351 D._outerGapX = R._outerGapX;
352 D._outerGapY = R._outerGapY;
353 D._innerGapX = R._innerGapX;
354 D._innerGapY = R._innerGapY;
355 D._addFrameWidthToLayout = R._addFrameWidthToLayout;
356 D._addFrameHeightToLayout = R._addFrameHeightToLayout;
357 }
358
359 private:
360 // KDChartFrameSettings( const KDChartFrameSettings& other ) :TQObject( 0 ) {
361 KDChartFrameSettings( const KDChartFrameSettings& ) {}
362 KDChartFrameSettings& operator=( const KDChartFrameSettings& ){return *this;}
363
364
365 private:
366 uint _dataRow;
367 uint _dataCol;
368 uint _data3rd;
369 KDFrame* _frame;
370 int _outerGapX;
371 int _outerGapY;
372 int _innerGapX;
373 int _innerGapY;
374 bool _addFrameWidthToLayout;
375 bool _addFrameHeightToLayout;
376 };
377
378// MOC_SKIP_END
379
380public slots:
381
382 void setFrame( uint area,
383 const KDFrame& frame,
384 int outerGapX,
385 int outerGapY,
386 int innerGapX,
387 int innerGapY,
388 bool addFrameWidthToLayout = true,
389 bool addFrameHeightToLayout = true )
390 {
391 _areaDict.setAutoDelete( true );
392 _areaDict.replace( TQString( "%1/-----/-----/-----" ).arg( area, 5 ),
393 new KDChartFrameSettings(0,0,0,
394 frame,
395 outerGapX,
396 outerGapY,
397 innerGapX,
398 innerGapY,
399 addFrameWidthToLayout,
400 addFrameHeightToLayout ) );
401 emit changed();
402 }
403
404
405 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
406 void setSimpleFrame( uint area,
407 int outerGapX = 0,
408 int outerGapY = 0,
409 int innerGapX = 0,
410 int innerGapY = 0,
411 bool addFrameWidthToLayout = true,
412 bool addFrameHeightToLayout = true,
413 KDFrame::SimpleFrame simpleFrame = KDFrame::FrameFlat,
414 int lineWidth = 1,
415 int midLineWidth = 0,
416 TQPen pen = TQPen(),
417 TQBrush background = TQBrush( TQt::NoBrush ),
418 const TQPixmap* backPixmap = 0, // no pixmap
419 KDFrame::BackPixmapMode backPixmapMode = KDFrame::PixStretched,
420 int shadowWidth = 0,
421 KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
422 {
423 _areaDict.setAutoDelete( true );
424 KDFrame frame( TQRect(0,0,0,0),
425 simpleFrame,
426 lineWidth,
427 midLineWidth,
428 pen,
429 background,
430 backPixmap,
431 backPixmapMode,
432 shadowWidth,
433 sunPos );
434
435 _areaDict.replace( TQString( "%1/-----/-----/-----" ).arg( area, 5 ),
436 new KDChartFrameSettings( 0,0,0, frame,
437 outerGapX,
438 outerGapY,
439 innerGapX,
440 innerGapY,
441 addFrameWidthToLayout,
442 addFrameHeightToLayout ) );
443 emit changed();
444 }
445
446 bool removeFrame( uint area );
447
448
449 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
450 void setDataRegionFrame( uint dataRow,
451 uint dataCol,
452 uint, // important: we ignore the data3rd parameter for now!
453 int innerGapX = 0,
454 int innerGapY = 0,
455 bool addFrameWidthToLayout = true,
456 bool addFrameHeightToLayout = true,
457 KDFrame::SimpleFrame simpleFrame = KDFrame::FrameFlat,
458 int lineWidth = 1,
459 int midLineWidth = 0,
460 TQPen pen = TQPen(),
461 int shadowWidth = 0,
462 KDFrame::CornerName sunPos = KDFrame::CornerTopLeft )
463 {
464 _areaDict.setAutoDelete( true );
465 KDFrame frame( TQRect(0,0,0,0),
466 simpleFrame,
467 lineWidth,
468 midLineWidth,
469 pen,
470 TQBrush( TQt::NoBrush ),
471 0,
472 KDFrame::PixStretched,
473 shadowWidth,
474 sunPos );
475
476 _areaDict.replace(
477 dataRegionFrameAreaName( dataRow, dataCol, 0 ), //data3rd 5 ),
478 new KDChartFrameSettings( dataRow,
479 dataCol,
480 0, // important: we ignore the data3rd parameter for now!
481 frame,
482 0,
483 0,
484 innerGapX,
485 innerGapY,
486 addFrameWidthToLayout,
487 addFrameHeightToLayout ) );
488 emit changed();
489 }
490
491
492 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
493 bool moveDataRegionFrame( uint oldDataRow,
494 uint oldDataCol,
495 uint, // important: we ignore the data3rd parameter for now!
496 uint newDataRow,
497 uint newDataCol,
498 uint // important: we ignore the data3rd parameter for now!
499 );
500
501
502 const KDChartFrameSettings* frameSettings( uint area,
503 bool& bFound,
504 int* pIterIdx=0 ) const;
505
506 const KDChartFrameSettings* nextFrameSettings( bool& bFound,
507 int* pIterIdx ) const;
508
509
510public:
511 typedef TQIntDict <KDChartCustomBox > CustomBoxDict;
512
513public slots:
514 uint insertCustomBox( const KDChartCustomBox & box );
515 bool removeCustomBox( const uint & idx );
516
518 {
519 emit changed();
520 _customBoxDict.setAutoDelete( true );
521 _customBoxDict.clear();
522 }
523
524 KDChartCustomBox* customBoxRef( uint box );
525 const KDChartCustomBox* customBox( uint box ) const;
526 uint maxCustomBoxIdx() const;
527
528
529public:
530 enum ChartType { NoType, Bar, Line, Area, Pie, HiLo, Ring, Polar, BoxWhisker };
531
532public slots:
533 void setChartType( ChartType chartType );
535 {
536 return _chartType;
537 }
538
539
540 static TQString chartTypeToString( ChartType type );
541 static ChartType stringToChartType( const TQString& string );
542
543 void setAdditionalChartType( ChartType chartType );
545 {
546 return _additionalChartType;
547 }
548public:
549
551 UnknownMode = 0,
552 DontUse = 1,
553 DataEntry = 2,
554 AxisLabel = 3,
555 LegendText = 4,
556 ExtraLinesAnchor = 5,
557 Last_SourceMode = ExtraLinesAnchor };
558
559public slots:
560 void setChartSourceMode( SourceMode mode,
561 uint dataset,
562 uint dataset2 = KDCHART_NO_DATASET,
563 uint chart = 0 );
564
565 static TQString chartSourceModeToString( const SourceMode& mode );
566 static SourceMode stringToChartSourceMode( const TQString& string );
567
568
570 {
571 return !_setChartSourceModeWasUsed;
572 }
573
574 SourceMode chartSourceMode( uint dataset,
575 uint dataset2 = KDCHART_NO_DATASET,
576 uint* chart = 0 ) const;
577
578 bool findDataset( SourceMode mode,
579 uint& dataset,
580 uint& dataset2,
581 uint chart = 0 ) const;
582
583 bool findDatasets( SourceMode mode1,
584 SourceMode mode2,
585 uint& dataset,
586 uint& dataset2,
587 uint chart = 0 ) const;
588
590 {
591 return _maxDatasetSourceMode;
592 }
593
594
595 void setDefaultAxesTypes();
596 void activateDefaultAxes();
597
598
599 void setNumValues( uint numValues )
600 {
601 _numValues = numValues;
602 emit changed();
603 }
604
605
606 int numValues() const
607 {
608 return _numValues;
609 }
610
611
612 void calculateShadowColors( TQColor color,
613 TQColor& shadow1,
614 TQColor& shadow2 ) const;
615
616 void setDataColor( uint dataset, TQColor color );
617 TQColor dataColor( uint dataset ) const;
618
619 void setDataDefaultColors();
620 void setDataRainbowColors();
621 void setDataSubduedColors( bool ordered = false );
622
623
624 void setShadowBrightnessFactor( double factor )
625 {
626 _shadowBrightnessFactor = factor;
627 recomputeShadowColors();
628 emit changed();
629 }
630
632 {
633 return _shadowBrightnessFactor;
634 }
635
636
637 void setShadowPattern( TQt::BrushStyle style ) {
638 _shadowPattern = style;
639 emit changed();
640 }
641
642 TQt::BrushStyle shadowPattern() const {
643 return _shadowPattern;
644 }
645
646
647 void setOutlineDataColor( TQColor color )
648 {
649 _outlineDataColor = color;
650 emit changed();
651 }
652
653
654 TQColor outlineDataColor() const
655 {
656 return _outlineDataColor;
657 }
658
659
660 void setOutlineDataLineWidth( uint width )
661 {
662 _outlineDataLineWidth = width;
663 emit changed();
664 }
665
667 {
668 return _outlineDataLineWidth;
669 }
670
671
672 void setOutlineDataLineStyle( TQt::PenStyle style )
673 {
674 _outlineDataLineStyle = style;
675 emit changed();
676 }
677
678 TQt::PenStyle outlineDataLineStyle() const
679 {
680 return _outlineDataLineStyle;
681 }
682
683
684 uint maxDataColor() const
685 {
686 return _maxDatasetColor;
687 }
688
689
690 void setThreeDShadowColors( bool shadow )
691 {
692 _threeDShadowColors = shadow;
693 emit changed();
694 }
695
696
698 {
699 return _threeDShadowColors;
700 }
701
702
703 static int roundVal( double d )
704 {
705 double fr;
706 double i;
707 fr = modf( d, &i );
708 int ret = static_cast < int > ( i );
709 if( 0.49999 <= fabs( fr ) )
710 ret += ( 0.0 < d ) ? 1 : -1;
711 return ret;
712 }
713
714 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
715 void setPrintDataValues( bool active,
716 uint chart = KDCHART_ALL_CHARTS,
717 int divPow10 = 0,
718 int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
719 TQFont* font = 0,
720 uint size = UINT_MAX, // <-- makes us use the *default* font params
721 // by IGNORING settings of
722 // the following parameters!
723 const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
724 KDChartEnums::PositionFlag negativePosition = KDChartEnums::PosCenter,
725 uint negativeAlign = TQt::AlignCenter,
726 int negativeDeltaX = 0,
727 int negativeDeltaY = 0,
728 int negativeRotation = 0,
729 KDChartEnums::PositionFlag positivePosition = KDChartEnums::PosCenter,
730 uint positiveAlign = TQt::AlignCenter,
731 int positiveDeltaX = 0,
732 int positiveDeltaY = 0,
733 int positiveRotation = 0,
734 KDChartEnums::TextLayoutPolicy policy = KDChartEnums::LayoutPolicyRotate );
735
736 void setDataValuesCalc( int divPow10 = 0,
737 int digitsBehindComma = KDCHART_DATA_VALUE_AUTO_DIGITS,
738 uint chart = KDCHART_ALL_CHARTS );
739 void setDataValuesFont( TQFont* font,
740 uint size = UINT_MAX,
741 uint chart = KDCHART_ALL_CHARTS );
742
743 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
744 void setDataValuesPlacing( KDChartEnums::PositionFlag position,
745 uint align,
746 int deltaX,
747 int deltaY,
748 int rotation,
749 bool specifyingPositiveValues = true,
750 uint chart = KDCHART_ALL_CHARTS );
751
752 void setDataValuesColors( const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
753 const TQBrush& background = TQBrush(TQt::NoBrush),
754 uint chart = KDCHART_ALL_CHARTS );
755
756 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
757 void setDataValuesPolicy( KDChartEnums::TextLayoutPolicy policy = KDChartEnums::LayoutPolicyRotate,
758 uint chart = KDCHART_ALL_CHARTS );
759
760 void setDataValuesShowInfinite( bool dataValuesShowInfinite = true,
761 uint chart = KDCHART_ALL_CHARTS );
762
763 void setPrintDataValuesWithDefaultFontParams( uint chart = KDCHART_ALL_CHARTS,
764 bool callSetPrintDataValues = true );
765
767 {
768 _allowOverlappingDataValueTexts = allow;
769 }
770
771
773 {
774 return _allowOverlappingDataValueTexts;
775 }
776
778 {
779 return chart ? _printDataValuesSettings2._useDefaultFontParams
780 : _printDataValuesSettings._useDefaultFontParams;
781 }
782
783 bool printDataValues( uint chart ) const
784 {
785 return chart ? _printDataValuesSettings2._printDataValues
786 : _printDataValuesSettings._printDataValues;
787 }
788
789
790 int dataValuesDivPow10( uint chart ) const
791 {
792 return chart ? _printDataValuesSettings2._divPow10
793 : _printDataValuesSettings._divPow10;
794 }
795
796
797 int dataValuesDigitsBehindComma( uint chart ) const
798 {
799 return chart ? _printDataValuesSettings2._digitsBehindComma
800 : _printDataValuesSettings._digitsBehindComma;
801 }
802
803
804 TQFont dataValuesFont( uint chart ) const
805 {
806 return chart ? _printDataValuesSettings2._dataValuesFont
807 : _printDataValuesSettings._dataValuesFont;
808 }
809
810
811 bool dataValuesUseFontRelSize( uint chart ) const
812 {
813 return chart ? _printDataValuesSettings2._dataValuesUseFontRelSize
814 : _printDataValuesSettings._dataValuesUseFontRelSize;
815 }
816
817
818 int dataValuesFontRelSize( uint chart ) const
819 {
820 return chart ? _printDataValuesSettings2._dataValuesFontRelSize
821 : _printDataValuesSettings._dataValuesFontRelSize;
822 }
823
824
825 TQColor dataValuesColor( uint chart ) const
826 {
827 return chart ? _printDataValuesSettings2._dataValuesColor
828 : _printDataValuesSettings._dataValuesColor;
829 }
830
831
832 TQBrush dataValuesBackground( uint chart ) const
833 {
834 return chart ? _printDataValuesSettings2._dataValuesBrush
835 : _printDataValuesSettings._dataValuesBrush;
836 }
837
838
839 bool dataValuesAutoColor( uint chart ) const
840 {
841 return chart ? _printDataValuesSettings2._dataValuesAutoColor
842 : _printDataValuesSettings._dataValuesAutoColor;
843 }
844
845
846 KDChartEnums::PositionFlag dataValuesAnchorPosition( uint chart,
847 bool negative ) const;
848 uint dataValuesAnchorAlign( uint chart, bool negative ) const;
849 int dataValuesAnchorDeltaX( uint chart, bool negative ) const;
850 int dataValuesAnchorDeltaY( uint chart, bool negative ) const;
851 int dataValuesRotation( uint chart, bool negative ) const;
852
854 {
855 return chart ? _printDataValuesSettings2._dataValuesLayoutPolicy
856 : _printDataValuesSettings._dataValuesLayoutPolicy;
857 }
858
859
860 bool dataValuesShowInfinite( uint chart ) const
861 {
862 return chart ? _printDataValuesSettings2._dataValuesShowInfinite
863 : _printDataValuesSettings._dataValuesShowInfinite;
864 }
865
866
867 // for backward compatibility we may NOT remove these functions:
868 void setPrintDataValuesColor( uint chart = KDCHART_ALL_CHARTS,
869 const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR );
870 void setPrintDataValuesFontRelSize( uint chart, uint size );
871
872
873 static TQString markerStyleToString( int style );
874 static TQString markerStyleToStringTr( int style );
875 static int stringToMarkerStyle( const TQString& string );
876 static int stringToMarkerStyleTr( const TQString& string );
877
878 // END GENERAL
879
880
881public:
882
883 // BAR CHART-SPECIFIC
884 enum BarChartSubType { BarNormal, BarStacked, BarPercent, BarMultiRows };
885
886public slots:
887 void setBarChartSubType( BarChartSubType barChartSubType )
888 {
889 _barChartSubType = barChartSubType;
890 emit changed();
891 }
892
894 {
895 return _barChartSubType;
896 }
897
898
899
900
901
902 static TQString barChartSubTypeToString( BarChartSubType type );
903 static BarChartSubType stringToBarChartSubType( const TQString& string );
904
905
906 void setThreeDBars( bool threeDBars )
907 {
908 _threeDBars = threeDBars;
909 emit changed();
910 }
911
912 bool threeDBars() const
913 {
914 return _threeDBars;
915 }
916
917
918 void setThreeDBarsShadowColors( bool shadow )
919 {
920 _threeDShadowColors = shadow;
921 emit changed();
922 }
923
924
926 {
927 return _threeDShadowColors;
928 }
929
930
931 TQColor dataShadow1Color( uint dataset ) const;
932 TQColor dataShadow2Color( uint dataset ) const;
933
934
935 void setThreeDBarAngle( uint angle );
936 uint threeDBarAngle() const
937 {
938 return _threeDBarAngle;
939 }
940
941
942 double cosThreeDBarAngle() const
943 {
944 return _cosThreeDBarAngle;
945 }
946
947
948 void setThreeDBarDepth( double depth )
949 {
950 _threeDBarDepth = depth;
951 emit changed();
952 }
953
954
955 double threeDBarDepth() const
956 {
957 return _threeDBarDepth;
958 }
959
960
961 void setDatasetGap( int gap )
962 {
963 _datasetGap = gap;
964 emit changed();
965 }
966
967 int datasetGap() const
968 {
969 return _datasetGap;
970 }
971
972
973 void setDatasetGapIsRelative( bool gapIsRelative )
974 {
975 _datasetGapIsRelative = gapIsRelative;
976 emit changed();
977 }
978
980 {
981 return _datasetGapIsRelative;
982 }
983
984
985 void setValueBlockGap( int gap )
986 {
987 _valueBlockGap = gap;
988 emit changed();
989 }
990
991 int valueBlockGap() const
992 {
993 return _valueBlockGap;
994 }
995
996
997 void setValueBlockGapIsRelative( bool gapIsRelative )
998 {
999 _valueBlockGapIsRelative = gapIsRelative;
1000 emit changed();
1001 }
1002
1004 {
1005 return _valueBlockGapIsRelative;
1006 }
1007
1008
1009 void setBarWidth( int width = KDCHART_AUTO_SIZE )
1010 {
1011 if ( width == KDCHART_AUTO_SIZE ) {
1012 _barWidth = width;
1013 _userWidth = 0;
1014 }
1015 else
1016 _userWidth = width;
1017
1018 emit changed();
1019 }
1020
1021
1022 int barWidth() const
1023 {
1024 return _barWidth;
1025 }
1026
1027 int userWidth() const
1028 {
1029 return _userWidth;
1030 }
1031
1033 {
1034 return _barsDisplayed;
1035 }
1036
1037 int numBarsLeft() const
1038 {
1039 return _barsLeft;
1040 }
1041
1042 void setDrawSolidExcessArrows( bool solidArrows ) {
1043 _solidExcessArrows = solidArrows;
1044 emit changed();
1045 }
1046
1048 {
1049 return _solidExcessArrows;
1050 }
1051
1052 // END BAR CHART-SPECIFIC
1053
1054public:
1055 // LINE/AREA CHART-SPECIFIC
1056 enum LineChartSubType { LineNormal, LineStacked, LinePercent };
1057
1058public slots:
1059 void setLineChartSubType( LineChartSubType lineChartSubType )
1060 {
1061 _lineChartSubType = lineChartSubType;
1062 emit changed();
1063 }
1064
1066 {
1067 return _lineChartSubType;
1068 }
1069
1070
1071 static LineChartSubType stringToLineChartSubType( const TQString& string );
1072 static TQString lineChartSubTypeToString( LineChartSubType type );
1073
1074
1075 void setLineMarker( bool marker )
1076 {
1077 _lineMarker = marker;
1078 emit changed();
1079 }
1080
1081 bool lineMarker() const
1082 {
1083 return _lineMarker;
1084 }
1085
1086public:
1087 enum LineMarkerStyle { LineMarkerCircle = 0,
1088 LineMarkerSquare = 1,
1089 LineMarkerDiamond = 2,
1090 LineMarker1Pixel = 3,
1091 LineMarker4Pixels = 4,
1092 LineMarkerRing = 5,
1093 LineMarkerCross = 6,
1094 LineMarkerFastCross = 7 };
1095
1096 // PENDING(blackie) Add a wrapper for this
1097 typedef TQMap<uint,LineMarkerStyle> LineMarkerStyleMap;
1098public slots:
1099
1100 void setLineMarkerStyle( uint dataset, LineMarkerStyle style );
1101 void setLineMarkerStyles( LineMarkerStyleMap map );
1102 LineMarkerStyle lineMarkerStyle( uint dataset ) const;
1103
1104 static TQString lineMarkerStyleToString( LineMarkerStyle style );
1105 static TQString lineMarkerStyleToStringTr( LineMarkerStyle style );
1106 static LineMarkerStyle stringToLineMarkerStyle( const TQString& string );
1107 static LineMarkerStyle stringToLineMarkerStyleTr( const TQString& string );
1108
1110 return _lineMarkerStyles;
1111 }
1112
1113
1115 {
1116 return _maxDatasetLineMarkerStyle;
1117 }
1118
1119
1120 void setLineMarkerSize( TQSize size )
1121 {
1122 _lineMarkerSize = size;
1123 emit changed();
1124 }
1125
1126 TQSize lineMarkerSize() const
1127 {
1128 return _lineMarkerSize;
1129 }
1130
1131 void setLineWidth( int width )
1132 {
1133 _lineWidth = width;
1134 emit changed();
1135 }
1136
1137 int lineWidth() const
1138 {
1139 return _lineWidth;
1140 }
1141
1142
1143 void setLineColor( TQColor color = TQColor() )
1144 {
1145 _lineColor = color;
1146 emit changed();
1147 }
1148
1149 TQColor lineColor() const
1150 {
1151 return _lineColor;
1152 }
1153
1154 void setLineStyle( TQt::PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE );
1155
1156 TQt::PenStyle lineStyle( uint dataset=KDCHART_GLOBAL_LINE_STYLE ) const;
1157
1158
1159 void setThreeDLines( bool threeD ) {
1160 _threeDLines = threeD;
1161 emit changed();
1162 }
1163
1164
1165 bool threeDLines() const {
1166 return _threeDLines;
1167 }
1168
1169
1170 void setThreeDLineDepth( int depth ) {
1171 _threeDLineDepth = depth;
1172 emit changed();
1173 }
1174
1175
1176 int threeDLineDepth() const {
1177 return _threeDLineDepth;
1178 }
1179
1180
1181 // NOTE: documentation of this function is temporary disabled.
1182 // Feature is currently not supported, will be implemented
1183 // by future versions of KDChart
1184 void setThreeDLineXRotation( int degrees ) {
1185 _threeDLineXRotation = degrees;
1186 emit changed();
1187 }
1188
1189
1190 // NOTE: documentation of this function is temporary disabled.
1191 // Feature is currently not supported, will be implemented
1192 // by future versions of KDChart
1194 return _threeDLineXRotation;
1195 }
1196
1197
1198 // NOTE: documentation of this function is temporary disabled.
1199 // Feature is currently not supported, will be implemented
1200 // by future versions of KDChart
1201 void setThreeDLineYRotation( int degrees ) {
1202 _threeDLineYRotation = degrees;
1203 emit changed();
1204 }
1205
1206
1207 // NOTE: documentation of this function is temporary disabled.
1208 // Feature is currently not supported, will be implemented
1209 // by future versions of KDChart
1211 return _threeDLineYRotation;
1212 }
1213
1214public:
1215 enum AreaChartSubType { AreaNormal, AreaStacked, AreaPercent };
1216
1217public slots:
1218 void setAreaChartSubType( AreaChartSubType areaChartSubType )
1219 {
1220 _areaChartSubType = areaChartSubType;
1221 // activate default data value text settings for this chart type
1222 if( printDataValues( 0 )
1223 && printDataValuesWithDefaultFontParams( 0 ) )
1224 setPrintDataValues( true, 0 );
1225 emit changed();
1226 }
1227
1228
1230 {
1231 return _areaChartSubType;
1232 }
1233
1234
1235 static TQString areaChartSubTypeToString( AreaChartSubType type );
1236 static AreaChartSubType stringToAreaChartSubType( const TQString& string );
1237
1238public:
1239 enum AreaLocation { AreaAbove, AreaBelow };
1240public slots:
1241
1243 {
1244 _areaLocation = location;
1245 emit changed();
1246 }
1247
1249 {
1250 return _areaLocation;
1251 }
1252
1253
1254 static TQString areaLocationToString( AreaLocation type );
1255 static AreaLocation stringToAreaLocation( const TQString& string );
1256
1257 // END LINE/AREA CHART-SPECIFIC
1258
1259public:
1260 // POLAR CHART-SPECIFIC
1261 enum PolarChartSubType { PolarNormal, PolarStacked, PolarPercent };
1262
1263public slots:
1264 void setPolarChartSubType( PolarChartSubType polarChartSubType )
1265 {
1266 _polarChartSubType = polarChartSubType;
1267 emit changed();
1268 }
1269
1271 {
1272 return _polarChartSubType;
1273 }
1274
1275
1276 static PolarChartSubType stringToPolarChartSubType( const TQString& string );
1277 static TQString polarChartSubTypeToString( PolarChartSubType type );
1278
1279 void setPolarMarker( bool marker )
1280 {
1281 _polarMarker = marker;
1282 emit changed();
1283 }
1284
1285 bool polarMarker() const
1286 {
1287 return _polarMarker;
1288 }
1289
1290public:
1291 enum PolarMarkerStyle { PolarMarkerCircle = 0,
1292 PolarMarkerSquare = 1,
1293 PolarMarkerDiamond = 2,
1294 PolarMarker1Pixel = 3,
1295 PolarMarker4Pixels = 4,
1296 PolarMarkerRing = 5,
1297 PolarMarkerCross = 6 };
1298
1299public slots:
1300 void setPolarMarkerStyle( uint dataset, PolarMarkerStyle style );
1301 PolarMarkerStyle polarMarkerStyle( uint dataset ) const;
1302 static TQString polarMarkerStyleToString( PolarMarkerStyle style );
1303 static TQString polarMarkerStyleToStringTr( PolarMarkerStyle style );
1304 static PolarMarkerStyle stringToPolarMarkerStyle( const TQString& string );
1305 static PolarMarkerStyle stringToPolarMarkerStyleTr( const TQString& string );
1306
1307public:
1308 typedef TQMap<uint,PolarMarkerStyle> PolarMarkerStyleMap;
1309
1310public slots:
1311 void setPolarMarkerStyles( PolarMarkerStyleMap map );
1312
1314 return _polarMarkerStyles;
1315 }
1316
1318 {
1319 return _maxDatasetPolarMarkerStyle;
1320 }
1321
1322 void setPolarMarkerSize( TQSize size = TQSize( -40, -40 ) )
1323 {
1324 _polarMarkerSize = size;
1325 emit changed();
1326 }
1327
1328 TQSize polarMarkerSize() const
1329 {
1330 return _polarMarkerSize;
1331 }
1332
1333 void setPolarLineWidth( int width = -3 )
1334 {
1335 _polarLineWidth = width;
1336 emit changed();
1337 }
1338
1339 int polarLineWidth() const
1340 {
1341 return _polarLineWidth;
1342 }
1343
1344
1345 void setPolarZeroDegreePos( int degrees )
1346 {
1347 _polarZeroDegreePos = degrees;
1348 }
1349
1351 {
1352 return _polarZeroDegreePos;
1353 }
1354
1355
1356 void setPolarRotateCircularLabels( bool rotateCircularLabels )
1357 {
1358 _polarRotateCircularLabels = rotateCircularLabels;
1359 }
1360
1362 {
1363 return _polarRotateCircularLabels;
1364 }
1365
1366
1367 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
1368 void setPolarDelimsAndLabelsAtPos( KDChartEnums::PositionFlag pos,
1369 bool showDelimiters,
1370 bool showLabels );
1371
1372 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
1373 bool polarDelimAtPos( KDChartEnums::PositionFlag pos ) const;
1374
1375 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
1376 bool polarLabelsAtPos( KDChartEnums::PositionFlag pos ) const;
1377
1378 // END POLAR CHART-SPECIFIC
1379
1380
1381 // PIE/RING CHART-SPECIFIC
1382
1383 void setExplode( bool explode )
1384 {
1385 _explode = explode;
1386 emit changed();
1387 }
1388
1389 bool explode() const
1390 {
1391 return _explode;
1392 }
1393
1394
1395 void setExplodeValues( TQValueList<int> explodeList ) {
1396 _explodeList = explodeList;
1397 emit changed();
1398 }
1399
1400
1401 // Unfortunately this is not avaialble from TQSA-
1402 TQValueList<int> explodeValues() const {
1403 return _explodeList;
1404 }
1405
1406public:
1407 typedef TQMap<int,double> ExplodeFactorsMap;
1408
1409public slots:
1410 void setExplodeFactors( ExplodeFactorsMap factors ) {
1411 _explodeFactors = factors;
1412 emit changed();
1413 }
1414
1415
1416 ExplodeFactorsMap explodeFactors() const {
1417 return _explodeFactors;
1418 }
1419
1420
1421 void setExplodeFactor( double factor )
1422 {
1423 _explodeFactor = factor;
1424 emit changed();
1425 }
1426
1427 double explodeFactor() const
1428 {
1429 return _explodeFactor;
1430 }
1431
1432
1433 void setThreeDPies( bool threeDPies )
1434 {
1435 _threeDPies = threeDPies;
1436 emit changed();
1437 }
1438
1439 bool threeDPies() const
1440 {
1441 return _threeDPies;
1442 }
1443
1444
1445 void setThreeDPieHeight( int pixels )
1446 {
1447 _threeDPieHeight = pixels;
1448 emit changed();
1449 }
1450
1452 {
1453 return _threeDPieHeight;
1454 }
1455
1456 void setPieStart( int degrees )
1457 {
1458 while ( degrees < 0 )
1459 degrees += 360;
1460 while ( degrees >= 360 )
1461 degrees -= 360;
1462 _pieStart = degrees;
1463
1464 emit changed();
1465 }
1466
1467
1468 int pieStart() const
1469 {
1470 return _pieStart;
1471 }
1472
1473 void setRingStart( int degrees )
1474 {
1475 while ( degrees < 0 )
1476 degrees += 360;
1477 while ( degrees >= 360 )
1478 degrees -= 360;
1479 _ringStart = degrees;
1480
1481 emit changed();
1482 }
1483
1484
1485 int ringStart() const
1486 {
1487 return _ringStart;
1488 }
1489
1490 void setRelativeRingThickness( bool relativeThickness ) {
1491 _relativeRingThickness = relativeThickness;
1492
1493 emit changed();
1494 }
1495
1496
1498 return _relativeRingThickness;
1499 }
1500
1501 // END PIE/RING CHART-SPECIFIC
1502
1503public:
1504 // HI/LO CHART-SPECIFIC
1505 enum HiLoChartSubType { HiLoNormal, HiLoSimple = HiLoNormal,
1506 HiLoClose, HiLoOpenClose };
1507
1508public slots:
1509 void setHiLoChartSubType( HiLoChartSubType hiLoChartSubType )
1510 {
1511 _hiLoChartSubType = hiLoChartSubType;
1512 emit changed();
1513 }
1514
1516 {
1517 return _hiLoChartSubType;
1518 }
1519
1520 static TQString hiLoChartSubTypeToString( HiLoChartSubType type );
1521 static HiLoChartSubType stringToHiLoChartSubType( const TQString& string );
1522 void setHiLoChartPrintLowValues( bool active,
1523 TQFont* font = 0,
1524 int size = 14,
1525 TQColor* color = 0 );
1526
1528 {
1529 return _hiLoChartPrintLowValues;
1530 }
1531
1532
1534 {
1535 return _hiLoChartLowValuesFont;
1536 }
1537
1538
1540 {
1541 return _hiLoChartLowValuesUseFontRelSize;
1542 }
1543
1544
1546 {
1547 return _hiLoChartLowValuesFontRelSize;
1548 }
1549
1550
1552 {
1553 return _hiLoChartLowValuesColor;
1554 }
1555
1556 void setHiLoChartPrintHighValues( bool active,
1557 TQFont* font = 0,
1558 int size = 14,
1559 TQColor* color = 0 );
1560
1561
1563 {
1564 return _hiLoChartPrintHighValues;
1565 }
1566
1567
1569 {
1570 return _hiLoChartHighValuesFont;
1571 }
1572
1573
1575 {
1576 return _hiLoChartHighValuesUseFontRelSize;
1577 }
1578
1579
1581 {
1582 return _hiLoChartHighValuesFontRelSize;
1583 }
1584
1585
1587 {
1588 return _hiLoChartHighValuesColor;
1589 }
1590
1591 void setHiLoChartPrintOpenValues( bool active,
1592 TQFont* font = 0,
1593 uint size = 14,
1594 TQColor* color = 0 );
1595
1597 {
1598 return _hiLoChartPrintOpenValues;
1599 }
1600
1601
1603 {
1604 return _hiLoChartOpenValuesFont;
1605 }
1606
1607
1609 {
1610 return _hiLoChartOpenValuesUseFontRelSize;
1611 }
1612
1613
1615 {
1616 return _hiLoChartOpenValuesFontRelSize;
1617 }
1618
1619
1621 {
1622 return _hiLoChartOpenValuesColor;
1623 }
1624
1625 void setHiLoChartPrintCloseValues( bool active,
1626 TQFont* font = 0,
1627 int size = 14,
1628 TQColor* color = 0 );
1629
1631 {
1632 return _hiLoChartPrintCloseValues;
1633 }
1634
1635
1637 {
1638 return _hiLoChartCloseValuesFont;
1639 }
1640
1641
1643 {
1644 return _hiLoChartCloseValuesUseFontRelSize;
1645 }
1646
1647
1649 {
1650 return _hiLoChartCloseValuesFontRelSize;
1651 }
1652
1653
1655 {
1656 return _hiLoChartCloseValuesColor;
1657 }
1658
1659
1661 TQFont* font = 0,
1662 uint size = 14,
1663 TQColor* color = 0 )
1664 {
1665 setHiLoChartPrintOpenValues( active, font, size, color );
1666 }
1667
1669 {
1670 return hiLoChartPrintOpenValues();
1671 }
1672
1673
1675 {
1676 return hiLoChartOpenValuesFont();
1677 }
1678
1679
1681 {
1682 return hiLoChartOpenValuesUseFontRelSize();
1683 }
1684
1686 {
1687 return hiLoChartOpenValuesFontRelSize();
1688 }
1689
1691 {
1692 return hiLoChartOpenValuesColor();
1693 }
1694
1696 TQFont* font = 0,
1697 int size = 14,
1698 TQColor* color = 0 )
1699 {
1700 setHiLoChartPrintCloseValues( active, font, size, color );
1701 }
1702
1704 {
1705 return hiLoChartPrintCloseValues();
1706 }
1707
1709 {
1710 return hiLoChartCloseValuesFont();
1711 }
1712
1714 {
1715 return hiLoChartCloseValuesUseFontRelSize();
1716 }
1717
1719 {
1720 return hiLoChartCloseValuesFontRelSize();
1721 }
1722
1724 {
1725 return hiLoChartCloseValuesColor();
1726 }
1727
1728
1729 // END HI/LO CHART-SPECIFIC
1730
1731
1732public:
1733 // BOX WHISKER CHART-SPECIFIC
1734 enum BWChartSubType { BWNormal, BWSimple = BWNormal };
1735
1736 enum BWStatVal { BWStatValSTART,
1737 UpperOuterFence = BWStatValSTART, // first value stored in array
1738 UpperInnerFence,
1739 Quartile3,
1740 Median,
1741 Quartile1,
1742 LowerInnerFence,
1743 LowerOuterFence,
1744 MaxValue,
1745 MeanValue,
1746 MinValue,
1747 BWStatValEND = MinValue, // last value stored in array
1748 // extra values - not stored in the array:
1749 BWStatValOffEndValue, // the number of array values
1750 BWStatValALL, // special flag reprsenting *all* array values
1751 BWStatValUNKNOWN }; // to be returned when value is undefined
1752public slots:
1753
1754 void setBWChartSubType( BWChartSubType bWChartSubType )
1755 {
1756 _BWChartSubType = bWChartSubType;
1757 emit changed();
1758 }
1759
1761 {
1762 return _BWChartSubType;
1763 }
1764
1765 static TQString bWChartSubTypeToString( BWChartSubType type );
1766 static BWChartSubType stringToBWChartSubType( const TQString& string );
1767 static TQString bWChartStatValToString( BWStatVal type );
1768 static BWStatVal stringToBWChartStatVal( const TQString& string );
1769
1770 void setBWChartFences( double upperInner, double lowerInner,
1771 double upperOuter, double lowerOuter );
1772 void bWChartFences( double& upperInner, double& lowerInner,
1773 double& upperOuter, double& lowerOuter ) const;
1774
1775 void setBWChartBrush( const TQBrush& bWChartBrush )
1776 {
1777 _BWChartBrush = bWChartBrush;
1778 emit changed();
1779 }
1780
1781 TQBrush bWChartBrush() const
1782 {
1783 return _BWChartBrush;
1784 }
1785
1787 {
1788 _BWChartOutValMarkerSize = size;
1789 }
1790
1791
1793 {
1794 return _BWChartOutValMarkerSize;
1795 }
1796
1797 void setBWChartPrintStatistics( BWStatVal statValue,
1798 bool active,
1799 TQFont* font = 0,
1800 int size = 24,
1801 TQColor* color = 0,
1802 TQBrush* brush = 0 );
1803
1804 bool bWChartPrintStatistics( BWStatVal statValue ) const
1805 {
1806 return _BWChartStatistics[ statValue ].active;
1807 }
1808
1809
1810 TQFont bWChartStatisticsFont( BWStatVal statValue ) const
1811 {
1812 return _BWChartStatistics[ statValue ].font;
1813 }
1814
1815
1817 {
1818 return _BWChartStatistics[ statValue ].useRelSize;
1819 }
1820
1821
1823 {
1824 return _BWChartStatistics[ statValue ].relSize;
1825 }
1826
1827
1828 TQColor bWChartStatisticsColor( BWStatVal statValue ) const
1829 {
1830 return _BWChartStatistics[ statValue ].color;
1831 }
1832
1833 TQBrush bWChartStatisticsBrush( BWStatVal statValue ) const
1834 {
1835 return _BWChartStatistics[ statValue ].brush;
1836 }
1837
1838
1839public:
1840 // LEGENDS
1841
1842 enum LegendPosition { NoLegend, LegendTop, LegendBottom,
1843 LegendLeft, LegendRight,
1844 LegendTopLeft,
1845 LegendTopLeftTop,
1846 LegendTopLeftLeft,
1847 LegendTopRight,
1848 LegendTopRightTop,
1849 LegendTopRightRight,
1850 LegendBottomLeft,
1851 LegendBottomLeftBottom,
1852 LegendBottomLeftLeft,
1853 LegendBottomRight,
1854 LegendBottomRightBottom,
1855 LegendBottomRightRight
1856 };
1857
1858public slots:
1860 {
1861 _legendPosition = position;
1862 emit changed();
1863 }
1864
1866 {
1867 return _legendPosition;
1868 }
1869
1870 void setLegendOrientation( TQt::Orientation orientation )
1871 {
1872 _legendOrientation = orientation;
1873 emit changed();
1874 }
1875
1876 TQt::Orientation legendOrientation() const
1877 {
1878 return _legendOrientation;
1879 }
1880
1881
1882 void setLegendShowLines( bool legendShowLines )
1883 {
1884 _legendShowLines = legendShowLines;
1885 emit changed();
1886 }
1887
1888 bool legendShowLines() const
1889 {
1890 return _legendShowLines;
1891 }
1892
1893
1894 static TQString legendPositionToString( LegendPosition pos );
1895 static LegendPosition stringToLegendPosition( const TQString& string );
1896
1897public:
1898 enum LegendSource { LegendManual, LegendFirstColumn, LegendAutomatic };
1899
1900public slots:
1902 {
1903 _legendSource = source;
1904 emit changed();
1905 }
1906
1908 {
1909 return _legendSource;
1910 }
1911
1912 static TQString legendSourceToString( LegendSource source );
1913 static LegendSource stringToLegendSource( const TQString& string );
1914
1915 void setLegendText( uint dataset, const TQString& text )
1916 {
1917 _legendText[ dataset ] = text;
1918 emit changed();
1919 }
1920
1921 TQString legendText( uint dataset ) const
1922 {
1923 if( _legendText.find( dataset ) != _legendText.end() )
1924 return _legendText[ dataset ];
1925 else
1926 return TQString();
1927 }
1928
1929
1930 void setLegendTextColor( const TQColor& color )
1931 {
1932 _legendTextColor = color;
1933 emit changed();
1934 }
1935
1936
1937 TQColor legendTextColor() const
1938 {
1939 return _legendTextColor;
1940 }
1941
1942
1943 void setLegendFont( const TQFont& font, bool useFontSize )
1944 {
1945 _legendFont = font;
1946 _legendFontUseRelSize = ! useFontSize;
1947 emit changed();
1948 }
1949
1950 TQFont legendFont() const
1951 {
1952 return _legendFont;
1953 }
1954
1955
1956 void setLegendFontUseRelSize( bool legendFontUseRelSize )
1957 {
1958 _legendFontUseRelSize = legendFontUseRelSize;
1959 emit changed();
1960 }
1961
1963 {
1964 return _legendFontUseRelSize;
1965 }
1966
1967 void setLegendFontRelSize( int legendFontRelSize )
1968 {
1969 _legendFontRelSize = legendFontRelSize;
1970 emit changed();
1971 }
1972
1974 {
1975 return _legendFontRelSize;
1976 }
1977
1978
1979 void setLegendTitleText( const TQString& text )
1980 {
1981 _legendTitleText = text;
1982 emit changed();
1983 }
1984
1985
1986 TQString legendTitleText() const
1987 {
1988 return _legendTitleText;
1989 }
1990
1991
1992 void setLegendTitleTextColor( const TQColor& color )
1993 {
1994 _legendTitleTextColor = color;
1995 emit changed();
1996 }
1997
1998
1999 TQColor legendTitleTextColor() const
2000 {
2001 return _legendTitleTextColor;
2002 }
2003
2004
2005
2006 void setLegendTitleFont( const TQFont& font, bool useFontSize )
2007 {
2008 _legendTitleFont = font;
2009 _legendTitleFontUseRelSize = ! useFontSize;
2010 emit changed();
2011 }
2012
2013 TQFont legendTitleFont() const
2014 {
2015 return _legendTitleFont;
2016 }
2017
2018
2019 void setLegendTitleFontUseRelSize( bool legendTitleFontUseRelSize )
2020 {
2021 _legendTitleFontUseRelSize = legendTitleFontUseRelSize;
2022 emit changed();
2023 }
2024
2026 {
2027 return _legendTitleFontUseRelSize;
2028 }
2029
2030 void setLegendTitleFontRelSize( int legendTitleFontRelSize )
2031 {
2032 _legendTitleFontRelSize = legendTitleFontRelSize;
2033 emit changed();
2034 }
2035
2037 {
2038 return _legendTitleFontRelSize;
2039 }
2040
2041
2042 void setLegendSpacing( uint space )
2043 {
2044 _legendSpacing = space;
2045 }
2046
2047
2048 uint legendSpacing() const
2049 {
2050 return _legendSpacing;
2051 }
2052
2053 // END LEGENDS
2054
2055
2056
2057 // AXES
2058
2059 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
2060 void setAxisType( uint n, const KDChartAxisParams::AxisType axisType )
2061 {
2062 if ( n < KDCHART_MAX_AXES ) {
2063 _axisSettings[ n ].params.setAxisType( axisType );
2064 emit changed();
2065 }
2066 }
2067
2068 void setAxisVisible( uint n,
2069 const bool axisVisible )
2070 {
2071 if ( n < KDCHART_MAX_AXES ) {
2072 _axisSettings[ n ].params.setAxisVisible( axisVisible );
2073 emit changed();
2074 }
2075 }
2076
2077 bool axisVisible( uint n ) const
2078 {
2079 return n < KDCHART_MAX_AXES ? _axisSettings[ n ].params.axisVisible()
2080 : false;
2081 }
2082
2083 void setAxisShowGrid( uint n,
2084 bool axisShowGrid );
2085 bool showGrid() const;
2086 void setAxisDatasets( uint n,
2087 uint dataset,
2088 uint dataset2 = KDCHART_NO_DATASET,
2089 uint chart = 0 );
2090 bool axisDatasets( uint n,
2091 uint& dataset,
2092 uint& dataset2,
2093 uint& chart ) const;
2094
2095public:
2096 typedef TQValueVector<uint> AxesArray;
2097
2098public slots:
2099 bool chartAxes( uint chart, uint& cnt, AxesArray& axes ) const;
2100
2101 void setAxisArea( const uint n, const TQRect& areaRect )
2102 {
2103 if ( n < KDCHART_MAX_AXES ) {
2104 _axisSettings[ n ].params.setAxisTrueAreaRect( areaRect );
2105 // Do not do emit changed() here!
2106 }
2107 }
2108
2109 void setAxisLabelsTouchEdges( uint n, bool axisLabelsTouchEdges )
2110 {
2111 _axisSettings[ n ].params.setAxisLabelsTouchEdges(
2112 axisLabelsTouchEdges );
2113 emit changed();
2114 }
2115
2117 bool axisLabelsVisible )
2118 {
2119 if ( n < KDCHART_MAX_AXES )
2120 _axisSettings[ n ].params.setAxisLabelsVisible( axisLabelsVisible );
2121 }
2122
2123 void setAxisLabelsFont( uint n,
2124 TQFont axisLabelsFont,
2125 int axisLabelsFontSize = 0,
2126 TQColor axisLabelsColor = TQt::black );
2127
2128 // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
2130 bool axisSteadyValueCalc = true,
2131 TQVariant axisValueStart = KDCHART_AXIS_LABELS_AUTO_LIMIT,
2132 TQVariant axisValueEnd = KDCHART_AXIS_LABELS_AUTO_LIMIT,
2133 double axisValueDelta = KDCHART_AXIS_LABELS_AUTO_DELTA,
2134 int axisDigitsBehindComma = KDCHART_AXIS_LABELS_AUTO_DIGITS,
2135 int axisMaxEmptyInnerSpan = 67,
2136 KDChartAxisParams::LabelsFromDataRow takeLabelsFromDataRow
2137 = KDChartAxisParams::LabelsFromDataRowNo,
2138 int labelTextsDataRow = 0,
2139 TQStringList* axisLabelStringList = 0,
2140 TQStringList* axisShortLabelsStringList = 0,
2141 int axisValueLeaveOut = KDCHART_AXIS_LABELS_AUTO_LEAVEOUT,
2142 KDChartAxisParams::ValueScale axisValueDeltaScale = KDChartAxisParams::ValueScaleNumerical )
2143 {
2144 _axisSettings[ n ].params.setAxisValues(
2145 axisSteadyValueCalc,
2146 axisValueStart,
2147 axisValueEnd,
2148 axisValueDelta,
2149 axisDigitsBehindComma,
2150 axisMaxEmptyInnerSpan,
2151 takeLabelsFromDataRow,
2152 labelTextsDataRow,
2153 axisLabelStringList,
2154 axisShortLabelsStringList,
2155 axisValueLeaveOut,
2156 axisValueDeltaScale );
2157 emit changed();
2158 }
2159
2160
2161 void setAxisLabelStringParams( uint n,
2162 TQStringList* axisLabelStringList,
2163 TQStringList* axisShortLabelStringList,
2164 const TQString& valueStart = TQString(),
2165 const TQString& valueEnd = TQString() );
2166
2167
2168 void setAxisParams( uint n,
2169 const KDChartAxisParams& axisParams );
2170
2171 const KDChartAxisParams& axisParams( uint n ) const
2172 {
2173 return n < KDCHART_MAX_AXES ? _axisSettings[ n ].params
2174 : _axisSettings[ KDCHART_MAX_AXES ].params;
2175 }
2176
2177 // some convenience functions refering to the first KDChartCustomBox
2178 // that is anchored to the axis n.
2179 bool findFirstAxisCustomBoxID( uint n, uint& boxID ) const;
2180 void setAxisTitle( uint n, const TQString& axisTitle );
2181
2182 TQString axisTitle( uint n ) const;
2183 void setAxisTitleColor( uint n, TQColor axisTitleColor );
2184 TQColor axisTitleColor( uint n ) const;
2185 void setAxisTitleFont( uint n, TQFont axisTitleFont );
2186 void setAxisTitleFont( uint n, TQFont axisTitleFont, bool useFixedFontSize );
2187 TQFont axisTitleFont( uint n ) const;
2188 void setAxisTitleFontUseRelSize( uint n, bool useRelSize );
2189 bool axisTitleFontUseRelSize( uint n ) const;
2190 void setAxisTitleFontRelSize( uint n, int axisTitleFontRelSize );
2191 int axisTitleFontRelSize( uint n ) const;
2192
2193 TQRect axisArea( const uint n ) const
2194 {
2195 if ( n < KDCHART_MAX_AXES ) {
2196 return _axisSettings[ n ].params.axisTrueAreaRect();
2197 // Do not do emit changed() here!
2198 }else{
2199 return TQRect(TQPoint(0,0),TQSize(0,0));
2200 }
2201 }
2202 // END AXES
2203
2204
2205
2206 TQRect dataArea() const { return _dataAreaRect; }
2207 TQRect legendArea() const { return _legendAreaRect; }
2208
2209
2210
2211 // HEADERS/FOOTERS
2212
2213public:
2214
2215 /*
2216 READ before changing/enhancing the following enum
2217 =================================================
2218
2219 Please note: The following enum is made in a way that
2220 sections with smaller Y values come first.
2221 Thus one can construct a loop itterating over theHdFtPos values
2222 and so going from the top of the screen toiwards the bottom...
2223
2224 Also please note that extending this enum shound NOT break the
2225 tripple groups (numbers 0/1/2, 3/4/5, and 6/7/8) since the
2226 algorithms in
2227 KDChartPainter::setupGeometry() and
2228 KDChartPainter::paintHeaderFooter() rely on this schema.
2229 Also don't forget to always update the auxiliary values
2230 HdFtPosSTART, HdFtPosHeadersSTART,
2231 HdFtPosHeadersEND, HdFtPosFootersSTART,
2232 HdFtPosFootersEND, and HdFtPosEND muessen - these are used
2233 fpr other itarators...
2234 */
2235 enum HdFtPos{ // start of all sections
2236 HdFtPosSTART = 0,
2237
2238 // headers:
2239 HdFtPosHeadersSTART = 0,
2240 // top-most headers
2241 HdFtPosHeaders0START = 0,
2242 HdFtPosHeader0 = 0,
2243 HdFtPosHeader0L = 1,
2244 HdFtPosHeader0R = 2,
2245 HdFtPosHeaders0END = 2,
2246 // normal ( == middle ) headers
2247 HdFtPosHeaders1START = 3,
2248 HdFtPosHeader = 3, // center
2249 HdFtPosHeaderL = 4, // left
2250 HdFtPosHeaderR = 5, // right
2251 HdFtPosHeaders1END = 5,
2252 // bottom headers
2253 HdFtPosHeaders2START = 6,
2254 HdFtPosHeader2 = 6,
2255 HdFtPosHeader2L = 7,
2256 HdFtPosHeader2R = 8,
2257 HdFtPosHeaders2END = 8,
2258
2259 HdFtPosHeadersEND = 8,
2260
2261 // footers:
2262 HdFtPosFootersSTART = 9,
2263 // normal ( == middle ) footers
2264 HdFtPosFooters1START = 9,
2265 HdFtPosFooter = 9,
2266 HdFtPosFooterL = 10,
2267 HdFtPosFooterR = 11,
2268 HdFtPosFooters1END = 11,
2269 // bottom footers
2270 HdFtPosFooters2START = 12,
2271 HdFtPosFooter2 = 12,
2272 HdFtPosFooter2L = 13,
2273 HdFtPosFooter2R = 14,
2274 HdFtPosFooters2END = 14,
2275 // top-most footers
2276 HdFtPosFooters0START = 15,
2277 HdFtPosFooter0 = 15,
2278 HdFtPosFooter0L = 16,
2279 HdFtPosFooter0R = 17,
2280 HdFtPosFooters0END = 17,
2281
2282 HdFtPosFootersEND = 17,
2283
2284 HdFtPosEND = 17 };
2285
2286public slots:
2287
2288 void setHeaderFooterText( uint pos, const TQString& text );
2289 TQString headerFooterText( uint pos ) const;
2290 const TQRect& headerFooterRect( uint pos ) const;
2291 void setHeaderFooterColor( uint pos, const TQColor color );
2292 TQColor headerFooterColor( uint pos ) const;
2293 void setHeaderFooterFont( uint pos, const TQFont& font,
2294 bool fontUseRelSize,
2295 int fontRelSize );
2296 TQFont headerFooterFont( uint pos ) const;
2297 bool headerFooterFontUseRelSize( uint pos ) const;
2298 int headerFooterFontRelSize( uint pos ) const;
2299
2300
2301 // quick&dirty functions: access Header, Header2 and Footer
2302 // without having to specify the HdFtPos
2303 //
2304 // This may be convenient for specifying simple charts with
2305 // up to two centered header(s) and up to one centered footer.
2306
2307
2308 void setHeader1Text( const TQString& text )
2309 {
2310 _hdFtParams[ HdFtPosHeader ]._text = text;
2311 emit changed();
2312 }
2313
2314
2315 TQString header1Text() const
2316 {
2317 return _hdFtParams[ HdFtPosHeader ]._text;
2318 }
2319
2320 void setHeader1Font( const TQFont& font )
2321 {
2322 _hdFtParams[ HdFtPosHeader ]._font = font;
2323 emit changed();
2324 }
2325
2326
2327 TQFont header1Font() const
2328 {
2329 return _hdFtParams[ HdFtPosHeader ]._font;
2330 }
2331
2332 void setHeader2Text( const TQString& text )
2333 {
2334 _hdFtParams[ HdFtPosHeader2 ]._text = text;
2335 emit changed();
2336 }
2337
2338
2339 TQString header2Text() const
2340 {
2341 return _hdFtParams[ HdFtPosHeader2 ]._text;
2342 }
2343
2344 void setHeader2Font( const TQFont& font )
2345 {
2346 _hdFtParams[ HdFtPosHeader2 ]._font = font;
2347 emit changed();
2348 }
2349
2350
2351 TQFont header2Font() const
2352 {
2353 return _hdFtParams[ HdFtPosHeader2 ]._font;
2354 }
2355
2356
2357
2358 void setFooterText( const TQString& text )
2359 {
2360 _hdFtParams[ HdFtPosFooter ]._text = text;
2361 emit changed();
2362 }
2363
2364
2365 TQString footerText() const
2366 {
2367 return _hdFtParams[ HdFtPosFooter ]._text;
2368 }
2369
2370 void setFooterFont( const TQFont& font )
2371 {
2372 _hdFtParams[ HdFtPosFooter ]._font = font;
2373 emit changed();
2374 }
2375
2376
2377 TQFont footerFont() const
2378 {
2379 return _hdFtParams[ HdFtPosFooter ]._font;
2380 }
2381
2382
2386 void __internalStoreHdFtRect( int pos, TQRect rect )
2387 {
2388 if ( 0 <= pos && HdFtPosEND >= pos )
2389 _hdFtParams[ pos ].setRect( rect );
2390 }
2391
2392
2393 // END HEADERS/FOOTERS
2394
2395
2396
2397public:
2398 KDChartParams();
2399 virtual ~KDChartParams();
2400
2401public slots:
2402 void loadAxesFormXML(int& curAxisSettings, TQDomElement& element);
2403 bool loadXML( const TQDomDocument& doc );
2404
2405 void saveAxesToXML(TQDomDocument& doc, TQDomElement& docRoot) const;
2406 TQDomDocument saveXML( bool withPI = true ) const;
2407
2408public:
2409 friend TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
2410 friend TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
2411
2412public slots:
2413 static void createChartValueNode( TQDomDocument& doc, TQDomNode& parent,
2414 const TQString& elementName,
2415 const TQVariant& valY,
2416 const TQVariant& valX,
2417 const int& propID );
2418 static void createColorMapNode( TQDomDocument& doc, TQDomNode& parent,
2419 const TQString& elementName,
2420 const TQMap< uint, TQColor >& map );
2421 static void createDoubleMapNode( TQDomDocument& doc, TQDomNode& parent,
2422 const TQString& elementName,
2423 const TQMap< int, double >& map );
2424 static void createChartFontNode( TQDomDocument& doc, TQDomNode& parent,
2425 const TQString& elementName,
2426 const TQFont& font, bool useRelFont,
2427 int relFont,
2428 int minFont=-1 );
2429 static bool readColorMapNode( const TQDomElement& element,
2430 TQMap<uint,TQColor>* map );
2431 static bool readDoubleMapNode( const TQDomElement& element,
2432 TQMap<int,double>* map );
2433 static bool readChartFontNode( const TQDomElement& element, TQFont& font,
2434 bool& useRelFont, int& relFontSize,
2435 int* minFontSize=0 );
2436 static bool readChartValueNode( const TQDomElement& element,
2437 TQVariant& valY,
2438 TQVariant& valX,
2439 int& propID );
2440
2441
2442 // do *not* call this function manually: it is used by KDChartPainter::setupGeometry()
2443 void setDataArea( const TQRect& areaRect )
2444 {
2445 _dataAreaRect = areaRect;
2446 // Do not do emit changed() here!
2447 }
2448 // do *not* call this function manually: it is used by KDChartPainter::setupGeometry()
2449 void setLegendArea( const TQRect& areaRect )
2450 {
2451 _legendAreaRect = areaRect;
2452 // Do not do emit changed() here!
2453 }
2454
2455
2456signals:
2457 void changed();
2458
2459
2460protected:
2461 void setBarsDisplayed( int barsDisplayed )
2462 {
2463 _barsDisplayed = barsDisplayed;
2464 }
2465 void setBarsLeft( int barsLeft )
2466 {
2467 _barsLeft = barsLeft;
2468 }
2469
2470
2471private:
2472 TQString dataRegionFrameAreaName( uint dataRow,
2473 uint dataCol,
2474 uint data3rd );
2475 void recomputeShadowColors();
2476 void insertDefaultAxisTitleBox( uint n,
2477 bool setTitle, const TQString& axisTitle,
2478 bool setColor, const TQColor& axisTitleColor,
2479 bool setFont, const TQFont& axisTitleFont,
2480 bool setFontUseRel, bool useFontSize,
2481 bool setFontRelSize, int axisTitleFontRelSize );
2482
2483 static TQColor _internalPointer_DataValueAutoColor;
2484
2485 KDChartPropertySet* tempPropSetA;
2486 KDChartPropertySet* tempPropSetB;
2487
2488 bool _optimizeOutputForScreen;
2489 int _globalLeadingLeft;
2490 int _globalLeadingTop;
2491 int _globalLeadingRight;
2492 int _globalLeadingBottom;
2493 ChartType _chartType;
2494 ChartType _additionalChartType;
2495 int _numValues;
2496 TQFont _defaultFont;
2497
2498 typedef TQDict < KDChartFrameSettings > AreaDict;
2499 AreaDict _areaDict;
2500
2501 CustomBoxDict _customBoxDict;
2502 bool _customBoxDictMayContainHoles;
2503 TQRect _noRect;
2504 KDFrame _noFrame;
2505
2506 KDChartFrameSettings _noFrameSettings;
2507
2508 class ModeAndChart
2509 {
2510 public:
2511 ModeAndChart()
2512 : _mode( UnknownMode ), _chart( KDCHART_NO_CHART )
2513 {}
2514 ModeAndChart( SourceMode mode, uint chart )
2515 : _mode( mode ), _chart( chart )
2516 {}
2517
2518 SourceMode mode() const
2519 {
2520 return _mode;
2521 };
2522 uint chart() const
2523 {
2524 return _chart;
2525 };
2526
2527 void setMode( SourceMode mode )
2528 {
2529 _mode = mode;
2530 };
2531 void setChart( uint chart )
2532 {
2533 _chart = chart;
2534 };
2535 private:
2536 SourceMode _mode;
2537 uint _chart;
2538 };
2539
2540 typedef TQMap < uint, ModeAndChart > ModeAndChartMap;
2541 ModeAndChartMap _dataSourceModeAndChart;
2542 bool _setChartSourceModeWasUsed;
2543 TQMap < uint, TQColor > _dataColors;
2544 uint _maxDatasetSourceMode;
2545 KDChartPropertySetList _propertySetList;
2546 double _shadowBrightnessFactor;
2547 TQt::BrushStyle _shadowPattern;
2548 bool _threeDShadowColors;
2549 uint _maxDatasetColor;
2550 TQMap < uint, TQColor > _dataColorsShadow1;
2551 TQMap < uint, TQColor > _dataColorsShadow2;
2552 TQColor _outlineDataColor;
2553 uint _outlineDataLineWidth;
2554 TQt::PenStyle _outlineDataLineStyle;
2555
2556
2557 struct PrintDataValuesSettings {
2558 bool _printDataValues;
2559 int _divPow10;
2560 int _digitsBehindComma;
2561 TQFont _dataValuesFont;
2562 bool _dataValuesUseFontRelSize;
2563 int _dataValuesFontRelSize;
2564 TQColor _dataValuesColor;
2565 TQBrush _dataValuesBrush;
2566 bool _dataValuesAutoColor;
2567 KDChartEnums::PositionFlag _dataValuesAnchorNegativePosition;
2568 uint _dataValuesAnchorNegativeAlign;
2569 int _dataValuesAnchorNegativeDeltaX;
2570 int _dataValuesAnchorNegativeDeltaY;
2571 int _dataValuesNegativeRotation;
2572 KDChartEnums::PositionFlag _dataValuesAnchorPositivePosition;
2573 uint _dataValuesAnchorPositiveAlign;
2574 int _dataValuesAnchorPositiveDeltaX;
2575 int _dataValuesAnchorPositiveDeltaY;
2576 int _dataValuesPositiveRotation;
2577 KDChartEnums::TextLayoutPolicy _dataValuesLayoutPolicy;
2578 bool _dataValuesShowInfinite;
2579
2580 bool _useDefaultFontParams; // internal flag, do NOT store it!
2581 };
2582 PrintDataValuesSettings _printDataValuesSettings;
2583 PrintDataValuesSettings _printDataValuesSettings2;
2584
2585 bool _allowOverlappingDataValueTexts;
2586 BarChartSubType _barChartSubType;
2587 bool _threeDBars;
2588 int _threeDBarAngle;
2589 double _threeDBarDepth;
2590 double _cosThreeDBarAngle;
2591 int _datasetGap;
2592 bool _datasetGapIsRelative;
2593 int _valueBlockGap;
2594 bool _valueBlockGapIsRelative;
2595 int _barWidth;
2596 int _userWidth;
2597 bool _solidExcessArrows;
2598 // volatile bar chart information, not saved in the stream
2599 TQRect _dataAreaRect;
2600 TQRect _legendAreaRect;
2601 int _barsDisplayed;
2602 int _barsLeft;
2603
2604 // LINES/AREAS-specific
2605 LineChartSubType _lineChartSubType;
2606 bool _threeDLines;
2607 int _threeDLineDepth;
2608 int _threeDLineXRotation;
2609 int _threeDLineYRotation;
2610 bool _lineMarker;
2611 LineMarkerStyleMap _lineMarkerStyles;
2612 uint _maxDatasetLineMarkerStyle;
2613 TQSize _lineMarkerSize;
2614 TQColor _lineColor;
2615 int _lineWidth;
2616 TQt::PenStyle _lineStyle;
2617 typedef TQMap<uint, TQt::PenStyle> LineStyleMap;
2618 LineStyleMap _datasetLineStyles;
2619 AreaChartSubType _areaChartSubType;
2620 AreaLocation _areaLocation;
2621
2622
2623 // POLAR-specific
2624 PolarChartSubType _polarChartSubType;
2625 bool _polarMarker;
2626 PolarMarkerStyleMap _polarMarkerStyles;
2627 uint _maxDatasetPolarMarkerStyle;
2628 TQSize _polarMarkerSize;
2629 int _polarLineWidth;
2630 int _polarZeroDegreePos;
2631 bool _polarRotateCircularLabels;
2632 struct _polarDelimsAndLabelStruct {
2633 bool showDelimiters;
2634 bool showLabels;
2635 };
2636 _polarDelimsAndLabelStruct _polarDelimsAndLabels[ 1 + KDCHART_MAX_POLAR_DELIMS_AND_LABELS_POS ];
2637
2638
2639
2640 // PIES/RINGS
2641 bool _explode;
2642 double _explodeFactor;
2643 ExplodeFactorsMap _explodeFactors;
2644 TQValueList<int> _explodeList;
2645 bool _threeDPies;
2646 int _threeDPieHeight;
2647 int _pieStart;
2648 int _ringStart;
2649 bool _relativeRingThickness;
2650
2651
2652 // HI-LO CHARTS
2653
2654 HiLoChartSubType _hiLoChartSubType;
2655 bool _hiLoChartPrintLowValues;
2656 TQFont _hiLoChartLowValuesFont;
2657 bool _hiLoChartLowValuesUseFontRelSize;
2658 int _hiLoChartLowValuesFontRelSize;
2659 TQColor _hiLoChartLowValuesColor;
2660 bool _hiLoChartPrintHighValues;
2661 TQFont _hiLoChartHighValuesFont;
2662 bool _hiLoChartHighValuesUseFontRelSize;
2663 int _hiLoChartHighValuesFontRelSize;
2664 TQColor _hiLoChartHighValuesColor;
2665 bool _hiLoChartPrintOpenValues;
2666 TQFont _hiLoChartOpenValuesFont;
2667 bool _hiLoChartOpenValuesUseFontRelSize;
2668 int _hiLoChartOpenValuesFontRelSize;
2669 TQColor _hiLoChartOpenValuesColor;
2670 bool _hiLoChartPrintCloseValues;
2671 TQFont _hiLoChartCloseValuesFont;
2672 bool _hiLoChartCloseValuesUseFontRelSize;
2673 int _hiLoChartCloseValuesFontRelSize;
2674 TQColor _hiLoChartCloseValuesColor;
2675
2676
2677
2678 // BOX AND WHISKER CHARTS
2679
2680 BWChartSubType _BWChartSubType;
2681
2682 struct BWChartStatistics {
2683 double value;
2684 int y;
2685 bool active;
2686 TQFont font;
2687 bool useRelSize;
2688 int relSize;
2689 TQColor color;
2690 TQBrush brush;
2691 };
2692 BWChartStatistics _BWChartStatistics[ BWStatValOffEndValue ];
2693 double _BWChartFenceUpperInner;
2694 double _BWChartFenceLowerInner;
2695 double _BWChartFenceUpperOuter;
2696 double _BWChartFenceLowerOuter;
2697 int _BWChartOutValMarkerSize;
2698 TQBrush _BWChartBrush;
2699
2700
2701 // LEGENDS
2702
2703 LegendPosition _legendPosition;
2704 TQt::Orientation _legendOrientation;
2705 bool _legendShowLines;
2706 LegendSource _legendSource;
2707 TQMap < int, TQString > _legendText;
2708 TQColor _legendTextColor;
2709 TQFont _legendFont;
2710 bool _legendFontUseRelSize;
2711 int _legendFontRelSize;
2712 TQString _legendTitleText;
2713 TQColor _legendTitleTextColor;
2714 TQFont _legendTitleFont;
2715 bool _legendTitleFontUseRelSize;
2716 int _legendTitleFontRelSize;
2717 uint _legendSpacing;
2718
2719
2720 // AXES (private)
2721 // Must be exported because of the inline methods
2722 struct KDCHART_EXPORT AxisSettings
2723 {
2724 uint dataset;
2725 uint dataset2;
2726 uint chart;
2727 KDChartAxisParams params;
2728 AxisSettings()
2729 {
2730 dataset = KDCHART_NO_DATASET;
2731 dataset2 = KDCHART_NO_DATASET;
2732 chart = KDCHART_NO_CHART;
2733 }
2734 };
2735
2736 // 13 == KDCHART_MAX_AXES + 1
2737 AxisSettings _axisSettings[ 13 ];
2738 // END AXES (private)
2739
2740
2741 // HEADER/FOOTER (private)
2742 // Must be exported because of the inline methods
2743 struct KDCHART_EXPORT HdFtParams
2744 {
2745 TQString _text;
2746 TQColor _color;
2747 TQFont _font;
2748 bool _fontUseRelSize;
2749 int _fontRelSize;
2750 HdFtParams()
2751 {
2752 _color = TQColor( TQt::black );
2753 _font = TQFont( "helvetica", 10, TQFont::Normal, false );
2754 _fontUseRelSize = true;
2755 _fontRelSize = 8; // per default quite small
2756 }
2757 void setRect( TQRect rect )
2758 {
2759 _rect = rect;
2760 }
2761 const TQRect& rect() const
2762 {
2763 return _rect;
2764 }
2765 private:
2766 // temporary data that are NOT to be stored within sessions:
2767 TQRect _rect;
2768 };
2769
2770 HdFtParams _hdFtParams[ HdFtPosEND + 1 ];
2771 // END HEADER/FOOTER (private)
2772};
2773
2774
2775TQTextStream& operator<<( TQTextStream& s, const KDChartParams& p );
2776
2777
2778TQTextStream& operator>>( TQTextStream& s, KDChartParams& p );
2779
2780
2781#endif
Provide access to the chart axis parameters.
#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_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 a class for specifying and drawing custom boxes.
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.
#define KDCHART_MAX_AXES
Charts have up to 12 axes: up to two axes on both sides for X, Y and Z (if data is 3-dimensional).
TQTextStream & operator<<(TQTextStream &s, const KDChartParams &p)
Writes the KDChartParams object p as an XML document to the text stream s.
Property settings of a single KDChart data cell.
Header of the KDFrame class providing highly configurable rectangular frame drawing.
access the chart axis parameters.
Class for specifying and drawing custom boxes.
TextLayoutPolicy
Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighborin...
PositionFlag
The general position flag to specify a point of an area, for example this could be the anchor point w...
Stores the frame settings for one of the chart areas:
int innerGapX() const
Return the X-distance between the frame and the inner area.
int outerGapX() const
Return the X-distance between the frame and the surrounding parts of the chart.
int outerGapY() const
Return the Y-distance between the frame and the surrounding parts of the chart.
const KDFrame & frame() const
Return the KDFrame object used for drawing this areas frame.
int innerGapY() const
Return the Y-distance between the frame and the inner area.
bool addFrameHeightToLayout() const
Return whether the inner area will shrink the area AND its frame will occupy the same space of the ch...
bool addFrameWidthToLayout() const
Return whether the inner area will shrink the area AND its frame will occupy the same space of the ch...
Bundles the display parameters of a chart.
int threeDPieHeight() const
Returns the height of the 3D effect for pies in pixels.
bool hiLoChartLowValuesUseFontRelSize() const
Returns whether the font size to be used for printing the low values is calculated dynamically.
TQColor lineColor() const
Returns the color of the lines in line charts.
void setPieStart(int degrees)
Specifies the starting point of the pie circle.
int bWChartOutValMarkerSize() const
Returns how big outlier markers (representing the values outside the inner fences) will be drawn.
void setLegendOrientation(TQt::Orientation orientation)
Specifies how the legend should be printed.
void setAreaChartSubType(AreaChartSubType areaChartSubType)
Specifies the area chart subtype.
bool printDataValues(uint chart) const
Returns whether the data values will be printed near their respective entries.
void setPolarMarkerSize(TQSize size=TQSize(-40, -40))
Specifies the sizes of polar markers.
bool dataValuesAutoColor(uint chart) const
Returns whether the font to be used for printing the data values texts shall have automatically calcu...
ExplodeFactorsMap explodeFactors() const
Returns the list of explode factors.
void setHiLoChartPrintLastValues(bool active, TQFont *font=0, int size=14, TQColor *color=0)
TQString legendTitleText() const
Returns the text that is shown as the title of the legend.
TQColor outlineDataColor() const
Returns the color for the outlines of data displays.
TQSize lineMarkerSize() const
Returns the sizes of line markers.
TQSize polarMarkerSize() const
Returns the sizes of polar markers.
int datasetGap() const
Returns the number of pixels between two dataset values.
bool neverUsedSetChartSourceMode() const
Retrieves whether setChartSourceMode() was called or not.
TQColor dataValuesColor(uint chart) const
Returns the colour of the font to be used for printing the data values.
bool drawSolidExcessArrows() const
Returns whether arrows showing excess values in bar charts should be drawn solidly or split.
int bWChartStatisticsFontRelSize(BWStatVal statValue) const
Returns the relative size (in per mille of the chart width) of the font to be used for printing the r...
int globalLeadingLeft() const
Return the distance between the chart and the left border of the painter area.
double threeDBarDepth() const
Returns the depth of the 3D Effect used for 3D bars.
TQBrush bWChartBrush() const
Returns the brush to be used to fill the BoxWhisker charts.
bool dataValuesUseFontRelSize(uint chart) const
Returns whether the font size to be used for printing the data values is calculated dynamically.
BarChartSubType
The bar subtype.
void setLineMarkerSize(TQSize size)
Specifies the sizes of line markers.
PolarMarkerStyleMap polarMarkerStyles() const
Returns the whole map of polar marker styles.
bool axisVisible(uint n) const
Returns if the axis will be drawn.
TQColor legendTextColor() const
Returns the color in which the legend texts are drawn.
void setGlobalLeadingRight(int leading)
Specifies the distance between the chart and the right border of the painter area.
TQRect dataArea() const
Returns the true data area rectangle as it was was calculate by KD Chart.
void setLegendFontUseRelSize(bool legendFontUseRelSize)
Specifies whether the legend shall be drawn using relative font size.
TQRect axisArea(const uint n) const
Returns the true axis area rectangle as it was was calculate by KD Chart.
void setValueBlockGap(int gap)
Specifies the number of pixels between each value block.
LegendPosition legendPosition() const
Returns where the legend will be shown.
void setExplodeFactor(double factor)
Specifies the explode factor in percent, i.e.
TQFont hiLoChartCloseValuesFont() const
Returns the font to be used for printing the close values.
void setDrawSolidExcessArrows(bool solidArrows)
Specifies whether arrows showing excess values in bar charts should be drawn solidly or split.
TQColor hiLoChartLastValuesColor() const
AreaLocation
Specifies whether the area above the value points or below the value points should be filled.
uint maxDatasetPolarMarkerStyle() const
Returns the highest dataset for which a polar marker style has been defined.
ChartType chartType() const
Returns the chart type configured in this params object.
void setAxisArea(const uint n, const TQRect &areaRect)
Specifies the true axis area rectangle.
bool hiLoChartCloseValuesUseFontRelSize() const
Returns whether the font size to be used for printing the close values is calculated dynamically.
double shadowBrightnessFactor() const
Returns a factor to be used to adjust the built-in brightness of shadow colors in 3-dimensional drawi...
bool valueBlockGapIsRelative() const
Returns if the value set by setValueBlockGap is a per mille value of the chart data area width.
int polarLineWidth() const
Returns the line width of the lines in polar charts.
void setHeader2Text(const TQString &text)
Specifies the text to be displayed as the second header line.
bool polarMarker() const
Returns whether polar markers should be drawn at each data point.
void setThreeDLineDepth(int depth)
Specifies the depth of 3D lines (the "width" in Z direction).
PolarChartSubType
The polar subtype.
void changed()
This signal is emitted when any of the chart parameters has changed.
void setThreeDLineYRotation(int degrees)
TQColor hiLoChartCloseValuesColor() const
Returns the colour of the font size to be used for printing the close values.
void setShadowPattern(TQt::BrushStyle style)
Specifies a filling style for filling the shadow areas in 3-dimensional drawings like 3D bar charts.
bool threeDBarsShadowColors() const
LineChartSubType
The line subtype.
bool hiLoChartFirstValuesUseFontRelSize() const
int barWidth() const
Returns the width of one bar as set by setBarWidth or KDCHART_AUTO_SIZE if setBarWidth was never call...
void setPolarChartSubType(PolarChartSubType polarChartSubType)
Specifies the polar chart subtype.
void setPolarLineWidth(int width=-3)
Specifies the width for lines in polar charts.
void setLegendSource(LegendSource source)
Specifies where the legend text is coming from.
void setDataRegionFrame(uint dataRow, uint dataCol, uint, int innerGapX=0, int innerGapY=0, bool addFrameWidthToLayout=true, bool addFrameHeightToLayout=true, KDFrame::SimpleFrame simpleFrame=KDFrame::FrameFlat, int lineWidth=1, int midLineWidth=0, TQPen pen=TQPen(), int shadowWidth=0, KDFrame::CornerName sunPos=KDFrame::CornerTopLeft)
Select a pre-defined frame setting to be used for one of the data representations (e....
void setAllowOverlappingDataValueTexts(bool allow)
Specifies whether a data value text may be drawn even if it's region intersects with another data val...
void setThreeDLines(bool threeD)
Specifies whether lines should be drawn three-dimensionally or not.
void setLegendFontRelSize(int legendFontRelSize)
Specifies the legend relative font size.
void setExplode(bool explode)
Specifies whether the pie chart or ring chart should be exploding (all pies or ring segments are slig...
bool hiLoChartPrintOpenValues() const
Returns whether the open values will be printed under their respective entries.
bool hiLoChartPrintCloseValues() const
Returns whether the close values will be printed under their respective entries.
HiLoChartSubType
The HiLo subtype.
TQColor legendTitleTextColor() const
Returns the color in which the legend title is drawn.
TQString header2Text() const
Returns the text that is displayed as the second header line.
TQFont hiLoChartFirstValuesFont() const
int legendTitleFontRelSize() const
Returns the relative legend title font size.
static int roundVal(double d)
Returns the parameter d rounded to the nearest integer.
TQColor hiLoChartFirstValuesColor() const
void setAxisLabelTextParams(uint n, bool axisSteadyValueCalc=true, TQVariant axisValueStart=KDCHART_AXIS_LABELS_AUTO_LIMIT, TQVariant axisValueEnd=KDCHART_AXIS_LABELS_AUTO_LIMIT, double axisValueDelta=KDCHART_AXIS_LABELS_AUTO_DELTA, int axisDigitsBehindComma=KDCHART_AXIS_LABELS_AUTO_DIGITS, int axisMaxEmptyInnerSpan=67, KDChartAxisParams::LabelsFromDataRow takeLabelsFromDataRow=KDChartAxisParams::LabelsFromDataRowNo, int labelTextsDataRow=0, TQStringList *axisLabelStringList=0, TQStringList *axisShortLabelsStringList=0, int axisValueLeaveOut=KDCHART_AXIS_LABELS_AUTO_LEAVEOUT, KDChartAxisParams::ValueScale axisValueDeltaScale=KDChartAxisParams::ValueScaleNumerical)
Specifies the label text parameters for one axis.
int threeDLineDepth() const
Returns the depth of 3D lines (the "width" in Z direction).
TQMap< uint, PolarMarkerStyle > PolarMarkerStyleMap
The type of the storage structure for polar marker styles.
void setThreeDBarsShadowColors(bool shadow)
void setFrame(uint area, const KDFrame &frame, int outerGapX, int outerGapY, int innerGapX, int innerGapY, bool addFrameWidthToLayout=true, bool addFrameHeightToLayout=true)
int legendFontRelSize() const
Returns the relative legend font size.
bool hiLoChartPrintLowValues() const
Returns whether the low values will be printed under their respective entries.
LegendSource
The possible ways for getting the legend text.
void setOutlineDataColor(TQColor color)
Specifies a color for the outlines of data displays.
int hiLoChartCloseValuesFontRelSize() const
Returns the relative size (in per mille of the chart width) of font size to be used for printing the ...
bool lineMarker() const
Returns whether line markers should be drawn at each data point.
void setHiLoChartPrintFirstValues(bool active, TQFont *font=0, uint size=14, TQColor *color=0)
TQt::Orientation legendOrientation() const
Returns how the legend will be printed.
int polarZeroDegreePos() const
Returns the zero degree position in polar charts.
AreaChartSubType areaChartSubType() const
Returns the area chart subtype.
void setBarChartSubType(BarChartSubType barChartSubType)
Specifies the bar chart subtype.
void setThreeDLineXRotation(int degrees)
void setLegendPosition(LegendPosition position)
Specifies where the legend should be shown.
bool relativeRingThickness() const
Returns whether the ring thickness is relative to the sum of values in the dataset that the ring repr...
void setGlobalLeadingTop(int leading)
Specifies the distance between the chart and the upper border of the painter area.
TQColor bWChartStatisticsColor(BWStatVal statValue) const
Returns the colour of the font to be used for printing the respective statistical values.
LineMarkerStyle
The available line marker styles.
void setThreeDBars(bool threeDBars)
Specifies whether the engine should draw the bars in 3D.
PolarMarkerStyle
The available polar marker styles.
void setSimpleFrame(uint area, int outerGapX=0, int outerGapY=0, int innerGapX=0, int innerGapY=0, bool addFrameWidthToLayout=true, bool addFrameHeightToLayout=true, KDFrame::SimpleFrame simpleFrame=KDFrame::FrameFlat, int lineWidth=1, int midLineWidth=0, TQPen pen=TQPen(), TQBrush background=TQBrush(TQt::NoBrush), const TQPixmap *backPixmap=0, KDFrame::BackPixmapMode backPixmapMode=KDFrame::PixStretched, int shadowWidth=0, KDFrame::CornerName sunPos=KDFrame::CornerTopLeft)
Select a pre-defined frame setting to be used for one of the chart areas.
AreaChartSubType
The area subtype.
bool printDataValuesWithDefaultFontParams(uint chart) const
Retrieves whether data value texts are to be printed with non-default font parameters or not - when t...
void setThreeDPies(bool threeDPies)
Specifies whether the engine should draw the pies in 3D.
TQt::PenStyle outlineDataLineStyle() const
Returns the style of the outlines of data displays.
TQFont hiLoChartLastValuesFont() const
TQColor hiLoChartHighValuesColor() const
Returns the colour of the font size to be used for printing the high values.
int numValues() const
Returns how many of the values should be shown.
bool threeDShadowColors() const
Returns whether the engine should draw the sides and tops of 3D effects in shadowed versions of the d...
TQString legendText(uint dataset) const
Returns the manually specified legend text for a given dataset.
void setHeader1Text(const TQString &text)
Specifies the text to be displayed as the first header line.
void setOutlineDataLineWidth(uint width)
Specifies the width of the outlines of data displays.
void setDatasetGap(int gap)
Specifies the number of pixels between two dataset values.
TQString footerText() const
Returns the text that is displayed as the footer line.
int valueBlockGap() const
Returns the number of pixels between each value block.
bool hiLoChartPrintLastValues() const
int globalLeadingBottom() const
Return the distance between the chart and the lower border of the painter area.
int numBarsDisplayed() const
Returns the number of bars that were displayed last time your bar chart was drawn.
TQColor hiLoChartOpenValuesColor() const
Returns the colour of the font size to be used for printing the open values.
void setFooterText(const TQString &text)
Specifies the text to be displayed as the footer line.
void setLineWidth(int width)
Specifies the width for lines in line charts.
bool hiLoChartOpenValuesUseFontRelSize() const
Returns whether the font size to be used for printing the open values is calculated dynamically.
int hiLoChartOpenValuesFontRelSize() const
Returns the relative size (in per mille of the chart width) of font size to be used for printing the ...
TQFont hiLoChartLowValuesFont() const
Returns the font to be used for printing the low values.
uint maxDatasetSourceMode() const
Returns the number of the highest dataset for which a SourceMode has been defined.
TQFont dataValuesFont(uint chart) const
Returns the font to be used for printing the data values.
void setThreeDBarDepth(double depth)
Specifies the depth of the 3D Effect used for 3D bars.
void setLegendTextColor(const TQColor &color)
Specifies the color to be used for the legend texts.
uint threeDBarAngle() const
Returns the angle in degrees used for 3D bars.
SourceMode
The chart source mode.
AreaLocation areaLocation() const
Returns whether the area above or below the value points is filled.
int hiLoChartLastValuesFontRelSize() const
int threeDLineYRotation() const
void setRingStart(int degrees)
Specifies the starting point of the ring circle.
LineChartSubType lineChartSubType() const
Returns the line chart subtype.
LegendSource legendSource() const
Returns where the legend text is coming from.
void setShadowBrightnessFactor(double factor)
Specifies a factor to be used to adjust the built-in brightness of shadow colors in 3-dimensional dra...
bool threeDPies() const
Returns whether the engine should draw any pies in 3D.
bool allowOverlappingDataValueTexts() const
Returns whether a data value text may be drawn even if it's region intersects with another data value...
void setNumValues(uint numValues)
Specifies how many of the values should be shown.
bool hiLoChartHighValuesUseFontRelSize() const
Returns whether the font size to be used for printing the high values is calculated dynamically.
LegendPosition
The possible positions for a legend.
void setAxisType(uint n, const KDChartAxisParams::AxisType axisType)
Specifies the axis type.
bool datasetGapIsRelative() const
Returns if the value set by setDatasetGap is a per mille value of the chart data area width.
void setGlobalLeadingBottom(int leading)
Specifies the distance between the chart and the lower border of the painter area.
void setLegendTitleFontUseRelSize(bool legendTitleFontUseRelSize)
Specifies whether the legend title (if any) shall be drawn using relative font size.
double cosThreeDBarAngle() const
Returns the cosine in rad of the angle used for 3D bars.
void setBWChartBrush(const TQBrush &bWChartBrush)
Specifies the brush to be used to fill the BoxWhisker charts.
TQMap< uint, LineMarkerStyle > LineMarkerStyleMap
The type of the storage structure for line marker styles.
TQIntDict< KDChartCustomBox > CustomBoxDict
The type that stores the custom boxes in a chart.
int hiLoChartFirstValuesFontRelSize() const
BWStatVal
The different statistical values that can be printed into or asked from a Box and Whisker chart.
void setThreeDPieHeight(int pixels)
Specifies the height of the 3D effect for pies in pixels.
TQFont hiLoChartOpenValuesFont() const
Returns the font to be used for printing the open values.
ChartType
The chart type.
void setPolarZeroDegreePos(int degrees)
Specifies the zero degree position in polar charts.
int lineWidth() const
Returns the line width of the lines in line charts.
uint maxDatasetLineMarkerStyle() const
Returns the highest dataset for which a line marker style has been defined.
bool legendShowLines() const
Returns whether the legend shows lines or just the markers (or squares, resp.).
void setBWChartSubType(BWChartSubType bWChartSubType)
Specifies the BoxWhisker chart subtype.
void setLegendTitleText(const TQString &text)
Specifies a text to be shown as the title of the legend.
void setBWChartOutValMarkerSize(int size)
Specifies how big outlier markers (representing the values outside the inner fences) will be drawn.
ChartType additionalChartType() const
Returns the additional chart type configured in this params object.
void setPolarRotateCircularLabels(bool rotateCircularLabels)
Specifies whether to rotate circular labels in polar charts.
void setAxisVisible(uint n, const bool axisVisible)
Specifies if the axis will be drawn.
void setThreeDShadowColors(bool shadow)
Specifies whether the engine should draw the sides and tops of 3D effects in shadowed versions of the...
bool optimizeOutputForScreen() const
Returns whether drawing is optimized for (low resolution) screen output (this is the default) or whet...
void setLineChartSubType(LineChartSubType lineChartSubType)
Specifies the line chart subtype.
HdFtPos
This enum lists the positions that headers and footers can take.
TQValueList< int > explodeValues() const
Returns which values are exploded in a pie or ring chart.
void setLegendTitleFontRelSize(int legendTitleFontRelSize)
Specifies the legend title relative font size.
void setBarWidth(int width=KDCHART_AUTO_SIZE)
Specifies the width of one bar: makes sure that all of the bars have exactly the same width.
void setExplodeValues(TQValueList< int > explodeList)
Specifies which values to explode.
PolarChartSubType polarChartSubType() const
Returns the polar chart subtype.
int numBarsLeft() const
Returns the number of bars that could NOT be painted last time your bar chart was drawn.
bool hiLoChartPrintFirstValues() const
void setLineColor(TQColor color=TQColor())
Specifies the color of the lines in line charts.
void setPolarMarker(bool marker)
Specifies whether there should be a marker at each data point.
void setAxisLabelsVisible(uint n, bool axisLabelsVisible)
Specifies whether the axis labels of an axis are to be shown.
void setAreaLocation(AreaLocation location)
Specifies whether the area above or below the value points should be filled.
int globalLeadingRight() const
Return the distance between the chart and the right border of the painter area.
const KDChartAxisParams & axisParams(uint n) const
Returns the parameters that are currently defined for axis n.
void setRelativeRingThickness(bool relativeThickness)
Specifies whether the ring thickness should be relative to the sum of the values in the dataset that ...
bool threeDBars() const
Returns whether the engine should draw any bars in 3D.
int globalLeadingTop() const
Return the distance between the chart and the upper border of the painter area.
bool threeDLines() const
Returns whether lines are drawn three-dimensionally or not.
LineMarkerStyleMap lineMarkerStyles() const
Returns the whole map of line marker styles.
bool legendTitleFontUseRelSize() const
Returns whether the legend title font size is used.
TQFont legendTitleFont() const
Returns the font in which the legend title (if any) is drawn.
void setLegendTitleFont(const TQFont &font, bool useFontSize)
Specifies the font in which the legend title (if any) is drawn.
void setGlobalLeadingLeft(int leading)
Specifies the distance between the chart and the left border of the painter area.
bool bWChartPrintStatistics(BWStatVal statValue) const
Returns whether the respective statistical values will be printed near to the drawing.
int hiLoChartLowValuesFontRelSize() const
Returns the relative size (in per mille of the chart width) of font size to be used for printing the ...
uint maxDataColor() const
Returns the number of the highest dataset for which a color has been defined.
bool explode() const
Returns whether the pie or ring chart should be exploding or not.
TQFont header2Font() const
Returns the font used for displaying the second header line.
int pieStart() const
Returns the starting point of the pie circle.
TQFont legendFont() const
Returns the font in which the legend texts are drawn.
TQt::BrushStyle shadowPattern() const
Returns the filling style used for filling the shadow areas in 3-dimensional drawings like 3D bar cha...
BWChartSubType
The BoxWhisker subtype.
void setValueBlockGapIsRelative(bool gapIsRelative)
Specifies if the value set by setValueBlockGap is a per mille value of the chart data area width.
void setLegendShowLines(bool legendShowLines)
Specifies whether the legend shall show lines or just show the markers (or squares,...
bool bWChartStatisticsUseRelSize(BWStatVal statValue) const
Returns whether the font size to be used for printing the respective statistical values is calculated...
TQString header1Text() const
Returns the text that is displayed as the first header line.
void setExplodeFactors(ExplodeFactorsMap factors)
Specifies the explode factors for each segment in percent, i.e.
void setHiLoChartSubType(HiLoChartSubType hiLoChartSubType)
Specifies the HiLo chart subtype.
TQFont footerFont() const
Returns the font used for displaying the footer line.
void setHeader1Font(const TQFont &font)
Specifies the font to be used for displaying the first header line.
bool hiLoChartLastValuesUseFontRelSize() const
TQFont hiLoChartHighValuesFont() const
Returns the font to be used for printing the high values.
int ringStart() const
Returns the starting point of the ring circle.
TQColor hiLoChartLowValuesColor() const
Returns the colour of the font size to be used for printing the low values.
BWChartSubType bWChartSubType() const
Returns the BoxWhisker chart subtype.
void setOutlineDataLineStyle(TQt::PenStyle style)
Specifies the line style of the outlines of data displays.
KDChartEnums::TextLayoutPolicy dataValuesLayoutPolicy(uint chart) const
Returns the way to handle too narrow space conflicts: what to do if a data text covers a neighboring ...
int dataValuesFontRelSize(uint chart) const
Returns the relative size (in per mille of the chart width) of font size to be used for printing the ...
bool polarRotateCircularLabels() const
Returns whether circular labels will be rotated in polar charts.
void setDatasetGapIsRelative(bool gapIsRelative)
Specifies if the value set by setDatasetGap is a per mille value of the chart data area width.
void setLegendText(uint dataset, const TQString &text)
Manually specifies a legend text for a certain dataset.
TQRect legendArea() const
Returns the true legend area rectangle as it was was calculate by KD Chart.
int hiLoChartHighValuesFontRelSize() const
Returns the relative size (in per mille of the chart width) of font size to be used for printing the ...
void setOptimizeOutputForScreen(bool screenOutput)
Specify whether drawing should be optimized for (low resolution) screen output or whether other routi...
uint legendSpacing() const
Returns how much space in pixels there is between the legend and the data display.
TQFont header1Font() const
Returns the font used for displaying the second header line.
double explodeFactor() const
Returns the default explode factor, i.e., the explode factor used for those segments which should be ...
void setLegendFont(const TQFont &font, bool useFontSize)
Specifies the font in which the legend texts are drawn.
void setHeader2Font(const TQFont &font)
Specifies the font to be used for displaying the second header line.
HiLoChartSubType hiLoChartSubType() const
Returns the HiLo chart subtype.
BarChartSubType barChartSubType() const
Returns the bar chart subtype.
void setLegendTitleTextColor(const TQColor &color)
Specifies the color to be used for the legend title.
bool legendFontUseRelSize() const
Returns whether the legend font size is used.
int threeDLineXRotation() const
void setFooterFont(const TQFont &font)
Specifies the font to be used for displaying the footer line.
void setAxisLabelsTouchEdges(uint n, bool axisLabelsTouchEdges)
Specifies whether the axis labels start and end at the edges of the charts instead being positioned i...
TQFont bWChartStatisticsFont(BWStatVal statValue) const
Returns the font to be used for printing the respective statistical values.
bool hiLoChartPrintHighValues() const
Returns whether the high values will be printed under their respective entries.
void removeAllCustomBoxes()
Remove all custom boxes from the list of boxes.
uint outlineDataLineWidth() const
Returns the width of the outlines of data displays.
void setLineMarker(bool marker)
Specifies whether there should be a marker at each data point.
void setLegendSpacing(uint space)
Specifies how much space in pixels there should be between the legend and the data display.
TQBrush bWChartStatisticsBrush(BWStatVal statValue) const
Returns the brush used to fill the text's area before printing the respective statistical values.
Property settings of a single KDChart data cell.
The main class of KDFrame.
Definition KDFrame.h:88
BackPixmapMode
These are ways how to display a pixmap that might be painted into the inner area.
Definition KDFrame.h:109
SimpleFrame
These simple frames are pre-defined for your convenience.
Definition KDFrame.h:177