.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
QCPAxisExtended.h
1 // QCPAxisExtended.h - QCPAxis class extension declaration.
2 // Written By Jesse Z. Zhong
3 #ifndef __QCP_Axis_Extended_H__
4 #define __QCP_Axis_Extended_H__
5 #pragma region Includes
6 #include "qcustomplot.h"
7 #include <QScrollBar>
8 using namespace std;
9 using namespace QCPlot;
10 #pragma endregion
11 namespace DataVisualizerGUI {
12 
16  class QCPAxisExtended : public QCPAxis {
17  #pragma region Constants
18  static const bool DefaultScrollState;
21 
23  static const int ScrollBarHeight;
24  #pragma endregion
25  public:
29  QCPAxisExtended(QCustomPlot* parentPlot,
30  QCPAxis::AxisType type);
31 
35  void SetIsZoomed(bool isZoomed);
36 
40  QScrollBar* GetScrollBar();
41 
42  protected:
46  void draw(QCPPainter* painter);
47 
51  int calculateMargin() const;
52 
53  private:
54  QScrollBar* ScrollBar_;
55  bool IsZoomed_;
56  };
57 }
58 
59 #endif // !__QCP_Axis_Extended_H__
Extends the axis class to allow scrolling when zoomed.
Definition: QCPAxisExtended.h:16
The central class of the library, the QWidget which displays the plot and interacts with the user...
Definition: qcustomplot.h:1903
QPainter subclass used internally.
Definition: qcustomplot.h:202
Manages a single axis inside a QCustomPlot.
Definition: qcustomplot.h:1615
AxisType
Defines at which side of the axis rect the axis will appear.
Definition: qcustomplot.h:1658