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//=============================================================================================================
70class DISPSHARED_EXPORT Graph : public QWidget
71{
72 Q_OBJECT
73
74public:
75 typedef QSharedPointer<Graph> SPtr;
76 typedef QSharedPointer<const Graph> ConstSPtr;
77
78 //=========================================================================================================
84 explicit Graph(QWidget *parent = 0);
85
86 //=========================================================================================================
90 void init();
91
92 //=========================================================================================================
98 void setTitle(const QString &p_sTitle);
99
100 //=========================================================================================================
106 void setXLabel(const QString &p_sXLabel);
107
108 //=========================================================================================================
114 void setYLabel(const QString &p_sYLabel);
115
116protected:
117// void paintEvent(QPaintEvent*);
118 //=========================================================================================================
124 void resizeEvent(QResizeEvent* event);
125
126 //=========================================================================================================
133 void drawLabels(qint32 p_iContentWidth,
134 qint32 p_iContentHeight);
135
137
138 QString m_sTitle;
141
144
145 QString m_sXLabel;
146 QString m_sYLabel;
149};
150
151//=============================================================================================================
152// INLINE DEFINITIONS
153//=============================================================================================================
154} // NAMESPACE
155
156#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:139
QPen m_qPenAxes
Definition graph.h:148
Graph(QWidget *parent=0)
Definition graph.cpp:43
QString m_sXLabel
Definition graph.h:145
void init()
Definition graph.cpp:51
QSize m_qSizeWidget
Definition graph.h:136
QFont m_qFontAxes
Definition graph.h:147
void setYLabel(const QString &p_sYLabel)
Definition graph.cpp:91
QSharedPointer< const Graph > ConstSPtr
Definition graph.h:76
QString m_sTitle
Definition graph.h:138
QString m_sYLabel
Definition graph.h:146
QPen m_qPenTitle
Definition graph.h:140
qint32 m_iBorderLeftRight
Definition graph.h:143
void setTitle(const QString &p_sTitle)
Definition graph.cpp:75
void resizeEvent(QResizeEvent *event)
Definition graph.cpp:145
qint32 m_iBorderTopBottom
Definition graph.h:142
void drawLabels(qint32 p_iContentWidth, qint32 p_iContentHeight)
Definition graph.cpp:99
QSharedPointer< Graph > SPtr
Definition graph.h:75
void setXLabel(const QString &p_sXLabel)
Definition graph.cpp:83