Go to the documentation of this file.
5 #ifndef CNOID_BASE_GRAPH_WIDGET_H
6 #define CNOID_BASE_GRAPH_WIDGET_H
8 #include <cnoid/Archive>
14 #include "exportdecl.h"
21 class GraphDataHandler;
22 class GraphDataHandlerImpl;
23 class GraphWidgetImpl;
33 void setID(
int id) { this->
id = id; }
34 int getID()
const {
return id; }
36 void setColor(
float r,
float g,
float b);
37 void setLabel(
const std::string& label);
39 void setFrameProperties(
int numFrames,
double frameRate,
double offset = 0.0);
41 void setValueLimits(
double lower,
double upper);
42 void setVelocityLimits(
double lower,
double upper);
44 void addVerticalLine(
double x,
const std::string& label);
45 void addHorizontalLine(
double y,
const std::string& label);
60 friend class GraphWidgetImpl;
62 GraphDataHandlerImpl* impl;
74 void clearDataHandlers();
76 void setRenderingTypes(
bool showOriginalValues,
bool showVelocities,
bool showAccelerations);
77 void getRenderingTypes(
bool& showOriginalValues,
bool& showVelocities,
bool& showAccelerations);
79 bool setCursorPosition(
double pos);
81 void setTimeBarSyncMode(
bool on);
82 bool isTimeBarSyncMode();
85 void setAutoScrollMode(ScrollMode on);
86 ScrollMode autoScrollMode();
88 void setVerticalValueRange(
double lower,
double upper);
89 void getVerticalValueRange(
double& lower,
double& upper);
91 void setLineWidth(
double width);
92 double getLineWidth();
94 void showRulers(
bool show);
97 void showLimits(
bool show);
100 void showGrid(
bool show);
103 void setGridSize(
double width,
double height);
104 void getGridSize(
double& width,
double& height);
106 void setControlPointStep(
int step,
int offset = 0);
107 void getControlPointStep(
int& step,
int& offset);
109 void highlightControlPoints(
bool on);
110 bool highlightsControlPoints();
113 void changeMode(Mode mode);
117 void changeEditMode(EditMode mode);
120 QLabel& statusLabel();
122 bool saveImage(
const std::string& filename);
124 virtual bool storeState(
Archive& archive);
125 virtual bool restoreState(
const Archive& archive);
128 virtual bool eventFilter(QObject* obj, QEvent* event);
134 GraphWidgetImpl* impl;
int getID() const
Definition: GraphWidget.h:34
std::function< void(int frame, int size, double *out_values)> DataRequestCallback
Definition: GraphWidget.h:50
void setID(int id)
Definition: GraphWidget.h:33
std::shared_ptr< GraphDataHandler > GraphDataHandlerPtr
Definition: GraphWidget.h:23
Definition: AbstractSceneLoader.h:11
Definition: GraphWidget.h:27
std::function< void(int frame, int size, double *values)> DataModifiedCallback
Definition: GraphWidget.h:53