COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
imu_stream_plot.BoundControlBox Class Reference
Inheritance diagram for imu_stream_plot.BoundControlBox:
Collaboration diagram for imu_stream_plot.BoundControlBox:

Public Member Functions

def __init__ (self, parent, ID, label, initval)
 
def on_update_manual_text (self, event)
 
def on_text_enter (self, event)
 
def is_auto (self)
 
def manual_value (self)
 

Public Attributes

 value
 
 radio_auto
 
 radio_manual
 
 manual_text
 

Detailed Description

A static box with a couple of radio buttons and a text
    box. Allows to switch between an automatic mode and a 
    manual mode with an associated value.

Constructor & Destructor Documentation

def imu_stream_plot.BoundControlBox.__init__ (   self,
  parent,
  ID,
  label,
  initval 
)
77  def __init__(self, parent, ID, label, initval):
78  wx.Panel.__init__(self, parent, ID)
79 
80  self.value = initval
81 
82  box = wx.StaticBox(self, -1, label)
83  sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
84 
85  self.radio_auto = wx.RadioButton(self, -1,
86  label="Auto", style=wx.RB_GROUP)
87  self.radio_manual = wx.RadioButton(self, -1,
88  label="Manual")
89  self.manual_text = wx.TextCtrl(self, -1,
90  size=(35,-1),
91  value=str(initval),
92  style=wx.TE_PROCESS_ENTER)
93 
94  self.Bind(wx.EVT_UPDATE_UI, self.on_update_manual_text, self.manual_text)
95  self.Bind(wx.EVT_TEXT_ENTER, self.on_text_enter, self.manual_text)
96 
97  manual_box = wx.BoxSizer(wx.HORIZONTAL)
98  manual_box.Add(self.radio_manual, flag=wx.ALIGN_CENTER_VERTICAL)
99  manual_box.Add(self.manual_text, flag=wx.ALIGN_CENTER_VERTICAL)
100 
101  sizer.Add(self.radio_auto, 0, wx.ALL, 10)
102  sizer.Add(manual_box, 0, wx.ALL, 10)
103 
104  self.SetSizer(sizer)
105  sizer.Fit(self)
106 
const string & str
Definition: json11.cpp:360

Member Function Documentation

def imu_stream_plot.BoundControlBox.on_update_manual_text (   self,
  event 
)
107  def on_update_manual_text(self, event):
108  self.manual_text.Enable(self.radio_manual.GetValue())
109 
def imu_stream_plot.BoundControlBox.on_text_enter (   self,
  event 
)
110  def on_text_enter(self, event):
111  self.value = self.manual_text.GetValue()
112 
def imu_stream_plot.BoundControlBox.is_auto (   self)
113  def is_auto(self):
114  return self.radio_auto.GetValue()
115 
def imu_stream_plot.BoundControlBox.manual_value (   self)
116  def manual_value(self):
117  return self.value
118 
119 

Member Data Documentation

imu_stream_plot.BoundControlBox.value
imu_stream_plot.BoundControlBox.radio_auto
imu_stream_plot.BoundControlBox.radio_manual
imu_stream_plot.BoundControlBox.manual_text

The documentation for this class was generated from the following file: