Class StripTableau
Widget for displaying a table of strip charts.
This widget acts as a container for a set of TableauItem
widgets, and acts to display a
set, or tableau, of different sets of data that might be displayed
on a StripChart
or ScaledStripChart
widget. Conceptually, the
StripTableau
may be thought of as
containing a set of channels, each of which contains some data to be
displayed. For example, each channel might contain the data from a single
strain gauge in a rosette.
To make the best use of a StripTableau
widget, the caller should set
up the metadata region of the TableauItem
s it contains. If this is done,
then the individual channels of the StripTableau
can be "minimized"
into a toolbar by clicking on each channel's close button. Channels can
be restored from the toolbar by clicking on the toolbar button
representing the channel.
To add a set of data to a StripTableau
, you would do something like
this:
>>> import gtk, striptableau
>>> hadj = gtk.Adjustment(0, 0, 100, 1, 10, 10)
>>> sel = gtk.Adjustment(-1)
>>> striptableau = striptableau.StripTableau(hadj, sel)
>>> striptableau.metawidth = 100
>>> striptableau.gradewidth = 100
>>> channel_vadj = gtk.Adjustment(-10, -20, 20, 0, 0, 20)
>>> channel_data = [ 0, 1, 2, 3, 4, 5 ]
>>> channel = striptableau.addChannel(channel_data, channel_vadj)
>>> channel.name = "My Data"
The widget is designed to work closely with the TableauItem
widget.
See Also: TableauItem
Method Summary |
|
__init__ (self,
hadjustment,
selection)
Initializes the widget. |
|
__delattr__ (self,
name,
value)
Deletes attributes. |
|
__setattr__ (self,
name,
value)
Sets attributes. |
TableauItem
|
addChannel (self,
data,
vadjustment)
Adds a channel to the widget. |
TableauItem
|
getChannel (self,
data)
Returns the TableauItem associated with a particular
channel. |
|
zoomIn (self)
Zoom in. |
|
zoomOut (self)
Zooms out. |
|
zoomSel (self)
Zoom to selection. |
|
__init_gui (self)
Does initial GUI setup for the StripTableau . |
|
__min_button_handler (self,
widget,
data)
Handles presses on the close buttons of the TableauItem
sub-widgets. |
|
__set_gradewidth (self,
value)
Sets the gradewidth of the TableauItem subwidgets. |
|
__set_hadjustment (self,
value)
Sets the hadjustment for the widget. |
|
__set_metawidth (self,
value)
Sets the metawidth of the TableauItem subwidgets. |
|
__set_selection (self,
value)
Sets the selection for the widget. |
|
__toolbar_btn_handler (self,
widget,
data)
Handles clicks on the internal toolbar buttons. |
__init__(self,
hadjustment,
selection=None)
(Constructor)
Initializes the widget.
-
- Parameters:
hadjustment -
Controls the horizontal range displayed on the widget.
(type=gtk.Adjustment )
selection -
Controls the selection displayed on the widget. Set this value
to None to disable selection or to
gtk.Adjustment(-1) to have an empty selection.
(type=gtk.Adjustment )
|
__delattr__(self,
name,
value)
Deletes attributes.
-
|
__setattr__(self,
name,
value)
Sets attributes.
-
|
addChannel(self,
data,
vadjustment=None)
Adds a channel to the widget.
Call this method to add a data channel to the StripTableau . The method returns a TableauItem object which is the
sub-widget that displays that data within the StripTableau .
-
- Parameters:
data -
Data to display. See the StripChart widget for a description
of valid data objects.
(type=Sequence object.)
vadjustment -
Vertical range control.
(type=gtk.Adjustment )
- Returns:
-
TableauItem for the channel.
(type=TableauItem )
|
zoomIn(self)
Zoom in.
This method modifies the hadjustment of the StripTableau by halving its
page_size property. This doubles the "zoom" of
the widget.
-
|
zoomOut(self)
Zooms out.
This method modifies the hadjustment of the StripTableau by doubling its
page_size property. This halves the "zoom" of
the widget. If the change to the page_size puts any part
of the view out of the lower to upper range
then this is corrected for.
-
|
__init_gui(self)
Does initial GUI setup for the StripTableau .
-
|
__min_button_handler(self,
widget,
data)
Handles presses on the close buttons of the TableauItem
sub-widgets.
-
|
__set_hadjustment(self,
value)
Sets the hadjustment for the widget.
-
|
__set_selection(self,
value)
Sets the selection for the widget.
-
|
__toolbar_btn_handler(self,
widget,
data)
Handles clicks on the internal toolbar buttons.
-
|
Instance Variable Details |
gradewidth
Width of the VGrade widgets displayed on the left of the
StripTableau .
-
- Type:
-
int
|
hadjustment
Controls the horizontal range displayed.
-
- Type:
-
gtk.Adjustment
|
metawidth
Width of the metadata region on the right of the StripTableau .
-
- Type:
-
int
|
selection
Controls the selection. Set this value to None to have no
selection or to gtk.Adjustment(-1) to have an empty
selection.
-
- Type:
-
gtk.Adjustment
|
widget
Read-only pseudo-parent widget.
-
- Type:
-
gtk.VBox
|