v2.0.0
Loading...
Searching...
No Matches
DISPLIB::Graph Class Reference

Common base widget providing title, axis labels and resize handling for DISPLIB's QPainter plots. More...

#include <graph.h>

Public Types

typedef QSharedPointer< GraphSPtr
typedef QSharedPointer< const GraphConstSPtr

Public Member Functions

 Graph (QWidget *parent=0)
void init ()
void setTitle (const QString &p_sTitle)
void setXLabel (const QString &p_sXLabel)
void setYLabel (const QString &p_sYLabel)

Protected Member Functions

void resizeEvent (QResizeEvent *event)
void drawLabels (qint32 p_iContentWidth, qint32 p_iContentHeight)

Protected Attributes

QSize m_qSizeWidget
QString m_sTitle
QFont m_qFontTitle
QPen m_qPenTitle
qint32 m_iBorderTopBottom
qint32 m_iBorderLeftRight
QString m_sXLabel
QString m_sYLabel
QFont m_qFontAxes
QPen m_qPenAxes

Detailed Description

Common base widget providing title, axis labels and resize handling for DISPLIB's QPainter plots.

Subclasses such as Plot and ImageSc paint inside the content rectangle that Graph leaves free after stamping the title bar at the top and the x / y axis labels on the bottom and left margins.

Definition at line 70 of file graph.h.

Inheritance diagram for DISPLIB::Graph:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const Graph> DISPLIB::Graph::ConstSPtr

Const shared pointer type for Graph class.

Definition at line 76 of file graph.h.

◆ SPtr

typedef QSharedPointer<Graph> DISPLIB::Graph::SPtr

Shared pointer type for Graph class.

Definition at line 75 of file graph.h.

Constructor & Destructor Documentation

◆ Graph()

Graph::Graph ( QWidget * parent = 0)
explicit

The constructor.

Parameters
[in]parentThe parent widget.

Definition at line 43 of file graph.cpp.

Member Function Documentation

◆ drawLabels()

void Graph::drawLabels ( qint32 p_iContentWidth,
qint32 p_iContentHeight )
protected

Draw the labels.

Parameters
[in]p_iContentWidthThe contents width.
[in]p_iContentHeightThe contents height.

Definition at line 99 of file graph.cpp.

◆ init()

void Graph::init ( )

Init this class.

Definition at line 51 of file graph.cpp.

◆ resizeEvent()

void Graph::resizeEvent ( QResizeEvent * event)
protected

Reimplemented resizeEvent

Parameters
[in]eventThe resize event.

Definition at line 145 of file graph.cpp.

◆ setTitle()

void Graph::setTitle ( const QString & p_sTitle)

Sets the scaled image view title.

Parameters
[in]p_sTitleThe title.

Definition at line 75 of file graph.cpp.

◆ setXLabel()

void Graph::setXLabel ( const QString & p_sXLabel)

Sets the label of the y axes

Parameters
[in]p_sXLabelThe x axes label.

Definition at line 83 of file graph.cpp.

◆ setYLabel()

void Graph::setYLabel ( const QString & p_sYLabel)

Sets the label of the y axes

Parameters
[in]p_sXLabelThe y axes label.

Definition at line 91 of file graph.cpp.

Member Data Documentation

◆ m_iBorderLeftRight

qint32 DISPLIB::Graph::m_iBorderLeftRight
protected

distance to left and right.

Definition at line 143 of file graph.h.

◆ m_iBorderTopBottom

qint32 DISPLIB::Graph::m_iBorderTopBottom
protected

distance to top and bottom.

Definition at line 142 of file graph.h.

◆ m_qFontAxes

QFont DISPLIB::Graph::m_qFontAxes
protected

Axes font.

Definition at line 147 of file graph.h.

◆ m_qFontTitle

QFont DISPLIB::Graph::m_qFontTitle
protected

Title font.

Definition at line 139 of file graph.h.

◆ m_qPenAxes

QPen DISPLIB::Graph::m_qPenAxes
protected

Axes pen.

Definition at line 148 of file graph.h.

◆ m_qPenTitle

QPen DISPLIB::Graph::m_qPenTitle
protected

Title pen.

Definition at line 140 of file graph.h.

◆ m_qSizeWidget

QSize DISPLIB::Graph::m_qSizeWidget
protected

current widget size.

Definition at line 136 of file graph.h.

◆ m_sTitle

QString DISPLIB::Graph::m_sTitle
protected

Title.

Definition at line 138 of file graph.h.

◆ m_sXLabel

QString DISPLIB::Graph::m_sXLabel
protected

X axes label.

Definition at line 145 of file graph.h.

◆ m_sYLabel

QString DISPLIB::Graph::m_sYLabel
protected

Y axes label.

Definition at line 146 of file graph.h.


The documentation for this class was generated from the following files: