The widget holds the ActivityGraph and all its controls. More...
#include <graphwidget.h>
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< GraphMarker > | getMarkers () |
Gets markers from the graph and passes them to parent. More... | |
std::vector< std::string > | getMarkerHistory () |
Passes marker history to parent. More... | |
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.
|
explicit |
Constructs the GraphWidget.
parent | Parent of The Widget. |
|
slot |
Sets whether absolute time button is active or inactive.
ae | True/false for if active or not. |
|
signal |
Passes export command with generated options from ExportDialog to parent.
options | Export options as ExportOptions. |
std::vector< std::string > cavapa_gui::GraphWidget::getMarkerHistory | ( | ) |
Passes marker history to parent.
std::vector< GraphMarker > cavapa_gui::GraphWidget::getMarkers | ( | ) |
Gets markers from the graph and passes them to parent.
void cavapa_gui::GraphWidget::getSettings | ( | GraphSettings | settings | ) |
Gets settings from the parent and sets them as the current ones.
settings | New settings from parent in GraphSettings. |
GraphSettings cavapa_gui::GraphWidget::giveSettings | ( | ) |
Gives current settings to parent.
|
signal |
Sends pointed frametime from graph to parent.
point | Point in FrameTime. |
|
slot |
Removes the selected marker text from marker history.
i | Index in markers vector array. |
|
inlineslot |
Requests statistical data.
start | Period start time. If 0, the period will start from the first possible frame. |
stop | Period end time. If 0, the period will end at the last possible frame. |
points | Number of points desired to be returned. |
|
signal |
Sends current settings of the graph to parent.
currentsettings | Current settings in GraphSettings. |
void cavapa_gui::GraphWidget::setMarkerHistory | ( | std::vector< std::string > | history | ) |
Sets the marker history from parent when loading saved measurement.
history | History as vector array of strings. |
void cavapa_gui::GraphWidget::setMarkers | ( | std::vector< GraphMarker > | markers | ) |
Sets the markers from parent when loading saved measurement.
markers | Markers as vector array of GraphMarkers. |
|
slot |
Sets the scroll bar size.
size | Scroll bar size as integer. |
|
slot |
Sets slide left button active or inactive.
active | True/false for if active or not. |
|
slot |
Sets slide right button active or inactive.
active | True/false for if active or not. |
|
slot |
Sets zoom in button active or inactive.
active | True/false for if active or not. |
|
slot |
Sets zoom out button active or inactive.
active | True/false for if active or not. |
|
signal |
Signal to be emitted when the graph wants data to be retrieved.
start | Period start time. If 0, the period will start from the first possible frame. |
stop | Period end time. If 0, the period will end at the last possible frame. |
points | Number 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.
new_data | Statistics from the current frame update. |
new_data | Not 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.
stats | Statistical information from a certain period. |
stats | Statisticcs as vector array of FrameStats. |