From cfd482078cd4805076cc6fd7e4e8642b97a03b25 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Tue, 8 Dec 2009 12:44:03 +0100 Subject: refactor list of data sets out of GraphWidget into a global data structure. Also, add a sigc signal for broadcasting data set changes. * grapher/GraphData.hxx (GraphDataList) new typedef (getGraphData, graphDataSignal): new functions * grapher/Graph.hxx (DatasetList): remove typedef in favor of systemtap::GraphDataList * grapher/GraphWidget.cxx (GraphWidget, onGraphDataChanged): Use graphDataSignal to notice new data sets that need to be added. Use the global data set list instead of one embedded in GraphWidget. * grapher/StapParser.hxx: delete the _widget member; use signals to broadcast that there are new data sets instead of calling into the widget. --- grapher/StapParser.hxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'grapher/StapParser.hxx') diff --git a/grapher/StapParser.hxx b/grapher/StapParser.hxx index 476b0071..eba8a7af 100644 --- a/grapher/StapParser.hxx +++ b/grapher/StapParser.hxx @@ -7,7 +7,6 @@ // later version. #include "GraphData.hxx" -#include "GraphWidget.hxx" #include namespace systemtap @@ -19,14 +18,12 @@ class StapParser DataMap _dataSets; CSVData _csv; Gtk::Window* _win; - GraphWidget* _widget; int _errFd; int _inFd; unsigned char _lineEndChar; public: - StapParser(Gtk::Window* win, - GraphWidget* widget) : _win(win), _widget(widget), _errFd(-1), - _inFd(-1), _lineEndChar('\n') + StapParser(Gtk::Window* win) + : _win(win), _errFd(-1), _inFd(-1), _lineEndChar('\n') { } void parseData(std::tr1::shared_ptr gdata, -- cgit