v2.0.0
Loading...
Searching...
No Matches
graph.h
Go to the documentation of this file.
1//=============================================================================================================
23
24#ifndef GRAPH_H
25#define GRAPH_H
26
27//=============================================================================================================
28// INCLUDES
29//=============================================================================================================
30
31#include "../disp_global.h"
32
33//=============================================================================================================
34// QT INCLUDES
35//=============================================================================================================
36
37#include <QWidget>
38#include <QPen>
39
40//=============================================================================================================
41// EIGEN INCLUDES
42//=============================================================================================================
43
44#include <Eigen/Core>
45
46//=============================================================================================================
47// FORWARD DECLARATIONS
48//=============================================================================================================
49
50//=============================================================================================================
51// DEFINE NAMESPACE DISPLIB
52//=============================================================================================================
53
54namespace DISPLIB
55{
56
57//=============================================================================================================
58// DISPLIB FORWARD DECLARATIONS
59//=============================================================================================================
60
61//=============================================================================================================
72class DISPSHARED_EXPORT Graph : public QWidget
73{
74 Q_OBJECT
75
76public:
77 typedef QSharedPointer<Graph> SPtr;
78 typedef QSharedPointer<const Graph> ConstSPtr;
79
80 //=========================================================================================================
86 explicit Graph(QWidget* parent = 0);
87
88 //=========================================================================================================
92 void init();
93
94 //=========================================================================================================
100 void setTitle(const QString& p_sTitle);
101
102 //=========================================================================================================
108 void setXLabel(const QString& p_sXLabel);
109
110 //=========================================================================================================
116 void setYLabel(const QString& p_sYLabel);
117
118protected:
119 // void paintEvent(QPaintEvent*);
120 //=========================================================================================================
126 void resizeEvent(QResizeEvent* event);
127
128 //=========================================================================================================
135 void drawLabels(qint32 p_iContentWidth,
136 qint32 p_iContentHeight);
137
139
140 QString m_sTitle;
143
146
147 QString m_sXLabel;
148 QString m_sYLabel;
151};
152
153//=============================================================================================================
154// INLINE DEFINITIONS
155//=============================================================================================================
156} // NAMESPACE
157
158#endif // GRAPH_H
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
2-D display widgets and visualisation helpers (charts, topography, colour maps).
QFont m_qFontTitle
Definition graph.h:141
QPen m_qPenAxes
Definition graph.h:150
Graph(QWidget *parent=0)
Definition graph.cpp:43
QString m_sXLabel
Definition graph.h:147
void init()
Definition graph.cpp:51
QSize m_qSizeWidget
Definition graph.h:138
QFont m_qFontAxes
Definition graph.h:149
void setYLabel(const QString &p_sYLabel)
Definition graph.cpp:91
QSharedPointer< const Graph > ConstSPtr
Definition graph.h:78
QString m_sTitle
Definition graph.h:140
QString m_sYLabel
Definition graph.h:148
QPen m_qPenTitle
Definition graph.h:142
qint32 m_iBorderLeftRight
Definition graph.h:145
void setTitle(const QString &p_sTitle)
Definition graph.cpp:75
void resizeEvent(QResizeEvent *event)
Definition graph.cpp:142
qint32 m_iBorderTopBottom
Definition graph.h:144
void drawLabels(qint32 p_iContentWidth, qint32 p_iContentHeight)
Definition graph.cpp:99
QSharedPointer< Graph > SPtr
Definition graph.h:77
void setXLabel(const QString &p_sXLabel)
Definition graph.cpp:83