diff options
author | Tim Moore <timoore@redhat.com> | 2009-09-02 12:39:05 +0200 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-09-30 20:40:29 +0200 |
commit | eece8f14d92f71fc12ab87c529fffc5fcc5a4e94 (patch) | |
tree | 2a0b6fce96e5acc0ee0316f889e616a7c2fcef1b /grapher/GraphWidget.hxx | |
parent | c18a296b760df73e2c233077aa0b863f67ed725f (diff) | |
download | systemtap-steved-eece8f14d92f71fc12ab87c529fffc5fcc5a4e94.tar.gz systemtap-steved-eece8f14d92f71fc12ab87c529fffc5fcc5a4e94.tar.xz systemtap-steved-eece8f14d92f71fc12ab87c529fffc5fcc5a4e94.zip |
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
Diffstat (limited to 'grapher/GraphWidget.hxx')
-rw-r--r-- | grapher/GraphWidget.hxx | 24 |
1 files changed, 23 insertions, 1 deletions
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 <vector> #include <tr1/memory> -#include <gtkmm/drawingarea.h> +#include <gtkmm.h> +#include <libglademm.h> #include <Graph.hxx> namespace systemtap { class CairoPlayButton; + + class DataModelColumns : public Gtk::TreeModelColumnRecord + { + public: + DataModelColumns() + { + add(_dataName); + add(_graphData); + } + Gtk::TreeModelColumn<Glib::ustring> _dataName; + Gtk::TreeModelColumn<std::tr1::shared_ptr<GraphDataBase> > _graphData; + }; class GraphWidget : public Gtk::DrawingArea { @@ -43,6 +56,15 @@ namespace systemtap double _dragOrigRight; double _width; double _height; + Glib::RefPtr<Gnome::Glade::Xml> _refXmlDataDialog; + Gtk::Dialog* _dataDialog; + Gtk::TreeView* _dataTreeView; + void onDataDialogCancel(); + void onDataAdd(); + void onDataRemove(); + void onDataDialogOpen(); + DataModelColumns _dataColumns; + Glib::RefPtr<Gtk::ListStore> _listStore; }; } #endif // SYSTEMTAP_GRAPHWIDGET_H |