summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.cxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-12-08 12:44:03 +0100
committerTim Moore <timoore@redhat.com>2009-12-08 23:25:20 +0100
commitcfd482078cd4805076cc6fd7e4e8642b97a03b25 (patch)
tree2d12ccdcfb9eee27d73f1c09d4da72e70fec82c4 /grapher/StapParser.cxx
parent72a9e5a2d3788f5465eb5e1610f2402744054f2e (diff)
downloadsystemtap-steved-cfd482078cd4805076cc6fd7e4e8642b97a03b25.tar.gz
systemtap-steved-cfd482078cd4805076cc6fd7e4e8642b97a03b25.tar.xz
systemtap-steved-cfd482078cd4805076cc6fd7e4e8642b97a03b25.zip
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.
Diffstat (limited to 'grapher/StapParser.cxx')
-rw-r--r--grapher/StapParser.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/grapher/StapParser.cxx b/grapher/StapParser.cxx
index edb7f5f2..653c00de 100644
--- a/grapher/StapParser.cxx
+++ b/grapher/StapParser.cxx
@@ -118,7 +118,8 @@ vector<string> commaSplit(const boost::sub_range<Glib::ustring>& range)
dataSet->color[2] = (hexColor & 0xff) / 255.0;
dataSet->scale = scale;
_dataSets.insert(std::make_pair(setName, dataSet));
- _widget->addGraphData(dataSet);
+ getGraphData().push_back(dataSet);
+ graphDataSignal().emit();
}
else if (style == "discreet")
{
@@ -131,7 +132,8 @@ vector<string> commaSplit(const boost::sub_range<Glib::ustring>& range)
dataSet->color[2] = (hexColor & 0xff) / 255.0;
dataSet->scale = scale;
_dataSets.insert(std::make_pair(setName, dataSet));
- _widget->addGraphData(dataSet);
+ getGraphData().push_back(dataSet);
+ graphDataSignal().emit();
}
}
else if ((found = find_first(dataString, "%CSV:")))