From eece8f14d92f71fc12ab87c529fffc5fcc5a4e94 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Wed, 2 Sep 2009 12:39:05 +0200 Subject: Add graph data chooser window, based on glade * configure.ac: Test for libglademm * grapher/GraphWidget.hxx (DataModelColumns): new class (onDataDialogCancel, void onDataAdd, onDataRemove, onDataDialogOpen): new methods * grapher/GraphWidget.cxx: ditto; methods for the graph data dialog. * grapher/graph-dialog.glade: New file. * grapher/graph-dialog.gladep: New file. * grapher/Makefile.am (dist_pkgdata_DATA): add graph-dialog.glade to installation. * grapher/GraphWidget.cxx (GraphWidget constructor): Use PKGDATADIR --- grapher/GraphWidget.hxx | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'grapher/GraphWidget.hxx') diff --git a/grapher/GraphWidget.hxx b/grapher/GraphWidget.hxx index 25476f5f..4548d0c3 100644 --- a/grapher/GraphWidget.hxx +++ b/grapher/GraphWidget.hxx @@ -5,12 +5,25 @@ #include #include -#include +#include +#include #include namespace systemtap { class CairoPlayButton; + + class DataModelColumns : public Gtk::TreeModelColumnRecord + { + public: + DataModelColumns() + { + add(_dataName); + add(_graphData); + } + Gtk::TreeModelColumn _dataName; + Gtk::TreeModelColumn > _graphData; + }; class GraphWidget : public Gtk::DrawingArea { @@ -43,6 +56,15 @@ namespace systemtap double _dragOrigRight; double _width; double _height; + Glib::RefPtr _refXmlDataDialog; + Gtk::Dialog* _dataDialog; + Gtk::TreeView* _dataTreeView; + void onDataDialogCancel(); + void onDataAdd(); + void onDataRemove(); + void onDataDialogOpen(); + DataModelColumns _dataColumns; + Glib::RefPtr _listStore; }; } #endif // SYSTEMTAP_GRAPHWIDGET_H -- cgit