summaryrefslogtreecommitdiffstats
path: root/grapher/GraphWidget.hxx
diff options
context:
space:
mode:
authorTim Moore <timoore@redhat.com>2009-09-02 12:39:05 +0200
committerTim Moore <timoore@redhat.com>2009-09-30 20:40:29 +0200
commiteece8f14d92f71fc12ab87c529fffc5fcc5a4e94 (patch)
tree2a0b6fce96e5acc0ee0316f889e616a7c2fcef1b /grapher/GraphWidget.hxx
parentc18a296b760df73e2c233077aa0b863f67ed725f (diff)
downloadsystemtap-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.hxx24
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