From 5891de489db0e172162279247fb633a719fa3756 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 7 Dec 2009 12:43:56 +0100 Subject: option to display graph times relative to the start time This avoids having humongous numbers displayed on the graphs' x axis. Also, the dialog for adding a data set to a graph was cleaned up. * grapher/graph-dialog.glade: Add check box for display of relative time and a label for the data set list. Force the list of data sets to be larger. * grapher/Graph.hxx (_timeBase): new member * grapher/Graph.cxx (draw): Subtract _timeBase from displayed time value. * grapher/GraphWidget.hxx (DataModelColumns): Add a column for a data set's title, which is optional at the moment. * grapher/GraphWidget.hxx (_globalTimeBase, _timeBaseInitialized, _relativeTimesButton, _displayRelativeTimes): new members * grapher/GraphWidget.hxx (GraphWidget): Hook up check button for displaying relative time. (on_expose_event): Determine base time if needed; set base time in graphs. (onDataDialogOpen): Insert graph data set's name (key) and title into the list of data sets. --- grapher/graph-dialog.glade | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'grapher/graph-dialog.glade') diff --git a/grapher/graph-dialog.glade b/grapher/graph-dialog.glade index cca2e0e3..85c10128 100644 --- a/grapher/graph-dialog.glade +++ b/grapher/graph-dialog.glade @@ -66,6 +66,31 @@ + + + True + Data sets + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + True @@ -83,6 +108,8 @@ + 200 + 100 True True False @@ -159,6 +186,25 @@ True + + + + True + True + Display relative times + True + GTK_RELIEF_NORMAL + True + True + False + True + + + 0 + False + False + + -- cgit From b930d6ec364e35bb04a0860b1a5f2fbdee6effe3 Mon Sep 17 00:00:00 2001 From: Tim Moore Date: Mon, 7 Dec 2009 16:50:44 +0100 Subject: Change data set list display to use a check box for inclusion in a graph Incidently, this supports removing a data set from a graph. Also, remove the Add, Remove, and Cancel buttons from the data set dialog. * grapher/GraphWidget.hxx (DataModelColumns::_dataEnabled): new member _listConnection: new member * grapher/GraphWidget.cxx (GraphWidget): Delete connections for removed buttons. Connect to dialog show and hide signals instead of map. Add "Enabled" column to dialog list. (onDataAdd, onDataRemove): delete (onDataDialogOpen): Initialize list store with all data sets and hook up row_changed signal (onDataDialogClose, onRowChanged): new functions * grapher/graph-dialog.glade: Remove obsolete buttons (Add, Remove, Cancel). --- grapher/graph-dialog.glade | 71 ++-------------------------------------------- 1 file changed, 3 insertions(+), 68 deletions(-) (limited to 'grapher/graph-dialog.glade') diff --git a/grapher/graph-dialog.glade b/grapher/graph-dialog.glade index 85c10128..8076d2b0 100644 --- a/grapher/graph-dialog.glade +++ b/grapher/graph-dialog.glade @@ -31,29 +31,15 @@ GTK_BUTTONBOX_END - + True True True - gtk-cancel + gtk-close True GTK_RELIEF_NORMAL True - -6 - - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 + -7 @@ -128,57 +114,6 @@ True - - - - True - False - 0 - - - - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - 0 - False - False - - - - - - - - - 0 - False - False - - 0 -- cgit