~ubuntu-branches/ubuntu/edgy/koffice/edgy-updates

« back to all changes in this revision

Viewing changes to kchart/kdchart/KDChartPropertySet.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040509113300-xi5t1z4yxe7n03x7
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++ -*-
 
2
   KDChart - a multi-platform charting engine
 
3
   */
 
4
 
 
5
/****************************************************************************
 
6
 ** Copyright (C) 2001-2003 Klarļæ½lvdalens Datakonsult AB.  All rights reserved.
 
7
 **
 
8
 ** This file is part of the KDChart library.
 
9
 **
 
10
 ** This file may be distributed and/or modified under the terms of the
 
11
 ** GNU General Public License version 2 as published by the Free Software
 
12
 ** Foundation and appearing in the file LICENSE.GPL included in the
 
13
 ** packaging of this file.
 
14
 **
 
15
 ** Licensees holding valid commercial KDChart licenses may use this file in
 
16
 ** accordance with the KDChart Commercial License Agreement provided with
 
17
 ** the Software.
 
18
 **
 
19
 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 
20
 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
21
 **
 
22
 ** See http://www.klaralvdalens-datakonsult.se/?page=products for
 
23
 **   information about KDChart Commercial License Agreements.
 
24
 **
 
25
 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
 
26
 ** licensing are not clear to you.
 
27
 **
 
28
 **********************************************************************/
 
29
#ifndef __KDCHARTPROPERTYSET__
 
30
#define __KDCHARTPROPERTYSET__
 
31
 
 
32
 
 
33
#include <KDXMLTools.h>
 
34
#include <KDChartEnums.h>
 
35
 
 
36
 
 
37
/**
 
38
  \file KDChartPropertySet.h
 
39
 
 
40
  \brief Property settings of a single KDChart data cell.
 
41
  */
 
42
 
 
43
/**
 
44
  \class KDChartPropertySet KDChartPropertySet.h
 
45
  \brief Property settings of a single KDChart data cell.
 
46
 
 
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...
 
51
 
 
52
  The KDChartPropertySet class stores several settings to be
 
53
  used by the painter classes to decide how to visualize the
 
54
  respective data cell.
 
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.
 
59
 
 
60
\sa KDChartData::setPropertySet
 
61
\sa KDChartParams::KDCHART_PROPSET_NORMAL_DATA, KDChartParams::KDCHART_PROPSET_TRANSPARENT_DATA
 
62
\sa KDChartParams::registerProperties
 
63
*/
 
64
class KDChartPropertySet
 
65
{
 
66
    friend class KDChartParams;
 
67
 
 
68
    public:
 
69
    /**
 
70
      Special property IDs.
 
71
 
 
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...
 
76
 
 
77
      \li \c OwnID used for referencing a property set's *own* ID.
 
78
 
 
79
      \sa KDChartPropertySet
 
80
      */
 
81
    enum SpecialDataPropertyID {
 
82
        UndefinedID = -2,
 
83
        OwnID = -1
 
84
    };
 
85
 
 
86
    /**
 
87
      default constructor setting all values to undefined
 
88
      and name to empty string (default for QString)
 
89
      */
 
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(); }
 
109
 
 
110
    /**
 
111
      Constructor setting all values to undefined.
 
112
 
 
113
      This constructor may be used to initialize a property set
 
114
      specifying neither property IDs nor special property values
 
115
 
 
116
      \param name (may be empty) a name describing this property set.
 
117
      */
 
118
    KDChartPropertySet( const QString& name ) :
 
119
        mOwnID( UndefinedID ),
 
120
        mName( name ),
 
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(); }
 
138
 
 
139
    /**
 
140
      Constructor setting all Property Set IDs to the same ID value.
 
141
 
 
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
 
146
      values.
 
147
 
 
148
      \param name (may be empty) a name describing this property set.
 
149
      \param idParent the ID of the parent property set.
 
150
      */
 
151
    KDChartPropertySet( const QString& name, int idParent ) :
 
152
        mOwnID( UndefinedID ),
 
153
        mName( name ),
 
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(); }
 
171
 
 
172
    /**
 
173
      Constructor.
 
174
 
 
175
      \param name (may be empty) a name describing this property set.
 
176
 
 
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.
 
186
 
 
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.
 
195
 
 
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.
 
205
 
 
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.
 
210
 
 
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.
 
220
 
 
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.
 
225
 
 
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.
 
235
 
 
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.
 
240
 
 
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.
 
245
 
 
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
 
264
 
 
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.).
 
272
 
 
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.).
 
280
 
 
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.).
 
287
 
 
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.)
 
296
 
 
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.).
 
302
 
 
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.).
 
311
 
 
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.).
 
317
 
 
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.).
 
323
 
 
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.).
 
329
 
 
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.).
 
335
 
 
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.
 
341
 
 
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
 
353
    the horizontal line.
 
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
 
358
    line style.
 
359
    \li \c Qt::AlignTop marker will be drawn at the top end of
 
360
    the vertical line.
 
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
 
365
    line style.
 
366
 
 
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
 
370
    this point.
 
371
    This parameter will be ignored if no markers are drawn, see
 
372
    parameter \c extraMarkersAlign for details.
 
373
 
 
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.
 
383
 
 
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
 
387
    this point.
 
388
    This parameter will be ignored if no markers are drawn, see
 
389
    parameter \c extraMarkersAlign for details.
 
390
 
 
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.
 
396
 
 
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.
 
403
 
 
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.
 
409
 
 
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.
 
419
 
 
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.
 
424
 
 
425
    \param idBarColor (for Bar Charts only) ID of the property set
 
426
    specifying the QColor to be used for drawing
 
427
    this cell's bar.
 
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.
 
434
 
 
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.
 
439
 
 
440
    \sa name
 
441
    \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
 
442
    \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
 
443
*/
 
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
 
461
                ) :
 
462
        mOwnID( UndefinedID ),
 
463
        mName( name ),
 
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 )
 
480
        {}
 
481
 
 
482
    KDChartPropertySet& operator=( const KDChartPropertySet& R );
 
483
 
 
484
    /**
 
485
      Save this property set's settings in a stream,
 
486
      this stores the own property set ID as well.
 
487
 
 
488
      \sa loadXML
 
489
      */
 
490
    QDomElement saveXML(QDomDocument& doc) const;
 
491
 
 
492
 
 
493
    /**
 
494
      Retrieves a property set and stores it in parameter set.
 
495
 
 
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.
 
500
 
 
501
      \returns TRUE if the property set could be read.
 
502
 
 
503
      \sa id, saveXLM
 
504
      */
 
505
    static bool loadXML( const QDomElement& element, KDChartPropertySet& set );
 
506
 
 
507
 
 
508
    /**
 
509
      Returns the name of this property set.
 
510
      */
 
511
    int id() const { return mOwnID; }
 
512
 
 
513
    /**
 
514
      Change the descriptive name of this property set.
 
515
      */
 
516
    void setName( const QString& name )
 
517
    {
 
518
        mName = name;
 
519
    }
 
520
 
 
521
    /**
 
522
      Returns the name of this property set.
 
523
      */
 
524
    QString name() const { return mName; }
 
525
 
 
526
 
 
527
 
 
528
    /**
 
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.
 
532
 
 
533
      \note This function should be used for Bar Charts only, otherwise
 
534
      the settings specified here will be ignored.
 
535
 
 
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.
 
548
 
 
549
      \sa hasOwnShowBar
 
550
      \sa setBarColor
 
551
      \sa hasOwnBarColor
 
552
      */
 
553
    void setShowBar( int idShowBar, bool showBar )
 
554
    {
 
555
        mIdShowBar = idShowBar;
 
556
        mShowBar =   showBar;
 
557
    }
 
558
 
 
559
    /**
 
560
      Returns whether this property set is specifying it's own flag indicating
 
561
      whether this cell's bar is to be painted.
 
562
 
 
563
      \note This function should be used for Bar Charts only, otherwise
 
564
      the settings specified here will be ignored.
 
565
 
 
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.
 
568
 
 
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
 
571
 
 
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
 
579
      to be used.
 
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.
 
589
 
 
590
      \sa setShowBar
 
591
      \sa setBarColor
 
592
      \sa hasOwnBarColor
 
593
      */
 
594
    bool hasOwnShowBar( int& idShowBar, bool& showBar )
 
595
    {
 
596
        idShowBar = mIdShowBar;
 
597
        if( OwnID == idShowBar ){
 
598
            showBar = mShowBar;
 
599
            return true;
 
600
        }
 
601
        return false;
 
602
    }
 
603
 
 
604
    /**
 
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.
 
608
 
 
609
      \note This function should be used for Bar Charts only, otherwise
 
610
      the settings specified here will be ignored.
 
611
 
 
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.
 
623
 
 
624
      \sa hasOwnBarColor
 
625
      */
 
626
    void setBarColor( int idBarColor, const QColor& barColor )
 
627
    {
 
628
        mIdBarColor = idBarColor;
 
629
        mBarColor = barColor;
 
630
    }
 
631
 
 
632
    /**
 
633
      Returns whether this property set is specifying it's own bar color settings.
 
634
 
 
635
      \note This function should be used for Bar Charts only, otherwise
 
636
      the settings specified here will be ignored.
 
637
 
 
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.
 
640
 
 
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
 
643
 
 
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.
 
660
 
 
661
      \sa setBarColor
 
662
      */
 
663
    bool hasOwnBarColor( int& idBarColor, QColor& barColor )
 
664
    {
 
665
        idBarColor = mIdBarColor;
 
666
        if( OwnID == mIdBarColor ){
 
667
            barColor = mBarColor;
 
668
            return true;
 
669
        }
 
670
        return false;
 
671
    }
 
672
 
 
673
    /**
 
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.
 
677
 
 
678
      \note This function should be used for Line Charts only, otherwise
 
679
      the settings specified here will be ignored.
 
680
 
 
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.
 
692
 
 
693
      \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
 
694
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
 
695
      */
 
696
    void setLineWidth( int idLineWidth, int lineWidth )
 
697
    {
 
698
        mIdLineWidth = idLineWidth;
 
699
        mLineWidth =   lineWidth;
 
700
    }
 
701
 
 
702
    /**
 
703
      Returns whether this property set is specifying it's own line width settings.
 
704
 
 
705
      \note This function should be used for Line Charts only.
 
706
 
 
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.
 
709
 
 
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.
 
726
 
 
727
      \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
 
728
      \sa hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
 
729
      */
 
730
    bool hasOwnLineWidth( int& idLineWidth, int& lineWidth )
 
731
    {
 
732
        idLineWidth = mIdLineWidth;
 
733
        if( OwnID == mIdLineWidth ){
 
734
            lineWidth = mLineWidth;
 
735
            return true;
 
736
        }
 
737
        return false;
 
738
    }
 
739
 
 
740
    /**
 
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.
 
744
 
 
745
      \note This function should be used for Line Charts only, otherwise
 
746
      the settings specified here will be ignored.
 
747
 
 
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.
 
759
 
 
760
      \sa setLineWidth, setLineStyle, setShowMarker
 
761
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
 
762
      */
 
763
    void setLineColor( int idLineColor, const QColor& lineColor )
 
764
    {
 
765
        mIdLineColor = idLineColor;
 
766
        mLineColor = lineColor;
 
767
    }
 
768
 
 
769
    /**
 
770
      Returns whether this property set is specifying it's own line color settings.
 
771
 
 
772
      \note This function should be used for Line Charts only, otherwise
 
773
      the settings specified here will be ignored.
 
774
 
 
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.
 
777
 
 
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
 
780
 
 
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.
 
797
 
 
798
      \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
 
799
      \sa hasOwnLineWidth, hasOwnLineStyle, hasOwnShowMarker
 
800
      */
 
801
    bool hasOwnLineColor( int& idLineColor, QColor& lineColor )
 
802
    {
 
803
        idLineColor = mIdLineColor;
 
804
        if( OwnID == mIdLineColor ){
 
805
            lineColor = mLineColor;
 
806
            return true;
 
807
        }
 
808
        return false;
 
809
    }
 
810
 
 
811
    /**
 
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.
 
815
 
 
816
      \note This function should be used for Line Charts only, otherwise
 
817
      the settings specified here will be ignored.
 
818
 
 
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.
 
830
 
 
831
      \sa setLineWidth, setLineColor, setShowMarker
 
832
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
 
833
      */
 
834
    void setLineStyle( int idLineStyle, const Qt::PenStyle& lineStyle )
 
835
    {
 
836
        mIdLineStyle = idLineStyle;
 
837
        mLineStyle =   lineStyle;
 
838
    }
 
839
 
 
840
    /**
 
841
      Returns whether this property set is specifying it's own line style settings.
 
842
 
 
843
      \note This function should be used for Line Charts only, otherwise
 
844
      the settings specified here will be ignored.
 
845
 
 
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.
 
848
 
 
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
 
851
 
 
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.
 
868
 
 
869
      \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
 
870
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnShowMarker
 
871
      */
 
872
    bool hasOwnLineStyle( int& idLineStyle, Qt::PenStyle& lineStyle )
 
873
    {
 
874
        idLineStyle = mIdLineStyle;
 
875
        if( OwnID == mIdLineStyle ){
 
876
            lineStyle = mLineStyle;
 
877
            return true;
 
878
        }
 
879
        return false;
 
880
    }
 
881
 
 
882
    /**
 
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.
 
886
 
 
887
      \note This function should be used for Line Charts only, otherwise
 
888
      the settings specified here will be ignored.
 
889
 
 
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.
 
902
 
 
903
      \sa hasOwnShowMarker
 
904
      \sa setLineWidth, setLineColor, setLineStyle
 
905
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle
 
906
      */
 
907
    void setShowMarker( int idShowMarker, bool showMarker )
 
908
    {
 
909
        mIdShowMarker = idShowMarker;
 
910
        mShowMarker =   showMarker;
 
911
    }
 
912
 
 
913
    /**
 
914
      Returns whether this property set is specifying it's own flag indicating
 
915
      whether a Marker is to be displayed.
 
916
 
 
917
      \note This function should be used for Line Charts only, otherwise
 
918
      the settings specified here will be ignored.
 
919
 
 
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.
 
922
 
 
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
 
925
 
 
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
 
933
      to be used.
 
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.
 
943
 
 
944
      \sa setShowMarker
 
945
      \sa setLineWidth, setLineColor, setLineStyle
 
946
      \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle
 
947
      */
 
948
    bool hasOwnShowMarker( int& idShowMarker, bool& showMarker )
 
949
    {
 
950
        idShowMarker = mIdShowMarker;
 
951
        if( OwnID == idShowMarker ){
 
952
            showMarker = mShowMarker;
 
953
            return true;
 
954
        }
 
955
        return false;
 
956
    }
 
957
 
 
958
    void setExtraLinesAlign( int idExtraLinesAlign, uint extraLinesAlign )
 
959
    {
 
960
        mIdExtraLinesAlign = idExtraLinesAlign;
 
961
        mExtraLinesAlign =   extraLinesAlign;
 
962
    }
 
963
    bool hasOwnExtraLinesAlign( int& idExtraLinesAlign, uint& extraLinesAlign )
 
964
    {
 
965
        idExtraLinesAlign = mIdExtraLinesAlign;
 
966
        if( OwnID == idExtraLinesAlign ){
 
967
            extraLinesAlign = mExtraLinesAlign;
 
968
            return true;
 
969
        }
 
970
        return false;
 
971
    }
 
972
    void setExtraLinesInFront( int idExtraLinesInFront, bool extraLinesInFront )
 
973
    {
 
974
        mIdExtraLinesInFront = idExtraLinesInFront;
 
975
        mExtraLinesInFront   = extraLinesInFront;
 
976
    }
 
977
    bool hasOwnExtraLinesInFront( int& idExtraLinesInFront, bool& extraLinesInFront )
 
978
    {
 
979
        idExtraLinesInFront = mIdExtraLinesInFront;
 
980
        if( OwnID == idExtraLinesInFront ){
 
981
            extraLinesInFront = mExtraLinesInFront;
 
982
            return true;
 
983
        }
 
984
        return false;
 
985
    }
 
986
    void setExtraLinesLength( int idExtraLinesLength, int extraLinesLength )
 
987
    {
 
988
        mIdExtraLinesLength = idExtraLinesLength;
 
989
        mExtraLinesLength =   extraLinesLength;
 
990
    }
 
991
    bool hasOwnExtraLinesLength( int& idExtraLinesLength, int& extraLinesLength )
 
992
    {
 
993
        idExtraLinesLength = mIdExtraLinesLength;
 
994
        if( OwnID == idExtraLinesLength ){
 
995
            extraLinesLength = mExtraLinesLength;
 
996
            return true;
 
997
        }
 
998
        return false;
 
999
    }
 
1000
    void setExtraLinesWidth( int idExtraLinesWidth, int extraLinesWidth )
 
1001
    {
 
1002
        mIdExtraLinesWidth = idExtraLinesWidth;
 
1003
        mExtraLinesWidth =   extraLinesWidth;
 
1004
    }
 
1005
    bool hasOwnExtraLinesWidth( int& idExtraLinesWidth, int& extraLinesWidth )
 
1006
    {
 
1007
        idExtraLinesWidth = mIdExtraLinesWidth;
 
1008
        if( OwnID == idExtraLinesWidth ){
 
1009
            extraLinesWidth = mExtraLinesWidth;
 
1010
            return true;
 
1011
        }
 
1012
        return false;
 
1013
    }
 
1014
    void setExtraLinesColor( int idExtraLinesColor, const QColor& extraLinesColor )
 
1015
    {
 
1016
        mIdExtraLinesColor = idExtraLinesColor;
 
1017
        mExtraLinesColor =   extraLinesColor;
 
1018
    }
 
1019
    bool hasOwnExtraLinesColor( int& idExtraLinesColor, QColor& extraLinesColor )
 
1020
    {
 
1021
        idExtraLinesColor = mIdExtraLinesColor;
 
1022
        if( OwnID == idExtraLinesColor ){
 
1023
            extraLinesColor = mExtraLinesColor;
 
1024
            return true;
 
1025
        }
 
1026
        return false;
 
1027
    }
 
1028
    void setExtraLinesStyle( int idExtraLinesStyle, const Qt::PenStyle extraLinesStyle )
 
1029
    {
 
1030
        mIdExtraLinesStyle = idExtraLinesStyle;
 
1031
        mExtraLinesStyle =   extraLinesStyle;
 
1032
    }
 
1033
    bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, Qt::PenStyle& extraLinesStyle )
 
1034
    {
 
1035
        idExtraLinesStyle = mIdExtraLinesStyle;
 
1036
        if( OwnID == idExtraLinesStyle ){
 
1037
            extraLinesStyle = mExtraLinesStyle;
 
1038
            return true;
 
1039
        }
 
1040
        return false;
 
1041
    }
 
1042
 
 
1043
    void setExtraMarkersAlign( int idExtraMarkersAlign, uint extraMarkersAlign )
 
1044
    {
 
1045
        mIdExtraMarkersAlign = idExtraMarkersAlign;
 
1046
        mExtraMarkersAlign =   extraMarkersAlign;
 
1047
    }
 
1048
    bool hasOwnExtraMarkersAlign( int& idExtraMarkersAlign, uint& extraMarkersAlign )
 
1049
    {
 
1050
        idExtraMarkersAlign = mIdExtraMarkersAlign;
 
1051
        if( OwnID == idExtraMarkersAlign ){
 
1052
            extraMarkersAlign = mExtraMarkersAlign;
 
1053
            return true;
 
1054
        }
 
1055
        return false;
 
1056
    }
 
1057
    void setExtraMarkersSize( int idExtraMarkersSize, const QSize& extraMarkersSize )
 
1058
    {
 
1059
        mIdExtraMarkersSize = idExtraMarkersSize;
 
1060
        mExtraMarkersSize =   extraMarkersSize;
 
1061
    }
 
1062
    bool hasOwnExtraMarkersSize( int& idExtraMarkersSize, QSize& extraMarkersSize )
 
1063
    {
 
1064
        idExtraMarkersSize = mIdExtraMarkersSize;
 
1065
        if( OwnID == idExtraMarkersSize ){
 
1066
            extraMarkersSize = mExtraMarkersSize;
 
1067
            return true;
 
1068
        }
 
1069
        return false;
 
1070
    }
 
1071
    void setExtraMarkersColor( int idExtraMarkersColor, const QColor& extraMarkersColor )
 
1072
    {
 
1073
        mIdExtraMarkersColor = idExtraMarkersColor;
 
1074
        mExtraMarkersColor =   extraMarkersColor;
 
1075
    }
 
1076
    bool hasOwnExtraMarkersColor( int& idExtraMarkersColor, QColor& extraMarkersColor )
 
1077
    {
 
1078
        idExtraMarkersColor = mIdExtraMarkersColor;
 
1079
        if( OwnID == idExtraMarkersColor ){
 
1080
            extraMarkersColor = mExtraMarkersColor;
 
1081
            return true;
 
1082
        }
 
1083
        return false;
 
1084
    }
 
1085
    void setExtraMarkersStyle( int idExtraMarkersStyle, int extraMarkersStyle )
 
1086
    {
 
1087
        mIdExtraMarkersStyle = idExtraMarkersStyle;
 
1088
        mExtraMarkersStyle =   extraMarkersStyle;
 
1089
    }
 
1090
    bool hasOwnExtraMarkersStyle( int& idExtraMarkersStyle, int& extraMarkersStyle )
 
1091
    {
 
1092
        idExtraMarkersStyle = mIdExtraMarkersStyle;
 
1093
        if( OwnID == idExtraMarkersStyle ){
 
1094
            extraMarkersStyle = mExtraMarkersStyle;
 
1095
            return true;
 
1096
        }
 
1097
        return false;
 
1098
    }
 
1099
 
 
1100
    protected:
 
1101
    // the following member only to be set internally by KDChartParams::registerProperties
 
1102
    // and by KDChartParams::setProperties
 
1103
    int mOwnID;
 
1104
 
 
1105
    private:
 
1106
    QString mName;
 
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();
 
1125
};
 
1126
 
 
1127
#endif