~ubuntu-branches/ubuntu/vivid/goldencheetah/vivid

« back to all changes in this revision

Viewing changes to qwt/src/qwt_compass_rose.cpp

  • Committer: Package Import Robot
  • Author(s): Bhavani Shankar
  • Date: 2014-11-16 14:54:01 UTC
  • mfrom: (15.1.2 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20141116145401-ngy1fwrd4vn6d9th
Tags: 3.1.0-1ubuntu1
* Resync on debian unstable. Remaining changes:
  + Use libgcrypt11-dev than libgcrypt-dev as it no longer exists.
    (Closes: #769754)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#include "qwt_painter.h"
13
13
#include <qpainter.h>
14
14
 
15
 
static QPointF qwtIntersection(
 
15
static QPointF qwtIntersection( 
16
16
    QPointF p11, QPointF p12, QPointF p21, QPointF p22 )
17
17
{
18
18
    const QLineF line1( p11, p12 );
59
59
    const QColor light( 192, 255, 255 );
60
60
 
61
61
    QPalette palette;
62
 
    for ( int i = 0; i < QPalette::NColorGroups; i++ )
63
 
    {
64
 
        palette.setColor( ( QPalette::ColorGroup )i,
65
 
            QPalette::Dark, dark );
66
 
        palette.setColor( ( QPalette::ColorGroup )i,
67
 
            QPalette::Light, light );
68
 
    }
 
62
    palette.setColor( QPalette::Dark, dark );
 
63
    palette.setColor( QPalette::Light, light );
69
64
 
70
65
    setPalette( palette );
71
66
}
80
75
  Set the Factor how to shrink the thorns with each level
81
76
  The default value is 0.9.
82
77
 
 
78
  \param factor Shrink factor
83
79
  \sa shrinkFactor()
84
80
*/
85
81
void QwtSimpleCompassRose::setShrinkFactor( double factor )
170
166
        if ( 2.0 * M_PI / step > 32 )
171
167
            leafWidth = 16;
172
168
 
173
 
        const double origin = north / 180.0 * M_PI;
 
169
        const double origin = qwtRadians( north );
174
170
        for ( double angle = origin;
175
171
            angle < 2.0 * M_PI + origin; angle += step )
176
172
        {
216
212
        d_data->width = 0.4;
217
213
}
218
214
 
219
 
//! \sa setWidth()
 
215
/*! 
 
216
  \return Width of the rose
 
217
  \sa setWidth()
 
218
 */
220
219
double QwtSimpleCompassRose::width() const
221
220
{
222
221
    return d_data->width;