All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::qt::widgets::ChartDisplay Class Reference

A class to represent a chart display. More...

#include <ChartDisplay.h>

Inheritance diagram for te::qt::widgets::ChartDisplay:

Signals

void selected (te::da::ObjectIdSet *, const bool &)
 Emmit when objects were selected. More...
 

Public Member Functions

void adjustDisplay ()
 Updates the general display settings according to the ChartStyle. The adjusted properties are: Title; Axis titles (x and Y); Weather to display the grid or not; Background color;. More...
 
 ChartDisplay (QWidget *parent=NULL, QString title="", ChartStyle *style=0)
 Constructor. More...
 
te::qt::widgets::ChartStylegetStyle ()
 Returns a pointer to the display's style. More...
 
void highlightOIds (const te::da::ObjectIdSet *oids)
 Highlights the objects identified by oids. More...
 
void setSelectionColor (QColor selColor)
 color used to hgihlight selected objects on this display. More...
 
void setStyle (te::qt::widgets::ChartStyle *newStyle)
 It sets the display's style. More...
 
 ~ChartDisplay ()
 Destructor. More...
 

Protected Slots

void onRectPicked (const QRectF &rect)
 Called when the user selects an area of the canvas. Will highlight the data, if possible, depending on the type of chart being displayed (f.e. histogram, scatter, etc). More...
 

Private Attributes

ChartStylem_chartStyle
 The display's style. More...
 
QwtPlotPicker * m_ctrlPicker
 The display's control button picker. More...
 
QwtPlotGrid * m_grid
 The display's grid. More...
 
QwtPlotPicker * m_leftPicker
 The display's left button picker. More...
 
QwtPlotMagnifier * m_magnifier
 The display's magnifinifier. More...
 
QwtPlotPanner * m_panner
 The display's panner. More...
 
QwtPlotPicker * m_shiftPicker
 The display's shift button picker. More...
 

Detailed Description

A class to represent a chart display.

Definition at line 65 of file ChartDisplay.h.

Constructor & Destructor Documentation

te::qt::widgets::ChartDisplay::ChartDisplay ( QWidget *  parent = NULL,
QString  title = "",
ChartStyle style = 0 
)

Constructor.

It constructs a ChartDisplay with the given title and style.

Parameters
parentthis widget's parent
titlethis widget's title.
Note
it will take the ownership of the pointer "style". If style is null, the display will be constructed with a default style.

Definition at line 56 of file ChartDisplay.cpp.

References te::map::DotLine, m_chartStyle, m_ctrlPicker, m_grid, m_leftPicker, m_magnifier, m_panner, m_shiftPicker, onRectPicked(), selected(), and te::map::SolidLine.

te::qt::widgets::ChartDisplay::~ChartDisplay ( )

Destructor.

Definition at line 100 of file ChartDisplay.cpp.

Member Function Documentation

void te::qt::widgets::ChartDisplay::adjustDisplay ( )

Updates the general display settings according to the ChartStyle. The adjusted properties are: Title; Axis titles (x and Y); Weather to display the grid or not; Background color;.

Definition at line 167 of file ChartDisplay.cpp.

Referenced by te::qt::widgets::createHistogramDisplay(), te::qt::widgets::createScatterDisplay(), te::qt::widgets::ScatterDialog::onOkPushButtonClicked(), te::qt::widgets::HistogramDialog::onOkPushButtonClicked(), and te::qt::widgets::RasterHistogramWidget::RasterHistogramWidget().

te::qt::widgets::ChartStyle * te::qt::widgets::ChartDisplay::getStyle ( )

Returns a pointer to the display's style.

Returns
A ChartStyle type pointer to the display's style.
Note
The caller will not take ownership of the returned pointer.

Definition at line 111 of file ChartDisplay.cpp.

void te::qt::widgets::ChartDisplay::highlightOIds ( const te::da::ObjectIdSet oids)

Highlights the objects identified by oids.

Parameters
oidsThe identifiers of plotitems to be highlighted.

Definition at line 122 of file ChartDisplay.cpp.

References te::qt::widgets::ScatterChart::highlight(), te::qt::widgets::HistogramChart::highlight(), te::qt::widgets::HISTOGRAM_CHART, and te::qt::widgets::SCATTER_CHART.

void te::qt::widgets::ChartDisplay::onRectPicked ( const QRectF &  rect)
protectedslot

Called when the user selects an area of the canvas. Will highlight the data, if possible, depending on the type of chart being displayed (f.e. histogram, scatter, etc).

Definition at line 193 of file ChartDisplay.cpp.

References te::qt::widgets::HISTOGRAM_CHART, and te::qt::widgets::SCATTER_CHART.

Referenced by ChartDisplay().

void te::qt::widgets::ChartDisplay::selected ( te::da::ObjectIdSet ,
const bool &   
)
signal

Emmit when objects were selected.

Referenced by ChartDisplay().

void te::qt::widgets::ChartDisplay::setSelectionColor ( QColor  selColor)

color used to hgihlight selected objects on this display.

Parameters
selColorThe color used to hgihlight selected objects on this display.

Definition at line 147 of file ChartDisplay.cpp.

References te::qt::widgets::HISTOGRAM_CHART, te::qt::widgets::SCATTER_CHART, te::qt::widgets::ScatterChart::setSelectionColor(), and te::qt::widgets::HistogramChart::setSelectionColor().

void te::qt::widgets::ChartDisplay::setStyle ( te::qt::widgets::ChartStyle newStyle)

It sets the display's style.

Parameters
newStyleThe new style.
Note
It will take ownership of the given pointer

Definition at line 116 of file ChartDisplay.cpp.

Referenced by te::qt::widgets::ChartStyleFrame::getDisplay(), and te::qt::widgets::ChartStyleFrame::setDisplay().

Member Data Documentation

ChartStyle* te::qt::widgets::ChartDisplay::m_chartStyle
private

The display's style.

Definition at line 147 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotPicker* te::qt::widgets::ChartDisplay::m_ctrlPicker
private

The display's control button picker.

Definition at line 152 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotGrid* te::qt::widgets::ChartDisplay::m_grid
private

The display's grid.

Definition at line 148 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotPicker* te::qt::widgets::ChartDisplay::m_leftPicker
private

The display's left button picker.

Definition at line 150 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotMagnifier* te::qt::widgets::ChartDisplay::m_magnifier
private

The display's magnifinifier.

Definition at line 151 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotPanner* te::qt::widgets::ChartDisplay::m_panner
private

The display's panner.

Definition at line 149 of file ChartDisplay.h.

Referenced by ChartDisplay().

QwtPlotPicker* te::qt::widgets::ChartDisplay::m_shiftPicker
private

The display's shift button picker.

Definition at line 153 of file ChartDisplay.h.

Referenced by ChartDisplay().


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