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/GraphWidget.hxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'grapher/GraphWidget.hxx') diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 0e9f2a29..89b86db9 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -42,14 +42,11 @@ namespace systemtap public: GraphWidget(); virtual ~GraphWidget(); - void addGraphData(std::tr1::shared_ptr data); void addGraph(); protected: typedef std::vector > GraphList; GraphList _graphs; - typedef std::vector > GraphDataList; - GraphDataList _graphData; // For click and drag std::tr1::shared_ptr _activeGraph; // Dragging all graphs simultaneously, or perhaps seperately @@ -99,6 +96,7 @@ namespace systemtap { return false; } + void onGraphDataChanged(); }; } #endif // SYSTEMTAP_GRAPHWIDGET_H -- cgit