30#include <KDXMLTools.h>
45 TQDomDocument document = p. saveXML();
46 s << document.toString();
58 for( int axis = 0; axis < 13; axis++ ) {
59 TQDomElement axisSettingsElement =
60 doc.createElement( "AxisSettings" );
61 docRoot.appendChild( axisSettingsElement );
62 axisSettingsElement.setAttribute( "Dataset",
63 _axisSettings[axis].dataset );
64 axisSettingsElement.setAttribute( "Dataset2",
65 _axisSettings[axis].dataset2 );
66 axisSettingsElement.setAttribute( "Chart",
67 _axisSettings[axis].chart );
70 KDXML::createStringNode( doc, axisSettingsElement, "Type",
74 KDXML::createBoolNode( doc, axisSettingsElement, "Visible",
75 _axisSettings[axis].params._axisVisible );
78 KDXML::createBoolNode( doc, axisSettingsElement, "LabelsTouchEdges",
79 _axisSettings[axis].params._axisLabelsTouchEdges );
82 KDXML::createStringNode( doc, axisSettingsElement, "AreaMode",
86 KDXML::createIntNode( doc, axisSettingsElement, "UseAvailableSpaceFrom",
87 _axisSettings[axis].params._axisUseAvailableSpaceFrom );
90 KDXML::createIntNode( doc, axisSettingsElement, "UseAvailableSpaceTo",
91 _axisSettings[axis].params._axisUseAvailableSpaceTo );
94 KDXML::createIntNode( doc, axisSettingsElement, "IsometricReferenceAxis",
95 _axisSettings[axis].params._axisIsoRefAxis );
98 KDXML::createIntNode( doc, axisSettingsElement, "AreaMin",
99 _axisSettings[axis].params._axisAreaMin );
102 KDXML::createIntNode( doc, axisSettingsElement, "AreaMax",
103 _axisSettings[axis].params._axisAreaMax );
106 KDXML::createStringNode( doc, axisSettingsElement, "CalcMode",
110 KDXML::createIntNode( doc, axisSettingsElement, "TrueAreaSize",
111 _axisSettings[axis].params._axisTrueAreaSize );
114 KDXML::createRectNode( doc, axisSettingsElement, "TrueAreaRect",
115 _axisSettings[axis].params._axisTrueAreaRect );
118 KDXML::createBoolNode( doc, axisSettingsElement, "ShowSubDelimiters",
119 _axisSettings[axis].params._axisShowSubDelimiters );
122 KDXML::createBoolNode( doc, axisSettingsElement, "LineVisible",
123 _axisSettings[axis].params._axisLineVisible );
126 KDXML::createIntNode( doc, axisSettingsElement, "LineWidth",
127 _axisSettings[axis].params._axisLineWidth );
130 KDXML::createIntNode( doc, axisSettingsElement, "TrueLineWidth",
131 _axisSettings[axis].params._axisTrueLineWidth );
134 KDXML::createColorNode( doc, axisSettingsElement, "LineColor",
135 _axisSettings[axis].params._axisLineColor );
138 KDXML::createBoolNode( doc, axisSettingsElement, "ShowGrid",
139 _axisSettings[axis].params._axisShowGrid );
142 KDXML::createColorNode( doc, axisSettingsElement, "GridColor",
143 _axisSettings[axis].params._axisGridColor );
146 KDXML::createIntNode( doc, axisSettingsElement, "GridLineWidth",
147 _axisSettings[axis].params._axisGridLineWidth );
150 KDXML::createStringNode( doc, axisSettingsElement, "GridStyle",
151 KDXML::penStyleToString( _axisSettings[axis].params._axisGridStyle ) );
154 KDXML::createColorNode( doc, axisSettingsElement, "GridSubColor",
155 _axisSettings[axis].params._axisGridSubColor );
158 KDXML::createIntNode( doc, axisSettingsElement, "GridSubLineWidth",
159 _axisSettings[axis].params._axisGridSubLineWidth );
162 KDXML::createStringNode( doc, axisSettingsElement, "GridSubStyle",
163 KDXML::penStyleToString( _axisSettings[axis].params._axisGridSubStyle ) );
166 KDXML::createColorNode( doc, axisSettingsElement, "ZeroLineColor",
167 _axisSettings[axis].params._axisZeroLineColor );
170 KDXML::createBoolNode( doc, axisSettingsElement, "LabelsVisible",
171 _axisSettings[axis].params._axisLabelsVisible );
175 _axisSettings[axis].params._axisLabelsFont,
176 _axisSettings[axis].params._axisLabelsFontUseRelSize,
177 _axisSettings[axis].params._axisLabelsFontRelSize,
178 _axisSettings[axis].params._axisLabelsFontMinSize );
181 KDXML::createBoolNode( doc, axisSettingsElement, "LabelsDontShrinkFont",
182 _axisSettings[axis].params._axisLabelsDontShrinkFont );
185 KDXML::createBoolNode( doc, axisSettingsElement, "LabelsDontAutoRotate",
186 _axisSettings[axis].params._axisLabelsDontAutoRotate );
189 KDXML::createIntNode( doc, axisSettingsElement, "LabelsRotation",
190 _axisSettings[axis].params._axisLabelsRotation );
193 KDXML::createIntNode( doc, axisSettingsElement, "LabelsLeaveOut",
194 _axisSettings[axis].params._axisValueLeaveOut );
197 KDXML::createColorNode( doc, axisSettingsElement, "LabelsColor",
198 _axisSettings[axis].params._axisLabelsColor );
201 KDXML::createBoolNode( doc, axisSettingsElement, "SteadyValueCalc",
202 _axisSettings[axis].params._axisSteadyValueCalc );
207 _axisSettings[axis].params._axisValueStart,
212 KDXML::createBoolNode( doc, axisSettingsElement, "ValueStartIsExact",
213 _axisSettings[axis].params._axisValueStartIsExact );
218 _axisSettings[axis].params._axisValueEnd,
224 KDXML::createDoubleNode( doc, axisSettingsElement, "ValueDelta",
225 _axisSettings[axis].params._axisValueDelta );
226 KDXML::createIntNode( doc, axisSettingsElement, "ValueDeltaScale",
227 _axisSettings[axis].params._axisValueDeltaScale );
230 KDXML::createBoolNode( doc, axisSettingsElement, "ValuesDecreasing",
231 _axisSettings[axis].params._axisValuesDecreasing );
234 KDXML::createDoubleNode( doc, axisSettingsElement, "TrueLow",
235 _axisSettings[axis].params._trueLow );
238 KDXML::createDoubleNode( doc, axisSettingsElement, "TrueHigh",
239 _axisSettings[axis].params._trueHigh );
242 KDXML::createDoubleNode( doc, axisSettingsElement, "TrueDelta",
243 _axisSettings[axis].params._trueDelta );
246 TQDomElement zeroLineStartElement = doc.createElement( "ZeroLineStart" );
247 axisSettingsElement.appendChild( zeroLineStartElement );
248 zeroLineStartElement.setAttribute( "X", _axisSettings[axis].params._axisZeroLineStartX );
249 zeroLineStartElement.setAttribute( "Y", _axisSettings[axis].params._axisZeroLineStartY );
252 KDXML::createIntNode( doc, axisSettingsElement, "DigitsBehindComma",
253 _axisSettings[axis].params._axisDigitsBehindComma );
256 KDXML::createStringNode( doc, axisSettingsElement, "LabelsDateTimeFormat",
257 _axisSettings[axis].params._axisLabelsDateTimeFormat );
260 KDXML::createIntNode( doc, axisSettingsElement, "MaxEmptyInnerSpan",
261 _axisSettings[axis].params._axisMaxEmptyInnerSpan );
264 KDXML::createStringNode( doc, axisSettingsElement, "LabelsFromDataRow",
268 KDXML::createIntNode( doc, axisSettingsElement, "TextsDataRow",
269 _axisSettings[axis].params._labelTextsDataRow );
272 KDXML::createStringListNodes( doc, axisSettingsElement, "LabelString",
273 &_axisSettings[axis].params._axisLabelStringList );
276 KDXML::createStringListNodes( doc, axisSettingsElement, "ShortLabelString",
277 &_axisSettings[axis].params._axisShortLabelsStringList );
280 KDXML::createStringListNodes( doc, axisSettingsElement, "LabelText",
281 &_axisSettings[axis].params._axisLabelTexts );
284 KDXML::createBoolNode( doc, axisSettingsElement, "LabelTextsDirty",
285 _axisSettings[axis].params._axisLabelTextsDirty );
290 KDXML::createStringNode( doc, axisSettingsElement, "FirstLabelReplacementText",
291 _axisSettings[axis].params._axisFirstLabelText );
294 KDXML::createStringNode( doc, axisSettingsElement, "LastLabelReplacementText",
295 _axisSettings[axis].params._axisLastLabelText );
298 KDXML::createIntNode( doc, axisSettingsElement, "LabelsDivPow10",
299 _axisSettings[axis].params._axisLabelsDivPow10 );
302 KDXML::createStringNode( doc, axisSettingsElement, "LabelsDecimalPoint",
303 _axisSettings[axis].params._axisLabelsDecimalPoint );
306 KDXML::createStringNode( doc, axisSettingsElement, "LabelsThousandsPoint",
307 _axisSettings[axis].params._axisLabelsThousandsPoint );
310 KDXML::createStringNode( doc, axisSettingsElement, "LabelsNotation",
314 KDXML::createStringNode( doc, axisSettingsElement, "LabelsPrefix",
315 _axisSettings[axis].params._axisLabelsPrefix );
318 KDXML::createStringNode( doc, axisSettingsElement, "LabelsPostfix",
319 _axisSettings[axis].params._axisLabelsPostfix );
322 KDXML::createIntNode( doc, axisSettingsElement, "LabelsTotalLen",
323 _axisSettings[axis].params._axisLabelsTotalLen );
326 KDXML::createStringNode( doc, axisSettingsElement, "LabelsPadFill",
327 _axisSettings[axis].params._axisLabelsPadFill );
330 KDXML::createBoolNode( doc, axisSettingsElement, "LabelsBlockAlign",
331 _axisSettings[axis].params._axisLabelsBlockAlign );
346 TQString docstart = "<ChartParams/>";
348 TQDomDocument doc( "ChartParams" );
349 doc.setContent( docstart );
351 doc.appendChild( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
353 TQDomElement docRoot = doc.documentElement();
354 docRoot.setAttribute( "xmlns", "http://www.klaralvdalens-datakonsult.se/kdchart" );
355 docRoot.setAttribute( "xmlns:xsi", "http://www.w3.org/2000/10/XMLSchema-instance" );
356 docRoot.setAttribute( "xsi:schemaLocation", "http://www.klaralvdalens-datakonsult.se/kdchart" );
359 TQDomElement chartTypeElement = doc.createElement( "ChartType" );
360 docRoot.appendChild( chartTypeElement );
361 chartTypeElement.setAttribute( "primary",
363 chartTypeElement.setAttribute( "secondary",
368 KDXML::createIntNode( doc, docRoot, "NumValues", _numValues );
371 TQDomElement modeAndChartMapElement =
372 doc.createElement( "ModeAndChartMap" );
373 docRoot.appendChild( modeAndChartMapElement );
374 for( TQMap<uint,KDChartParams::ModeAndChart>::ConstIterator it = _dataSourceModeAndChart.begin();
375 it != _dataSourceModeAndChart.end(); ++it ) {
377 TQDomElement datasetElement = doc.createElement( "Dataset" );
378 TQDomText datasetContent =
379 doc.createTextNode( TQString::number( it.key() ) );
380 datasetElement.appendChild( datasetContent );
381 modeAndChartMapElement.appendChild( datasetElement );
383 TQDomElement modeAndChartElement = doc.createElement( "ModeAndChart" );
385 modeAndChartElement.setAttribute( "Chart", it.data().chart() );
386 modeAndChartMapElement.appendChild( modeAndChartElement );
390 TQDomElement propertySetMapElement =
391 doc.createElement( "PropertySetMap" );
392 docRoot.appendChild( propertySetMapElement );
393 TQIntDictIterator<KDChartPropertySet> it2( _propertySetList );
394 for( ; it2.current(); ++it2 )
395 propertySetMapElement.appendChild( it2.current()->saveXML( doc ) );
397 KDXML::createBoolNode( doc, docRoot, "ChartSourceModeWasUsed",
398 _setChartSourceModeWasUsed );
401 KDXML::createIntNode( doc, docRoot, "MaxDatasetSourceMode",
402 _maxDatasetSourceMode );
405 TQDomElement colorSettingsElement =
406 doc.createElement( "ColorSettings" );
407 docRoot.appendChild( colorSettingsElement );
412 "DataColors", _dataColors );
415 KDXML::createIntNode( doc, colorSettingsElement, "MaxDatasetColor",
419 KDXML::createDoubleNode( doc, colorSettingsElement,
420 "ShadowBrightnessFactor",
421 _shadowBrightnessFactor );
424 KDXML::createStringNode( doc, colorSettingsElement,
426 KDXML::brushStyleToString(_shadowPattern ) );
429 KDXML::createBoolNode( doc, colorSettingsElement,
430 "ThreeDShadowColors",
431 _threeDShadowColors );
436 _dataColorsShadow1 );
441 _dataColorsShadow2 );
444 KDXML::createColorNode( doc, colorSettingsElement,
449 KDXML::createIntNode( doc, colorSettingsElement,
450 "OutlineDataLineWidth",
451 _outlineDataLineWidth );
454 TQDomElement outlineDataLineStyleElement =
455 doc.createElement( "OutlineDataLineStyle" );
456 colorSettingsElement.appendChild( outlineDataLineStyleElement );
457 outlineDataLineStyleElement.setAttribute( "Style",
458 KDXML::penStyleToString( _outlineDataLineStyle ) );
463 TQDomElement barSettingsElement =
464 doc.createElement( "BarSettings" );
465 docRoot.appendChild( barSettingsElement );
469 KDXML::createStringNode( doc, barSettingsElement,
472 KDXML::createBoolNode( doc, barSettingsElement,
473 "ThreeDBars", _threeDBars );
475 KDXML::createDoubleNode( doc, barSettingsElement,
476 "ThreeDBarDepth", _threeDBarDepth );
478 KDXML::createIntNode( doc, barSettingsElement,
479 "DatasetGap", _datasetGap );
481 KDXML::createBoolNode( doc, barSettingsElement,
482 "DatasetGapIsRelative", _datasetGapIsRelative );
484 KDXML::createIntNode( doc, barSettingsElement,
485 "ValueBlockGap", _valueBlockGap );
487 KDXML::createBoolNode( doc, barSettingsElement,
488 "ValueBlockGapIsRelative",
489 _valueBlockGapIsRelative );
491 KDXML::createIntNode( doc, barSettingsElement,
492 "BarWidth", _barWidth );
494 KDXML::createBoolNode( doc, barSettingsElement,
495 "SolidExcessArrows", _solidExcessArrows );
500 TQDomElement lineSettingsElement =
501 doc.createElement( "LineSettings" );
502 docRoot.appendChild( lineSettingsElement );
506 KDXML::createStringNode( doc, lineSettingsElement,
510 KDXML::createBoolNode( doc, lineSettingsElement,
511 "Marker", _lineMarker );
514 { for( TQMap<uint,KDChartParams::LineMarkerStyle>::ConstIterator it = _lineMarkerStyles.begin();
515 it != _lineMarkerStyles.end(); ++it ) {
516 TQDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
517 lineSettingsElement.appendChild( markerStyleElement );
518 markerStyleElement.setAttribute( "Dataset", it.key() );
523 KDXML::createSizeNode( doc, lineSettingsElement,
524 "MarkerSize", _lineMarkerSize );
527 KDXML::createIntNode( doc, lineSettingsElement,
528 "LineWidth", _lineWidth );
531 KDXML::createColorNode( doc, lineSettingsElement,
536 TQDomElement lineStyleElement =
537 doc.createElement( "LineStyle" );
538 lineSettingsElement.appendChild( lineStyleElement );
539 lineStyleElement.setAttribute( "Style",
540 KDXML::penStyleToString( _lineStyle ) );
543 { for( TQMap<uint, TQt::PenStyle>::ConstIterator it = _datasetLineStyles.begin();
544 it != _datasetLineStyles.end(); ++it ) {
545 TQDomElement lineStyleElement = doc.createElement( "DatasetLineStyle" );
546 lineSettingsElement.appendChild( lineStyleElement );
547 lineStyleElement.setAttribute( "Dataset", it.key() );
548 lineStyleElement.setAttribute( "Style", KDXML::penStyleToString( it.data() ) );
552 KDXML::createBoolNode( doc, lineSettingsElement,
553 "ThreeD", _threeDLines );
556 KDXML::createIntNode( doc, lineSettingsElement,
557 "ThreeDDepth", _threeDLineDepth );
560 KDXML::createIntNode( doc, lineSettingsElement,
561 "ThreeDXRotation", _threeDLineXRotation );
564 KDXML::createIntNode( doc, lineSettingsElement,
565 "ThreeDYRotation", _threeDLineYRotation );
570 TQDomElement areaSettingsElement =
571 doc.createElement( "AreaSettings" );
572 docRoot.appendChild( areaSettingsElement );
576 KDXML::createStringNode( doc, areaSettingsElement, "SubType",
580 KDXML::createStringNode( doc, areaSettingsElement, "Location",
586 TQDomElement pieRingSettingsElement =
587 doc.createElement( "PieRingSettings" );
588 docRoot.appendChild( pieRingSettingsElement );
592 KDXML::createBoolNode( doc, pieRingSettingsElement, "Explode",
596 KDXML::createDoubleNode( doc, pieRingSettingsElement, "DefaultExplodeFactor",
604 for( TQValueList<int>::ConstIterator it = _explodeList.begin();
605 it != _explodeList.end(); ++it )
606 KDXML::createIntNode( doc, pieRingSettingsElement,
607 "ExplodeSegment", *it );
610 KDXML::createBoolNode( doc, pieRingSettingsElement, "ThreeDPies",
614 KDXML::createIntNode( doc, pieRingSettingsElement, "ThreeDPieHeight",
618 KDXML::createIntNode( doc, pieRingSettingsElement, "PieStart",
622 KDXML::createIntNode( doc, pieRingSettingsElement, "RingStart",
626 KDXML::createBoolNode( doc, pieRingSettingsElement,
627 "RelativeRingThickness", _relativeRingThickness );
631 TQDomElement hiLoSettingsElement =
632 doc.createElement( "HiLoSettings" );
633 docRoot.appendChild( hiLoSettingsElement );
636 KDXML::createStringNode( doc, hiLoSettingsElement, "SubType",
640 KDXML::createBoolNode( doc, hiLoSettingsElement, "PrintLowValues",
641 _hiLoChartPrintLowValues );
645 _hiLoChartLowValuesFont,
646 _hiLoChartLowValuesUseFontRelSize,
647 _hiLoChartLowValuesFontRelSize );
650 KDXML::createColorNode( doc, hiLoSettingsElement, "LowValuesColor",
651 _hiLoChartLowValuesColor );
654 KDXML::createBoolNode( doc, hiLoSettingsElement, "PrintHighValues",
655 _hiLoChartPrintHighValues );
659 _hiLoChartHighValuesFont,
660 _hiLoChartHighValuesUseFontRelSize,
661 _hiLoChartHighValuesFontRelSize );
664 KDXML::createColorNode( doc, hiLoSettingsElement, "HighValuesColor",
665 _hiLoChartHighValuesColor );
668 KDXML::createBoolNode( doc, hiLoSettingsElement, "PrintOpenValues",
669 _hiLoChartPrintOpenValues );
673 _hiLoChartOpenValuesFont,
674 _hiLoChartOpenValuesUseFontRelSize,
675 _hiLoChartOpenValuesFontRelSize );
678 KDXML::createColorNode( doc, hiLoSettingsElement, "OpenValuesColor",
679 _hiLoChartOpenValuesColor );
682 KDXML::createBoolNode( doc, hiLoSettingsElement, "PrintCloseValues",
683 _hiLoChartPrintCloseValues );
687 _hiLoChartCloseValuesFont,
688 _hiLoChartCloseValuesUseFontRelSize,
689 _hiLoChartCloseValuesFontRelSize );
692 KDXML::createColorNode( doc, hiLoSettingsElement, "CloseValuesColor",
693 _hiLoChartCloseValuesColor );
699 TQDomElement bWSettingsElement =
700 doc.createElement( "BoxAndWhiskerSettings" );
701 docRoot.appendChild( bWSettingsElement );
704 KDXML::createStringNode( doc, bWSettingsElement, "SubType",
708 KDXML::createDoubleNode( doc, bWSettingsElement, "FenceUpperInner",
709 _BWChartFenceUpperInner );
710 KDXML::createDoubleNode( doc, bWSettingsElement, "FenceLowerInner",
711 _BWChartFenceLowerInner );
712 KDXML::createDoubleNode( doc, bWSettingsElement, "FenceUpperOuter",
713 _BWChartFenceUpperInner );
714 KDXML::createDoubleNode( doc, bWSettingsElement, "FenceLowerOuter",
715 _BWChartFenceLowerOuter );
718 KDXML::createBrushNode( doc, bWSettingsElement, "Brush",
722 KDXML::createIntNode( doc, bWSettingsElement, "OutlierSize",
723 _BWChartOutValMarkerSize );
726 for( int i = BWStatValSTART; i <= BWStatValEND; ++i ){
727 TQDomElement printStatElement =
729 KDXML::createBoolNode( doc, printStatElement, "Active",
730 _BWChartStatistics[ i ].active );
732 _BWChartStatistics[ i ].font,
733 _BWChartStatistics[ i ].useRelSize,
734 _BWChartStatistics[ i ].relSize );
735 KDXML::createColorNode( doc, printStatElement, "Color",
736 _BWChartStatistics[ i ].color );
737 KDXML::createBrushNode( doc, printStatElement, "Brush",
738 _BWChartStatistics[ i ].brush );
745 TQDomElement polarSettingsElement =
746 doc.createElement( "PolarSettings" );
747 docRoot.appendChild( polarSettingsElement );
751 KDXML::createStringNode( doc, polarSettingsElement,
755 KDXML::createBoolNode( doc, polarSettingsElement,
756 "Marker", _polarMarker );
759 for( TQMap<uint,KDChartParams::PolarMarkerStyle>::ConstIterator it = _polarMarkerStyles.begin();
760 it != _polarMarkerStyles.end(); ++it ) {
761 TQDomElement markerStyleElement = doc.createElement( "MarkerStyle" );
762 polarSettingsElement.appendChild( markerStyleElement );
763 markerStyleElement.setAttribute( "Dataset", it.key() );
768 KDXML::createSizeNode( doc, polarSettingsElement,
769 "MarkerSize", _polarMarkerSize );
772 KDXML::createIntNode( doc, polarSettingsElement,
773 "PolarLineWidth", _polarLineWidth );
779 TQDomElement legendSettingsElement =
780 doc.createElement( "LegendSettings" );
781 docRoot.appendChild( legendSettingsElement );
784 KDXML::createStringNode( doc, legendSettingsElement, "Position",
788 KDXML::createOrientationNode( doc, legendSettingsElement,
789 "Orientation", _legendOrientation );
792 KDXML::createBoolNode( doc, legendSettingsElement,
793 "ShowLines", _legendShowLines );
796 KDXML::createStringNode( doc, legendSettingsElement, "Source",
800 for( TQMap<int,TQString>::ConstIterator it = _legendText.begin();
801 it != _legendText.end(); ++it ) {
802 TQDomElement legendTextElement = doc.createElement( "LegendText" );
803 legendSettingsElement.appendChild( legendTextElement );
804 legendTextElement.setAttribute( "Dataset", it.key() );
805 legendTextElement.setAttribute( "Text", it.data() );
809 KDXML::createColorNode( doc, legendSettingsElement, "TextColor",
815 _legendFontUseRelSize,
816 _legendFontRelSize );
819 KDXML::createStringNode( doc, legendSettingsElement, "TitleText",
823 KDXML::createColorNode( doc, legendSettingsElement, "TitleColor",
824 _legendTitleTextColor );
829 _legendTitleFontUseRelSize,
830 _legendTitleFontRelSize );
833 KDXML::createIntNode( doc, legendSettingsElement, "Spacing",
840 for( int hf = 0; hf < 18; hf++ ) {
841 TQDomElement hfSettingsElement =
842 doc.createElement( "HeaderFooterSettings" );
843 docRoot.appendChild( hfSettingsElement );
845 KDXML::createStringNode( doc, hfSettingsElement, "Text",
846 _hdFtParams[hf]._text );
848 _hdFtParams[hf]._font,
849 _hdFtParams[hf]._fontUseRelSize,
850 _hdFtParams[hf]._fontRelSize );
851 KDXML::createColorNode( doc, hfSettingsElement, "Color",
852 _hdFtParams[hf]._color );
858 TQDomElement globalLeadingElement =
859 doc.createElement( "GlobalLeading" );
860 docRoot.appendChild( legendSettingsElement );
862 KDXML::createIntNode( doc, globalLeadingElement, "Left",
863 _globalLeadingLeft );
864 KDXML::createIntNode( doc, globalLeadingElement, "Top",
866 KDXML::createIntNode( doc, globalLeadingElement, "Right",
867 _globalLeadingRight );
868 KDXML::createIntNode( doc, globalLeadingElement, "Bottom",
869 _globalLeadingBottom );
873 TQDomElement dataValuesSettings1Element =
874 doc.createElement( "DataValuesSettings1" );
875 docRoot.appendChild( dataValuesSettings1Element );
877 KDXML::createBoolNode( doc, dataValuesSettings1Element, "PrintDataValues",
878 _printDataValuesSettings._printDataValues );
879 KDXML::createIntNode( doc, dataValuesSettings1Element, "DivPow10",
880 _printDataValuesSettings._divPow10 );
881 KDXML::createIntNode( doc, dataValuesSettings1Element, "DigitsBehindComma",
882 _printDataValuesSettings._digitsBehindComma );
884 _printDataValuesSettings._dataValuesFont,
885 _printDataValuesSettings._dataValuesUseFontRelSize,
886 _printDataValuesSettings._dataValuesFontRelSize );
887 KDXML::createColorNode( doc, dataValuesSettings1Element, "Color",
888 _printDataValuesSettings._dataValuesColor );
889 KDXML::createBrushNode( doc, dataValuesSettings1Element, "Background",
890 _printDataValuesSettings._dataValuesBrush );
891 KDXML::createBoolNode( doc, dataValuesSettings1Element, "AutoColor",
892 _printDataValuesSettings._dataValuesAutoColor );
893 KDXML::createStringNode( doc, dataValuesSettings1Element,
894 "AnchorNegativePosition",
896 KDXML::createIntNode( doc, dataValuesSettings1Element,
897 "AnchorNegativeAlign",
898 _printDataValuesSettings._dataValuesAnchorNegativeAlign );
899 KDXML::createIntNode( doc, dataValuesSettings1Element,
900 "AnchorNegativeDeltaX",
901 _printDataValuesSettings._dataValuesAnchorNegativeDeltaX );
902 KDXML::createIntNode( doc, dataValuesSettings1Element,
903 "AnchorNegativeDeltaY",
904 _printDataValuesSettings._dataValuesAnchorNegativeDeltaY );
905 KDXML::createIntNode( doc, dataValuesSettings1Element,
907 _printDataValuesSettings._dataValuesNegativeRotation );
908 KDXML::createStringNode( doc, dataValuesSettings1Element,
909 "AnchorPositivePosition",
911 KDXML::createIntNode( doc, dataValuesSettings1Element,
912 "AnchorPositiveAlign",
913 _printDataValuesSettings._dataValuesAnchorPositiveAlign );
914 KDXML::createIntNode( doc, dataValuesSettings1Element,
915 "AnchorPositiveDeltaX",
916 _printDataValuesSettings._dataValuesAnchorPositiveDeltaX );
917 KDXML::createIntNode( doc, dataValuesSettings1Element,
918 "AnchorPositiveDeltaY",
919 _printDataValuesSettings._dataValuesAnchorPositiveDeltaY );
920 KDXML::createIntNode( doc, dataValuesSettings1Element,
922 _printDataValuesSettings._dataValuesPositiveRotation );
924 KDXML::createStringNode( doc, dataValuesSettings1Element,
928 KDXML::createBoolNode( doc, dataValuesSettings1Element, "ShowInfinite",
929 _printDataValuesSettings._dataValuesShowInfinite );
933 TQDomElement dataValuesSettings2Element =
934 doc.createElement( "DataValuesSettings2" );
935 docRoot.appendChild( dataValuesSettings2Element );
937 KDXML::createBoolNode( doc, dataValuesSettings2Element, "PrintDataValues",
938 _printDataValuesSettings2._printDataValues );
939 KDXML::createIntNode( doc, dataValuesSettings2Element, "DivPow10",
940 _printDataValuesSettings2._divPow10 );
941 KDXML::createIntNode( doc, dataValuesSettings2Element, "DigitsBehindComma",
942 _printDataValuesSettings2._digitsBehindComma );
944 _printDataValuesSettings2._dataValuesFont,
945 _printDataValuesSettings2._dataValuesUseFontRelSize,
946 _printDataValuesSettings2._dataValuesFontRelSize );
947 KDXML::createColorNode( doc, dataValuesSettings2Element, "Color",
948 _printDataValuesSettings2._dataValuesColor );
949 KDXML::createBrushNode( doc, dataValuesSettings2Element, "Background",
950 _printDataValuesSettings2._dataValuesBrush );
951 KDXML::createBoolNode( doc, dataValuesSettings2Element, "AutoColor",
952 _printDataValuesSettings2._dataValuesAutoColor );
953 KDXML::createStringNode( doc, dataValuesSettings2Element,
954 "AnchorNegativePosition",
956 KDXML::createIntNode( doc, dataValuesSettings2Element,
957 "AnchorNegativeAlign",
958 _printDataValuesSettings2._dataValuesAnchorNegativeAlign );
959 KDXML::createIntNode( doc, dataValuesSettings2Element,
960 "AnchorNegativeDeltaX",
961 _printDataValuesSettings2._dataValuesAnchorNegativeDeltaX );
962 KDXML::createIntNode( doc, dataValuesSettings2Element,
963 "AnchorNegativeDeltaY",
964 _printDataValuesSettings2._dataValuesAnchorNegativeDeltaY );
965 KDXML::createIntNode( doc, dataValuesSettings2Element,
967 _printDataValuesSettings2._dataValuesNegativeRotation );
968 KDXML::createStringNode( doc, dataValuesSettings2Element,
969 "AnchorPositivePosition",
971 KDXML::createIntNode( doc, dataValuesSettings2Element,
972 "AnchorPositiveAlign",
973 _printDataValuesSettings2._dataValuesAnchorPositiveAlign );
974 KDXML::createIntNode( doc, dataValuesSettings2Element,
975 "AnchorPositiveDeltaX",
976 _printDataValuesSettings2._dataValuesAnchorPositiveDeltaX );
977 KDXML::createIntNode( doc, dataValuesSettings2Element,
978 "AnchorPositiveDeltaY",
979 _printDataValuesSettings2._dataValuesAnchorPositiveDeltaY );
980 KDXML::createIntNode( doc, dataValuesSettings2Element,
982 _printDataValuesSettings2._dataValuesPositiveRotation );
984 KDXML::createStringNode( doc, dataValuesSettings2Element,
988 KDXML::createBoolNode( doc, dataValuesSettings2Element, "ShowInfinite",
989 _printDataValuesSettings2._dataValuesShowInfinite );
993 TQDomElement dataValuesGlobalSettingsElement =
994 doc.createElement( "DataValuesGlobalSettings" );
995 docRoot.appendChild( dataValuesGlobalSettingsElement );
997 KDXML::createBoolNode( doc, dataValuesGlobalSettingsElement,
998 "allowOverlappingTexts",
999 _allowOverlappingDataValueTexts );
1003 TQDomElement areaMapElement =
1004 doc.createElement( "AreaMap" );
1005 docRoot.appendChild( areaMapElement );
1007 TQDictIterator<KDChartFrameSettings> it( _areaDict );
1008 for( ; it.current(); ++it ){
1012 it.currentKey().left(5).stripWhiteSpace().toUInt() );
1017 TQDomElement customBoxMapElement =
1018 doc.createElement( "CustomBoxMap" );
1019 docRoot.appendChild( customBoxMapElement );
1021 TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
1022 for( ; it.current(); ++it ){
1023 KDXML::createIntNode( doc, customBoxMapElement, "Number", it.currentKey() );
1046 TQDomDocument doc( "ChartParams" );
1048 TQString docString = s.read();
1049 doc.setContent( docString );
1063 &( _axisSettings[ curAxisSettings ].params );
1064 TQDomNode node = element.firstChild();
1065 while( !node.isNull() ) {
1066 TQDomElement element = node.toElement();
1067 if( !element.isNull() ) {
1068 TQString tagName = element.tagName();
1069 if( tagName == "Type" ) {
1071 if( KDXML::readStringNode( element, string ) )
1073 } else if( tagName == "Visible" ) {
1075 if( KDXML::readBoolNode( element, visible ) )
1076 axisSettings->_axisVisible = visible;
1077 } else if( tagName == "LabelsTouchEdges" ) {
1078 bool labelsTouchEdges;
1079 if( KDXML::readBoolNode( element, labelsTouchEdges ) )
1080 axisSettings->_axisLabelsTouchEdges = labelsTouchEdges;
1081 } else if( tagName == "AreaMode" ) {
1083 if( KDXML::readStringNode( element, string ) )
1085 } else if( tagName == "UseAvailableSpaceFrom" ) {
1087 if( KDXML::readIntNode( element, spaceFrom ) )
1088 axisSettings->_axisUseAvailableSpaceFrom = spaceFrom;
1089 } else if( tagName == "UseAvailableSpaceTo" ) {
1091 if( KDXML::readIntNode( element, spaceTo ) )
1092 axisSettings->_axisUseAvailableSpaceTo = spaceTo;
1093 } else if( tagName == "IsometricReferenceAxis" ) {
1095 if( KDXML::readIntNode( element, isoRefAxis ) )
1096 axisSettings->_axisIsoRefAxis = isoRefAxis;
1097 } else if( tagName == "AreaMin" ) {
1099 if( KDXML::readIntNode( element, areaMin ) )
1100 axisSettings->_axisAreaMin = areaMin;
1101 } else if( tagName == "AreaMax" ) {
1103 if( KDXML::readIntNode( element, areaMax ) )
1104 axisSettings->_axisAreaMax = areaMax;
1105 } else if( tagName == "CalcMode" ) {
1107 if( KDXML::readStringNode( element, string ) )
1109 } else if( tagName == "TrueAreaSize" ) {
1111 if( KDXML::readIntNode( element, trueAreaSize ) )
1112 axisSettings->_axisTrueAreaSize = trueAreaSize;
1113 } else if( tagName == "TrueAreaRect" ) {
1114 TQRect trueAreaRect;
1115 if( KDXML::readRectNode( element, trueAreaRect ) )
1116 axisSettings->_axisTrueAreaRect = trueAreaRect;
1117 } else if( tagName == "ShowSubDelimiters" ) {
1118 bool showSubDelimiters;
1119 if( KDXML::readBoolNode( element, showSubDelimiters ) )
1120 axisSettings->_axisShowSubDelimiters = showSubDelimiters;
1121 } else if( tagName == "LineVisible" ) {
1123 if( KDXML::readBoolNode( element, lineVisible ) )
1124 axisSettings->_axisLineVisible = lineVisible;
1125 } else if( tagName == "LineWidth" ) {
1127 if( KDXML::readIntNode( element, lineWidth ) )
1128 axisSettings->_axisLineWidth = lineWidth;
1129 } else if( tagName == "TrueLineWidth" ) {
1131 if( KDXML::readIntNode( element, trueLineWidth ) )
1132 axisSettings->_axisTrueLineWidth = trueLineWidth;
1133 } else if( tagName == "LineColor" ) {
1135 if( KDXML::readColorNode( element, color ) )
1136 axisSettings->_axisLineColor = color;
1137 } else if( tagName == "ShowGrid" ) {
1139 if( KDXML::readBoolNode( element, showGrid ) )
1140 axisSettings->_axisShowGrid = showGrid;
1141 } else if( tagName == "GridColor" ) {
1143 if( KDXML::readColorNode( element, color ) )
1144 axisSettings->_axisGridColor = color;
1145 } else if( tagName == "GridLineWidth" ) {
1147 if( KDXML::readIntNode( element, gridLineWidth ) )
1148 axisSettings->_axisGridLineWidth = gridLineWidth;
1149 } else if( tagName == "GridStyle" ) {
1150 if( element.hasAttribute( "Style" ) )
1151 axisSettings->_axisGridStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
1152 } else if( tagName == "GridSubColor" ) {
1154 if( KDXML::readColorNode( element, color ) )
1155 axisSettings->_axisGridSubColor = color;
1156 } else if( tagName == "GridSubLineWidth" ) {
1157 int gridSubLineWidth;
1158 if( KDXML::readIntNode( element, gridSubLineWidth ) )
1159 axisSettings->_axisGridSubLineWidth = gridSubLineWidth;
1160 } else if( tagName == "GridSubStyle" ) {
1161 if( element.hasAttribute( "Style" ) )
1162 axisSettings->_axisGridSubStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
1163 } else if( tagName == "ZeroLineColor" ) {
1165 if( KDXML::readColorNode( element, color ) )
1166 axisSettings->_axisZeroLineColor = color;
1167 } else if( tagName == "LabelsVisible" ) {
1169 if( KDXML::readBoolNode( element, labelsVisible ) )
1170 axisSettings->_axisLabelsVisible = labelsVisible;
1171 } else if( tagName == "LabelsFont" ) {
1173 axisSettings->_axisLabelsFont,
1174 axisSettings->_axisLabelsFontUseRelSize,
1175 axisSettings->_axisLabelsFontRelSize,
1176 &axisSettings->_axisLabelsFontMinSize );
1177 } else if( tagName == "LabelsDontShrinkFont" ) {
1179 if( KDXML::readBoolNode( element, dontShrink ) )
1180 axisSettings->_axisLabelsDontShrinkFont = dontShrink;
1181 } else if( tagName == "LabelsDontAutoRotate" ) {
1183 if( KDXML::readBoolNode( element, dontRotate ) )
1184 axisSettings->_axisLabelsDontAutoRotate = dontRotate;
1185 } else if( tagName == "LabelsRotation" ) {
1187 if( KDXML::readIntNode( element, rotation ) )
1188 axisSettings->_axisLabelsRotation = rotation;
1189 } else if( tagName == "LabelsLeaveOut" ) {
1191 if( KDXML::readIntNode( element, leaveOut ) )
1192 axisSettings->_axisValueLeaveOut = leaveOut;
1193 } else if( tagName == "LabelsColor" ) {
1195 if( KDXML::readColorNode( element, color ) )
1196 axisSettings->_axisLabelsColor = color;
1197 } else if( tagName == "SteadyValueCalc" ) {
1198 bool steadyValueCalc;
1199 if( KDXML::readBoolNode( element, steadyValueCalc ) )
1200 axisSettings->_axisSteadyValueCalc = steadyValueCalc;
1201 } else if( tagName == "ValueStart" ) {
1202 TQVariant valX, valY;
1205 TQVariant::Double == valY.type() )
1206 axisSettings->_axisValueStart = valY.toDouble();
1207 } else if( tagName == "ValueStartIsExact" ) {
1209 if( KDXML::readBoolNode( element, isExactValue ) )
1210 axisSettings->_axisValueStartIsExact = isExactValue;
1211 } else if( tagName == "ValueEnd" ) {
1212 TQVariant valX, valY;
1215 TQVariant::Double == valY.type() )
1216 axisSettings->_axisValueEnd = valY.toDouble();
1217 } else if( tagName == "ValueDelta" ) {
1219 if( KDXML::readDoubleNode( element, valueDelta ) )
1220 axisSettings->_axisValueDelta = valueDelta;
1221 } else if( tagName == "ValueDeltaScale" ) {
1222 int valueDeltaScale;
1223 if( KDXML::readIntNode( element, valueDeltaScale ) )
1224 axisSettings->_axisValueDeltaScale = (KDChartAxisParams::ValueScale)valueDeltaScale;
1225 } else if( tagName == "ValuesDecreasing" ) {
1227 if( KDXML::readBoolNode( element, decreasing ) )
1228 axisSettings->_axisValuesDecreasing = decreasing;
1229 } else if( tagName == "TrueLow" ) {
1231 if( KDXML::readDoubleNode( element, trueLow ) )
1232 axisSettings->_trueLow = trueLow;
1233 } else if( tagName == "TrueHigh" ) {
1235 if( KDXML::readDoubleNode( element, trueHigh ) )
1236 axisSettings->_trueHigh = trueHigh;
1237 } else if( tagName == "TrueDelta" ) {
1239 if( KDXML::readDoubleNode( element, trueDelta ) )
1240 axisSettings->_trueDelta = trueDelta;
1241 } else if( tagName == "ZeroLineStart" ) {
1245 if( element.hasAttribute( "X" ) &&
1246 element.hasAttribute( "Y" ) ) {
1247 x = element.attribute( "X" ).toDouble( &ok );
1249 y = element.attribute( "Y" ).toDouble( &ok );
1254 axisSettings->_axisZeroLineStartX = x;
1255 axisSettings->_axisZeroLineStartY = y;
1257 } else if( tagName == "DigitsBehindComma" ) {
1258 int digitsBehindComma;
1259 if( KDXML::readIntNode( element, digitsBehindComma ) )
1260 axisSettings->_axisDigitsBehindComma = digitsBehindComma;
1261 } else if( tagName == "LabelsDateTimeFormat" ) {
1263 if( KDXML::readStringNode( element, string ) )
1264 axisSettings->_axisLabelsDateTimeFormat = string;
1265 } else if( tagName == "MaxEmptyInnerSpan" ) {
1266 int maxEmptyInnerSpan;
1267 if( KDXML::readIntNode( element, maxEmptyInnerSpan ) )
1268 axisSettings->_axisMaxEmptyInnerSpan = maxEmptyInnerSpan;
1269 } else if( tagName == "LabelsFromDataRow" ) {
1271 if( KDXML::readStringNode( element, string ) )
1273 } else if( tagName == "TextsDataRow" ) {
1275 if( KDXML::readIntNode( element, textsDataRow ) )
1276 axisSettings->_labelTextsDataRow = textsDataRow;
1277 } else if( tagName == "LabelString" ) {
1279 if( KDXML::readStringNode( element, string ) )
1280 axisSettings->_axisLabelStringList << string;
1281 } else if( tagName == "ShortLabelString" ) {
1283 if( KDXML::readStringNode( element, string ) )
1284 axisSettings->_axisShortLabelsStringList << string;
1285 } else if( tagName == "LabelText" ) {
1287 if( KDXML::readStringNode( element, string ) )
1288 axisSettings->_axisLabelTexts = string;
1289 } else if( tagName == "LabelTextsDirty" ) {
1290 bool labelTextsDirty;
1291 if( KDXML::readBoolNode( element, labelTextsDirty ) )
1292 axisSettings->_axisLabelTextsDirty = labelTextsDirty;
1293 } else if( tagName == "FirstLabelReplacementText" ) {
1295 if( KDXML::readStringNode( element, value ) )
1296 axisSettings->_axisFirstLabelText = value;
1297 } else if( tagName == "LastLabelReplacementText" ) {
1299 if( KDXML::readStringNode( element, value ) )
1300 axisSettings->_axisLastLabelText = value;
1301 } else if( tagName == "LabelsDivPow10" ) {
1303 if( KDXML::readIntNode( element, divPow10 ) )
1304 axisSettings->_axisLabelsDivPow10 = divPow10;
1305 } else if( tagName == "LabelsDecimalPoint" ) {
1307 if( KDXML::readStringNode( element, value ) )
1308 axisSettings->_axisLabelsDecimalPoint = value;
1309 } else if( tagName == "LabelsThousandsPoint" ) {
1311 if( KDXML::readStringNode( element, value ) )
1312 axisSettings->_axisLabelsThousandsPoint = value;
1313 } else if( tagName == "LabelsNotation" ) {
1315 if( KDXML::readStringNode( element, string ) )
1317 } else if( tagName == "LabelsPrefix" ) {
1319 if( KDXML::readStringNode( element, value ) )
1320 axisSettings->_axisLabelsPrefix = value;
1321 } else if( tagName == "LabelsPostfix" ) {
1323 if( KDXML::readStringNode( element, value ) )
1324 axisSettings->_axisLabelsPostfix = value;
1325 } else if( tagName == "LabelsTotalLen" ) {
1327 if( KDXML::readIntNode( element, totalLen ) )
1328 axisSettings->_axisLabelsTotalLen = totalLen;
1329 } else if( tagName == "LabelsPadFill" ) {
1331 if( KDXML::readStringNode( element, value ) ){
1332 if( value.isEmpty() )
1333 axisSettings->_axisLabelsPadFill = ' ';
1335 axisSettings->_axisLabelsPadFill = value.at(0);
1337 } else if( tagName == "LabelsBlockAlign" ) {
1339 if( KDXML::readBoolNode( element, blockAlign ) )
1340 axisSettings->_axisLabelsBlockAlign = blockAlign;
1342 tqDebug( "Unknown subelement of AxisSettings found: %s", tagName.latin1() );
1345 node = node.nextSibling();
1360 int curAxisSettings = 0;
1361 int curHFSettings = 0;
1363 TQDomElement docRoot = doc.documentElement();
1364 TQDomNode node = docRoot.firstChild();
1365 while( !node.isNull() ) {
1366 TQDomElement element = node.toElement();
1367 if( !element.isNull() ) {
1368 TQString tagName = element.tagName();
1369 if( tagName == "ChartType" ) {
1370 if( element.hasAttribute( "primary" ) )
1372 if( element.hasAttribute( "secondary" ) )
1374 } else if( tagName == "NumValues" ) {
1376 if( KDXML::readIntNode( element, numValues ) )
1378 } else if( tagName == "ModeAndChartMap" ) {
1380 TQDomNode node = element.firstChild();
1381 while( !node.isNull() ) {
1382 TQDomElement element = node.toElement();
1383 if( !element.isNull() ) {
1384 TQString tagName = element.tagName();
1385 if( tagName == "Dataset" ) {
1386 KDXML::readIntNode( element, dataset );
1387 } else if( tagName == "ModeAndChart" ) {
1388 Q_ASSERT( dataset != -1 );
1389 if( element.hasAttribute( "Mode" ) &&
1390 element.hasAttribute( "Chart" ) ) {
1393 uint chart = element.attribute( "Chart" ).toUInt( &ok );
1395 _dataSourceModeAndChart[dataset] = KDChartParams::ModeAndChart( sourceMode, chart );
1398 tqDebug( "Unknown subelement of ModeAndChartMap found: %s", tagName.latin1() );
1401 node = node.nextSibling();
1403 } else if( tagName == "PropertySetMap" ) {
1405 TQDomNode node = element.firstChild();
1407 while( !node.isNull() ) {
1408 TQDomElement element = node.toElement();
1409 if( !element.isNull()
1412 node = node.nextSibling();
1414 } else if( tagName == "ChartSourceModeWasUsed" ) {
1415 bool chartSourceModeWasUsed;
1416 if( KDXML::readBoolNode( element, chartSourceModeWasUsed ) )
1417 _setChartSourceModeWasUsed = chartSourceModeWasUsed;
1418 } else if( tagName == "MaxDatasetSourceMode" ) {
1422 } else if( tagName == "ColorSettings" ) {
1423 TQDomNode node = element.firstChild();
1424 while( !node.isNull() ) {
1425 TQDomElement element = node.toElement();
1426 if( !element.isNull() ) {
1427 TQString tagName = element.tagName();
1428 if( tagName == "DataColors" ) {
1429 TQMap<uint,TQColor>* map = &_dataColors;
1431 } else if( tagName == "MaxDatasetColor" ) {
1432 int maxDatasetColor;
1433 if( KDXML::readIntNode( element, maxDatasetColor ) )
1434 _maxDatasetColor = maxDatasetColor;
1435 } else if( tagName == "ShadowBrightnessFactor" ) {
1439 } else if( tagName == "ShadowPattern" ) {
1441 if( KDXML::readStringNode( element, value ) )
1442 _shadowPattern = KDXML::stringToBrushStyle( value );
1443 } else if( tagName == "ThreeDShadowColors" ) {
1447 } else if( tagName == "DataColorsShadow1" ) {
1448 TQMap<uint,TQColor>* map = &_dataColorsShadow1;
1450 } else if( tagName == "DataColorsShadow2" ) {
1451 TQMap<uint,TQColor>* map = &_dataColorsShadow2;
1453 } else if( tagName == "OutlineDataColor" ) {
1455 if( KDXML::readColorNode( element, color ) )
1456 _outlineDataColor = color;
1457 } else if( tagName == "OutlineDataLineWidth" ) {
1461 } else if( tagName == "OutlineDataLineStyle" ) {
1462 if( element.hasAttribute( "Style" ) )
1463 _outlineDataLineStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
1465 tqDebug( "!!!Unknown subelement of ColorSettings found: %s", tagName.latin1() );
1468 node = node.nextSibling();
1470 } else if( tagName == "BarSettings" ) {
1471 TQDomNode node = element.firstChild();
1472 while( !node.isNull() ) {
1473 TQDomElement element = node.toElement();
1474 if( !element.isNull() ) {
1475 TQString tagName = element.tagName();
1476 if( tagName == "SubType" ) {
1478 if( KDXML::readStringNode( element, value ) )
1480 } else if( tagName == "ThreeDBars" ) {
1482 if( KDXML::readBoolNode( element, threeDBars ) )
1484 } else if( tagName == "ThreeDBarDepth" ) {
1488 } else if( tagName == "DatasetGap" ) {
1490 if( KDXML::readIntNode( element, datasetGap ) )
1492 } else if( tagName == "DatasetGapIsRelative" ) {
1496 } else if( tagName == "ValueBlockGap" ) {
1500 } else if( tagName == "ValueBlockGapIsRelative" ) {
1504 } else if( tagName == "BarWidth" ) {
1506 if( KDXML::readIntNode( element, barWidth ) )
1508 } else if( tagName == "SolidExcessArrows" ) {
1509 bool solidExcessArrows;
1510 if( KDXML::readBoolNode( element, solidExcessArrows ) )
1511 _solidExcessArrows = solidExcessArrows;
1513 tqDebug( "Unknown subelement of BarSettings found: %s", tagName.latin1() );
1516 node = node.nextSibling();
1518 } else if( tagName == "LineSettings" ) {
1519 TQDomNode node = element.firstChild();
1520 while( !node.isNull() ) {
1521 TQDomElement element = node.toElement();
1522 if( !element.isNull() ) {
1523 TQString tagName = element.tagName();
1524 if( tagName == "SubType" ) {
1526 if( KDXML::readStringNode( element, value ) )
1528 } else if( tagName == "Marker" ) {
1530 if( KDXML::readBoolNode( element, marker ) )
1531 _lineMarker = marker;
1532 } else if( tagName == "MarkerStyle" ) {
1536 if( element.hasAttribute( "Dataset" ) &&
1537 element.hasAttribute( "Style" ) ) {
1538 dataset = element.attribute( "Dataset" ).toUInt( &ok );
1544 _lineMarkerStyles[dataset] = style;
1545 } else if( tagName == "MarkerSize" ) {
1549 if( element.hasAttribute( "Width" ) &&
1550 element.hasAttribute( "Height" ) ) {
1551 width = element.attribute( "Width" ).toInt( &ok );
1553 height = element.attribute( "Height" ).toInt( &ok );
1558 _lineMarkerSize.setWidth( width );
1559 _lineMarkerSize.setHeight( height );
1561 } else if( tagName == "LineWidth" ) {
1563 if( KDXML::readIntNode( element, lineWidth ) )
1565 } else if( tagName == "LineColor" ) {
1567 if( KDXML::readColorNode( element, color ) )
1569 } else if( tagName == "LineStyle" ) {
1570 if( element.hasAttribute( "Style" ) )
1571 _lineStyle = KDXML::stringToPenStyle( element.attribute( "Style" ) );
1572 } else if( tagName == "DatasetLineStyle" ) {
1575 TQt::PenStyle style = TQt::SolidLine;
1576 if( element.hasAttribute( "Dataset" ) &&
1577 element.hasAttribute( "Style" ) ) {
1578 dataset = element.attribute( "Dataset" ).toUInt( &ok );
1580 style = KDXML::stringToPenStyle( element.attribute( "Style" ) );
1584 _datasetLineStyles[dataset] = style;
1585 } else if( tagName == "ThreeD" ) {
1587 if( KDXML::readBoolNode( element, threeD ) )
1588 _threeDLines = threeD;
1589 } else if( tagName == "ThreeDDepth" ) {
1591 if( KDXML::readIntNode( element, depth ) )
1592 _threeDLineDepth = depth;
1593 } else if( tagName == "ThreeDXRotation" ) {
1595 if( KDXML::readIntNode( element, rotation ) )
1596 _threeDLineXRotation = rotation;
1597 } else if( tagName == "ThreeDYRotation" ) {
1599 if( KDXML::readIntNode( element, rotation ) )
1600 _threeDLineYRotation = rotation;
1602 tqDebug( "Unknown subelement of LineSettings found: %s", tagName.latin1() );
1605 node = node.nextSibling();
1607 } else if( tagName == "AreaSettings" ) {
1608 TQDomNode node = element.firstChild();
1609 while( !node.isNull() ) {
1610 TQDomElement element = node.toElement();
1611 if( !element.isNull() ) {
1612 TQString tagName = element.tagName();
1613 if( tagName == "SubType" ) {
1615 if( KDXML::readStringNode( element, value ) )
1617 } else if( tagName == "Location" ) {
1619 if( KDXML::readStringNode( element, string ) )
1622 tqDebug( "Unknown subelement of AreaSettings found: %s", tagName.latin1() );
1625 node = node.nextSibling();
1627 } else if( tagName == "PieRingSettings" ) {
1628 TQDomNode node = element.firstChild();
1629 while( !node.isNull() ) {
1630 TQDomElement element = node.toElement();
1631 if( !element.isNull() ) {
1632 TQString tagName = element.tagName();
1633 if( tagName == "Explode" ) {
1635 if( KDXML::readBoolNode( element, explode ) )
1637 } else if( tagName == "DefaultExplodeFactor" ) {
1638 double defaultExplodeFactor;
1639 if( KDXML::readDoubleNode( element, defaultExplodeFactor ) )
1640 _explodeFactor = defaultExplodeFactor;
1641 } else if( tagName == "ExplodeFactors" ) {
1642 TQMap<int,double>* map = &_explodeFactors;
1644 } else if( tagName == "ExplodeSegment" ) {
1646 if( KDXML::readIntNode( element, explodeSegment ) )
1647 _explodeList << explodeSegment;
1648 } else if( tagName == "ThreeDPies" ) {
1650 if( KDXML::readBoolNode( element, threeDPies ) )
1652 } else if( tagName == "ThreeDPieHeight" ) {
1656 } else if( tagName == "PieStart" ) {
1658 if( KDXML::readIntNode( element, pieStart ) )
1660 } else if( tagName == "RingStart" ) {
1662 if( KDXML::readIntNode( element, ringStart ) )
1664 } else if( tagName == "RelativeRingThickness" ) {
1669 tqDebug( "Unknown subelement of PieRingSettings found: %s", tagName.latin1() );
1672 node = node.nextSibling();
1674 } else if( tagName == "HiLoSettings" ) {
1675 TQDomNode node = element.firstChild();
1676 while( !node.isNull() ) {
1677 TQDomElement element = node.toElement();
1678 if( !element.isNull() ) {
1679 TQString tagName = element.tagName();
1680 if( tagName == "SubType" ) {
1682 if( KDXML::readStringNode( element, value ) )
1684 } else if( tagName == "PrintLowValues" ) {
1685 bool printLowValues;
1686 if( KDXML::readBoolNode( element, printLowValues ) )
1687 _hiLoChartPrintLowValues = printLowValues;
1688 } else if( tagName == "LowValuesFont" ) {
1690 _hiLoChartLowValuesFont,
1691 _hiLoChartLowValuesUseFontRelSize,
1692 _hiLoChartLowValuesFontRelSize );
1693 } else if( tagName == "LowValuesColor" ) {
1695 if( KDXML::readColorNode( element, color ) )
1696 _hiLoChartLowValuesColor = color;
1697 } else if( tagName == "PrintHighValues" ) {
1698 bool printHighValues;
1699 if( KDXML::readBoolNode( element, printHighValues ) )
1700 _hiLoChartPrintHighValues = printHighValues;
1701 } else if( tagName == "HighValuesFont" ) {
1703 _hiLoChartHighValuesFont,
1704 _hiLoChartHighValuesUseFontRelSize,
1705 _hiLoChartHighValuesFontRelSize );
1706 } else if( tagName == "HighValuesColor" ) {
1708 if( KDXML::readColorNode( element, color ) )
1709 _hiLoChartHighValuesColor = color;
1710 } else if( tagName == "PrintOpenValues" ) {
1711 bool printOpenValues;
1712 if( KDXML::readBoolNode( element, printOpenValues ) )
1713 _hiLoChartPrintOpenValues = printOpenValues;
1714 } else if( tagName == "OpenValuesFont" ) {
1716 _hiLoChartOpenValuesFont,
1717 _hiLoChartOpenValuesUseFontRelSize,
1718 _hiLoChartOpenValuesFontRelSize );
1719 } else if( tagName == "OpenValuesColor" ) {
1721 if( KDXML::readColorNode( element, color ) )
1722 _hiLoChartOpenValuesColor = color;
1723 } else if( tagName == "PrintCloseValues" ) {
1724 bool printCloseValues;
1725 if( KDXML::readBoolNode( element, printCloseValues ) )
1726 _hiLoChartPrintCloseValues = printCloseValues;
1727 } else if( tagName == "CloseValuesFont" ) {
1729 _hiLoChartCloseValuesFont,
1730 _hiLoChartCloseValuesUseFontRelSize,
1731 _hiLoChartCloseValuesFontRelSize );
1732 } else if( tagName == "CloseValuesColor" ) {
1734 if( KDXML::readColorNode( element, color ) )
1735 _hiLoChartCloseValuesColor = color;
1737 tqDebug( "Unknown subelement of HiLoSettings found: %s", tagName.latin1() );
1740 node = node.nextSibling();
1744 } else if( tagName == "BoxAndWhiskerSettings" ) {
1745 TQDomNode node = element.firstChild();
1746 while( !node.isNull() ) {
1747 TQDomElement element = node.toElement();
1748 if( !element.isNull() ) {
1749 TQString tagName = element.tagName();
1750 if( tagName == "SubType" ) {
1752 if( KDXML::readStringNode( element, value ) )
1754 } else if( tagName == "FenceUpperInner" ) {
1756 if( KDXML::readDoubleNode( element, fence ) )
1757 _BWChartFenceUpperInner = fence;
1758 } else if( tagName == "FenceLowerInner" ) {
1760 if( KDXML::readDoubleNode( element, fence ) )
1761 _BWChartFenceUpperOuter = fence;
1762 } else if( tagName == "FenceUpperOuter" ) {
1764 if( KDXML::readDoubleNode( element, fence ) )
1765 _BWChartFenceUpperOuter = fence;
1766 } else if( tagName == "FenceLowerOuter" ) {
1768 if( KDXML::readDoubleNode( element, fence ) )
1769 _BWChartFenceUpperOuter = fence;
1770 } else if( tagName == "Brush" ) {
1772 if( KDXML::readBrushNode( element, brush ) )
1773 _BWChartBrush = brush;
1774 } else if( tagName == "OutlierSize" ) {
1776 if( KDXML::readIntNode( element, size ) )
1777 _BWChartOutValMarkerSize = size;
1778 } else if( tagName.startsWith( "PrintStatistics") ) {
1780 TQString statName(tagName.mid( 15 ));
1782 if( BWStatValSTART <= i && i <= BWStatValEND ) {
1783 TQDomNode node = element.firstChild();
1784 while( !node.isNull() ) {
1785 TQDomElement element = node.toElement();
1786 if( !element.isNull() ) {
1787 TQString tagName = element.tagName();
1788 if( tagName == "Active" ) {
1790 if( KDXML::readBoolNode( element, active ) )
1791 _BWChartStatistics[ i ].active = active;
1792 } else if( tagName == "Font" ) {
1794 _BWChartStatistics[ i ].font,
1795 _BWChartStatistics[ i ].useRelSize,
1796 _BWChartStatistics[ i ].relSize );
1797 } else if( tagName == "Color" ) {
1799 if( KDXML::readColorNode( element, color ) )
1800 _BWChartStatistics[ i ].color = color;
1801 } else if( tagName == "Brush" ) {
1803 if( KDXML::readBrushNode( element, brush ) )
1804 _BWChartStatistics[ i ].brush = brush;
1806 tqDebug( "Unknown subelement of BoxAndWhiskerSettings found: %s", tagName.latin1() );
1811 tqDebug( "Unknown subelement of BoxAndWhiskerSettings found: %s", tagName.latin1() );
1814 tqDebug( "Unknown subelement of BoxAndWhiskerSettings found: %s", tagName.latin1() );
1817 node = node.nextSibling();
1819 } else if( tagName == "PolarSettings" ) {
1820 TQDomNode node = element.firstChild();
1821 while( !node.isNull() ) {
1822 TQDomElement element = node.toElement();
1823 if( !element.isNull() ) {
1824 TQString tagName = element.tagName();
1825 if( tagName == "SubType" ) {
1827 if( KDXML::readStringNode( element, value ) )
1829 } else if( tagName == "Marker" ) {
1831 if( KDXML::readBoolNode( element, marker ) )
1832 _polarMarker = marker;
1833 } else if( tagName == "MarkerStyle" ) {
1837 if( element.hasAttribute( "Dataset" ) &&
1838 element.hasAttribute( "Style" ) ) {
1839 dataset = element.attribute( "Dataset" ).toUInt( &ok );
1845 _polarMarkerStyles[dataset] = style;
1846 } else if( tagName == "MarkerSize" ) {
1850 if( element.hasAttribute( "Width" ) &&
1851 element.hasAttribute( "Height" ) ) {
1852 width = element.attribute( "Width" ).toInt( &ok );
1854 height = element.attribute( "Height" ).toInt( &ok );
1859 _polarMarkerSize.setWidth( width );
1860 _polarMarkerSize.setHeight( height );
1862 } else if( tagName == "PolarLineWidth" ) {
1867 tqDebug( "Unknown subelement of PolarSettings found: %s", tagName.latin1() );
1870 node = node.nextSibling();
1872 } else if( tagName == "LegendSettings" ) {
1873 TQDomNode node = element.firstChild();
1874 while( !node.isNull() ) {
1875 TQDomElement element = node.toElement();
1876 if( !element.isNull() ) {
1877 TQString tagName = element.tagName();
1878 if( tagName == "Position" ) {
1880 if( KDXML::readStringNode( element, string ) )
1882 } else if( tagName == "Orientation" ) {
1883 TQt::Orientation value=TQt::Vertical;
1884 if( KDXML::readOrientationNode( element, value ) )
1885 _legendOrientation = value;
1886 } else if( tagName == "ShowLines" ) {
1888 if( KDXML::readBoolNode( element, showLines ) )
1889 _legendShowLines = showLines;
1890 } else if( tagName == "Source" ) {
1892 if( KDXML::readStringNode( element, string ) )
1894 } else if( tagName == "LegendText" ) {
1898 if( element.hasAttribute( "Dataset" ) &&
1899 element.hasAttribute( "Text" ) ) {
1900 dataset = element.attribute( "Dataset" ).toUInt( &ok );
1902 text = element.attribute( "Text" );
1906 _legendText[dataset] = text;
1907 } else if( tagName == "TextColor" ) {
1909 if( KDXML::readColorNode( element, color ) )
1910 _legendTextColor = color;
1911 } else if( tagName == "TextFont" ) {
1914 _legendFontUseRelSize,
1915 _legendFontRelSize );
1916 } else if( tagName == "TitleText" ) {
1918 if( KDXML::readStringNode( element, string ) )
1919 _legendTitleText = string;
1920 } else if( tagName == "TitleColor" ) {
1922 if( KDXML::readColorNode( element, color ) )
1923 _legendTitleTextColor = color;
1924 } else if( tagName == "TitleFont" ) {
1927 _legendTitleFontUseRelSize,
1928 _legendTitleFontRelSize );
1929 } else if( tagName == "Spacing" ) {
1931 if( KDXML::readIntNode( element, spacing ) )
1932 _legendSpacing = spacing;
1934 tqDebug( "Unknown subelement of LegendSettings found: %s", tagName.latin1() );
1937 node = node.nextSibling();
1939 } else if( tagName == "AxisSettings" ) {
1943 } else if( tagName == "HeaderFooterSettings" ) {
1944 KDChartParams::HdFtParams* hfSettings =
1945 &( _hdFtParams[ curHFSettings ] );
1946 TQDomNode node = element.firstChild();
1947 while( !node.isNull() ) {
1948 TQDomElement element = node.toElement();
1949 if( !element.isNull() ) {
1950 TQString tagName = element.tagName();
1951 if( tagName == "Text" ) {
1953 if( KDXML::readStringNode( element, string ) )
1954 hfSettings->_text = string;
1955 } else if( tagName == "Font" ) {
1958 hfSettings->_fontUseRelSize,
1959 hfSettings->_fontRelSize );
1960 } else if( tagName == "Color" ) {
1962 if( KDXML::readColorNode( element, color ) )
1963 hfSettings->_color = color;
1965 tqDebug( "Unknown subelement of HeaderFooterSettings found: %s", tagName.latin1() );
1968 node = node.nextSibling();
1971 } else if( tagName == "GlobalLeading" ) {
1972 TQDomNode node = element.firstChild();
1973 while( !node.isNull() ) {
1974 TQDomElement element = node.toElement();
1975 if( !element.isNull() ) {
1976 TQString tagName = element.tagName();
1977 if( tagName == "Left" ) {
1979 if( KDXML::readIntNode( element, value ) )
1980 _globalLeadingLeft = value;
1982 else if( tagName == "Top" ) {
1984 if( KDXML::readIntNode( element, value ) )
1985 _globalLeadingTop = value;
1987 else if( tagName == "Right" ) {
1989 if( KDXML::readIntNode( element, value ) )
1990 _globalLeadingRight = value;
1992 else if( tagName == "Bottom" ) {
1994 if( KDXML::readIntNode( element, value ) )
1995 _globalLeadingBottom = value;
1997 tqDebug( "Unknown subelement of GlobalLeading found: %s", tagName.latin1() );
2000 node = node.nextSibling();
2002 } else if( tagName == "DataValuesSettings1" ) {
2003 TQDomNode node = element.firstChild();
2004 while( !node.isNull() ) {
2005 TQDomElement element = node.toElement();
2006 if( !element.isNull() ) {
2007 TQString tagName = element.tagName();
2008 if( tagName == "PrintDataValues" ) {
2010 if( KDXML::readBoolNode( element, value ) )
2011 _printDataValuesSettings._printDataValues = value;
2012 } else if( tagName == "DivPow10" ) {
2014 if( KDXML::readIntNode( element, value ) )
2015 _printDataValuesSettings._divPow10 = value;
2016 } else if( tagName == "DigitsBehindComma" ) {
2018 if( KDXML::readIntNode( element, value ) )
2019 _printDataValuesSettings._digitsBehindComma = value;
2020 } else if( tagName == "Font" ) {
2022 _printDataValuesSettings._dataValuesFont,
2023 _printDataValuesSettings._dataValuesUseFontRelSize,
2024 _printDataValuesSettings._dataValuesFontRelSize );
2025 } else if( tagName == "Color" ) {
2026 KDXML::readColorNode( element, _printDataValuesSettings._dataValuesColor );
2027 } else if( tagName == "Background" ) {
2028 KDXML::readBrushNode( element, _printDataValuesSettings._dataValuesBrush );
2029 } else if( tagName == "AutoColor" ) {
2030 KDXML::readBoolNode( element,
2031 _printDataValuesSettings._dataValuesAutoColor );
2032 } else if( tagName == "AnchorNegativePosition" ) {
2034 if( KDXML::readStringNode( element, value ) )
2036 } else if( tagName == "AnchorNegativeAlign" ) {
2038 if( KDXML::readIntNode( element, value ) )
2039 _printDataValuesSettings._dataValuesAnchorNegativeAlign = value;
2040 } else if( tagName == "AnchorNegativeDeltaX" ) {
2042 if( KDXML::readIntNode( element, value ) )
2043 _printDataValuesSettings._dataValuesAnchorNegativeDeltaX = value;
2044 } else if( tagName == "AnchorNegativeDeltaY" ) {
2046 if( KDXML::readIntNode( element, value ) )
2047 _printDataValuesSettings._dataValuesAnchorNegativeDeltaY = value;
2048 } else if( tagName == "NegativeRotation" ) {
2050 if( KDXML::readIntNode( element, value ) )
2051 _printDataValuesSettings._dataValuesNegativeRotation = value;
2052 } else if( tagName == "AnchorPositivePosition" ) {
2054 if( KDXML::readStringNode( element, value ) )
2056 } else if( tagName == "AnchorPositiveAlign" ) {
2058 if( KDXML::readIntNode( element, value ) )
2059 _printDataValuesSettings._dataValuesAnchorPositiveAlign = value;
2060 } else if( tagName == "AnchorPositiveDeltaX" ) {
2062 if( KDXML::readIntNode( element, value ) )
2063 _printDataValuesSettings._dataValuesAnchorPositiveDeltaX = value;
2064 } else if( tagName == "AnchorPositiveDeltaY" ) {
2066 if( KDXML::readIntNode( element, value ) )
2067 _printDataValuesSettings._dataValuesAnchorPositiveDeltaY = value;
2068 } else if( tagName == "PositiveRotation" ) {
2070 if( KDXML::readIntNode( element, value ) )
2071 _printDataValuesSettings._dataValuesPositiveRotation = value;
2072 } else if( tagName == "LayoutPolicy" ) {
2074 if( KDXML::readStringNode( element, value ) )
2076 } else if( tagName == "ShowInfinite" ) {
2077 KDXML::readBoolNode( element, _printDataValuesSettings._dataValuesShowInfinite );
2079 tqDebug( "Unknown subelement of DataValuesSettings1 found: %s", tagName.latin1() );
2082 node = node.nextSibling();
2084 } else if( tagName == "DataValuesSettings2" ) {
2085 TQDomNode node = element.firstChild();
2086 while( !node.isNull() ) {
2087 TQDomElement element = node.toElement();
2088 if( !element.isNull() ) {
2089 TQString tagName = element.tagName();
2090 if( tagName == "PrintDataValues" ) {
2092 if( KDXML::readBoolNode( element, value ) )
2093 _printDataValuesSettings2._printDataValues = value;
2094 } else if( tagName == "DivPow10" ) {
2096 if( KDXML::readIntNode( element, value ) )
2097 _printDataValuesSettings2._divPow10 = value;
2098 } else if( tagName == "DigitsBehindComma" ) {
2100 if( KDXML::readIntNode( element, value ) )
2101 _printDataValuesSettings2._digitsBehindComma = value;
2102 } else if( tagName == "Font" ) {
2104 _printDataValuesSettings2._dataValuesFont,
2105 _printDataValuesSettings2._dataValuesUseFontRelSize,
2106 _printDataValuesSettings2._dataValuesFontRelSize );
2107 } else if( tagName == "Color" ) {
2108 KDXML::readColorNode( element, _printDataValuesSettings2._dataValuesColor );
2109 } else if( tagName == "Background" ) {
2110 KDXML::readBrushNode( element, _printDataValuesSettings2._dataValuesBrush );
2111 } else if( tagName == "AutoColor" ) {
2112 KDXML::readBoolNode( element,
2113 _printDataValuesSettings2._dataValuesAutoColor );
2114 } else if( tagName == "AnchorNegativePosition" ) {
2116 if( KDXML::readStringNode( element, value ) )
2118 } else if( tagName == "AnchorNegativeAlign" ) {
2120 if( KDXML::readIntNode( element, value ) )
2121 _printDataValuesSettings2._dataValuesAnchorNegativeAlign = value;
2122 } else if( tagName == "AnchorNegativeDeltaX" ) {
2124 if( KDXML::readIntNode( element, value ) )
2125 _printDataValuesSettings2._dataValuesAnchorNegativeDeltaX = value;
2126 } else if( tagName == "AnchorNegativeDeltaY" ) {
2128 if( KDXML::readIntNode( element, value ) )
2129 _printDataValuesSettings2._dataValuesAnchorNegativeDeltaY = value;
2130 } else if( tagName == "NegativeRotation" ) {
2132 if( KDXML::readIntNode( element, value ) )
2133 _printDataValuesSettings2._dataValuesNegativeRotation = value;
2134 } else if( tagName == "AnchorPositivePosition" ) {
2136 if( KDXML::readStringNode( element, value ) )
2138 } else if( tagName == "AnchorPositiveAlign" ) {
2140 if( KDXML::readIntNode( element, value ) )
2141 _printDataValuesSettings2._dataValuesAnchorPositiveAlign = value;
2142 } else if( tagName == "AnchorPositiveDeltaX" ) {
2144 if( KDXML::readIntNode( element, value ) )
2145 _printDataValuesSettings2._dataValuesAnchorPositiveDeltaX = value;
2146 } else if( tagName == "AnchorPositiveDeltaY" ) {
2148 if( KDXML::readIntNode( element, value ) )
2149 _printDataValuesSettings2._dataValuesAnchorPositiveDeltaY = value;
2150 } else if( tagName == "PositiveRotation" ) {
2152 if( KDXML::readIntNode( element, value ) )
2153 _printDataValuesSettings2._dataValuesPositiveRotation = value;
2154 } else if( tagName == "LayoutPolicy" ) {
2156 if( KDXML::readStringNode( element, value ) )
2158 } else if( tagName == "ShowInfinite" ) {
2159 KDXML::readBoolNode( element, _printDataValuesSettings2._dataValuesShowInfinite );
2161 tqDebug( "Unknown subelement of DataValuesSettings2 found: %s", tagName.latin1() );
2164 node = node.nextSibling();
2166 } else if( tagName == "DataValuesGlobalSettings" ) {
2167 TQDomNode node = element.firstChild();
2168 while( !node.isNull() ) {
2169 TQDomElement element = node.toElement();
2170 if( !element.isNull() ) {
2171 TQString tagName = element.tagName();
2172 if( tagName == "allowOverlappingTexts" ) {
2174 if( KDXML::readBoolNode( element, value ) )
2175 _allowOverlappingDataValueTexts = value;
2178 tqDebug( "Unknown subelement of DataValuesGlobalSettings found: %s", tagName.latin1() );
2181 node = node.nextSibling();
2183 } else if( tagName == "AreaMap" ) {
2184 TQDomNode node = element.firstChild();
2185 while( !node.isNull() ) {
2186 TQDomElement element = node.toElement();
2187 if( !element.isNull() ) {
2188 TQString tagName = element.tagName();
2189 if( tagName == "FrameSettings" ) {
2191 uint areaId = KDChartEnums::AreaUNKNOWN;
2195 if(areaId == KDChartEnums::AreaChartDataRegion)
2196 str = TQString( "%1/%2/%3/%4" )
2202 str = TQString( "%1/-----/-----/-----" ).arg( areaId, 5 );
2207 tqDebug( "Unknown tag in AreaMap found: %s", tagName.latin1() );
2210 node = node.nextSibling();
2212 } else if( tagName == "CustomBoxMap" ) {
2213 TQDomNode node = element.firstChild();
2215 while( !node.isNull() ) {
2216 TQDomElement element = node.toElement();
2217 if( !element.isNull() ) {
2218 TQString tagName = element.tagName();
2219 if( tagName == "Number" ) {
2220 KDXML::readIntNode( element, curNumber );
2221 } else if( tagName == "CustomBox" ) {
2222 Q_ASSERT( curNumber != -1 );
2226 _customBoxDict.insert( curNumber, customBox.clone() );
2229 tqDebug( "Unknown tag in CustomBoxMap found: %s", tagName.latin1() );
2231 node = node.nextSibling();
2234 tqDebug( "Unknown second-level element found: %s", tagName.latin1() );
2239 node = node.nextSibling();
2255 const TQString& elementName,
2256 const TQMap< uint, TQColor >& map )
2258 TQDomElement mapElement =
2259 doc.createElement( elementName );
2260 parent.appendChild( mapElement );
2261 for( TQMap<uint,TQColor>::ConstIterator it = map.begin();
2262 it != map.end(); ++it ) {
2264 TQDomElement datasetElement = doc.createElement( "Dataset" );
2265 mapElement.appendChild( datasetElement );
2266 TQDomText datasetContent =
2267 doc.createTextNode( TQString::number( it.key() ) );
2268 datasetElement.appendChild( datasetContent );
2270 KDXML::createColorNode( doc, mapElement, "Color", it.data() );
2285 const TQString& elementName,
2286 const TQMap< int, double >& map )
2288 TQDomElement mapElement =
2289 doc.createElement( elementName );
2290 parent.appendChild( mapElement );
2291 for( TQMap<int,double>::ConstIterator it = map.begin();
2292 it != map.end(); ++it ) {
2294 TQDomElement valueElement = doc.createElement( "Value" );
2295 mapElement.appendChild( valueElement );
2296 TQDomText valueContent =
2297 doc.createTextNode( TQString::number( it.key() ) );
2298 valueElement.appendChild( valueContent );
2300 KDXML::createDoubleNode( doc, mapElement, "Factor", it.data() );
2305void dataCoordToElementAttr( const TQVariant& val, TQDomElement& element, const TQString& postfix)
2307 if( TQVariant::Double == val.type() )
2308 element.setAttribute( "DoubleValue"+postfix,
2309 TQString::number( val.toDouble() ) );
2310 else if( TQVariant::String == val.type() )
2311 element.setAttribute( "StringValue"+postfix, val.toString() );
2312 else if( TQVariant::DateTime == val.type() )
2313 element.setAttribute( "DateTimeValue"+postfix,
2314 val.toDateTime().toString( TQt::ISODate ) );
2316 element.setAttribute( "NoValue"+postfix, "true" );
2329 const TQString& elementName,
2330 const TQVariant& valY,
2331 const TQVariant& valX,
2334 TQDomElement element = doc.createElement( elementName );
2335 parent.appendChild( element );
2336 dataCoordToElementAttr( valY, element, "" );
2337 dataCoordToElementAttr( valX, element, "X" );
2338 element.setAttribute( "PropertySetID",
2339 TQString::number( propID ) );
2358 const TQString& elementName,
2359 const TQFont& font, bool useRelFont,
2363 TQDomElement chartFontElement = doc.createElement( elementName );
2364 parent.appendChild( chartFontElement );
2365 KDXML::createFontNode( doc, chartFontElement, "Font", font );
2366 KDXML::createBoolNode( doc, chartFontElement, "UseRelFontSize",
2368 KDXML::createIntNode( doc, chartFontElement, "RelFontSize", relFont );
2370 KDXML::createIntNode( doc, chartFontElement, "MinFontSize", minFont );
2387 TQMap<uint,TQColor>* value )
2389 TQDomNode node = element.firstChild();
2390 int curDataset = -1;
2391 while( !node.isNull() ) {
2392 TQDomElement element = node.toElement();
2393 if( !element.isNull() ) {
2394 TQString tagName = element.tagName();
2395 if( tagName == "Dataset" ) {
2396 KDXML::readIntNode( element, curDataset );
2397 } else if( tagName == "Color" ) {
2398 Q_ASSERT( curDataset != -1 );
2400 KDXML::readColorNode( element, color );
2401 value->insert( curDataset, color );
2403 tqDebug( "Unknown tag in color map" );
2406 node = node.nextSibling();
2421 TQMap<int,double>* value )
2423 TQDomNode node = element.firstChild();
2425 while( !node.isNull() ) {
2426 TQDomElement element = node.toElement();
2427 if( !element.isNull() ) {
2428 TQString tagName = element.tagName();
2429 if( tagName == "Value" ) {
2430 KDXML::readIntNode( element, curValue );
2431 } else if( tagName == "Factor" ) {
2432 Q_ASSERT( curValue != -1 );
2434 KDXML::readDoubleNode( element, doubleValue );
2435 value->insert( curValue, doubleValue );
2437 tqDebug( "Unknown tag in double map" );
2440 node = node.nextSibling();
2467 int tempRelFontSize;
2468 int tempMinFontSize=-1;
2469 TQDomNode node = element.firstChild();
2470 while( !node.isNull() ) {
2471 TQDomElement element = node.toElement();
2472 if( !element.isNull() ) {
2473 TQString tagName = element.tagName();
2474 if( tagName == "Font" ) {
2475 ok = ok & KDXML::readFontNode( element, tempFont );
2476 } else if( tagName == "UseRelFontSize" ) {
2477 ok = ok & KDXML::readBoolNode( element, tempRelFont );
2478 } else if( tagName == "RelFontSize" ) {
2479 ok = ok & KDXML::readIntNode( element, tempRelFontSize );
2480 } else if( tagName == "MinFontSize" ) {
2481 ok = ok & KDXML::readIntNode( element, tempMinFontSize );
2483 tqDebug( "Unknown tag in color map" );
2486 node = node.nextSibling();
2491 useRelFont = tempRelFont;
2492 relFontSize = tempRelFontSize;
2493 if( minFontSize && 0 <= tempMinFontSize )
2494 *minFontSize = tempMinFontSize;
2501bool foundCoordAttribute( const TQDomElement& element, const TQString& postfix,
2504 if( element.hasAttribute( "NoValue"+postfix ) )
2506 else if( element.hasAttribute( "DoubleValue"+postfix ) )
2507 val = element.attribute( "DoubleValue"+postfix );
2508 else if( element.hasAttribute( "DateTimeValue"+postfix ) )
2509 val = element.attribute( "DateTimeValue"+postfix );
2510 else if( element.hasAttribute( "StringValue"+postfix ) )
2511 val = element.attribute( "StringValue"+postfix );
2531 if( foundCoordAttribute( element, "", valY ) ||
2532 foundCoordAttribute( element, "Y", valY ) ){
2533 if( !foundCoordAttribute( element, "X", valX ) ){
2537 if( element.hasAttribute( "PropertySetID" ) ) {
2539 int i = element.attribute( "PropertySetID" ).toInt( &ok );
2572 return "BoxWhisker";
2591 if( string == "NoType" )
2593 else if( string == "Bar" )
2595 else if( string == "Line" )
2597 else if( string == "Area" )
2599 else if( string == "Pie" )
2601 else if( string == "HiLo" )
2603 else if( string == "BoxWhisker" )
2605 else if( string == "Ring" )
2607 else if( string == "Polar" )
2615TQString KDChartParams::markerStyleToString( int style )
2618 case LineMarkerSquare:
2620 case LineMarkerDiamond:
2622 case LineMarkerCircle:
2624 case LineMarker1Pixel:
2626 case LineMarker4Pixels:
2627 return "four Pixels";
2628 case LineMarkerRing:
2630 case LineMarkerCross:
2632 case LineMarkerFastCross:
2633 return "fast Cross";
2635 tqDebug( "Unknown marker style" );
2639TQString KDChartParams::markerStyleToStringTr( int style )
2642 case LineMarkerSquare:
2643 return tr( "Square" );
2644 case LineMarkerDiamond:
2645 return tr( "Diamond" );
2646 case LineMarkerCircle:
2647 return tr( "Circle" );
2648 case LineMarker1Pixel:
2649 return tr( "One pixel" );
2650 case LineMarker4Pixels:
2651 return tr( "Four pixels" );
2652 case LineMarkerRing:
2653 return tr( "Ring" );
2654 case LineMarkerCross:
2655 return tr( "Cross" );
2656 case LineMarkerFastCross:
2657 return tr( "fast Cross" );
2659 tqDebug( "Unknown line marker style!" );
2660 return tr( "Circle" );
2663int KDChartParams::stringToMarkerStyle( const TQString& string )
2665 if( string == "Square" )
2666 return LineMarkerSquare;
2667 else if( string == "Diamond" )
2668 return LineMarkerDiamond;
2669 else if( string == "Circle" )
2670 return LineMarkerCircle;
2671 else if( string == "one Pixel" )
2672 return LineMarker1Pixel;
2673 else if( string == "four Pixels" )
2674 return LineMarker4Pixels;
2675 else if( string == "Ring" )
2676 return LineMarkerRing;
2677 else if( string == "Cross" )
2678 return LineMarkerCross;
2679 else if( string == "fast Cross" )
2680 return LineMarkerFastCross;
2682 return LineMarkerCircle;
2684int KDChartParams::stringToMarkerStyleTr( const TQString& string )
2686 if( string == tr( "Square" ) )
2687 return LineMarkerSquare;
2688 else if( string == tr( "Diamond" ) )
2689 return LineMarkerDiamond;
2690 else if( string == tr( "Circle" ) )
2691 return LineMarkerCircle;
2692 else if( string == tr( "One pixel" ) )
2693 return LineMarker1Pixel;
2694 else if( string == tr( "Four pixels" ) )
2695 return LineMarker4Pixels;
2696 else if( string == tr( "Ring" ) )
2697 return LineMarkerRing;
2698 else if( string == tr( "Cross" ) )
2699 return LineMarkerCross;
2700 else if( string == tr( "fast Cross" ) )
2701 return LineMarkerFastCross;
2703 return LineMarkerCircle;
2719 return "BarStacked";
2721 return "BarPercent";
2723 return "BarMultiRows";
2725 tqDebug( "Unknown bar type" );
2738 if( string == "BarNormal" )
2740 else if( string == "BarStacked" )
2742 else if( string == "BarPercent" )
2744 else if( string == "BarMultiRows" )
2745 return BarMultiRows;
2759 if( string == "LineNormal" )
2761 else if( string == "LineStacked" )
2763 else if( string == "LinePercent" )
2780 return "LineNormal";
2782 return "LineStacked";
2784 return "LinePercent";
2786 tqDebug( "Unknown bar type" );
2787 return "LineNormal";
2801 return markerStyleToString( style );
2814 return markerStyleToStringTr( style );
2851 return "AreaNormal";
2853 return "AreaStacked";
2855 return "AreaPercent";
2857 tqDebug( "Unknown area chart subtype" );
2858 return "AreaNormal";
2870 if( string == "AreaNormal" )
2872 else if( string == "AreaStacked" )
2874 else if( string == "AreaPercent" )
2894 tqDebug( "Unknown area location" );
2907 if( string == "Above" )
2909 else if( string == "Below" )
2923 if( string == "PolarNormal" )
2925 else if( string == "PolarStacked" )
2926 return PolarStacked;
2927 else if( string == "PolarPercent" )
2928 return PolarPercent;
2943 return "PolarNormal";
2945 return "PolarStacked";
2947 return "PolarPercent";
2949 tqDebug( "Unknown polar type" );
2950 return "PolarNormal";
2964 return markerStyleToString( style );
2977 return markerStyleToStringTr( style );
3015 return "HiLoSimple";
3019 return "HiLoOpenClose";
3021 tqDebug( "Unknown HiLo chart subtype" );
3022 return "HiLoNormal";
3034 if( string == "HiLoSimple" )
3036 else if( string == "HiLoClose" )
3038 else if( string == "HiLoOpenClose" )
3039 return HiLoOpenClose;
3052 if( string == "BWSimple" )
3066 case UpperOuterFence:
3067 return "UpperOuterFence";
3068 case UpperInnerFence:
3069 return "UpperInnerFence";
3076 case LowerInnerFence:
3077 return "LowerInnerFence";
3078 case LowerOuterFence:
3079 return "LowerOuterFence";
3087 tqDebug( "Unknown BoxWhisker statistical value type" );
3099 if( string == "UpperOuterFence" )
3100 return UpperOuterFence;
3101 else if( string == "UpperInnerFence" )
3102 return UpperInnerFence;
3103 else if( string == "Quartile3" )
3105 else if( string == "Median" )
3107 else if( string == "Quartile1" )
3109 else if( string == "LowerInnerFence" )
3110 return LowerInnerFence;
3111 else if( string == "LowerOuterFence" )
3112 return LowerOuterFence;
3113 else if( string == "MaxValue" )
3115 else if( string == "MeanValue" )
3117 else if( string == "MinValue" )
3120 return BWStatValUNKNOWN;
3137 return "LegendBottom";
3139 return "LegendLeft";
3141 return "LegendRight";
3143 return "LegendTopLeft";
3144 case LegendTopLeftTop:
3145 return "LegendTopLeftTop";
3146 case LegendTopLeftLeft:
3147 return "LegendTopLeftLeft";
3148 case LegendBottomLeft:
3149 return "LegendBottomLeft";
3150 case LegendBottomLeftBottom:
3151 return "LegendBottomLeftBottom";
3152 case LegendBottomLeftLeft:
3153 return "LegendBottomLeftLeft";
3154 case LegendTopRight:
3155 return "LegendTopRight";
3156 case LegendTopRightTop:
3157 return "LegendTopRightTop";
3158 case LegendTopRightRight:
3159 return "LegendTopRightRight";
3160 case LegendBottomRight:
3161 return "LegendBottomRight";
3162 case LegendBottomRightBottom:
3163 return "LegendBottomRightBottom";
3164 case LegendBottomRightRight:
3165 return "LegendBottomRightRight";
3167 tqDebug( "Unknown legend position" );
3168 return "LegendLeft";
3180 if( string == "NoLegend" )
3182 else if( string == "LegendTop" )
3184 else if( string == "LegendBottom" )
3185 return LegendBottom;
3186 else if( string == "LegendLeft" )
3188 else if( string == "LegendRight" )
3190 else if( string == "LegendTopLeft" )
3191 return LegendTopLeft;
3192 else if( string == "LegendTopLeftTop" )
3193 return LegendTopLeftTop;
3194 else if( string == "LegendTopLeftLeft" )
3195 return LegendTopLeftLeft;
3196 else if( string == "LegendBottomLeft" )
3197 return LegendBottomLeft;
3198 else if( string == "LegendBottomLeftBottom" )
3199 return LegendBottomLeftBottom;
3200 else if( string == "LegendBottomLeftLeft" )
3201 return LegendBottomLeftLeft;
3202 else if( string == "LegendTopRight" )
3203 return LegendTopRight;
3204 else if( string == "LegendTopRightTop" )
3205 return LegendTopRightTop;
3206 else if( string == "LegendTopRightRight" )
3207 return LegendTopRightRight;
3208 else if( string == "LegendBottomRight" )
3209 return LegendBottomRight;
3210 else if( string == "LegendBottomRightBottom" )
3211 return LegendBottomRightBottom;
3212 else if( string == "LegendBottomRightRight" )
3213 return LegendBottomRightRight;
3228 case LegendFirstColumn:
3229 return "FirstColumn";
3230 case LegendAutomatic:
3233 tqDebug( "Unknown legend source" );
3246 if( string == "Manual" )
3247 return LegendManual;
3248 else if( string == "FirstColumn" )
3249 return LegendFirstColumn;
3250 else if( string == "Automatic" )
3251 return LegendAutomatic;
3253 return LegendAutomatic;
3267 return "UnknownMode";
3275 return "LegendText";
3276 case ExtraLinesAnchor:
3277 return "ExtraLinesAnchor";
3279 return "UnknownMode";
3292 if( string.isEmpty() )
3296 int mode = string.toInt( &bOk );
3297 if( bOk && mode >= 0 && mode <= Last_SourceMode )
3300 if( string == "UnknownMode" )
3302 if( string == "DontUse" )
3304 if( string == "DataEntry" )
3306 if( string == "AxisLabel" )
3308 if( string == "LegendText" )
3310 if( string == "ExtraLinesAnchor" )
3311 return ExtraLinesAnchor;
3329 tqDebug( "Unknown BoxWhisker chart subtype" );
#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...
Header for all common chart parameters.
TQTextStream & operator>>(TQTextStream &s, KDChartParams &p) Reads the an XML document from the text stream s into the KDChartParams object p.
TQTextStream & operator<<(TQTextStream &s, const KDChartParams &p) Writes the KDChartParams object p as an XML document to the text stream s.
access the chart axis parameters.
static AxisType stringToAxisType(const TQString &type) Converts the specified string to an axis type enum value.
static TQString axisTypeToString(AxisType type) Converts the specified axis type enum to a string representation.
static TQString labelsFromDataRowToString(LabelsFromDataRow mode) enum LabelsFromDataRow { LabelsFromDataRowYes, LabelsFromDataRowNo, LabelsFromDataRowGuess }...
static LabelsFromDataRow stringToLabelsFromDataRow(const TQString &type) Converts the specified string to a data row enum value.
static TQString axisAreaModeToString(AxisAreaMode mode) Converts the specified axis area mode enum to a string representation.
static AxisAreaMode stringToAxisAreaMode(const TQString &type) Converts the specified string to an axis area mode enum value.
static AxisCalcMode stringToAxisCalcMode(const TQString &type) Converts the specified string to an axis calc mode enum value.
static TQString axisCalcModeToString(AxisCalcMode mode) Converts the specified axis calc mode enum to a string representation.
Class for specifying and drawing custom boxes.
static bool readCustomBoxNode(const TQDomElement &element, KDChartCustomBox &custombox) Reads data from a DOM element node that represents a custom box object and fills a KDChartCustomBox o...
static void createCustomBoxNode(TQDomDocument &document, TQDomNode &parent, const TQString &elementName, const KDChartCustomBox *custombox) Creates a DOM element node that represents a custom box for use in a DOM document.
static PositionFlag stringToPositionFlag(const TQString &string) Converts the specified string to a content position enum value.
static TQString layoutPolicyToString(TextLayoutPolicy type) Converts the specified text layout policy enum to a string representation.
static TextLayoutPolicy stringToLayoutPolicy(const TQString &string) Converts the specified string to a text layout policy enum value.
static TQString numberNotationToString(NumberNotation notation) Converts the specified number notation enum to a string representation.
static TQString positionFlagToString(PositionFlag type) Converts the specified content position enum to a string representation.
static NumberNotation stringToNumberNotation(const TQString ¬ation) Converts the specified string to a number notation enum value.
Stores the frame settings for one of the chart areas:
static bool readFrameSettingsNode(const TQDomElement &element, KDChartFrameSettings &settings, uint &areaId) Reads data from a DOM element node that represents a frame settings object and fills a KDChartFrameSe...
static void createFrameSettingsNode(TQDomDocument &document, TQDomNode &parent, const TQString &elementName, const KDChartFrameSettings *settings, uint areaId) Creates a DOM element node that represents a frame settings object for use in a DOM document.
Bundles the display parameters of a chart.
int threeDPieHeight() const Returns the height of the 3D effect for pies in pixels.
static TQString legendSourceToString(LegendSource source) Converts the specified legend source enum to a string representation.
static TQString legendPositionToString(LegendPosition pos) Converts the specified legend position enum to a string representation.
void setProperties(int id, KDChartPropertySet &rSet) Overwrites a property set with a new property set.
static TQString lineMarkerStyleToString(LineMarkerStyle style) Converts the specified line marker style enum to a string representation.
int datasetGap() const Returns the number of pixels between two dataset values.
static TQString polarMarkerStyleToString(PolarMarkerStyle style) Converts the specified polar marker style enum to a string representation.
TQDomDocument saveXML(bool withPI=true) const Saves the parameters to an XML document.
double threeDBarDepth() const Returns the depth of the 3D Effect used for 3D bars.
static bool readColorMapNode(const TQDomElement &element, TQMap< uint, TQColor > *map) Creates a DOM element node that represents a color map for use in a DOM document.
BarChartSubType The bar subtype.
static TQString barChartSubTypeToString(BarChartSubType type) Converts the specified bar chart subtype enum to a string representation.
AreaLocation Specifies whether the area above the value points or below the value points should be filled.
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.
const KDChartFrameSettings * frameSettings(uint area, bool &bFound, int *pIterIdx=0) const Return the frame settings of one of the chart areas.
static TQString polarMarkerStyleToStringTr(PolarMarkerStyle style) Converts the specified polar marker style enum to a localized string representation that can be used ...
int polarLineWidth() const Returns the line width of the lines in polar charts.
PolarChartSubType The polar subtype.
static ChartType stringToChartType(const TQString &string) Converts the specified string to a chart type enum value.
static void createColorMapNode(TQDomDocument &doc, TQDomNode &parent, const TQString &elementName, const TQMap< uint, TQColor > &map) Creates a DOM element node that represents a map of TQColor objects for use in a DOM document.
LineChartSubType The line subtype.
static PolarChartSubType stringToPolarChartSubType(const TQString &string) Converts the specified string to a polar chart subtype enum value.
int barWidth() const Returns the width of one bar as set by setBarWidth or KDCHART_AUTO_SIZE if setBarWidth was never call...
static void createChartValueNode(TQDomDocument &doc, TQDomNode &parent, const TQString &elementName, const TQVariant &valY, const TQVariant &valX, const int &propID) Creates a DOM element node that represents a chart value for use in a DOM document.
const KDChartCustomBox * customBox(uint box) const Retrieve a const pointer to a custom box from the list.
HiLoChartSubType The HiLo subtype.
static LineMarkerStyle stringToLineMarkerStyleTr(const TQString &string) Converts the specified localized string to a line marker style value.
static TQString lineMarkerStyleToStringTr(LineMarkerStyle style) Converts the specified line marker style enum to a localized string representation that can be used f...
static TQString lineChartSubTypeToString(LineChartSubType type) Converts the specified line chart subtype enum to a string representation.
void loadAxesFormXML(int &curAxisSettings, TQDomElement &element) Helper method called by loadXML() only.
LegendSource The possible ways for getting the legend text.
bool relativeRingThickness() const Returns whether the ring thickness is relative to the sum of values in the dataset that the ring repr...
static void createDoubleMapNode(TQDomDocument &doc, TQDomNode &parent, const TQString &elementName, const TQMap< int, double > &map) Creates a DOM element node that represents a map of doubles for use in a DOM document.
static TQString bWChartStatValToString(BWStatVal type) Converts the specified BWStatVal enum to a string representation.
LineMarkerStyle The available line marker styles.
PolarMarkerStyle The available polar marker styles.
AreaChartSubType The area subtype.
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...
static bool readChartFontNode(const TQDomElement &element, TQFont &font, bool &useRelFont, int &relFontSize, int *minFontSize=0) Reads data from a DOM element node that represents a font uses in a chart and fills the reference par...
static LineChartSubType stringToLineChartSubType(const TQString &string) Converts the specified string to a line chart subtype enum value.
static AreaLocation stringToAreaLocation(const TQString &string) Converts the specified string to an area location enum value.
int valueBlockGap() const Returns the number of pixels between each value block.
static SourceMode stringToChartSourceMode(const TQString &string) Converts the specified string to a chart source mode enum value.
static void createChartFontNode(TQDomDocument &doc, TQDomNode &parent, const TQString &elementName, const TQFont &font, bool useRelFont, int relFont, int minFont=-1) Creates a DOM element node that represents a font used in a chart for use in a DOM document.
uint maxDatasetSourceMode() const Returns the number of the highest dataset for which a SourceMode has been defined.
static HiLoChartSubType stringToHiLoChartSubType(const TQString &string) Converts the specified string to a HiLo chart subtype enum value.
SourceMode The chart source mode.
static LegendPosition stringToLegendPosition(const TQString &string) Converts the specified string to a legend position enum value.
static TQString areaLocationToString(AreaLocation type) Converts the specified area location enum to a string representation.
bool threeDPies() const Returns whether the engine should draw any pies in 3D.
static AreaChartSubType stringToAreaChartSubType(const TQString &string) Converts the specified string to a area chart subtype enum value.
LegendPosition The possible positions for a legend.
static TQString chartTypeToString(ChartType type) Converts the specified chart type enum to a string representation.
bool datasetGapIsRelative() const Returns if the value set by setDatasetGap is a per mille value of the chart data area width.
bool showGrid() const Returns if any grid will be drawn at the data area.
static bool readDoubleMapNode(const TQDomElement &element, TQMap< int, double > *map) Reads data from a DOM element node that represents a double map and fills a double map with the data.
BWStatVal The different statistical values that can be printed into or asked from a Box and Whisker chart.
int lineWidth() const Returns the line width of the lines in line charts.
void saveAxesToXML(TQDomDocument &doc, TQDomElement &docRoot) const Helper method saving the axis parameters to an XML file, this is called by saveXML() only.
static TQString chartSourceModeToString(const SourceMode &mode) Converts the specified chart source mode enum value to a string.
static BarChartSubType stringToBarChartSubType(const TQString &string) Converts the specified string to a bar chart subtype enum value.
bool threeDBars() const Returns whether the engine should draw any bars in 3D.
static bool readChartValueNode(const TQDomElement &element, TQVariant &valY, TQVariant &valX, int &propID) Reads data from a DOM element node that represents a chart value and fills a KDChartData object with ...
static TQString polarChartSubTypeToString(PolarChartSubType type) Converts the specified polar chart subtype enum to a string representation.
bool explode() const Returns whether the pie or ring chart should be exploding or not.
static PolarMarkerStyle stringToPolarMarkerStyleTr(const TQString &string) Converts the specified localized string to a polar marker style value.
int pieStart() const Returns the starting point of the pie circle.
BWChartSubType The BoxWhisker subtype.
bool loadXML(const TQDomDocument &doc) Reads the parameters from an XML document.
static LineMarkerStyle stringToLineMarkerStyle(const TQString &string) Converts the specified string to a line marker style value.
int ringStart() const Returns the starting point of the ring circle.
static PolarMarkerStyle stringToPolarMarkerStyle(const TQString &string) Converts the specified string to a polar marker style value.
static LegendSource stringToLegendSource(const TQString &string) Converts the specified string to a legend source enum value.
static BWChartSubType stringToBWChartSubType(const TQString &string) Converts the specified string to a BoxWhisker chart subtype enum value.
static TQString hiLoChartSubTypeToString(HiLoChartSubType type) Converts the specified HiLo chart subtype enum to a string representation.
static TQString bWChartSubTypeToString(BWChartSubType type) Converts the specified BoxWhisker chart subtype enum to a string representation.
static TQString areaChartSubTypeToString(AreaChartSubType type) Converts the specified area chart subtype enum to a string representation.
static BWStatVal stringToBWChartStatVal(const TQString &string) Converts the specified string to a BWStatVal enum value.
uint outlineDataLineWidth() const Returns the width of the outlines of data displays.
Property settings of a single KDChart data cell.
int id() const Returns the name of this property set.
static bool loadXML(const TQDomElement &element, KDChartPropertySet &set) Retrieves a property set and stores it in parameter set.
|