SciDAVis  1.D4
QwtBarCurve.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : QwtBarCurve.h
3  Project : SciDAVis
4  --------------------------------------------------------------------
5  Copyright : (C) 2006 by Ion Vasilief, Tilman Benkert
6  Email (use @ for *) : ion_vasilief*yahoo.fr, thzs*gmx.net
7  Description : Bar curve
8 
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  * This program is distributed in the hope that it will be useful, *
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21  * GNU General Public License for more details. *
22  * *
23  * You should have received a copy of the GNU General Public License *
24  * along with this program; if not, write to the Free Software *
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26  * Boston, MA 02110-1301 USA *
27  * *
28  ***************************************************************************/
29 #ifndef BARCURVE_H
30 #define BARCURVE_H
31 
32 #include "PlotCurve.h"
33 #include <qwt_plot.h>
34 
36 class QwtBarCurve: public DataCurve
37 {
38 public:
39  enum BarStyle{Vertical = 0, Horizontal = 1};
40  QwtBarCurve(BarStyle style, Table *t, const QString& xColName, const char *name, int startRow, int endRow);
41 
42  void copy(const QwtBarCurve *b);
43 
44  virtual QwtDoubleRect boundingRect() const;
45 
47 
48  void setGap (int gap);
49  int gap() const {return bar_gap;};
50 
51  void setOffset(int offset);
52  int offset() const {return bar_offset;};
53 
54  double dataOffset();
55 
56 private:
57  virtual void draw(QPainter *painter,const QwtScaleMap &xMap,
58  const QwtScaleMap &yMap, int from, int to) const;
59 
62 };
63 
64 #endif