qwt_compass_rose.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_COMPASS_ROSE_H
11 #define QWT_COMPASS_ROSE_H 1
12 
13 #include "qwt_global.h"
14 #include <qpalette.h>
15 
16 class QPainter;
17 
22 {
23 public:
25  virtual ~QwtCompassRose();
26 
27  virtual void setPalette( const QPalette & );
28  const QPalette &palette() const;
29 
39  virtual void draw( QPainter *painter,
40  const QPointF &center, double radius, double north,
41  QPalette::ColorGroup colorGroup = QPalette::Active ) const = 0;
42 
43 private:
44  Q_DISABLE_COPY(QwtCompassRose)
45 
46  QPalette d_palette;
47 };
48 
53 {
54 public:
55  QwtSimpleCompassRose( int numThorns = 8, int numThornLevels = -1 );
56  virtual ~QwtSimpleCompassRose();
57 
58  void setWidth( double w );
59  double width() const;
60 
61  void setNumThorns( int count );
62  int numThorns() const;
63 
64  void setNumThornLevels( int count );
65  int numThornLevels() const;
66 
67  void setShrinkFactor( double factor );
68  double shrinkFactor() const;
69 
70  virtual void draw( QPainter *, const QPointF &center, double radius,
71  double north, QPalette::ColorGroup = QPalette::Active ) const;
72 
73  static void drawRose( QPainter *, const QPalette &,
74  const QPointF &center, double radius, double origin, double width,
75  int numThorns, int numThornLevels, double shrinkFactor );
76 
77 private:
78  class PrivateData;
80 };
81 
82 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
A simple rose for QwtCompass.
Abstract base class for a compass rose.
TFSIMD_FORCE_INLINE const tfScalar & w() const


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17