2
KDChart - a multi-platform charting engine
5
/****************************************************************************
6
** Copyright (C) 2001-2003 Klarļæ½lvdalens Datakonsult AB. All rights reserved.
8
** This file is part of the KDChart library.
10
** This file may be distributed and/or modified under the terms of the
11
** GNU General Public License version 2 as published by the Free Software
12
** Foundation and appearing in the file LICENSE.GPL included in the
13
** packaging of this file.
15
** Licensees holding valid commercial KDChart licenses may use this file in
16
** accordance with the KDChart Commercial License Agreement provided with
19
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22
** See http://www.klaralvdalens-datakonsult.se/?page=products for
23
** information about KDChart Commercial License Agreements.
25
** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26
** licensing are not clear to you.
28
**********************************************************************/
29
#ifndef __KDCHARTPROPERTYSET__
30
#define __KDCHARTPROPERTYSET__
33
#include <KDXMLTools.h>
34
#include <KDChartEnums.h>
38
\file KDChartPropertySet.h
40
\brief Property settings of a single KDChart data cell.
44
\class KDChartPropertySet KDChartPropertySet.h
45
\brief Property settings of a single KDChart data cell.
47
\note The property settings feature currently is supported by
48
normal (== not 3-dimensional!) Line Charts only. Future releases
49
of KDChart will offer a rich set of options to use cell-specific
50
properties for other chart types as well...
52
The KDChartPropertySet class stores several settings to be
53
used by the painter classes to decide how to visualize the
55
Each of the settings may be specified either by giving a
56
value for it or by using the ID of another KDChartPropertySet
57
instance: If the later the value of that instance is used
58
instead of the value that is stored locally.
60
\sa KDChartData::setPropertySet
61
\sa KDChartParams::KDCHART_PROPSET_NORMAL_DATA, KDChartParams::KDCHART_PROPSET_TRANSPARENT_DATA
62
\sa KDChartParams::registerProperties
64
class KDChartPropertySet
66
friend class KDChartParams;
72
\li \c UndefinedID (the default value)
73
used to indicate that <b>no</b> ID was set for
74
members \c mIdLineWidth, \c mIdLineColor,
75
\c mIdLineStyle, \c mIdShowMarker and the like...
77
\li \c OwnID used for referencing a property set's *own* ID.
79
\sa KDChartPropertySet
81
enum SpecialDataPropertyID {
87
default constructor setting all values to undefined
88
and name to empty string (default for QString)
90
KDChartPropertySet() :
91
mOwnID( UndefinedID ),
92
mIdLineWidth( UndefinedID ),
93
mIdLineColor( UndefinedID ),
94
mIdLineStyle( UndefinedID ),
95
mIdShowMarker( UndefinedID ),
96
mIdExtraLinesAlign( UndefinedID ),
97
mIdExtraLinesInFront( UndefinedID ),
98
mIdExtraLinesLength( UndefinedID ),
99
mIdExtraLinesWidth( UndefinedID ),
100
mIdExtraLinesColor( UndefinedID ),
101
mIdExtraLinesStyle( UndefinedID ),
102
mIdExtraMarkersAlign( UndefinedID ),
103
mIdExtraMarkersSize( UndefinedID ),
104
mIdExtraMarkersColor( UndefinedID ),
105
mIdExtraMarkersStyle( UndefinedID ),
106
mIdShowBar( UndefinedID ),
107
mIdBarColor( UndefinedID )
108
{ fillValueMembersWithDummyValues(); }
111
Constructor setting all values to undefined.
113
This constructor may be used to initialize a property set
114
specifying neither property IDs nor special property values
116
\param name (may be empty) a name describing this property set.
118
KDChartPropertySet( const QString& name ) :
119
mOwnID( UndefinedID ),
121
mIdLineWidth( UndefinedID ),
122
mIdLineColor( UndefinedID ),
123
mIdLineStyle( UndefinedID ),
124
mIdShowMarker( UndefinedID ),
125
mIdExtraLinesAlign( UndefinedID ),
126
mIdExtraLinesInFront( UndefinedID ),
127
mIdExtraLinesLength( UndefinedID ),
128
mIdExtraLinesWidth( UndefinedID ),
129
mIdExtraLinesColor( UndefinedID ),
130
mIdExtraLinesStyle( UndefinedID ),
131
mIdExtraMarkersAlign( UndefinedID ),
132
mIdExtraMarkersSize( UndefinedID ),
133
mIdExtraMarkersColor( UndefinedID ),
134
mIdExtraMarkersStyle( UndefinedID ),
135
mIdShowBar( UndefinedID ),
136
mIdBarColor( UndefinedID )
137
{ fillValueMembersWithDummyValues(); }
140
Constructor setting all Property Set IDs to the same ID value.
142
This constructor may be used to initialize a property set
143
specifying and have all property IDs set to a specific value,
144
e.g. you might pass KDChartParams::KDCHART_PROPSET_NORMAL_DATA
145
as ID to make the default property set the parent of all
148
\param name (may be empty) a name describing this property set.
149
\param idParent the ID of the parent property set.
151
KDChartPropertySet( const QString& name, int idParent ) :
152
mOwnID( UndefinedID ),
154
mIdLineWidth( idParent ),
155
mIdLineColor( idParent ),
156
mIdLineStyle( idParent ),
157
mIdShowMarker( idParent ),
158
mIdExtraLinesAlign( idParent ),
159
mIdExtraLinesInFront( idParent ),
160
mIdExtraLinesLength( idParent ),
161
mIdExtraLinesWidth( idParent ),
162
mIdExtraLinesColor( idParent ),
163
mIdExtraLinesStyle( idParent ),
164
mIdExtraMarkersAlign( idParent ),
165
mIdExtraMarkersSize( idParent ),
166
mIdExtraMarkersColor( idParent ),
167
mIdExtraMarkersStyle( idParent ),
168
mIdShowBar( idParent ),
169
mIdBarColor( idParent )
170
{ fillValueMembersWithDummyValues(); }
175
\param name (may be empty) a name describing this property set.
177
\param idLineWidth (for Line Charts only) ID of the property set
178
specifying the line width to be used for drawing
179
a line from this data point to the next one.
180
Use special value KDChartPropertySet::UndefinedID
181
to specify neither another property set's ID
182
nor an own value for the line width.
183
Use special value KDChartPropertySet::OwnID
184
if you want to specify the line width by using
185
the following parameter.
187
\param lineWidth (for Line Charts only) the line width to be used
188
for drawing a line from this data point to the
189
next one. If \c lineWidth is negative it is
190
interpreted as per-mille value of the chart's
191
drawing area, the true line width will then be
192
calculated dynamically at drawing time.
193
This parameter is stored but ignored if the
194
previous parameter is not set to KDChartPropertySet::OwnID.
196
\param idLineColor (for Line Charts only) ID of the property set
197
specifying the QColor to be used for drawing
198
a line from this data point to the next one.
199
Use special value KDChartPropertySet::UndefinedID
200
to specify neither another property set's ID
201
nor an own value for the line color.
202
Use special value KDChartPropertySet::OwnID
203
if you want to specify the line color by using
204
the following parameter.
206
\param lineColor (for Line Charts only) the QColor to be used
207
for drawing a line from this data point to the
208
next one. This parameter is stored but ignored if the
209
previous parameter is not set to KDChartPropertySet::OwnID.
211
\param idLineStyle (for Line Charts only) ID of the property set
212
specifying the Qt::PenStyle to be used for drawing
213
a line from this data point to the next one.
214
Use special value KDChartPropertySet::UndefinedID
215
to specify neither another property set's ID
216
nor an own value for the line style.
217
Use special value KDChartPropertySet::OwnID
218
if you want to specify the line style by using
219
the following parameter.
221
\param lineStyle (for Line Charts only) the Qt::PenStyle to be used
222
for drawing a line from this data point to the
223
next one. This parameter is stored but ignored if the
224
previous parameter is not set to KDChartPropertySet::OwnID.
226
\param idShowMarker (for Line Charts only) ID of the property set
227
specifying the showMarker flag saying whether
228
a marker is to be shown for this cell's data value.
229
Use special value KDChartPropertySet::UndefinedID
230
to specify neither another property set's ID
231
nor an own value for this flag.
232
Use special value KDChartPropertySet::OwnID
233
if you want to specify the flag by using
234
the following parameter.
236
\param showMarker (for Line Charts only) flag indicating whether
237
a marker is to be shown for this cell's data value.
238
This parameter is stored but ignored if the
239
previous parameter is not set to KDChartPropertySet::OwnID.
241
\param idExtraLinesAlign (for Line or Bar Charts only) ID of the property set
242
specifying the alignment of extra horizontal or vertical
243
lines to be drawn through this point, see param \c
244
extraLinesAlign for details.
246
\param extraLinesAlign (for Line or Bar Charts only) the alignment of extra
247
horizontal or vertical lines to be drawn through this point.
248
These extra lines connect the point with the chart's axes,
249
or they reach from the point to the left and right
250
and/or towards the top and bottom without touching the axes.
251
Use either \c 0 (to surpress drawing of extra lines) or any
252
<b>OR</b> combination of the following bit flags to specify
253
which of the 4 possible lines are to be drawn.
254
Do <b>not</b> use any of the other flags defined with
255
Qt::AlignmentFlags: all values not listed here are reserved
256
for KDChart's further extensions and will be ignored.
257
\li \c Qt::AlignLeft horizontal line from this point to the left axis
258
\li \c Qt::AlignRight horizontal line to the right axis
259
\li \c Qt::AlignHCenter horizontal line of \c extraLinesLength
260
\li \c Qt::AlignTop vertical line to the top axis
261
\li \c Qt::AlignBottom vertical line to the bottom axis
262
\li \c Qt::AlignVCenter vertical line of \c extraLinesLength
263
\li \c Qt::AlignCenter horizontal and vertical lines of \c extraLinesLength
265
\param idExtraLinesInFront (for Line or Bar Charts only) ID of the property set
266
specifying whether the extra horizontal or vertical
267
lines (and their respective extra markers) to be drawn in front of
268
the normal lines (and/or in front of the normal markers, resp.).
269
This parameter will be ignored if extraLinesAlign is zero
270
(or idExtraLinesAlign points to a property set specifying
271
zero extraLinesAlign, resp.).
273
\param extraLinesInFront (for Line or Bar Charts only) specifying whether
274
the extra horizontal or vertical lines (and their respective extra
275
markers) to be drawn in front of the normal lines (and/or in front
276
of the normal markers, resp.): by default they are drawn behind.
277
This parameter will be ignored if extraLinesAlign is zero
278
(or idExtraLinesAlign points to a property set specifying
279
zero extraLinesAlign, resp.).
281
\param idExtraLinesLength (for Line or Bar Charts only) ID of the property set
282
specifying the length of the extra horizontal or vertical
283
lines to be drawn through this point. This parameter will
284
be ignored if extraLinesAlign is <b>not</b> Qt::AlignHCenter nor
285
Qt::AlignVCenter (or idExtraLinesAlign points to a property
286
set not specifying such alignment, resp.).
288
\param extraLinesLength (for Line or Bar Charts only) the length
289
of the extra horizontal or vertical lines to be drawn through
290
this point. If \c extraLinesLength is negative it is interpreted
291
as per-mille value of the data area's size, the true line length
292
will then be calculated dynamically at drawing time.
293
This parameter will be ignored if extraLinesAlign is <b>not</b> Qt::AlignHCenter
294
nor Qt::AlignVCenter (or idExtraLinesAlign points to a property set
295
not specifying such alignment, resp.)
297
\param idExtraLinesWidth (for Line or Bar Charts only) ID of the property set
298
specifying the width of the extra horizontal or vertical
299
lines to be drawn through this point. This parameter will be
300
ignored if extraLinesAlign is zero (or idExtraLinesAlign
301
points to a property set specifying zero extraLinesAlign, resp.).
303
\param extraLinesWidth (for Line or Bar Charts only) the width of the extra horizontal
304
or vertical lines to be drawn through this point.
305
If \c extraLinesWidth is negative it is interpreted as per-mille
306
value of the chart's drawing area, the true line width will then
307
be calculated dynamically at drawing time.
308
This parameter will be ignored if extraLinesAlign is zero
309
(or idExtraLinesAlign points to a property set specifying
310
zero extraLinesAlign, resp.).
312
\param idExtraLinesColor (for Line or Bar Charts only) ID of the property set
313
specifying the QColor of the extra horizontal or vertical
314
lines to be drawn through this point. This parameter will
315
be ignored if extraLinesAlign is zero (or idExtraLinesAlign
316
points to a property set specifying zero extraLinesAlign, resp.).
318
\param extraLinesColor (for Line or Bar Charts only) the QColor of the extra horizontal
319
or vertical lines to be drawn through this point. This parameter
320
will be ignored if extraLinesAlign is zero (or
321
idExtraLinesAlign points to a property set specifying zero
322
extraLinesAlign, resp.).
324
\param idExtraLinesStyle (for Line or Bar Charts only) ID of the property set
325
specifying the Qt::PenStyle of the extra horizontal or vertical
326
lines to be drawn through this point. This parameter will
327
be ignored if extraLinesAlign is zero (or idExtraLinesAlign
328
points to a property set specifying zero extraLinesAlign, resp.).
330
\param extraLinesStyle (for Line or Bar Charts only) the Qt::PenStyle of the extra horizontal
331
or vertical lines to be drawn through this point. This parameter
332
will be ignored if extraLinesAlign is zero (or
333
idExtraLinesAlign points to a property set specifying zero
334
extraLinesAlign, resp.).
336
\param idExtraMarkersAlign (for Line or Bar Charts only) ID of the property set
337
specifying the vertical and/or horizontal position of markers
338
to be drawn at the end(s) of extra horizontal or vertical
339
lines which are drawn through this point, see parameter \c
340
extraMarkersAlign for details.
342
\param extraMarkersAlign (for Line or Bar Charts only) the vertical and/or horizontal
343
position of markers to be drawn at the end(s) of extra
344
horizontal or vertical lines which are drawn through this point.
345
These markers can be drawn at the end(s) of one or both
346
extra lines, use either \c 0 (to surpress drawing of the
347
markers) or any <b>OR</b> combination of the following bit
348
flags to specify which of the markers are to be drawn.
349
Do <b>not</b> use any of the other flags defined with
350
Qt::AlignmentFlags: all values not listed here are reserved
351
for KDChart's further extensions and will be ignored.
352
\li \c Qt::AlignLeft marker will be drawn at the left end of
354
\li \c Qt::AlignRight marker will be drawn at the right end of
355
the horizontal line, this flag and the \c Qt::AlignLeft flag will
356
be ignored if no horizontal line is drawn but they will
357
<b>not</b> be ignored if the line is drawn using a \c Qt::NoPen
359
\li \c Qt::AlignTop marker will be drawn at the top end of
361
\li \c Qt::AlignBottom marker will be drawn at the bottom end of
362
the vertical line, this flag and the \c Qt::AlignTop flag will
363
be ignored if no vertical line is drawn but they will
364
<b>not</b> be ignored if the line is drawn using a \c Qt::NoPen
367
\param idExtraMarkersSize (for Line or Bar Charts only) ID of the property set
368
specifying the size of the markers to be drawn at the end(s)
369
of extra horizontal or vertical lines which are drawn through
371
This parameter will be ignored if no markers are drawn, see
372
parameter \c extraMarkersAlign for details.
374
\param extraMarkersSize (for Line or Bar Charts only) the size of the markers
375
to be drawn at the end(s) of extra horizontal or vertical
376
lines which are drawn through this point.
377
Negative values for \c extraMarkersSize.width() or
378
\c extraMarkersSize.height() are interpreted as per-mille
379
values of the chart's drawing area, the true marker size will
380
then be calculated dynamically at drawing time.
381
This parameter will be ignored if no markers are drawn, see
382
parameter \c extraMarkersAlign for details.
384
\param idExtraMarkersColor (for Line or Bar Charts only) ID of the property set
385
specifying a QColor for the markers to be drawn at the end(s)
386
of extra horizontal or vertical lines which are drawn through
388
This parameter will be ignored if no markers are drawn, see
389
parameter \c extraMarkersAlign for details.
391
\param extraMarkersSize (for Line or Bar Charts only) a QColor for the markers
392
to be drawn at the end(s) of extra horizontal or vertical
393
lines which are drawn through this point.
394
This parameter will be ignored if no markers are drawn, see
395
parameter \c extraMarkersAlign for details.
397
\param idExtraMarkersColor (for Line or Bar Charts only) ID of the property set
398
specifying a KDChartParams::LineMarkerStyle for the markers
399
to be drawn at the end(s) of extra horizontal or vertical
400
lines which are drawn through this point.
401
This parameter will be ignored if no markers are drawn, see
402
parameter \c extraMarkersAlign for details.
404
\param extraMarkersSize (for Line or Bar Charts only) a KDChartParams::LineMarkerStyle
405
for the markers to be drawn at the end(s) of extra horizontal
406
or vertical lines which are drawn through this point.
407
This parameter will be ignored if no markers are drawn, see
408
parameter \c extraMarkersAlign for details.
410
\param idShowBar (for Bar Charts only) ID of the property set
411
specifying the showBar flag saying whether
412
this cell's bar is to be painted.
413
Use special value KDChartPropertySet::UndefinedID
414
to specify neither another property set's ID
415
nor an own value for this flag.
416
Use special value KDChartPropertySet::OwnID
417
if you want to specify the flag by using
418
the following parameter.
420
\param showBar (for Bar Charts only) flag indicating whether
421
this cell's bar is to be painted.
422
This parameter is stored but ignored if the
423
previous parameter is not set to KDChartPropertySet::OwnID.
425
\param idBarColor (for Bar Charts only) ID of the property set
426
specifying the QColor to be used for drawing
428
Use special value KDChartPropertySet::UndefinedID
429
to specify neither another property set's ID
430
nor an own value for the bar color.
431
Use special value KDChartPropertySet::OwnID
432
if you want to specify the bar color by using
433
the following parameter.
435
\param barColor (for Bar Charts only) the QColor to be used
436
for drawing this cell's bar. This parameter is stored
437
but ignored if the previous parameter is not set to
438
KDChartPropertySet::OwnID.
441
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
442
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
444
KDChartPropertySet( const QString& name,
445
int idLineWidth, int lineWidth,
446
int idLineColor, const QColor& lineColor,
447
int idLineStyle, const Qt::PenStyle& lineStyle,
448
int idShowMarker, bool showMarker,
449
int idExtraLinesAlign, uint extraLinesAlign,
450
int idExtraLinesInFront,bool extraLinesInFront,
451
int idExtraLinesLength, int extraLinesLength,
452
int idExtraLinesWidth, int extraLinesWidth,
453
int idExtraLinesColor, const QColor& extraLinesColor,
454
int idExtraLinesStyle, const Qt::PenStyle& extraLinesStyle,
455
int idExtraMarkersAlign,uint extraMarkersAlign,
456
int idExtraMarkersSize, const QSize& extraMarkersSize,
457
int idExtraMarkersColor,const QColor& extraMarkersColor,
458
int idExtraMarkersStyle,int extraMarkersStyle,
459
int idShowBar, bool showBar,
460
int idBarColor, const QColor& barColor
462
mOwnID( UndefinedID ),
464
mIdLineWidth( idLineWidth ), mLineWidth( lineWidth ),
465
mIdLineColor( idLineColor ), mLineColor( lineColor ),
466
mIdLineStyle( idLineStyle ), mLineStyle( lineStyle ),
467
mIdShowMarker( idShowMarker ), mShowMarker( showMarker ),
468
mIdExtraLinesAlign( idExtraLinesAlign ), mExtraLinesAlign( extraLinesAlign ),
469
mIdExtraLinesInFront( idExtraLinesInFront ), mExtraLinesInFront( extraLinesInFront ),
470
mIdExtraLinesLength( idExtraLinesLength ), mExtraLinesLength( extraLinesLength ),
471
mIdExtraLinesWidth( idExtraLinesWidth ), mExtraLinesWidth( extraLinesWidth ),
472
mIdExtraLinesColor( idExtraLinesColor ), mExtraLinesColor( extraLinesColor ),
473
mIdExtraLinesStyle( idExtraLinesStyle ), mExtraLinesStyle( extraLinesStyle ),
474
mIdExtraMarkersAlign( idExtraMarkersAlign ), mExtraMarkersAlign( extraMarkersAlign ),
475
mIdExtraMarkersSize( idExtraMarkersSize ), mExtraMarkersSize( extraMarkersSize ),
476
mIdExtraMarkersColor( idExtraMarkersColor ), mExtraMarkersColor( extraMarkersColor ),
477
mIdExtraMarkersStyle( idExtraMarkersStyle ), mExtraMarkersStyle( extraMarkersStyle ),
478
mIdShowBar( idShowBar ), mShowBar( showBar ),
479
mIdBarColor( idBarColor ), mBarColor( barColor )
482
KDChartPropertySet& operator=( const KDChartPropertySet& R );
485
Save this property set's settings in a stream,
486
this stores the own property set ID as well.
490
QDomElement saveXML(QDomDocument& doc) const;
494
Retrieves a property set and stores it in parameter set.
496
\note Since the property set's internal <b>ID</b> is also read
497
make sure to call KDChartParams::setProperties( set.id(), set )
498
after calling \c load() if you want to use the loaded
499
property set in the context of KDChartParam settings.
501
\returns TRUE if the property set could be read.
505
static bool loadXML( const QDomElement& element, KDChartPropertySet& set );
509
Returns the name of this property set.
511
int id() const { return mOwnID; }
514
Change the descriptive name of this property set.
516
void setName( const QString& name )
522
Returns the name of this property set.
524
QString name() const { return mName; }
529
Specify the ID of the property set specifying a boolean flag indicating
530
whether this cell's bar is to be painted
531
<b>or</b> specifying this flag directly.
533
\note This function should be used for Bar Charts only, otherwise
534
the settings specified here will be ignored.
536
\param idShowBar ID of the property set specifying the flag
537
indicating whether this cell's bar is to be painted.
538
Use special value KDChartPropertySet::UndefinedID
539
to specify neither another property set's ID
540
nor an own value for this flag.
541
Use special value KDChartPropertySet::OwnID
542
if you do NOT want to inherit another property set's
543
settings but want to specify the flag by using
544
the following parameter.
545
\param showBar Flag indicating whether this cell's bar is to be painted.
546
This parameter is stored but ignored if the previous parameter
547
is not set to KDChartPropertySet::OwnID.
553
void setShowBar( int idShowBar, bool showBar )
555
mIdShowBar = idShowBar;
560
Returns whether this property set is specifying it's own flag indicating
561
whether this cell's bar is to be painted.
563
\note This function should be used for Bar Charts only, otherwise
564
the settings specified here will be ignored.
566
\returns TRUE if this property set is specifying it's own showBar flag,
567
FALSE if the settings of another property set are to be used instead.
569
\note The return value will also be FALSE if the 'default' properties
570
are to be used: in this case idShowBar will be KDChartParams::NormalData
572
\param idShowBar to be ignored if return value is TRUE.
573
If idShowBar is KDChartPropertySet::UndefinedID
574
then neither a property set ID
575
nor an own flag were specified (so no special
576
enabeling/disabeling of bars is associated to the
577
respective data cell), else idShowBar contains the
578
ID of another property set that is specifying the flag
580
\param showBar this parameter's value is not modified if return value is FALSE.
581
Parameter showBar contains the showBar flag
582
associated with the respective data cell.
583
If return value is FALSE the showBar
584
flag is not set (so the parameter keeps its previous value)
585
but this is to be overridden by the respective value
586
of another property set that is indicated
587
by the idShowBar parameter - unless this has the special
588
value KDChartPropertySet::UndefinedID as decribed above.
594
bool hasOwnShowBar( int& idShowBar, bool& showBar )
596
idShowBar = mIdShowBar;
597
if( OwnID == idShowBar ){
605
Specify the ID of the property set specifying the bar color
606
to be used for this cell
607
<b>or</b> specify the bar color directly.
609
\note This function should be used for Bar Charts only, otherwise
610
the settings specified here will be ignored.
612
\param idBarColor ID of the property set specifying the bar color.
613
Use special value KDChartPropertySet::UndefinedID
614
to specify neither another property set's ID
615
nor an own value for the bar color.
616
Use special value KDChartPropertySet::OwnID
617
if you do NOT want to inherit another property set's
618
settings but want to specify the bar color by using
619
the following parameter.
620
\param barColor The bar color to be used.
621
This parameter is stored but ignored if the previous parameter
622
is not set to KDChartPropertySet::OwnID.
626
void setBarColor( int idBarColor, const QColor& barColor )
628
mIdBarColor = idBarColor;
629
mBarColor = barColor;
633
Returns whether this property set is specifying it's own bar color settings.
635
\note This function should be used for Bar Charts only, otherwise
636
the settings specified here will be ignored.
638
\returns TRUE if this property set is specifying it's own bar color settings,
639
FALSE if the settings of another property set are to be used instead.
641
\note The return value will also be FALSE if the 'default' properties
642
are to be used: in this case idBarColor will be KDChartParams::NormalData
644
\param idBarColor to be ignored if return value is TRUE.
645
If idBarColor is KDChartPropertySet::UndefinedID
646
then neither a property set ID
647
nor an own bar color were specified (so no special
648
Bar color is associated to the respective data cell),
649
else idBarColor contains the ID of another property set
650
that is specifying the Bar color to be used.
651
\param barColor this parameter's value is not modified if return value is FALSE.
652
Parameter barColor contains the bar color value
653
associated with the respective data cell.
654
If return value is FALSE the barColor
655
value is not set (so the parameter keeps its previous value)
656
but this is to be overridden by the respective value
657
of another property set that is indicated
658
by the idBarColor parameter - unless this has the special
659
value KDChartPropertySet::UndefinedID as decribed above.
663
bool hasOwnBarColor( int& idBarColor, QColor& barColor )
665
idBarColor = mIdBarColor;
666
if( OwnID == mIdBarColor ){
667
barColor = mBarColor;
674
Specify the ID of the property set specifying the line width
675
to be used for drawing a line from this data point to the next one
676
<b>or</b> specify the line width directly.
678
\note This function should be used for Line Charts only, otherwise
679
the settings specified here will be ignored.
681
\param idLineWidth ID of the property set specifying the line width.
682
Use special value KDChartPropertySet::UndefinedID
683
to specify neither another property set's ID
684
nor an own value for the line width.
685
Use special value KDChartPropertySet::OwnID
686
if you do NOT want to inherit another property set's
687
settings but want to specify the line width by using
688
the following parameter.
689
\param lineWidth The line width to be used.
690
This parameter is stored but ignored if the previous parameter
691
is not set to KDChartPropertySet::OwnID.
693
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
694
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
696
void setLineWidth( int idLineWidth, int lineWidth )
698
mIdLineWidth = idLineWidth;
699
mLineWidth = lineWidth;
703
Returns whether this property set is specifying it's own line width settings.
705
\note This function should be used for Line Charts only.
707
\returns TRUE if this property set is specifying it's own line width settings,
708
FALSE if the settings of another property set are to be used instead.
710
\param idLineWidth to be ignored if return value is TRUE.
711
If idLineWidth is KDChartPropertySet::UndefinedID
712
then neither a property set ID
713
nor an own line width were specified (so no special
714
line width is associated to the respective data cell),
715
else idLineWidth contains the ID of another property set
716
that is specifying the line width to be used.
717
\param lineWidth this parameter's value is not modified if return value is FALSE.
718
Parameter lineWidth contains the line width value
719
associated with the respective data cell.
720
If return value is FALSE the lineWidth
721
value is not set (so the parameter keeps its previous value)
722
but this is to be overridden by the respective value
723
of another property set that is indicated
724
by the idLineWidth parameter - unless this has the special
725
value KDChartPropertySet::UndefinedID as decribed above.
727
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
728
\sa hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
730
bool hasOwnLineWidth( int& idLineWidth, int& lineWidth )
732
idLineWidth = mIdLineWidth;
733
if( OwnID == mIdLineWidth ){
734
lineWidth = mLineWidth;
741
Specify the ID of the property set specifying the line color
742
to be used for drawing a line from this data point to the next one
743
<b>or</b> specify the line color directly.
745
\note This function should be used for Line Charts only, otherwise
746
the settings specified here will be ignored.
748
\param idLineColor ID of the property set specifying the line color.
749
Use special value KDChartPropertySet::UndefinedID
750
to specify neither another property set's ID
751
nor an own value for the line color.
752
Use special value KDChartPropertySet::OwnID
753
if you do NOT want to inherit another property set's
754
settings but want to specify the line color by using
755
the following parameter.
756
\param lineColor The line color to be used.
757
This parameter is stored but ignored if the previous parameter
758
is not set to KDChartPropertySet::OwnID.
760
\sa setLineWidth, setLineStyle, setShowMarker
761
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
763
void setLineColor( int idLineColor, const QColor& lineColor )
765
mIdLineColor = idLineColor;
766
mLineColor = lineColor;
770
Returns whether this property set is specifying it's own line color settings.
772
\note This function should be used for Line Charts only, otherwise
773
the settings specified here will be ignored.
775
\returns TRUE if this property set is specifying it's own line color settings,
776
FALSE if the settings of another property set are to be used instead.
778
\note The return value will also be FALSE if the 'default' properties
779
are to be used: in this case idLineColor will be KDChartParams::NormalData
781
\param idLineColor to be ignored if return value is TRUE.
782
If idLineColor is KDChartPropertySet::UndefinedID
783
then neither a property set ID
784
nor an own line color were specified (so no special
785
line color is associated to the respective data cell),
786
else idLineColor contains the ID of another property set
787
that is specifying the line color to be used.
788
\param lineColor this parameter's value is not modified if return value is FALSE.
789
Parameter lineColor contains the line color value
790
associated with the respective data cell.
791
If return value is FALSE the lineColor
792
value is not set (so the parameter keeps its previous value)
793
but this is to be overridden by the respective value
794
of another property set that is indicated
795
by the idLineColor parameter - unless this has the special
796
value KDChartPropertySet::UndefinedID as decribed above.
798
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
799
\sa hasOwnLineWidth, hasOwnLineStyle, hasOwnShowMarker
801
bool hasOwnLineColor( int& idLineColor, QColor& lineColor )
803
idLineColor = mIdLineColor;
804
if( OwnID == mIdLineColor ){
805
lineColor = mLineColor;
812
Specify the ID of the property set specifying the line style
813
to be used for drawing a line from this data point to the next one
814
<b>or</b> specify the line width directly.
816
\note This function should be used for Line Charts only, otherwise
817
the settings specified here will be ignored.
819
\param idLineStyle ID of the property set specifying the line style.
820
Use special value KDChartPropertySet::UndefinedID
821
to specify neither another property set's ID
822
nor an own value for the line style.
823
Use special value KDChartPropertySet::OwnID
824
if you do NOT want to inherit another property set's
825
settings but want to specify the line style by using
826
the following parameter.
827
\param lineStyle The line style to be used.
828
This parameter is stored but ignored if the previous parameter
829
is not set to KDChartPropertySet::OwnID.
831
\sa setLineWidth, setLineColor, setShowMarker
832
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
834
void setLineStyle( int idLineStyle, const Qt::PenStyle& lineStyle )
836
mIdLineStyle = idLineStyle;
837
mLineStyle = lineStyle;
841
Returns whether this property set is specifying it's own line style settings.
843
\note This function should be used for Line Charts only, otherwise
844
the settings specified here will be ignored.
846
\returns TRUE if this property set is specifying it's own line style settings,
847
FALSE if the settings of another property set are to be used instead.
849
\note The return value will also be FALSE if the 'default' properties
850
are to be used: in this case idLineStyle will be KDChartParams::NormalData
852
\param idLineStyle to be ignored if return value is TRUE.
853
If idLineStyle is KDChartPropertySet::UndefinedID
854
then neither a property set ID
855
nor an own line style were specified (so no special
856
line style is associated to the respective data cell),
857
else idLineStyle contains the ID of another property set
858
that is specifying the line style to be used.
859
\param lineStyle this parameter's value is not modified if return value is FALSE.
860
Parameter lineStyle contains the line style value
861
associated with the respective data cell.
862
If return value is FALSE the lineStyle
863
value is not set (so the parameter keeps its previous value)
864
but this is to be overridden by the respective value
865
of another property set that is indicated
866
by the idLineStyle parameter - unless this has the special
867
value KDChartPropertySet::UndefinedID as decribed above.
869
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker
870
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnShowMarker
872
bool hasOwnLineStyle( int& idLineStyle, Qt::PenStyle& lineStyle )
874
idLineStyle = mIdLineStyle;
875
if( OwnID == mIdLineStyle ){
876
lineStyle = mLineStyle;
883
Specify the ID of the property set specifying a boolean flag indicating
884
whether a Marker is to be displayed for this data value
885
<b>or</b> specifying this flag directly.
887
\note This function should be used for Line Charts only, otherwise
888
the settings specified here will be ignored.
890
\param idShowMarker ID of the property set specifying the flag
891
indicating whether a marker is to be shown.
892
Use special value KDChartPropertySet::UndefinedID
893
to specify neither another property set's ID
894
nor an own value for this flag.
895
Use special value KDChartPropertySet::OwnID
896
if you do NOT want to inherit another property set's
897
settings but want to specify the flag by using
898
the following parameter.
899
\param showMarker Flag indicating whether a marker is to be shown.
900
This parameter is stored but ignored if the previous parameter
901
is not set to KDChartPropertySet::OwnID.
904
\sa setLineWidth, setLineColor, setLineStyle
905
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle
907
void setShowMarker( int idShowMarker, bool showMarker )
909
mIdShowMarker = idShowMarker;
910
mShowMarker = showMarker;
914
Returns whether this property set is specifying it's own flag indicating
915
whether a Marker is to be displayed.
917
\note This function should be used for Line Charts only, otherwise
918
the settings specified here will be ignored.
920
\returns TRUE if this property set is specifying it's own showMarker flag,
921
FALSE if the settings of another property set are to be used instead.
923
\note The return value will also be FALSE if the 'default' properties
924
are to be used: in this case idShowMarker will be KDChartParams::NormalData
926
\param idShowMarker to be ignored if return value is TRUE.
927
If idShowMarker is KDChartPropertySet::UndefinedID
928
then neither a property set ID
929
nor an own flag were specified (so no special
930
enabeling/disabeling of markers is associated to the
931
respective data cell), else idShowMarker contains the
932
ID of another property set that is specifying the flag
934
\param showMarker this parameter's value is not modified if return value is FALSE.
935
Parameter showMarker contains the showMarker flag
936
associated with the respective data cell.
937
If return value is FALSE the showMarker
938
flag is not set (so the parameter keeps its previous value)
939
but this is to be overridden by the respective value
940
of another property set that is indicated
941
by the idShowMarker parameter - unless this has the special
942
value KDChartPropertySet::UndefinedID as decribed above.
945
\sa setLineWidth, setLineColor, setLineStyle
946
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle
948
bool hasOwnShowMarker( int& idShowMarker, bool& showMarker )
950
idShowMarker = mIdShowMarker;
951
if( OwnID == idShowMarker ){
952
showMarker = mShowMarker;
958
void setExtraLinesAlign( int idExtraLinesAlign, uint extraLinesAlign )
960
mIdExtraLinesAlign = idExtraLinesAlign;
961
mExtraLinesAlign = extraLinesAlign;
963
bool hasOwnExtraLinesAlign( int& idExtraLinesAlign, uint& extraLinesAlign )
965
idExtraLinesAlign = mIdExtraLinesAlign;
966
if( OwnID == idExtraLinesAlign ){
967
extraLinesAlign = mExtraLinesAlign;
972
void setExtraLinesInFront( int idExtraLinesInFront, bool extraLinesInFront )
974
mIdExtraLinesInFront = idExtraLinesInFront;
975
mExtraLinesInFront = extraLinesInFront;
977
bool hasOwnExtraLinesInFront( int& idExtraLinesInFront, bool& extraLinesInFront )
979
idExtraLinesInFront = mIdExtraLinesInFront;
980
if( OwnID == idExtraLinesInFront ){
981
extraLinesInFront = mExtraLinesInFront;
986
void setExtraLinesLength( int idExtraLinesLength, int extraLinesLength )
988
mIdExtraLinesLength = idExtraLinesLength;
989
mExtraLinesLength = extraLinesLength;
991
bool hasOwnExtraLinesLength( int& idExtraLinesLength, int& extraLinesLength )
993
idExtraLinesLength = mIdExtraLinesLength;
994
if( OwnID == idExtraLinesLength ){
995
extraLinesLength = mExtraLinesLength;
1000
void setExtraLinesWidth( int idExtraLinesWidth, int extraLinesWidth )
1002
mIdExtraLinesWidth = idExtraLinesWidth;
1003
mExtraLinesWidth = extraLinesWidth;
1005
bool hasOwnExtraLinesWidth( int& idExtraLinesWidth, int& extraLinesWidth )
1007
idExtraLinesWidth = mIdExtraLinesWidth;
1008
if( OwnID == idExtraLinesWidth ){
1009
extraLinesWidth = mExtraLinesWidth;
1014
void setExtraLinesColor( int idExtraLinesColor, const QColor& extraLinesColor )
1016
mIdExtraLinesColor = idExtraLinesColor;
1017
mExtraLinesColor = extraLinesColor;
1019
bool hasOwnExtraLinesColor( int& idExtraLinesColor, QColor& extraLinesColor )
1021
idExtraLinesColor = mIdExtraLinesColor;
1022
if( OwnID == idExtraLinesColor ){
1023
extraLinesColor = mExtraLinesColor;
1028
void setExtraLinesStyle( int idExtraLinesStyle, const Qt::PenStyle extraLinesStyle )
1030
mIdExtraLinesStyle = idExtraLinesStyle;
1031
mExtraLinesStyle = extraLinesStyle;
1033
bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, Qt::PenStyle& extraLinesStyle )
1035
idExtraLinesStyle = mIdExtraLinesStyle;
1036
if( OwnID == idExtraLinesStyle ){
1037
extraLinesStyle = mExtraLinesStyle;
1043
void setExtraMarkersAlign( int idExtraMarkersAlign, uint extraMarkersAlign )
1045
mIdExtraMarkersAlign = idExtraMarkersAlign;
1046
mExtraMarkersAlign = extraMarkersAlign;
1048
bool hasOwnExtraMarkersAlign( int& idExtraMarkersAlign, uint& extraMarkersAlign )
1050
idExtraMarkersAlign = mIdExtraMarkersAlign;
1051
if( OwnID == idExtraMarkersAlign ){
1052
extraMarkersAlign = mExtraMarkersAlign;
1057
void setExtraMarkersSize( int idExtraMarkersSize, const QSize& extraMarkersSize )
1059
mIdExtraMarkersSize = idExtraMarkersSize;
1060
mExtraMarkersSize = extraMarkersSize;
1062
bool hasOwnExtraMarkersSize( int& idExtraMarkersSize, QSize& extraMarkersSize )
1064
idExtraMarkersSize = mIdExtraMarkersSize;
1065
if( OwnID == idExtraMarkersSize ){
1066
extraMarkersSize = mExtraMarkersSize;
1071
void setExtraMarkersColor( int idExtraMarkersColor, const QColor& extraMarkersColor )
1073
mIdExtraMarkersColor = idExtraMarkersColor;
1074
mExtraMarkersColor = extraMarkersColor;
1076
bool hasOwnExtraMarkersColor( int& idExtraMarkersColor, QColor& extraMarkersColor )
1078
idExtraMarkersColor = mIdExtraMarkersColor;
1079
if( OwnID == idExtraMarkersColor ){
1080
extraMarkersColor = mExtraMarkersColor;
1085
void setExtraMarkersStyle( int idExtraMarkersStyle, int extraMarkersStyle )
1087
mIdExtraMarkersStyle = idExtraMarkersStyle;
1088
mExtraMarkersStyle = extraMarkersStyle;
1090
bool hasOwnExtraMarkersStyle( int& idExtraMarkersStyle, int& extraMarkersStyle )
1092
idExtraMarkersStyle = mIdExtraMarkersStyle;
1093
if( OwnID == idExtraMarkersStyle ){
1094
extraMarkersStyle = mExtraMarkersStyle;
1101
// the following member only to be set internally by KDChartParams::registerProperties
1102
// and by KDChartParams::setProperties
1107
// IDs: values used if ID == OwnID:
1108
int mIdLineWidth; int mLineWidth;
1109
int mIdLineColor; QColor mLineColor;
1110
int mIdLineStyle; Qt::PenStyle mLineStyle;
1111
int mIdShowMarker; bool mShowMarker;
1112
int mIdExtraLinesAlign; uint mExtraLinesAlign;
1113
int mIdExtraLinesInFront; bool mExtraLinesInFront;
1114
int mIdExtraLinesLength; int mExtraLinesLength;
1115
int mIdExtraLinesWidth; int mExtraLinesWidth;
1116
int mIdExtraLinesColor; QColor mExtraLinesColor;
1117
int mIdExtraLinesStyle; Qt::PenStyle mExtraLinesStyle;
1118
int mIdExtraMarkersAlign; uint mExtraMarkersAlign;
1119
int mIdExtraMarkersSize; QSize mExtraMarkersSize;
1120
int mIdExtraMarkersColor; QColor mExtraMarkersColor;
1121
int mIdExtraMarkersStyle; int mExtraMarkersStyle;
1122
int mIdShowBar; bool mShowBar;
1123
int mIdBarColor; QColor mBarColor;
1124
void fillValueMembersWithDummyValues();