COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
imu_stream_plot2.BoundControlBox Class Reference
Inheritance diagram for imu_stream_plot2.BoundControlBox:
Collaboration diagram for imu_stream_plot2.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_plot2.BoundControlBox.__init__ (   self,
  parent,
  ID,
  label,
  initval 
)
71  def __init__(self, parent, ID, label, initval):
72  wx.Panel.__init__(self, parent, ID)
73 
74  self.value = initval
75 
76  box = wx.StaticBox(self, -1, label)
77  sizer = wx.StaticBoxSizer(box, wx.VERTICAL)
78 
79  self.radio_auto = wx.RadioButton(self, -1,
80  label="Auto", style=wx.RB_GROUP)
81  self.radio_manual = wx.RadioButton(self, -1,
82  label="Manual")
83  self.manual_text = wx.TextCtrl(self, -1,
84  size=(35,-1),
85  value=str(initval),
86  style=wx.TE_PROCESS_ENTER)
87 
88  self.Bind(wx.EVT_UPDATE_UI, self.on_update_manual_text, self.manual_text)
89  self.Bind(wx.EVT_TEXT_ENTER, self.on_text_enter, self.manual_text)
90 
91  manual_box = wx.BoxSizer(wx.HORIZONTAL)
92  manual_box.Add(self.radio_manual, flag=wx.ALIGN_CENTER_VERTICAL)
93  manual_box.Add(self.manual_text, flag=wx.ALIGN_CENTER_VERTICAL)
94 
95  sizer.Add(self.radio_auto, 0, wx.ALL, 10)
96  sizer.Add(manual_box, 0, wx.ALL, 10)
97 
98  self.SetSizer(sizer)
99  sizer.Fit(self)
100 
const string & str
Definition: json11.cpp:360

Member Function Documentation

def imu_stream_plot2.BoundControlBox.on_update_manual_text (   self,
  event 
)
101  def on_update_manual_text(self, event):
102  self.manual_text.Enable(self.radio_manual.GetValue())
103 
def imu_stream_plot2.BoundControlBox.on_text_enter (   self,
  event 
)
104  def on_text_enter(self, event):
105  self.value = self.manual_text.GetValue()
106 
def imu_stream_plot2.BoundControlBox.is_auto (   self)
107  def is_auto(self):
108  return self.radio_auto.GetValue()
109 
def imu_stream_plot2.BoundControlBox.manual_value (   self)
110  def manual_value(self):
111  return self.value
112 
113 

Member Data Documentation

imu_stream_plot2.BoundControlBox.value
imu_stream_plot2.BoundControlBox.radio_auto
imu_stream_plot2.BoundControlBox.radio_manual
imu_stream_plot2.BoundControlBox.manual_text

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