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

« back to all changes in this revision

Viewing changes to kchart/kdchart/KDChartBWPainter.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 __KDCHARTBWPAINTER_H__
 
30
#define __KDCHARTBWPAINTER_H__
 
31
 
 
32
#include "KDChartAxesPainter.h"
 
33
#include <KDChartParams.h>
 
34
#include <KDChartTable.h>
 
35
 
 
36
#include <qnamespace.h>
 
37
 
 
38
class KDChartParams;
 
39
 
 
40
class KDChartBWPainter : public KDChartAxesPainter, public Qt
 
41
{
 
42
    friend class KDChartPainter;
 
43
    protected:
 
44
    KDChartBWPainter( KDChartParams* params );
 
45
    virtual ~KDChartBWPainter();
 
46
 
 
47
    virtual bool isNormalMode() const;
 
48
    virtual int clipShiftUp( bool, double ) const;
 
49
    virtual void specificPaintData( QPainter* painter,
 
50
            const QRect& ourClipRect,
 
51
            KDChartTableDataBase* data,
 
52
            KDChartDataRegionList* regions,
 
53
            const KDChartAxisParams* axisPara,
 
54
            bool bNormalMode,
 
55
            uint chart,
 
56
            double logWidth,
 
57
            double areaWidthP1000,
 
58
            double logHeight,
 
59
            double axisYOffset,
 
60
            double minColumnValue,
 
61
            double maxColumnValue,
 
62
            double columnValueDistance,
 
63
            uint chartDatasetStart,
 
64
            uint chartDatasetEnd,
 
65
            uint datasetStart,
 
66
            uint datasetEnd );
 
67
 
 
68
    virtual QString fallbackLegendText( uint dataset ) const;
 
69
    virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
 
70
    private:
 
71
    int calculateStats( KDChartTableDataBase&, uint );// returns number of used cells containing a double
 
72
    double stats[   KDChartParams::BWStatValOffEndValue]; // y cordinates
 
73
    int nFirstQ1, nLastQ1, nFirstQ3, nLastQ3;
 
74
};
 
75
 
 
76
#endif