qwt_column_symbol.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_COLUMN_SYMBOL_H
11 #define QWT_COLUMN_SYMBOL_H
12 
13 #include "qwt_global.h"
14 #include "qwt_interval.h"
15 
16 #include <qnamespace.h>
17 
18 class QPainter;
19 class QPalette;
20 class QRectF;
21 
27 {
28 public:
30  enum Direction
31  {
34 
37 
40 
42  TopToBottom
43  };
44 
47  direction( BottomToTop )
48  {
49  }
50 
52  QRectF toRect() const;
53 
55  Qt::Orientation orientation() const
56  {
57  if ( direction == LeftToRight || direction == RightToLeft )
58  return Qt::Horizontal;
59 
60  return Qt::Vertical;
61  }
62 
65 
68 
71 };
72 
75 {
76 public:
81  enum Style
82  {
84  NoStyle = -1,
85 
90  Box,
91 
97  UserStyle = 1000
98  };
99 
105  {
108 
111 
113  Raised
114  };
115 
116 public:
117  explicit QwtColumnSymbol( Style = NoStyle );
118  virtual ~QwtColumnSymbol();
119 
120  void setFrameStyle( FrameStyle );
121  FrameStyle frameStyle() const;
122 
123  void setLineWidth( int width );
124  int lineWidth() const;
125 
126  void setPalette( const QPalette & );
127  const QPalette &palette() const;
128 
129  void setStyle( Style );
130  Style style() const;
131 
132  virtual void draw( QPainter *, const QwtColumnRect & ) const;
133 
134 protected:
135  void drawBox( QPainter *, const QwtColumnRect & ) const;
136 
137 private:
138  Q_DISABLE_COPY(QwtColumnSymbol)
139 
140  class PrivateData;
141  PrivateData* d_data;
142 };
143 
144 #endif
Qt::Orientation orientation() const
QwtInterval vInterval
Interval for the vertical coordinates.
A plain frame style.
QwtColumnRect()
Build an rectangle with invalid intervals directed BottomToTop.
A class representing an interval.
Definition: qwt_interval.h:22
#define QWT_EXPORT
Definition: qwt_global.h:38
From left to right.
A drawing primitive for columns.
Direction direction
Direction.
From bottom to top.
Directed rectangle representing bounding rectangle and orientation of a column.
Direction
Direction of the column.
QwtInterval hInterval
Interval for the horizontal coordinates.
From right to left.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10