COPASI API  4.16.103
scrollzoomer.h
Go to the documentation of this file.
1 // Copyright (C) 2010 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 // Copyright (C) 2008 - 2009 by Pedro Mendes, Virginia Tech Intellectual
7 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
8 // and The University of Manchester.
9 // All rights reserved.
10 
11 // Copyright (C) 2006 - 2007 by Pedro Mendes, Virginia Tech Intellectual
12 // Properties, Inc. and EML Research, gGmbH.
13 // All rights reserved.
14 
15 // Copyright � 1997 Josef Wilgen
16 // Copyright � 2002 Uwe Rathmann
17 //
18 // This file is published under the Qwt License, Version 1.0.
19 // You should have received a copy of this licence in the file
20 // QwtLicense.
21 //
22 // Modifications made to the original are
23 #ifndef _SCROLLZOOMER_H
24 #define _SCROLLZOOMER_H
25 
26 #include <QtCore/qglobal.h>
27 
28 #if QT_VERSION < 0x040000
29 # include <q3scrollview.h>
30 #endif
31 
32 #include <qwt_plot_zoomer.h>
33 //Added by qt3to4:
34 #include <QtCore/QEvent>
35 
36 class ScrollData;
37 class ScrollBar;
38 
39 class LogPlotZoomer: public QwtPlotZoomer
40 {
41  Q_OBJECT
42 
43 public:
44  LogPlotZoomer(QwtPlotCanvas *canvas);
45 
46 public slots:
47  virtual
48  void move(double x, double y);
49 
50 protected:
51  virtual QwtText trackerText(const QwtDoublePoint &pos) const;
52 };
53 
55 {
56  Q_OBJECT
57 public:
59  {
62  };
63 
64  ScrollZoomer(QwtPlotCanvas *);
65  virtual ~ScrollZoomer();
66 
69 
70 #if QT_VERSION < 0x040000
71  void setHScrollBarMode(Q3ScrollView::ScrollBarMode);
72  void setVScrollBarMode(Q3ScrollView::ScrollBarMode);
73 
74  Q3ScrollView::ScrollBarMode vScrollBarMode() const;
75  Q3ScrollView::ScrollBarMode hScrollBarMode() const;
76 #else
77  void setHScrollBarMode(Qt::ScrollBarPolicy);
78  void setVScrollBarMode(Qt::ScrollBarPolicy);
79 
80  Qt::ScrollBarPolicy vScrollBarMode() const;
81  Qt::ScrollBarPolicy hScrollBarMode() const;
82 #endif
83 
86 
89 
90  QWidget* cornerWidget() const;
91  virtual void setCornerWidget(QWidget *);
92 
93  virtual bool eventFilter(QObject *, QEvent *);
94 
95  virtual void rescale();
96 
97 protected:
98  virtual ScrollBar *scrollBar(Qt::Orientation);
99  virtual void updateScrollBars();
100  virtual void layoutScrollBars(const QRect &);
101 
102 private slots:
103  void scrollBarMoved(Qt::Orientation o, double min, double max);
104 
105 private:
106  bool needScrollBar(Qt::Orientation) const;
107  int oppositeAxis(int) const;
108 
109  QWidget *d_cornerWidget;
110 
113 };
114 
115 #endif
ScrollBar * horizontalScrollBar() const
void setHScrollBarPosition(ScrollBarPosition)
QWidget * d_cornerWidget
Definition: scrollzoomer.h:109
virtual void layoutScrollBars(const QRect &)
virtual void updateScrollBars()
ScrollData * d_vScrollData
Definition: scrollzoomer.h:112
ScrollBarPosition hScrollBarPosition() const
QWidget * cornerWidget() const
virtual bool eventFilter(QObject *, QEvent *)
void setVScrollBarPosition(ScrollBarPosition)
ScrollBar * verticalScrollBar() const
Q3ScrollView::ScrollBarMode hScrollBarMode() const
ScrollZoomer(QwtPlotCanvas *)
virtual void rescale()
bool needScrollBar(Qt::Orientation) const
void setVScrollBarMode(Q3ScrollView::ScrollBarMode)
virtual ~ScrollZoomer()
ScrollBarPosition vScrollBarPosition() const
virtual void setCornerWidget(QWidget *)
ScrollData * d_hScrollData
Definition: scrollzoomer.h:111
int oppositeAxis(int) const
virtual void move(double x, double y)
LogPlotZoomer(QwtPlotCanvas *canvas)
virtual ScrollBar * scrollBar(Qt::Orientation)
void setHScrollBarMode(Q3ScrollView::ScrollBarMode)
Q3ScrollView::ScrollBarMode vScrollBarMode() const
virtual QwtText trackerText(const QwtDoublePoint &pos) const
void scrollBarMoved(Qt::Orientation o, double min, double max)
#define min(a, b)
Definition: f2c.h:175
#define max(a, b)
Definition: f2c.h:176