~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to kchart/kdchart/KDChartPolarPainter.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- Mode: C++ -*-
2
 
 
3
 
  $Id: KDChartPolarPainter.h,v 1.1.2.1 2001/12/08 12:20:07 khz Exp $
4
 
 
5
 
  KDChart - a multi-platform charting engine
6
 
 
7
 
  Copyright (C) 2001 by Klar�lvdalens Datakonsult AB
8
 
*/
9
 
 
 
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
 **********************************************************************/
10
29
#ifndef __KDCHARTPOLARPAINTER_H__
11
30
#define __KDCHARTPOLARPAINTER_H__
12
31
 
18
37
{
19
38
    friend class KDChartPainter;
20
39
 
21
 
protected:
 
40
    protected:
22
41
    KDChartPolarPainter( KDChartParams* params );
23
42
    virtual ~KDChartPolarPainter();
24
43
 
25
 
    virtual void paintData( QPainter* painter, KDChartTableData* data,
26
 
                            bool paint2nd,
27
 
                            KDChartDataRegionList* regions = 0 );
28
 
  void drawMarker( QPainter* painter,
 
44
    virtual void paintData( QPainter* painter, 
 
45
            KDChartTableDataBase* data,
 
46
            bool paint2nd,
 
47
            KDChartDataRegionList* regions = 0 );
 
48
    void drawMarker( QPainter* painter,
29
49
            KDChartParams::PolarMarkerStyle style,
30
50
            const QColor& color, const QPoint& p,
31
51
            uint dataset, uint value, uint chart,
32
52
            double minSizeP1000,
33
53
            QRegion & region );
34
 
  virtual QString fallbackLegendText( uint dataset ) const;
35
 
  virtual uint numLegendFallbackTexts( KDChartTableData* data ) const;
 
54
    virtual QString fallbackLegendText( uint dataset ) const;
 
55
    virtual uint numLegendFallbackTexts( KDChartTableDataBase* data ) const;
36
56
 
37
 
private:
38
 
  QPoint polarToXY( int radius, int angle );
39
 
  void paintCircularAxisLabel( QPainter* painter,
40
 
                               bool rotate,
41
 
                               int txtAngle,
42
 
                               QPoint center,
43
 
                               double currentRadiusPPU,
44
 
                               const QString& txt,
45
 
                               int align,
46
 
                               int step );
 
57
    private:
 
58
    QPoint polarToXY( int radius, int angle );
 
59
    void paintCircularAxisLabel( QPainter* painter,
 
60
            bool rotate,
 
61
            int txtAngle,
 
62
            QPoint center,
 
63
            double currentRadiusPPU,
 
64
            const QString& txt,
 
65
            int align,
 
66
            int step );
47
67
};
48
68
 
49
69
#endif