34#include <KDChartTextPiece.h>
35#include <KDXMLTools.h>
36#ifndef KDCHART_MASTER_CVS
37#include "KDChartParams.moc"
57KDChartAutoColor* KDChartAutoColor::mInstance = NULL;
59KDChartAutoColor::KDChartAutoColor()
63KDChartAutoColor::KDChartAutoColor( KDChartAutoColor const& )
67KDChartAutoColor::~KDChartAutoColor()
71const KDChartAutoColor* KDChartAutoColor::instance()
74 mInstance = new KDChartAutoColor();
78void KDChartAutoColor::freeInstance()
102 _maxDatasetColor = 1;
103 _maxDatasetSourceMode = 0;
104 _setChartSourceModeWasUsed = false;
106 _customBoxDictMayContainHoles = false;
112 _printDataValuesSettings._dataValuesShowInfinite = true;
113 _printDataValuesSettings2._dataValuesShowInfinite = true;
129 _defaultFont = TQFont( "helvetica", 8, TQFont::Normal, false );
159 setDataArea( TQRect( TQPoint(0,0), TQSize(0,0)) );
160 setLegendArea(TQRect( TQPoint(0,0), TQSize(0,0)) );
193 setBarsDisplayed( 0 );
221 _maxDatasetLineMarkerStyle = 0;
260 _maxDatasetPolarMarkerStyle = 0;
346 setLegendFont( TQFont( "helvetica", 10, TQFont::Normal, false ), false );
378 TQFont defaultHdFtFont( "helvetica", 14, TQFont::Normal, false );
387 defaultHdFtFont, true, relHd0Size );
389 defaultHdFtFont, true, relHd0Size );
391 defaultHdFtFont, true, relHd0Size );
393 defaultHdFtFont, true, relHdSize );
395 defaultHdFtFont, true, relHdSize );
397 defaultHdFtFont, true, relHdSize );
399 defaultHdFtFont, true, relHd2Size );
401 defaultHdFtFont, true, relHd2Size );
403 defaultHdFtFont, true, relHd2Size );
406 defaultHdFtFont, true, relFt0Size );
408 defaultHdFtFont, true, relFt0Size );
410 defaultHdFtFont, true, relFt0Size );
412 defaultHdFtFont, true, relFtSize );
414 defaultHdFtFont, true, relFtSize );
416 defaultHdFtFont, true, relFtSize );
418 defaultHdFtFont, true, relFt2Size );
420 defaultHdFtFont, true, relFt2Size );
422 defaultHdFtFont, true, relFt2Size );
426 tempPropSetA->fullReset( "normal data");
429 tempPropSetA->setName( "transparent data");
430 tempPropSetA->setLineStyle( KDChartPropertySet::OwnID, TQt::NoPen );
431 tempPropSetA->setShowMarker( KDChartPropertySet::OwnID, false );
434 tempPropSetA->setName( "horizontal line");
435 tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignRight );
438 tempPropSetA->setName( "vertical line");
439 tempPropSetA->setExtraLinesAlign( KDChartPropertySet::OwnID, TQt::AlignTop | TQt::AlignBottom );
450 KDChartAutoColor::freeInstance();
487 _propertySetList.setAutoDelete( true );
488 rSet.mOwnID = _propertySetList.count();
489 _propertySetList.insert( rSet.mOwnID, rSet. clone() );
513 _propertySetList.setAutoDelete( true );
515 _propertySetList.replace( rSet.mOwnID, rSet. clone() );
534 _propertySetList.setAutoDelete( true );
538 return _propertySetList.remove( id );
566 const bool bFound = (0 != R);
597 return _propertySetList.find( id );
639 uint extraLinesAlign;
640 bool extraLinesInFront;
641 int extraLinesLength;
643 TQColor extraLinesColor;
644 TQt::PenStyle extraLinesStyle;
645 uint extraMarkersAlign;
646 TQSize extraMarkersSize;
647 TQColor extraMarkersColor;
648 int extraMarkersStyle;
658 const int maxDepth = 1000;
667 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
677 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
687 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
700 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
707 if( propSet.hasOwnMarkerAlign( id, markerAlign ) ){
710 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
717 if( propSet.hasOwnMarkerSize( id, markerSize ) ){
718 rSet.setMarkerSize( KDChartPropertySet::OwnID, markerSize );
720 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
727 if( propSet.hasOwnMarkerColor( id, markerColor ) ){
728 rSet.setMarkerColor( KDChartPropertySet::OwnID, markerColor );
730 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
737 if( propSet.hasOwnMarkerStyle( id, markerStyle ) ){
738 rSet.setMarkerStyle( KDChartPropertySet::OwnID, markerStyle );
740 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
750 if( propSet.hasOwnExtraLinesAlign( id, extraLinesAlign ) ){
751 rSet.setExtraLinesAlign( KDChartPropertySet::OwnID, extraLinesAlign );
753 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
760 if( propSet.hasOwnExtraLinesInFront( id, extraLinesInFront ) ){
761 rSet.setExtraLinesInFront( KDChartPropertySet::OwnID, extraLinesInFront );
763 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
770 if( propSet.hasOwnExtraLinesLength( id, extraLinesLength ) ){
771 rSet.setExtraLinesLength( KDChartPropertySet::OwnID, extraLinesLength );
773 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
780 if( propSet.hasOwnExtraLinesWidth( id, extraLinesWidth ) ){
781 rSet.setExtraLinesWidth( KDChartPropertySet::OwnID, extraLinesWidth );
783 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
790 if( propSet.hasOwnExtraLinesColor( id, extraLinesColor ) ){
791 rSet.setExtraLinesColor( KDChartPropertySet::OwnID, extraLinesColor );
793 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
800 if( propSet.hasOwnExtraLinesStyle( id, extraLinesStyle ) ){
801 rSet.setExtraLinesStyle( KDChartPropertySet::OwnID, extraLinesStyle );
803 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
813 if( propSet.hasOwnExtraMarkersAlign( id, extraMarkersAlign ) ){
814 rSet.setExtraMarkersAlign( KDChartPropertySet::OwnID, extraMarkersAlign );
816 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
823 if( propSet.hasOwnExtraMarkersSize( id, extraMarkersSize ) ){
824 rSet.setExtraMarkersSize( KDChartPropertySet::OwnID, extraMarkersSize );
826 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
833 if( propSet.hasOwnExtraMarkersColor( id, extraMarkersColor ) ){
834 rSet.setExtraMarkersColor( KDChartPropertySet::OwnID, extraMarkersColor );
836 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
843 if( propSet.hasOwnExtraMarkersStyle( id, extraMarkersStyle ) ){
844 rSet.setExtraMarkersStyle( KDChartPropertySet::OwnID, extraMarkersStyle );
846 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
855 rSet. setShowBar( KDChartPropertySet::OwnID, showBar );
857 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
865 rSet. setBarColor( KDChartPropertySet::OwnID, barColor );
867 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
876 rSet. setAreaBrush( KDChartPropertySet::OwnID, areaBrush );
878 } else if( KDChartPropertySet::UndefinedID == id || maxDepth < i )
1060 int digitsBehindComma,
1063 const TQColor* color,
1068 int negativeRotation,
1073 int positiveRotation,
1076 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
1077 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
1078 ? &_printDataValuesSettings
1079 : &_printDataValuesSettings2;
1080 for ( uint i = 0; i < count; ++i ) {
1081 settings->_printDataValues = active;
1082 settings->_divPow10 = divPow10;
1083 settings->_digitsBehindComma = digitsBehindComma;
1086 = ( ( 1 < count && i )
1087 || ( 1 == count && 0 < chart && chart < 1000 ) )
1091 bool finished( false );
1092 if ( UINT_MAX == size ) {
1098 settings->_dataValuesFont = *font;
1100 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1101 settings->_dataValuesUseFontRelSize = true;
1102 settings->_dataValuesFontRelSize = 16;
1103 settings->_dataValuesAutoColor = false;
1104 settings->_dataValuesColor = TQColor( TQt::darkBlue );
1105 settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
1107 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomRight;
1108 settings->_dataValuesAnchorNegativeAlign = TQt::AlignBottom + TQt::AlignRight;
1109 settings->_dataValuesAnchorNegativeDeltaX = 20;
1110 settings->_dataValuesAnchorNegativeDeltaY = 55;
1111 settings->_dataValuesNegativeRotation = 300;
1113 settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopLeft;
1114 settings->_dataValuesAnchorPositiveAlign = TQt::AlignTop + TQt::AlignLeft;
1115 settings->_dataValuesAnchorPositiveDeltaX = - 20;
1116 settings->_dataValuesAnchorPositiveDeltaY = - 65;
1117 settings->_dataValuesPositiveRotation = 300;
1119 settings->_dataValuesLayoutPolicy = KDChartEnums::LayoutPolicyRotate;
1124 settings->_dataValuesFont = *font;
1126 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Normal );
1127 settings->_dataValuesUseFontRelSize = true;
1128 settings->_dataValuesFontRelSize = 16;
1129 settings->_dataValuesAutoColor = false;
1130 settings->_dataValuesColor = TQColor( TQt::darkBlue );
1131 settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
1133 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomCenter;
1134 settings->_dataValuesAnchorNegativeAlign = TQt::AlignTop + TQt::AlignHCenter;
1135 settings->_dataValuesAnchorNegativeDeltaX = 0;
1136 settings->_dataValuesAnchorNegativeDeltaY = 0;
1137 settings->_dataValuesNegativeRotation = 0;
1139 settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
1140 settings->_dataValuesAnchorPositiveAlign = TQt::AlignBottom + TQt::AlignHCenter;
1141 settings->_dataValuesAnchorPositiveDeltaX = 0;
1142 settings->_dataValuesAnchorPositiveDeltaY = 0;
1143 settings->_dataValuesPositiveRotation = 0;
1145 settings->_dataValuesLayoutPolicy = KDChartEnums::LayoutPolicyRotate;
1150 settings->_dataValuesFont = *font;
1152 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1153 settings->_dataValuesUseFontRelSize = true;
1154 settings->_dataValuesFontRelSize = 21;
1155 settings->_dataValuesAutoColor = true;
1156 settings->_dataValuesColor = TQColor( TQt::black );
1157 settings->_dataValuesBrush = TQBrush( TQt::white );
1161 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosBottomCenter;
1162 settings->_dataValuesAnchorNegativeAlign = TQt::AlignHCenter
1163 + (bShowOutside ? TQt::AlignTop : TQt::AlignBottom);
1164 settings->_dataValuesAnchorNegativeDeltaX = 0;
1165 settings->_dataValuesAnchorNegativeDeltaY = bShowOutside ? 20 : -35;
1166 settings->_dataValuesNegativeRotation = 0;
1168 settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
1169 settings->_dataValuesAnchorPositiveAlign = TQt::AlignHCenter
1170 + (bShowOutside ? TQt::AlignBottom : TQt::AlignTop);
1171 settings->_dataValuesAnchorPositiveDeltaX = 0;
1172 settings->_dataValuesAnchorPositiveDeltaY = bShowOutside ? -20 : 35;
1173 settings->_dataValuesPositiveRotation = 0;
1175 settings->_dataValuesLayoutPolicy = KDChartEnums::LayoutPolicyRotate;
1186 settings->_dataValuesFont = *font;
1188 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1189 settings->_dataValuesUseFontRelSize = true;
1190 settings->_dataValuesFontRelSize = 25;
1191 settings->_dataValuesAutoColor = true;
1192 settings->_dataValuesColor = TQColor( TQt::black );
1193 settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
1195 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosTopCenter;
1196 settings->_dataValuesAnchorNegativeAlign = TQt::AlignTop + TQt::AlignHCenter;
1197 settings->_dataValuesAnchorNegativeDeltaX = 0;
1198 settings->_dataValuesAnchorNegativeDeltaY = 50;
1199 settings->_dataValuesNegativeRotation = KDCHART_TANGENTIAL_ROTATION;
1201 settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosTopCenter;
1202 settings->_dataValuesAnchorPositiveAlign = TQt::AlignTop + TQt::AlignHCenter;
1203 settings->_dataValuesAnchorPositiveDeltaX = 0;
1204 settings->_dataValuesAnchorPositiveDeltaY = 50;
1205 settings->_dataValuesPositiveRotation = KDCHART_TANGENTIAL_ROTATION;
1207 settings->_dataValuesLayoutPolicy = KDChartEnums::LayoutPolicyRotate;
1212 settings->_dataValuesFont = *font;
1214 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1215 settings->_dataValuesUseFontRelSize = true;
1216 settings->_dataValuesFontRelSize = 25;
1217 settings->_dataValuesAutoColor = true;
1218 settings->_dataValuesColor = TQColor( TQt::black );
1219 settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
1221 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
1222 settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
1223 settings->_dataValuesAnchorNegativeDeltaX = 0;
1224 settings->_dataValuesAnchorNegativeDeltaY = 10;
1225 settings->_dataValuesNegativeRotation = KDCHART_TANGENTIAL_ROTATION;
1227 settings->_dataValuesAnchorPositivePosition = KDChartEnums::PosCenter;
1228 settings->_dataValuesAnchorPositiveAlign = TQt::AlignCenter;
1229 settings->_dataValuesAnchorPositiveDeltaX = 0;
1230 settings->_dataValuesAnchorPositiveDeltaY = 10;
1231 settings->_dataValuesPositiveRotation = KDCHART_TANGENTIAL_ROTATION;
1233 settings->_dataValuesLayoutPolicy = KDChartEnums::LayoutPolicyRotate;
1238 settings->_dataValuesFontRelSize = 18;
1240 settings->_dataValuesFont = *font;
1242 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1243 settings->_dataValuesUseFontRelSize = true;
1244 settings->_dataValuesFontRelSize = 26;
1246 settings->_dataValuesColor = TQColor( TQt::black );
1247 settings->_dataValuesBrush = TQBrush( TQt::NoBrush );
1250 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
1251 settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
1252 settings->_dataValuesAnchorNegativeDeltaX = 0;
1253 settings->_dataValuesAnchorNegativeDeltaY = 0;
1254 settings->_dataValuesNegativeRotation = 0;
1256 settings->_dataValuesAnchorNegativePosition = KDChartEnums::PosCenter;
1257 settings->_dataValuesAnchorNegativeAlign = TQt::AlignCenter;
1258 settings->_dataValuesAnchorNegativeDeltaX = 0;
1259 settings->_dataValuesAnchorNegativeDeltaY = 0;
1260 settings->_dataValuesNegativeRotation = 0;
1270 tqDebug( "IMPLEMENTATION ERROR: Unknown chartType in setPrintDataValues()" );
1276 settings->_useDefaultFontParams = false;
1279 settings->_dataValuesFont = *font;
1281 settings->_dataValuesFont = TQFont( "times", 1, TQFont::Bold );
1283 uint theSize( UINT_MAX == size ? 14 : size );
1284 settings->_dataValuesUseFontRelSize = ( 0 < theSize );
1285 settings->_dataValuesFontRelSize = theSize;
1286 if ( KDCHART_DATA_VALUE_AUTO_COLOR == color
1288 settings->_dataValuesAutoColor = true;
1289 settings->_dataValuesColor = TQColor( TQt::black );
1292 settings->_dataValuesAutoColor = false;
1294 settings->_dataValuesColor
1295 = TQColor( i ? TQt::darkBlue : TQt::black );
1297 settings->_dataValuesColor = *color;
1299 settings->_dataValuesBrush = TQBrush(TQt::NoBrush);
1301 settings->_dataValuesAnchorNegativePosition = negativePosition;
1302 settings->_dataValuesAnchorNegativeAlign = negativeAlign;
1303 settings->_dataValuesAnchorNegativeDeltaX = negativeDeltaX;
1304 settings->_dataValuesAnchorNegativeDeltaY = negativeDeltaY;
1305 settings->_dataValuesNegativeRotation = negativeRotation;
1307 settings->_dataValuesAnchorPositivePosition = positivePosition;
1308 settings->_dataValuesAnchorPositiveAlign = positiveAlign;
1309 settings->_dataValuesAnchorPositiveDeltaX = positiveDeltaX;
1310 settings->_dataValuesAnchorPositiveDeltaY = positiveDeltaY;
1311 settings->_dataValuesPositiveRotation = positiveRotation;
1313 settings->_dataValuesLayoutPolicy = policy;
1316 settings = &_printDataValuesSettings2;
1439 if ( KDCHART_NO_DATASET != dataset
1440 && KDCHART_ALL_DATASETS != dataset
1441 && KDCHART_ALL_DATASETS != dataset2 ) {
1443 uint last = ( KDCHART_NO_DATASET == dataset2 ) ? dataset : dataset2;
1444 for ( i = dataset; i <= last; ++i )
1445 _dataSourceModeAndChart[ i ] = ModeAndChart( mode, chart );
1446 _maxDatasetSourceMode = TQMAX( _maxDatasetSourceMode, --i );
1447 _setChartSourceModeWasUsed = true;
1448 } else if ( UnknownMode == mode && dataset == KDCHART_ALL_DATASETS ) {
1449 _dataSourceModeAndChart.clear();
1450 _setChartSourceModeWasUsed = false;
1490 uint* pChart ) const
1492 uint chart = KDCHART_UNKNOWN_CHART;
1495 if ( _setChartSourceModeWasUsed ) {
1496 if ( dataset <= _maxDatasetSourceMode
1497 && ( KDCHART_NO_DATASET == dataset2
1498 || dataset2 <= _maxDatasetSourceMode ) ) {
1501 if ( KDCHART_ALL_DATASETS == dataset ) {
1506 b = KDCHART_NO_DATASET == dataset2 ? a : dataset2;
1510 ModeAndChartMap::ConstIterator it;
1511 for( it = _dataSourceModeAndChart.find( a );
1512 ( it != _dataSourceModeAndChart.end() ) && ( it.key() <= b );
1515 mode = it.data().mode();
1516 chart = it.data().chart();
1519 if ( mode != it.data().mode() )
1521 if ( chart != it.data().chart() )
1522 chart = KDCHART_UNKNOWN_CHART;
1570 dataset = KDCHART_NO_DATASET;
1571 dataset2 = KDCHART_NO_DATASET;
1572 if ( _setChartSourceModeWasUsed ) {
1574 ModeAndChartMap::ConstIterator it;
1575 for ( it = _dataSourceModeAndChart.begin();
1576 it != _dataSourceModeAndChart.end(); ++it ) {
1577 if ( ( it.data().mode() == mode )
1578 && ( ( KDCHART_ALL_CHARTS == chart )
1579 || ( it.data().chart() == chart ) ) ) {
1584 dataset2 = it.key();
1586 } else if ( !bStart )
1589 } else if ( DataEntry == mode ) {
1590 dataset = KDCHART_ALL_DATASETS;
1591 dataset2 = KDCHART_ALL_DATASETS;
1641 dataset = KDCHART_NO_DATASET;
1642 dataset2 = KDCHART_NO_DATASET;
1643 uint dsA1, dsA2, dsB1, dsB2;
1644 bool foundA = findDataset( modeA, dsA1, dsA2, chart );
1645 bool foundB = findDataset( modeB, dsB1, dsB2, chart );
1646 if( foundA || foundB ){
1647 if( dsA1 == KDCHART_ALL_DATASETS || dsB1 == KDCHART_ALL_DATASETS ){
1648 dataset = KDCHART_ALL_DATASETS;
1649 dataset2 = KDCHART_ALL_DATASETS;
1652 if( foundA && foundB ){
1653 if( TQMIN(dsA2, dsB2) + 1 == TQMAX(dsA1, dsB1) ){
1654 dataset = TQMIN(dsA1, dsB1);
1655 dataset2 = TQMAX(dsA2, dsB2);
1658 tqDebug( "ERROR in KDChartParams::findDatasets(): Datasets found are *not* a contiguous series.");
1661 dataset = foundA ? dsA1 : dsB1;
1662 dataset2 = foundA ? dsA2 : dsB2;
1692 calculateShadowColors( color, shadow1, shadow2 );
1693 _dataColors[ dataset ] = color;
1694 _dataColorsShadow1[ dataset ] = shadow1;
1695 _dataColorsShadow2[ dataset ] = shadow2;
1696 _maxDatasetColor = TQMAX( _maxDatasetColor, dataset );
1746 for( int i=8; i<16; ++i )
1768static const int NUM_SUBDUEDCOLORS = 18;
1769static const TQColor SUBDUEDCOLORS[ NUM_SUBDUEDCOLORS ] = {
1770 TQColor( 0xe0,0x7f,0x70 ),
1771 TQColor( 0xe2,0xa5,0x6f ),
1772 TQColor( 0xe0,0xc9,0x70 ),
1773 TQColor( 0xd1,0xe0,0x70 ),
1774 TQColor( 0xac,0xe0,0x70 ),
1775 TQColor( 0x86,0xe0,0x70 ),
1776 TQColor( 0x70,0xe0,0x7f ),
1777 TQColor( 0x70,0xe0,0xa4 ),
1778 TQColor( 0x70,0xe0,0xc9 ),
1779 TQColor( 0x70,0xd1,0xe0 ),
1780 TQColor( 0x70,0xac,0xe0 ),
1781 TQColor( 0x70,0x86,0xe0 ),
1782 TQColor( 0x7f,0x70,0xe0 ),
1783 TQColor( 0xa4,0x70,0xe0 ),
1784 TQColor( 0xc9,0x70,0xe0 ),
1785 TQColor( 0xe0,0x70,0xd1 ),
1786 TQColor( 0xe0,0x70,0xac ),
1787 TQColor( 0xe0,0x70,0x86 ),
1790 for( int i=0; i<NUM_SUBDUEDCOLORS; ++i)
1815void KDChartParams::calculateShadowColors( TQColor color,
1817 TQColor& shadow2 ) const
1819 if ( !color.isValid() ) {
1820 shadow1 = TQColor();
1821 shadow2 = TQColor();
1823 int hue, saturation, value;
1824 color.hsv( &hue, &saturation, &value );
1831 shadow1.setHsv( hue, saturation, static_cast < int > ( v ) );
1838 shadow2.setHsv( hue, saturation, static_cast < int > ( v ) );
1856 uint index = dataset % (_maxDatasetColor+1);
1857 if( _dataColors.find( index ) != _dataColors.end() )
1858 return _dataColors[ index ];
1864TQString KDChartParams::dataRegionFrameAreaName( uint dataRow,
1868 return TQString( "%1/%2/%3/%4" )
1869 .arg( KDChartEnums::AreaChartDataRegion, 5 )
1883void KDChartParams::recomputeShadowColors()
1887 for( TQMap<uint,TQColor>::Iterator it = _dataColors.begin();
1888 it != _dataColors.end(); ++it ) {
1911 uint index = dataset % _maxDatasetColor;
1912 if ( _threeDShadowColors )
1913 if( _dataColorsShadow1.find( index ) != _dataColorsShadow1.end() )
1914 return _dataColorsShadow1[ index ];
1918 if( _dataColors.find( index ) != _dataColors.end() )
1919 return _dataColors[ index ];
1940 uint index = dataset % _maxDatasetColor;
1941 if ( _threeDShadowColors )
1942 if( _dataColorsShadow2.find( index ) != _dataColorsShadow2.end() )
1943 return _dataColorsShadow2[ index ];
1947 if( _dataColors.find( index ) != _dataColors.end() )
1948 return _dataColors[ index ];
1970 setAxisType( i, KDChartAxisParams::AxisTypeUnknown );
1977 for ( i = KDChartAxisParams::AxisPosSTART;
1978 i <= KDChartAxisParams::AxisPosEND; ++i )
1981 case KDChartAxisParams::AxisPosBottom:
1982 case KDChartAxisParams::AxisPosTop:
1983 case KDChartAxisParams::AxisPosBottom2:
1984 case KDChartAxisParams::AxisPosTop2:
1988 case KDChartAxisParams::AxisPosLeft:
1989 case KDChartAxisParams::AxisPosRight:
1990 case KDChartAxisParams::AxisPosLeft2:
1991 case KDChartAxisParams::AxisPosRight2:
1995 case KDChartAxisParams::AxisPosLowerRightEdge:
1996 case KDChartAxisParams::AxisPosLowerLeftEdge:
1997 case KDChartAxisParams::AxisPosLowerRightEdge2:
1998 case KDChartAxisParams::AxisPosLowerLeftEdge2:
2002 tqDebug( "IMPLEMENTATION ERROR: axis type missing in KDChartParams::setDefaultAxesTypes()" );
2016 KDChartAxisParams::AxisTypeEAST );
2020 KDChartAxisParams::AxisTypeNORTH );
2025 KDChartAxisParams::AxisTypeEAST );
2027 KDChartAxisParams::AxisTypeNORTH );
2030 KDChartAxisParams::AxisTypeEAST );
2032 KDChartAxisParams::AxisTypeNORTH );
2035 KDChartAxisParams::AxisTypeEAST );
2037 KDChartAxisParams::AxisTypeNORTH );
2145 case KDChartParams::Pie:
2146 case KDChartParams::Ring:
2149 case KDChartParams::Polar:
2151 KDChartAxisParams::AxisTypeEAST );
2153 KDChartAxisParams::AxisTypeNORTH );
2156 TQFont( "helvetica", 1, TQFont::Bold ),
2161 TQFont( "helvetica", 1, TQFont::Bold ),
2167 tqDebug( "IMPLEMENTATION ERROR: type missing in KDChartParams::setDefaultAxesTypes()" );
2196 setAxisDatasets( KDChartAxisParams::AxisPosBottom, KDCHART_ALL_DATASETS );
2198 setAxisDatasets( KDChartAxisParams::AxisPosLeft, KDCHART_ALL_DATASETS );
2232 case KDChartParams::Pie:
2233 case KDChartParams::Ring:
2234 case KDChartParams::Polar:
2238 tqDebug( "IMPLEMENTATION ERROR: type missing in KDChartParams::activateDefaultAxes()" );
2292 _globalLeadingLeft = left;
2293 _globalLeadingTop = top;
2294 _globalLeadingRight = right;
2295 _globalLeadingBottom = bottom;
2568 const TQString oldKey( dataRegionFrameAreaName( oldDataRow, oldDataCol, 0 ) );
2570 bool bFound = ( it != 0 );
2572 if( KDCHART_NO_DATASET != newDataRow ){
2574 KDChartFrameSettings::deepCopy( *frame, *it );
2575 frame->setDataRow( newDataRow );
2576 frame->setDataCol( newDataCol );
2577 frame->setData3rd( 0 );
2578 _areaDict.setAutoDelete( true );
2580 dataRegionFrameAreaName( newDataRow, newDataCol, 0 ),
2583 _areaDict.remove( oldKey );
2602 int* pIterIdx ) const
2606 const TQString key( TQString( "%1/-----/-----/-----" ).arg( area, 5 ) );
2608 bFound = ( it != 0 );
2611 else if( pIterIdx ){
2612 TQString keyStart( key.left(6) );
2613 TQDictIterator<KDChartFrameSettings> it2( _areaDict );
2614 for( ; it2.current(); ++it2 ){
2615 if( it2.currentKey().startsWith( keyStart ) ){
2617 return it2.current();
2622 return &_noFrameSettings;
2640 return _areaDict.remove( TQString( "%1/-----/-----/-----" ).arg( area, 5 ) );
2652 int* pIterIdx ) const
2657 TQDictIterator<KDChartFrameSettings> it( _areaDict );
2658 for( ; it.current(); ++it ){
2659 if( *pIterIdx == i )
2663 if( *pIterIdx == i ){
2664 TQString keyStart( it.currentKey().left(6) );
2666 for( ; it.current(); ++it ){
2668 if( it.currentKey().startsWith( keyStart ) ){
2670 return it.current();
2675 return &_noFrameSettings;
2688 _customBoxDict.setAutoDelete( true );
2690 if( _customBoxDictMayContainHoles ){
2691 _customBoxDictMayContainHoles = false;
2693 newIdx = 1 + maxIndex;
2694 for( uint idx = 0; idx <= maxIndex; ++idx ) {
2695 if( ! _customBoxDict.find( idx ) ) {
2697 _customBoxDictMayContainHoles = true;
2702 newIdx = _customBoxDict.count();
2704 _customBoxDict.insert( newIdx, box. clone() );
2724 const bool bFound = _customBoxDict.remove( idx );
2727 removeFrame( KDChartEnums::AreaCustomBoxesBASE + idx );
2729 _customBoxDictMayContainHoles = true;
2755 return _customBoxDict.find( box );
2773 return _customBoxDict.find( box );
2783 uint cnt( _customBoxDict.count() );
2785 int maxIndex = cnt-1;
2786 TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
2787 for( ; it.current(); ++it )
2788 if( it.currentKey() > maxIndex )
2789 maxIndex = it.currentKey();
2854 bool bAbscissaAxisLabelsTouchEdges = ( Area == chartType );
2856 bAbscissaAxisLabelsTouchEdges );
2858 bAbscissaAxisLabelsTouchEdges );
2860 bAbscissaAxisLabelsTouchEdges );
2862 bAbscissaAxisLabelsTouchEdges );
2987 if ( KDChartParams::NoType == chartType ) {
2989 KDCHART_NO_DATASET );
2992 KDCHART_ALL_DATASETS,
2993 KDCHART_ALL_DATASETS,
3258 int digitsBehindComma,
3261 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3262 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3263 ? &_printDataValuesSettings
3264 : &_printDataValuesSettings2;
3265 for ( uint i = 0; i < count; ++i ) {
3266 settings->_divPow10 = divPow10;
3267 settings->_digitsBehindComma = digitsBehindComma;
3269 settings = &_printDataValuesSettings2;
3288 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3289 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3290 ? &_printDataValuesSettings
3291 : &_printDataValuesSettings2;
3292 for ( uint i = 0; i < count; ++i ) {
3293 settings->_useDefaultFontParams = false;
3295 settings->_dataValuesFont = *font;
3296 if( UINT_MAX != size ){
3297 settings->_dataValuesUseFontRelSize = ( 0 < size );
3298 settings->_dataValuesFontRelSize = size;
3301 settings = &_printDataValuesSettings2;
3321 bool specifyingPositiveValues,
3324 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3325 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3326 ? &_printDataValuesSettings
3327 : &_printDataValuesSettings2;
3328 for ( uint i = 0; i < count; ++i ) {
3329 if( specifyingPositiveValues ){
3331 settings->_dataValuesAnchorPositivePosition = position;
3332 settings->_dataValuesAnchorPositiveAlign = align;
3333 settings->_dataValuesAnchorPositiveDeltaX = deltaX;
3334 settings->_dataValuesAnchorPositiveDeltaY = deltaY;
3335 settings->_dataValuesPositiveRotation = rotation;
3338 settings->_dataValuesAnchorNegativePosition = position;
3339 settings->_dataValuesAnchorNegativeAlign = align;
3340 settings->_dataValuesAnchorNegativeDeltaX = deltaX;
3341 settings->_dataValuesAnchorNegativeDeltaY = deltaY;
3342 settings->_dataValuesNegativeRotation = rotation;
3345 settings = &_printDataValuesSettings2;
3374 const TQBrush& background,
3379 setPrintDataValuesColor( chart, color );
3381 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3382 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3383 ? &_printDataValuesSettings
3384 : &_printDataValuesSettings2;
3385 for ( uint i = 0; i < count; ++i ) {
3386 settings->_dataValuesBrush = background;
3388 settings = &_printDataValuesSettings2;
3395void KDChartParams::setDataValuesPolicy(
3399 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3400 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3401 ? &_printDataValuesSettings
3402 : &_printDataValuesSettings2;
3403 for ( uint i = 0; i < count; ++i ) {
3404 settings->_dataValuesLayoutPolicy = policy;
3406 settings = &_printDataValuesSettings2;
3427 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3428 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3429 ? &_printDataValuesSettings
3430 : &_printDataValuesSettings2;
3431 for ( uint i = 0; i < count; ++i ) {
3432 settings->_dataValuesShowInfinite = dataValuesShowInfinite;
3434 settings = &_printDataValuesSettings2;
3441void KDChartParams::setPrintDataValuesColor( uint chart, const TQColor* color )
3443 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3444 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3445 ? &_printDataValuesSettings
3446 : &_printDataValuesSettings2;
3447 for ( uint i = 0; i < count; ++i ) {
3448 if ( KDCHART_DATA_VALUE_AUTO_COLOR == color ) {
3449 settings->_dataValuesAutoColor = true;
3450 settings->_dataValuesColor = TQColor( TQt::black );
3453 settings->_dataValuesAutoColor = false;
3455 settings->_dataValuesColor
3456 = TQColor( i ? TQt::darkBlue : TQt::black );
3458 settings->_dataValuesColor = *color;
3461 settings = &_printDataValuesSettings2;
3480 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3481 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3482 ? &_printDataValuesSettings
3483 : &_printDataValuesSettings2;
3484 uint theSize( UINT_MAX == size ? 16 : size );
3485 for ( uint i = 0; i < count; ++i ) {
3486 settings->_dataValuesUseFontRelSize = ( 0 < theSize );
3487 settings->_dataValuesFontRelSize = theSize;
3489 settings = &_printDataValuesSettings2;
3514 bool callSetPrintDataValues )
3516 uint count = (KDCHART_ALL_CHARTS == chart) ? 2 : 1;
3517 PrintDataValuesSettings * settings = (( 1 < count ) || ( 0 == chart ))
3518 ? &_printDataValuesSettings
3519 : &_printDataValuesSettings2;
3520 for ( uint i = 0; i < count; ++i ) {
3521 settings->_printDataValues = true;
3522 settings->_useDefaultFontParams = true;
3524 settings = &_printDataValuesSettings2;
3526 if ( callSetPrintDataValues )
3668 return chart ? _printDataValuesSettings2._dataValuesAnchorNegativePosition
3669 : _printDataValuesSettings._dataValuesAnchorNegativePosition;
3671 return chart ? _printDataValuesSettings2._dataValuesAnchorPositivePosition
3672 : _printDataValuesSettings._dataValuesAnchorPositivePosition;
3697 return chart ? _printDataValuesSettings2._dataValuesAnchorNegativeAlign
3698 : _printDataValuesSettings._dataValuesAnchorNegativeAlign;
3700 return chart ? _printDataValuesSettings2._dataValuesAnchorPositiveAlign
3701 : _printDataValuesSettings._dataValuesAnchorPositiveAlign;
3729 return chart ? _printDataValuesSettings2._dataValuesAnchorNegativeDeltaX
3730 : _printDataValuesSettings._dataValuesAnchorNegativeDeltaX;
3732 return chart ? _printDataValuesSettings2._dataValuesAnchorPositiveDeltaX
3733 : _printDataValuesSettings._dataValuesAnchorPositiveDeltaX;
3761 return chart ? _printDataValuesSettings2._dataValuesAnchorNegativeDeltaY
3762 : _printDataValuesSettings._dataValuesAnchorNegativeDeltaY;
3764 return chart ? _printDataValuesSettings2._dataValuesAnchorPositiveDeltaY
3765 : _printDataValuesSettings._dataValuesAnchorPositiveDeltaY;
3789 return chart ? _printDataValuesSettings2._dataValuesNegativeRotation
3790 : _printDataValuesSettings._dataValuesNegativeRotation;
3792 return chart ? _printDataValuesSettings2._dataValuesPositiveRotation
3793 : _printDataValuesSettings._dataValuesPositiveRotation;
4199 _threeDBarAngle = angle;
4202 _cosThreeDBarAngle = cos( static_cast < double > ( _threeDBarAngle ) * M_PI / 180.0 );
4666 _lineMarkerStyles[ dataset ] = style;
4667 _maxDatasetLineMarkerStyle = TQMAX( dataset,
4668 _maxDatasetLineMarkerStyle );
4682 if( _lineMarkerStyles.find( dataset ) != _lineMarkerStyles.end() )
4683 return _lineMarkerStyles[ dataset ];
4685 return LineMarkerCircle;
4710 _lineMarkerStyles = map;
4712 uint maxDataset = 0;
4713 for( LineMarkerStyleMap::ConstIterator it = _lineMarkerStyles.begin();
4714 it != _lineMarkerStyles.end(); ++it )
4715 maxDataset = TQMAX( maxDataset, it.key() );
4716 _maxDatasetLineMarkerStyle = maxDataset;
4862 if( KDCHART_GLOBAL_LINE_STYLE == dataset )
4865 _datasetLineStyles[ dataset ] = style;
4885 if( KDCHART_GLOBAL_LINE_STYLE == dataset )
4888 else if( _datasetLineStyles.find( dataset ) == _datasetLineStyles.end() )
4891 return _datasetLineStyles[ dataset ];
5178 _polarMarkerStyles[ dataset ] = style;
5179 _maxDatasetPolarMarkerStyle = TQMAX( dataset,
5180 _maxDatasetPolarMarkerStyle );
5194 if( _polarMarkerStyles.find( dataset ) != _polarMarkerStyles.end() )
5195 return _polarMarkerStyles[ dataset ];
5197 return PolarMarkerCircle;
5220 _polarMarkerStyles = map;
5222 uint maxDataset = 0;
5223 for( PolarMarkerStyleMap::ConstIterator it = _polarMarkerStyles.begin();
5224 it != _polarMarkerStyles.end(); ++it )
5225 maxDataset = TQMAX( maxDataset, it.key() );
5226 _maxDatasetPolarMarkerStyle = maxDataset;
5348 bool showDelimiters,
5351 if( KDCHART_MAX_POLAR_DELIMS_AND_LABELS_POS >= pos ) {
5352 _polarDelimsAndLabels[ pos ].showDelimiters = showDelimiters;
5353 _polarDelimsAndLabels[ pos ].showLabels = showLabels;
5365 if( KDCHART_MAX_POLAR_DELIMS_AND_LABELS_POS >= pos )
5366 return _polarDelimsAndLabels[ pos ].showDelimiters;
5379 if( KDCHART_MAX_POLAR_DELIMS_AND_LABELS_POS >= pos )
5380 return _polarDelimsAndLabels[ pos ].showLabels;
5750 int size, TQColor* color )
5752 _hiLoChartPrintLowValues = active;
5754 _hiLoChartLowValuesFont = *font;
5756 _hiLoChartLowValuesFont = _defaultFont;
5757 _hiLoChartLowValuesUseFontRelSize = ( 0 < size );
5758 _hiLoChartLowValuesFontRelSize = size;
5760 _hiLoChartLowValuesColor = TQColor( 0, 0, 0 );
5762 _hiLoChartLowValuesColor = *color;
5873 int size, TQColor* color )
5875 _hiLoChartPrintHighValues = active;
5877 _hiLoChartHighValuesFont = *font;
5879 _hiLoChartHighValuesFont = _defaultFont;
5880 _hiLoChartHighValuesUseFontRelSize = ( 0 < size );
5881 _hiLoChartHighValuesFontRelSize = size;
5883 _hiLoChartHighValuesColor = TQColor( 0, 0, 0 );
5885 _hiLoChartHighValuesColor = *color;
5995 uint size, TQColor* color )
5997 _hiLoChartPrintOpenValues = active;
5999 _hiLoChartOpenValuesFont = *font;
6001 _hiLoChartOpenValuesFont = _defaultFont;
6002 _hiLoChartOpenValuesUseFontRelSize = ( 0 < size );
6003 _hiLoChartOpenValuesFontRelSize = size;
6005 _hiLoChartOpenValuesColor = TQColor( 0, 0, 0 );
6007 _hiLoChartOpenValuesColor = *color;
6115 int size, TQColor* color )
6117 _hiLoChartPrintCloseValues = active;
6119 _hiLoChartCloseValuesFont = *font;
6121 _hiLoChartCloseValuesFont = _defaultFont;
6122 _hiLoChartCloseValuesUseFontRelSize = ( 0 < size );
6123 _hiLoChartCloseValuesFontRelSize = size;
6125 _hiLoChartCloseValuesColor = TQColor( 0, 0, 0 );
6127 _hiLoChartCloseValuesColor = *color;
6389 double upperOuter, double lowerOuter )
6391 _BWChartFenceUpperInner = upperInner;
6392 _BWChartFenceLowerInner = lowerInner;
6393 _BWChartFenceUpperOuter = upperOuter;
6394 _BWChartFenceLowerOuter = lowerOuter;
6406 double& upperOuter, double& lowerOuter ) const
6408 upperInner = _BWChartFenceUpperInner;
6409 lowerInner = _BWChartFenceLowerInner;
6410 upperOuter = _BWChartFenceUpperOuter;
6411 lowerOuter = _BWChartFenceLowerOuter;
6512 BWStatVal statValA = (BWStatValALL == statValue) ? BWStatValSTART : statValue;
6513 BWStatVal statValZ = (BWStatValALL == statValue) ? BWStatValEND : statValue;
6514 for( int i = statValA; i <= statValZ; ++i ){
6515 _BWChartStatistics[ i ].active = active;
6517 _BWChartStatistics[ i ].font = *font;
6519 _BWChartStatistics[ i ].font = _defaultFont;
6520 _BWChartStatistics[ i ].useRelSize = ( 0 < size );
6521 _BWChartStatistics[ i ].relSize = size;
6523 _BWChartStatistics[ i ].color = TQColor( 0, 0, 0 );
6525 _BWChartStatistics[ i ].color = *color;
6527 _BWChartStatistics[ i ].brush = TQBrush( TQt::white );
6529 _BWChartStatistics[ i ].brush = *brush;
7093 _axisSettings[ n ].params.setAxisShowGrid( axisShowGrid );
7107 if ( _axisSettings[ i ].params.axisVisible()
7108 && _axisSettings[ i ].params.axisShowGrid() )
7145 uint a1 = ( KDCHART_ALL_AXES == n )
7148 uint a2 = ( KDCHART_ALL_AXES == n )
7151 for( uint i = a1; i <= a2; ++i ) {
7152 _axisSettings[ i ].params.setAxisVisible( KDCHART_NO_DATASET != dataset );
7153 _axisSettings[ i ].dataset = dataset;
7154 _axisSettings[ i ].dataset2 =
7155 ( KDCHART_ALL_DATASETS == dataset
7156 || KDCHART_NO_DATASET == dataset
7157 || KDCHART_ALL_DATASETS == dataset2
7158 || KDCHART_NO_DATASET == dataset2 )
7161 _axisSettings[ i ].chart = chart;
7178 uint& dataset2, uint& chart ) const
7182 dataset = _axisSettings[ n ].dataset;
7183 dataset2 = _axisSettings[ n ].dataset2;
7184 chart = _axisSettings[ n ].chart;
7211 axes[ i2 ] = KDCHART_NO_AXIS;
7214 if ( chart == _axisSettings[ i ].chart
7215 && ( KDChartAxisParams::AxisPosLeft == i
7216 || KDChartAxisParams::AxisPosRight == i
7217 || KDChartAxisParams::AxisPosLeft2 == i
7218 || KDChartAxisParams::AxisPosRight2 == i ) ) {
7220 if( KDCHART_NO_AXIS == axes[ j ] || axes[ j ] == i ) {
7221 if( KDCHART_NO_AXIS == axes[ j ] ) {
7350 TQFont axisLabelsFont,
7351 int axisLabelsFontSize,
7352 TQColor axisLabelsColor )
7355 bool extraSize = (0 != axisLabelsFontSize);
7356 TQFont theFont( axisLabelsFont );
7357 bool useFontFixedSize = true;
7359 if( 0 > axisLabelsFontSize ){
7360 useFontFixedSize = false;
7361 _axisSettings[ n ].params.setAxisLabelsFontRelSize( -axisLabelsFontSize );
7363 theFont.setPointSize( axisLabelsFontSize );
7366 _axisSettings[ n ].params.setAxisLabelsFont( theFont, useFontFixedSize );
7367 _axisSettings[ n ].params.setAxisLabelsColor( axisLabelsColor );
7423 TQStringList* axisLabelStringList,
7424 TQStringList* axisShortLabelStringList,
7425 const TQString& valueStart,
7426 const TQString& valueEnd )
7429 _axisSettings[ n ].params.setAxisLabelStringLists( axisLabelStringList,
7430 axisShortLabelStringList,
7730 if ( HdFtPosEND >= pos ) {
7731 _hdFtParams[ pos ]._text = text;
7756 if ( HdFtPosEND >= pos )
7757 return _hdFtParams[ pos ]._text;
7771 if ( HdFtPosEND >= pos )
7772 return _hdFtParams[ pos ].rect();
7798 if ( HdFtPosEND >= pos ) {
7799 _hdFtParams[ pos ]._color = color;
7824 if ( HdFtPosEND >= pos )
7825 return _hdFtParams[ pos ]._color;
7827 return TQColor( TQt::black );
7853 bool fontUseRelSize,
7856 if ( HdFtPosEND >= pos ) {
7857 _hdFtParams[ pos ]._font = font;
7858 _hdFtParams[ pos ]._fontUseRelSize = fontUseRelSize;
7859 _hdFtParams[ pos ]._fontRelSize = fontRelSize;
7887 if ( HdFtPosEND >= pos )
7888 return _hdFtParams[ pos ]._font;
7890 return TQApplication::font();
7916 if ( HdFtPosEND >= pos )
7917 return _hdFtParams[ pos ]._fontUseRelSize;
7946 if ( HdFtPosEND >= pos )
7947 return _hdFtParams[ pos ]._fontRelSize;
9163 TQIntDictIterator<KDChartCustomBox> it( _customBoxDict );
9164 for( ; it.current(); ++it ){
9165 if( (*it).anchorArea() == KDChartEnums::AreaAxisBASE + n ){
9166 boxID = it.currentKey();
9173void KDChartParams::insertDefaultAxisTitleBox( uint n,
9174 bool setTitle, const TQString& axisTitle,
9175 bool setColor, const TQColor& axisTitleColor,
9176 bool setFont, const TQFont& axisTitleFont,
9177 bool setFontUseRelSize, bool axisTitleFontUseRelSize,
9178 bool setFontRelSize, int axisTitleFontRelSize )
9184 case KDChartAxisParams::AxisPosLeft:
9185 case KDChartAxisParams::AxisPosRight:
9186 case KDChartAxisParams::AxisPosLeft2:
9187 case KDChartAxisParams::AxisPosRight2:
9190 case KDChartAxisParams::AxisPosTop:
9191 case KDChartAxisParams::AxisPosBottom:
9192 case KDChartAxisParams::AxisPosTop2:
9193 case KDChartAxisParams::AxisPosBottom2:
9200 const TQFont defaultFont( "helvetica", 6, TQFont::Normal, false );
9202 TQString titleString { setTitle ? axisTitle : "<qt><center> </center></qt>" };
9203 const TQString stripTitleString( titleString.simplifyWhiteSpace().upper() );
9205 if( !stripTitleString.startsWith( "<QT>" ) )
9206 titleString.prepend( "<qt><center>");
9207 if( !stripTitleString.endsWith( "</QT>" ) )
9208 titleString.append( "</center></qt>");
9211 KDChartTextPiece textPiece( titleString, setFont ? axisTitleFont : defaultFont );
9212 int fixedFontSize = textPiece.font().pointSize();
9213 if( -1 == fixedFontSize )
9214 fixedFontSize = textPiece.font().pixelSize();
9215 if( -1 == fixedFontSize )
9219 KDChartCustomBox customBox( bVert ? -90 : 0,
9229 KDChartEnums::AreaAxisBASE + n,
9230 bVert ? KDChartEnums::PosCenterLeft : KDChartEnums::PosBottomCenter, bVert ? (TQt::AlignTop + TQt::AlignHCenter) : (TQt::AlignBottom + TQt::AlignHCenter),
9232 bVert ? (TQt::AlignBottom + TQt::AlignRight) : (TQt::AlignTop + TQt::AlignHCenter),
9270 const TQString stripTitleString( title.simplifyWhiteSpace().upper() );
9271 if( !stripTitleString.startsWith( "<QT>" ) )
9272 title.prepend( "<qt><center>");
9273 if( !stripTitleString.endsWith( "</QT>" ) )
9274 title.append( "</center></qt>");
9276 KDChartTextPiece textPiece( 0, title,
9285 insertDefaultAxisTitleBox( n,
9331 insertDefaultAxisTitleBox( n,
9351 return box-> color();
9353 return TQt::darkBlue;
9373 KDChartTextPiece textPiece( 0, box-> content().text(),
9380 insertDefaultAxisTitleBox( n,
9400 bool useFixedFontSize )
9408 KDChartTextPiece textPiece( 0, box-> content().text(),
9410 int fixedFontSize = textPiece.font().pointSize();
9417 insertDefaultAxisTitleBox( n,
9426 if ( useFixedFontSize )
9446 return TQFont( "helvetica", 6, TQFont::Normal, false );
9477 insertDefaultAxisTitleBox( n,
9524 insertDefaultAxisTitleBox( n,
9546 return (0 > i) ? -i : i;
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.
Definition of a class for specifying and drawing custom boxes.
Definition of global enums.
Header for all common chart parameters.
#define KDCHART_PROPSET_VERT_LINE Predefined (build-in) property ID.
#define KDCHART_PROPSET_NORMAL_DATA Default (built-in) property ID, used for data cells without any special properties.
#define KDCHART_PROPSET_HORI_LINE Predefined (build-in) property ID.
#define KDCHART_CNT_ORDINATES Our charts may have up to 4 ordinate axes: 2 left ones and 2 right ones.
#define KDCHART_PROPSET_TRANSPARENT_DATA Predefined (build-in) property ID.
#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).
Header of the KDFrame class providing highly configurable rectangular frame drawing.
access the chart axis parameters.
static AxisPos basicAxisPos(uint pos) enum KDChartAxisParams::AxisPos { AxisPosSTART = 0,
Class for specifying and drawing custom boxes.
int fontSize() const Returns the font size to be used.
const KDChartTextPiece & content() const Returns the text piece content that is to be drawn.
const KDChartCustomBox * clone() const Create a new box on the heap, copy the settings stored by this box into the newly created box and ret...
void setFontSize(int fontSize, bool fontScaleGlobal) Specifies the font size to be used.
TQColor color() const Returns the text color.
void setColor(TQColor color) Specifies the text color to be used.
void setContent(const KDChartTextPiece &content) Specifies the text piece content to be drawn.
Encapsulates one data cell in a chart.
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:
TQColor lineColor() const Returns the color of the lines in line charts.
KDChartCustomBox * customBoxRef(uint box) Retrieve a non-const pointer to a custom box from the list.
void setPieStart(int degrees) Specifies the starting point of the pie circle.
void setDataValuesShowInfinite(bool dataValuesShowInfinite=true, uint chart=KDCHART_ALL_CHARTS) Specifies whether data value texts should be printed even if the value is KDCHART_POS_INFINITE (or KD...
TQColor dataColor(uint dataset) const Returns the color for a dataset.
void activateDefaultAxes() activate the default axis types for this chart:
int dataValuesRotation(uint chart, bool negative) const Returns the amount of degrees (using a circle of 360 degrees) taken to rotate the text.
void setHiLoChartPrintCloseValues(bool active, TQFont *font=0, int size=14, TQColor *color=0) Specifies if and how a HiLo chart will print the Close values next to their respective entries.
void setAxisLabelStringParams(uint n, TQStringList *axisLabelStringList, TQStringList *axisShortLabelStringList, const TQString &valueStart=TQString(), const TQString &valueEnd=TQString()) Specifies a TQStringList which the axis label texts for one axis are to be taken from,...
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 setDataValuesColors(const TQColor *color=KDCHART_DATA_VALUE_AUTO_COLOR, const TQBrush &background=TQBrush(TQt::NoBrush), uint chart=KDCHART_ALL_CHARTS) Specifies the text color and background brush to be used for printing the data value texts.
void setProperties(int id, KDChartPropertySet &rSet) Overwrites a property set with a new property set.
void setPolarMarkerSize(TQSize size=TQSize(-40, -40)) Specifies the sizes of polar markers.
void setOptimizeOutputForScreen(bool screenOutput) Specify whether drawing should be optimized for (low resolution) screen output or whether other routi...
PolarMarkerStyle polarMarkerStyle(uint dataset) const Returns the marker to be used for a dataset.
int registerProperties(KDChartPropertySet &rSet) Stores a new property set: data are stored by value so you may use your rSet instance for other purpo...
void bWChartFences(double &upperInner, double &lowerInner, double &upperOuter, double &lowerOuter) const Retrievs the factors to be used to calculate the position of the inner (or outer, resp....
void setAdditionalChartType(ChartType chartType) Specifies the additional chart type.
void setDataValuesFont(TQFont *font, uint size=UINT_MAX, uint chart=KDCHART_ALL_CHARTS) Specifies the font to be used for printing the data value texts.
int headerFooterFontRelSize(uint pos) const Returns the factor used for dynamical calculation of the font size of the text in the header (or foot...
void setDataDefaultColors() Specifies KD Chart's default colors for the datasets 0..11.
void setLineMarkerSize(TQSize size) Specifies the sizes of line markers.
void setChartType(ChartType chartType) Specifies the chart type.
void setAxisParams(uint n, const KDChartAxisParams &axisParams) Specifies the parameters for one axis.
void setPolarDelimsAndLabelsAtPos(KDChartEnums::PositionFlag pos, bool showDelimiters, bool showLabels) Specifies whether to show circular delimiters and labels at a given position in polar charts.
void setHeaderFooterText(uint pos, const TQString &text) Specifies the text to be displayed in the header (or footer, resp.) section specified by pos.
void setValueBlockGap(int gap) Specifies the number of pixels between each value block.
void setExplodeFactor(double factor) Specifies the explode factor in percent, i.e.
void setDrawSolidExcessArrows(bool solidArrows) Specifies whether arrows showing excess values in bar charts should be drawn solidly or split.
double shadowBrightnessFactor() const Returns a factor to be used to adjust the built-in brightness of shadow colors in 3-dimensional drawi...
const KDChartFrameSettings * frameSettings(uint area, bool &bFound, int *pIterIdx=0) const Return the frame settings of one of the chart areas.
void setAxisDatasets(uint n, uint dataset, uint dataset2=KDCHART_NO_DATASET, uint chart=0) Specifies which data are to be represented by a given axis.
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).
bool findFirstAxisCustomBoxID(uint n, uint &boxID) const Retrieves the ID of the first KDChartCustomBox that is anchored at axis n.
ChartType additionalChartType() const Returns the additional chart type configured in this params object.
void changed() This signal is emitted when any of the chart parameters has changed.
void setThreeDLineYRotation(int degrees)
void setShadowPattern(TQt::BrushStyle style) Specifies a filling style for filling the shadow areas in 3-dimensional drawings like 3D bar charts.
TQFont headerFooterFont(uint pos) const Returns the font used in the header (or footer, resp.) section specified by pos.
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 setAllowOverlappingDataValueTexts(bool allow) Specifies whether a data value text may be drawn even if it's region intersects with another data val...
void setDataValuesPlacing(KDChartEnums::PositionFlag position, uint align, int deltaX, int deltaY, int rotation, bool specifyingPositiveValues=true, uint chart=KDCHART_ALL_CHARTS) Specifies the position and rotation of the data value texts to be printed.
void setThreeDLines(bool threeD) Specifies whether lines should be drawn three-dimensionally or not.
void setLegendFontRelSize(int legendFontRelSize) Specifies the legend relative font size.
const KDChartFrameSettings * nextFrameSettings(bool &bFound, int *pIterIdx) const Return the next frame settings specified for the same area type as the frame that was retrieved by pr...
void setExplode(bool explode) Specifies whether the pie chart or ring chart should be exploding (all pies or ring segments are slig...
const KDChartCustomBox * customBox(uint box) const Retrieve a const pointer to a custom box from the list.
bool headerFooterFontUseRelSize(uint pos) const Returns is the font size used in the header (or footer, resp.) section specified by pos will be calcu...
TQColor dataShadow1Color(uint dataset) const Returns the first shadow color for a dataset.
void setBWChartFences(double upperInner, double lowerInner, double upperOuter, double lowerOuter) Specifies the factors to be used to calculate the position of the inner (or outer,...
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.
TQt::PenStyle lineStyle(uint dataset=KDCHART_GLOBAL_LINE_STYLE) const Returns the line style of one of the lines in a line chart or the global line style if no style was s...
TQMap< uint, LineMarkerStyle > LineMarkerStyleMap The type of the storage structure for line marker styles.
void setThreeDBarsShadowColors(bool shadow)
int axisTitleFontRelSize(uint n) const Returns the relative size of the default axis title text, should be ignored if axisTitleFontUseRelSiz...
void setOutlineDataColor(TQColor color) Specifies a color for the outlines of data displays.
void setAxisTitleColor(uint n, TQColor axisTitleColor) Specifies the color of the default axis title text.
bool findDataset(SourceMode mode, uint &dataset, uint &dataset2, uint chart=0) const Retrieves the dataset number or a range of datasets being used with a given SourceMode for a given ch...
void setBarChartSubType(BarChartSubType barChartSubType) Specifies the bar chart subtype.
void setThreeDLineXRotation(int degrees)
void setLegendPosition(LegendPosition position) Specifies where the legend should be shown.
void setHeaderFooterFont(uint pos, const TQFont &font, bool fontUseRelSize, int fontRelSize) Specifies the font to be used in the header (or footer, resp.) section specified by pos.
void setAxisTitleFontUseRelSize(uint n, bool useRelSize) Specifies whether the fixed size of the the default axis title text's font.
LineMarkerStyle lineMarkerStyle(uint dataset) const Returns the marker to be used for a dataset.
LineMarkerStyle The available line marker styles.
void setThreeDBars(bool threeDBars) Specifies whether the engine should draw the bars in 3D.
bool axisTitleFontUseRelSize(uint n) const Returns whether the fix font size is used for the default axis title text.
virtual ~KDChartParams() Destructor.
PolarMarkerStyle The available polar marker styles.
void setDataRainbowColors() Specifies a set of eight rainbow-like colors for the datasets 0..7 and sets the lighter versions of t...
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.
void setPrintDataValuesWithDefaultFontParams(uint chart=KDCHART_ALL_CHARTS, bool callSetPrintDataValues=true) Specifies that data value texts are to be printed with default font parameters.
TQString headerFooterText(uint pos) const Returns the text that is displayed in the header (or footer, resp.) section specified by pos.
bool calculateProperties(int startId, KDChartPropertySet &rSet) const Retrieves the values that correspond to a property set by reading this set's properties and obtaining...
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.
void setLineStyle(TQt::PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE) Specifies a line style to be used for line charts.
void setLineWidth(int width) Specifies the width for lines in line charts.
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.
KDChartEnums::PositionFlag dataValuesAnchorPosition(uint chart, bool negative) const Returns the anchor position which the text is to be aligned to.
SourceMode The chart source mode.
void setPrintDataValuesFontRelSize(uint chart, uint size) Specifies the dynamic font size to be used for printing the data value texts.
int dataValuesAnchorDeltaX(uint chart, bool negative) const Returns the X distance between the text and its anchor.
void setRingStart(int degrees) Specifies the starting point of the ring circle.
void setShadowBrightnessFactor(double factor) Specifies a factor to be used to adjust the built-in brightness of shadow colors in 3-dimensional dra...
void setNumValues(uint numValues) Specifies how many of the values should be shown.
SourceMode chartSourceMode(uint dataset, uint dataset2=KDCHART_NO_DATASET, uint *chart=0) const Retrieves usage information of a given dataset or a range of datasets.
bool properties(int id, KDChartPropertySet &rSet) const Retrieves the values specified for a property set that was stored by registerProperties().
void setAxisType(uint n, const KDChartAxisParams::AxisType axisType) Specifies the axis type.
void setLineMarkerStyle(uint dataset, LineMarkerStyle style) Specifies the line marker to be used for a dataset.
void setDataSubduedColors(bool ordered=false) Specifies a set of eighteen subdued colors for the datasets 0..17.
bool removeFrame(uint area) Remove the last frame, that was specified for this chart area.
void setHiLoChartPrintLowValues(bool active, TQFont *font=0, int size=14, TQColor *color=0) Specifies if and how a HiLo chart will print the Low values below their respective entries.
TQColor headerFooterColor(uint pos) const Returns the colour used for the header text (or footer text, resp.) of the header/footer section spec...
void setPolarMarkerStyle(uint dataset, PolarMarkerStyle style) Specifies the polar marker to be used for a dataset.
void setThreeDBarAngle(uint angle) Specifies the angle used for 3D bars.
void setDataColor(uint dataset, TQColor color) Specifies a color for a dataset.
bool showGrid() const Returns if any grid will be drawn at the data area.
void setBWChartBrush(const TQBrush &bWChartBrush) Specifies the brush to be used to fill the BoxWhisker charts.
AreaChartSubType areaChartSubType() const Returns the area chart subtype.
void setDataValuesCalc(int divPow10=0, int digitsBehindComma=KDCHART_DATA_VALUE_AUTO_DIGITS, uint chart=KDCHART_ALL_CHARTS) Specifies how the data value text figures are modified before printing.
BWStatVal The different statistical values that can be printed into or asked from a Box and Whisker chart.
TQColor axisTitleColor(uint n) const Returns the color of the default axis title text.
void setThreeDPieHeight(int pixels) Specifies the height of the 3D effect for pies in pixels.
void setAxisTitleFontRelSize(uint n, int axisTitleFontRelSize) Specifies whether a relative size to be used for the default axis title text instead of the fixed siz...
TQColor dataShadow2Color(uint dataset) const Returns the second shadow color for a dataset.
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.
KDChartParams() Constructor.
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.
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 setLineChartSubType(LineChartSubType lineChartSubType) Specifies the line chart subtype.
bool removeProperties(int id) Removes a property set from the registry that was registered via registerProperties().
TQFont axisTitleFont(uint n) const Returns the font of the default axis title text.
uint insertCustomBox(const KDChartCustomBox &box) Add a new custom box to the list of boxes.
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.
TQMap< uint, PolarMarkerStyle > PolarMarkerStyleMap The type of the storage structure for polar marker styles.
void setAxisLabelsFont(uint n, TQFont axisLabelsFont, int axisLabelsFontSize=0, TQColor axisLabelsColor=TQt::black) Specifies the axis labels font for one axis.
bool polarLabelsAtPos(KDChartEnums::PositionFlag pos) const Returns whether to show circular labels at a given position in polar charts.
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.
bool removeCustomBox(const uint &idx) Remove a custom box from the list of boxes.
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 ...
void setAxisTitleFont(uint n, TQFont axisTitleFont) Specifies the font and the size of the default axis title text.
void setHeaderFooterColor(uint pos, const TQColor color) Specifies the colour to be used for the header text (or footer text, resp.) of the header/footer sect...
void setLegendTitleFont(const TQFont &font, bool useFontSize) Specifies the font in which the legend title (if any) is drawn.
void setDefaultAxesTypes() Set the default axis types for all the axes the user might activate for this chart:
const TQRect & headerFooterRect(uint pos) const
void setLineMarkerStyles(LineMarkerStyleMap map) Sets a whole map of line marker styles.
uint dataValuesAnchorAlign(uint chart, bool negative) const Returns the way how the text is to be aligned to the anchor.
void setPrintDataValues(bool active, uint chart=KDCHART_ALL_CHARTS, int divPow10=0, int digitsBehindComma=KDCHART_DATA_VALUE_AUTO_DIGITS, TQFont *font=0, uint size=UINT_MAX, const TQColor *color=KDCHART_DATA_VALUE_AUTO_COLOR, KDChartEnums::PositionFlag negativePosition=KDChartEnums::PosCenter, uint negativeAlign=TQt::AlignCenter, int negativeDeltaX=0, int negativeDeltaY=0, int negativeRotation=0, KDChartEnums::PositionFlag positivePosition=KDChartEnums::PosCenter, uint positiveAlign=TQt::AlignCenter, int positiveDeltaX=0, int positiveDeltaY=0, int positiveRotation=0, KDChartEnums::TextLayoutPolicy policy=KDChartEnums::LayoutPolicyRotate) Specifies if and how a chart will print the data value texts near their respective entries.
void setChartSourceMode(SourceMode mode, uint dataset, uint dataset2=KDCHART_NO_DATASET, uint chart=0) Specifies the chart source mode of one or more datasets.
bool axisDatasets(uint n, uint &dataset, uint &dataset2, uint &chart) const Returns which data are to be represented by a given axis.
void setAxisShowGrid(uint n, bool axisShowGrid) Specifies whether a grid should be drawn at the chart data area.
void setValueBlockGapIsRelative(bool gapIsRelative) Specifies if the value set by setValueBlockGap is a per mille value of the chart data area width.
void setBWChartPrintStatistics(BWStatVal statValue, bool active, TQFont *font=0, int size=24, TQColor *color=0, TQBrush *brush=0) Specifies if and how a BoxWhisker chart will print the respective statistical values near to the draw...
void setLegendShowLines(bool legendShowLines) Specifies whether the legend shall show lines or just show the markers (or squares,...
void setHiLoChartPrintOpenValues(bool active, TQFont *font=0, uint size=14, TQColor *color=0) Specifies if and how a HiLo chart will print the Open values below their respective entries.
void setHiLoChartSubType(HiLoChartSubType hiLoChartSubType) Specifies the HiLo chart subtype.
void setOutlineDataLineStyle(TQt::PenStyle style) Specifies the line style of the outlines of data displays.
bool polarDelimAtPos(KDChartEnums::PositionFlag pos) const Returns whether to show circular delimiters at a given position in polar charts.
ChartType chartType() const Returns the chart type configured in this params object.
void setDatasetGapIsRelative(bool gapIsRelative) Specifies if the value set by setDatasetGap is a per mille value of the chart data area width.
uint maxCustomBoxIdx() const Retrieve the biggest custom boxes ID used.
void setPolarMarkerStyles(PolarMarkerStyleMap map) Sets a whole map of polar marker styles.
void setHiLoChartPrintHighValues(bool active, TQFont *font=0, int size=14, TQColor *color=0) Specifies if and how a HiLo chart will print the High values below their respective entries.
void setLegendFont(const TQFont &font, bool useFontSize) Specifies the font in which the legend texts are drawn.
int dataValuesAnchorDeltaY(uint chart, bool negative) const Returns the Y distance between the text and its anchor.
void setLegendTitleTextColor(const TQColor &color) Specifies the color to be used for the legend title.
bool moveDataRegionFrame(uint oldDataRow, uint oldDataCol, uint, uint newDataRow, uint newDataCol, uint) Move a frame that was previously specified using setDataRegionFrame to another location: moves the fr...
void setAxisTitle(uint n, const TQString &axisTitle) Specifies the default axis title text.
TQString axisTitle(uint n) const Returns the default axis title text.
void setAxisLabelsTouchEdges(uint n, bool axisLabelsTouchEdges) Specifies whether the axis labels start and end at the edges of the charts instead being positioned i...
void setGlobalLeading(int left, int top, int right, int bottom) Specifies the distance between the chart and the left border of the painter area.
bool chartAxes(uint chart, uint &cnt, AxesArray &axes) const Returns which ORDINATE axis(axes) is(are) representing a given chart.
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.
bool findDatasets(SourceMode mode1, SourceMode mode2, uint &dataset, uint &dataset2, uint chart=0) const Retrieves the dataset number or a range of datasets being used with one of two given SourceModes for ...
Property settings of a single KDChart data cell.
bool hasOwnBarColor(int &idBarColor, TQColor &barColor) Returns whether this property set is specifying it's own bar color settings.
bool hasOwnShowBar(int &idShowBar, bool &showBar) Returns whether this property set is specifying it's own flag indicating whether this cell's bar is t...
void setShowBar(int idShowBar, bool showBar) Specify the ID of the property set specifying a boolean flag indicating whether this cell's bar is to...
bool hasOwnLineWidth(int &idLineWidth, int &lineWidth) Returns whether this property set is specifying it's own line width settings.
void setLineWidth(int idLineWidth, int lineWidth) Specify the ID of the property set specifying the line width to be used for drawing a line from this ...
const KDChartPropertySet * clone() const Create a new property set on the heap, copy the settings stored by this property set into the newly c...
void setLineColor(int idLineColor, const TQColor &lineColor) Specify the ID of the property set specifying the line color to be used for drawing a line from this ...
void setMarkerAlign(int idMarkerAlign, uint markerAlign) Specify the ID of the property set specifying the alignment of the Marker to be displayed for this da...
bool hasOwnLineStyle(int &idLineStyle, TQt::PenStyle &lineStyle) Returns whether this property set is specifying it's own line style settings.
void quickReset(const TQString &name, int idParent=KDChartPropertySet::UndefinedID) Set the name, set all of the ID settings to idParent, but do NOT change the value settings,...
bool hasOwnShowMarker(int &idShowMarker, bool &showMarker) Returns whether this property set is specifying it's own flag indicating whether a Marker is to be di...
void setShowMarker(int idShowMarker, bool showMarker) Specify the ID of the property set specifying a boolean flag indicating whether a Marker is to be dis...
void setAreaBrush(int idAreaBrush, const TQBrush &areaBrush) Specify the ID of the property set specifying the area brush to be used for this cell or specify the ...
void setBarColor(int idBarColor, const TQColor &barColor) Specify the ID of the property set specifying the bar color to be used for this cell or specify the b...
void deepCopy(const KDChartPropertySet *source) Copy the settings stored by property set source into this property set.
bool hasOwnAreaBrush(int &idAreaBrush, TQBrush &areaBrush) Returns whether this property set is specifying it's own area brush settings.
bool hasOwnLineColor(int &idLineColor, TQColor &lineColor) Returns whether this property set is specifying it's own line color settings.
void setLineStyle(int idLineStyle, const TQt::PenStyle &lineStyle) Specify the ID of the property set specifying the line style to be used for drawing a line from this ...
|