CAVAPA-GUI  30.5.2014
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Slots | Signals | Public Member Functions | List of all members
cavapa_gui::GraphWidget Class Reference

The widget holds the ActivityGraph and all its controls. More...

#include <graphwidget.h>

Inheritance diagram for cavapa_gui::GraphWidget:

Public Slots

void requestStatistics (FrameTime start, FrameTime stop, int points)
 Requests statistical data. More...
 
void sendDefaultSettings ()
 Sets default settings into graph settings dialog.
 
void sendPreviousSettings ()
 Gets the previous graph settings (when settings dialog canceled).
 
void printGraphToFile ()
 Saves the graph in to scalable svg image file.
 
void removeFromHistory (int i)
 Removes the selected marker text from marker history. More...
 
void reset ()
 Resets the graph and nulls the clocks.
 
void setZoomInActive (bool active)
 Sets zoom in button active or inactive. More...
 
void setZoomOutActive (bool active)
 Sets zoom out button active or inactive. More...
 
void setScrollLeftActive (bool active)
 Sets slide left button active or inactive. More...
 
void setScrollRightActive (bool active)
 Sets slide right button active or inactive. More...
 
void setScrollBarSize (int size)
 Sets the scroll bar size. More...
 
void changeFixed ()
 Set fixed time window -button disabled.
 
void changeAbsoluteEnabled (bool ae)
 Sets whether absolute time button is active or inactive. More...
 
void openExportSelectionDialog ()
 Opens export dialog and send values from ui objects into it.
 

Signals

void statisticsRequested (FrameTime start, FrameTime stop, int points)
 Signal to be emitted when the graph wants data to be retrieved. More...
 
void sendGraphSettings (GraphSettings currentsettings)
 Sends current settings of the graph to parent. More...
 
void settingsChanged ()
 Sends notify to parent that graph's settings have been changed.
 
bool exportCommand (const ExportOptions &options)
 Passes export command with generated options from ExportDialog to parent. More...
 
void pointedFrame (FrameTime point)
 Sends pointed frametime from graph to parent. More...
 
void markerChanged ()
 Informs the parent of marker adding.
 

Public Member Functions

 GraphWidget (QWidget *parent=0)
 Constructs the GraphWidget. More...
 
void updateData (const FrameStats &new_data)
 Informs the graph about a new frame statistics. More...
 
void updateStatistics (const std::vector< FrameStats > &stats)
 Updates the graph with new statistics. More...
 
void getSettings (GraphSettings settings)
 Gets settings from the parent and sets them as the current ones. More...
 
GraphSettings giveSettings ()
 Gives current settings to parent. More...
 
void setMarkers (std::vector< GraphMarker > markers)
 Sets the markers from parent when loading saved measurement. More...
 
void setMarkerHistory (std::vector< std::string > history)
 Sets the marker history from parent when loading saved measurement. More...
 
std::vector< GraphMarkergetMarkers ()
 Gets markers from the graph and passes them to parent. More...
 
std::vector< std::string > getMarkerHistory ()
 Passes marker history to parent. More...
 

Detailed Description

The widget holds the ActivityGraph and all its controls.

The main idea of the class is to separate the main window from all these controls and act as a wrapper for everything related to the graph. By simply hiding the widget we can easily hide all the graph-related elements.

Author
Joel Kivelä

Constructor & Destructor Documentation

cavapa_gui::GraphWidget::GraphWidget ( QWidget *  parent = 0)
explicit

Constructs the GraphWidget.

Parameters
parentParent of The Widget.

Member Function Documentation

void cavapa_gui::GraphWidget::changeAbsoluteEnabled ( bool  ae)
slot

Sets whether absolute time button is active or inactive.

Parameters
aeTrue/false for if active or not.
bool cavapa_gui::GraphWidget::exportCommand ( const ExportOptions options)
signal

Passes export command with generated options from ExportDialog to parent.

Parameters
optionsExport options as ExportOptions.
Returns
True/false flag of export success.
std::vector< std::string > cavapa_gui::GraphWidget::getMarkerHistory ( )

Passes marker history to parent.

Returns
Marker history as string vector array.
std::vector< GraphMarker > cavapa_gui::GraphWidget::getMarkers ( )

Gets markers from the graph and passes them to parent.

Returns
Markers as vector array.
void cavapa_gui::GraphWidget::getSettings ( GraphSettings  settings)

Gets settings from the parent and sets them as the current ones.

Parameters
settingsNew settings from parent in GraphSettings.
GraphSettings cavapa_gui::GraphWidget::giveSettings ( )

Gives current settings to parent.

Returns
Current settings of the graph.
void cavapa_gui::GraphWidget::pointedFrame ( FrameTime  point)
signal

Sends pointed frametime from graph to parent.

Parameters
pointPoint in FrameTime.
void cavapa_gui::GraphWidget::removeFromHistory ( int  i)
slot

Removes the selected marker text from marker history.

Parameters
iIndex in markers vector array.
void cavapa_gui::GraphWidget::requestStatistics ( FrameTime  start,
FrameTime  stop,
int  points 
)
inlineslot

Requests statistical data.

Parameters
startPeriod start time. If 0, the period will start from the first possible frame.
stopPeriod end time. If 0, the period will end at the last possible frame.
pointsNumber of points desired to be returned.
void cavapa_gui::GraphWidget::sendGraphSettings ( GraphSettings  currentsettings)
signal

Sends current settings of the graph to parent.

Parameters
currentsettingsCurrent settings in GraphSettings.
void cavapa_gui::GraphWidget::setMarkerHistory ( std::vector< std::string >  history)

Sets the marker history from parent when loading saved measurement.

Parameters
historyHistory as vector array of strings.
void cavapa_gui::GraphWidget::setMarkers ( std::vector< GraphMarker markers)

Sets the markers from parent when loading saved measurement.

Parameters
markersMarkers as vector array of GraphMarkers.
void cavapa_gui::GraphWidget::setScrollBarSize ( int  size)
slot

Sets the scroll bar size.

Parameters
sizeScroll bar size as integer.
void cavapa_gui::GraphWidget::setScrollLeftActive ( bool  active)
slot

Sets slide left button active or inactive.

Parameters
activeTrue/false for if active or not.
void cavapa_gui::GraphWidget::setScrollRightActive ( bool  active)
slot

Sets slide right button active or inactive.

Parameters
activeTrue/false for if active or not.
void cavapa_gui::GraphWidget::setZoomInActive ( bool  active)
slot

Sets zoom in button active or inactive.

Parameters
activeTrue/false for if active or not.
void cavapa_gui::GraphWidget::setZoomOutActive ( bool  active)
slot

Sets zoom out button active or inactive.

Parameters
activeTrue/false for if active or not.
void cavapa_gui::GraphWidget::statisticsRequested ( FrameTime  start,
FrameTime  stop,
int  points 
)
signal

Signal to be emitted when the graph wants data to be retrieved.

Parameters
startPeriod start time. If 0, the period will start from the first possible frame.
stopPeriod end time. If 0, the period will end at the last possible frame.
pointsNumber of points desired to be returned.
void cavapa_gui::GraphWidget::updateData ( const FrameStats new_data)

Informs the graph about a new frame statistics.

Unimplemented but required by the parent.

Parameters
new_dataStatistics from the current frame update.
new_dataNot used.
void cavapa_gui::GraphWidget::updateStatistics ( const std::vector< FrameStats > &  stats)

Updates the graph with new statistics.

Passes new statistics into graph.

Either the graph requested new statistics with requestData()-signal or the graph is being initialized with new statistical information.

Parameters
statsStatistical information from a certain period.
statsStatisticcs as vector array of FrameStats.

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