summaryrefslogtreecommitdiffstats
path: root/grapher/GraphWidget.hxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-05-27 10:32:51 +0200
committerTim Moore <timoore@redhat.com>2009-07-28 10:17:29 +0200
commit5f4f8b1129659adb2015ce42821faccf8fe6d8d5 (patch)
tree9fdb07036f2461a01f8efa1f5d07f496191e71bc /grapher/GraphWidget.hxx
parent95ddfc079a1d9affdb285f7690f8d5623cd7124a (diff)
downloadsystemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.gz
systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.xz
systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.zip
Templatize GraphData
* grapher/GraphData.hxx (GraphDataBase): new superclass for GraphData. Split time data out as a separate vector. (GraphData): Rewrite as template. * grapher/GraphWidget.cxx (on_expose_event): Reflect GraphData templatization. Handle events with string values. * grapher/GraphWidget.hxx (GraphWidget): Keep pointers to GraphDataBase objects instead of GraphData. * grapher/StapParser.cxx (parseData): new member function (ioCallback): Handle new discreet event * grapher/StapParser.hxx (StapParser): keep pointers to GraphDataBase objects instead of GraphData * testsuite/systemtap.examples/general/grapher.stp: Display actual key pressed for keyboard event
Diffstat (limited to 'grapher/GraphWidget.hxx')
-rw-r--r--grapher/GraphWidget.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx
index 46075b78..86ba771d 100644
--- a/grapher/GraphWidget.hxx
+++ b/grapher/GraphWidget.hxx
@@ -17,7 +17,7 @@ namespace systemtap
public:
GraphWidget();
virtual ~GraphWidget();
- void addGraphData(std::tr1::shared_ptr<GraphData> data);
+ void addGraphData(std::tr1::shared_ptr<GraphDataBase> data);
void getExtents(double& left, double& right, double& top, double& bottom) const;
void setExtents(double left, double right, double top, double bottom);
double getLineWidth() { return _lineWidth; }
@@ -38,7 +38,7 @@ namespace systemtap
virtual bool on_button_release_event(GdkEventButton* event);
virtual bool on_scroll_event(GdkEventScroll* event);
bool on_timeout();
- typedef std::vector<std::tr1::shared_ptr<GraphData> > DatasetList;
+ typedef std::vector<std::tr1::shared_ptr<GraphDataBase> > DatasetList;
DatasetList _datasets;
double _left;
double _right;