Example #1
0
    def __init__(self, parent, codes, control):
        SimplePanel.__init__(self, parent)

        self.controlRepr = control

        self.butStart = self.CreateButton(label=codes.get('pCtrlStart'))
        self.butStop = self.CreateButton(label=codes.get('pCtrlStop'))

        self.rbObjectSetpoint = wx.RadioButton(self, wx.ID_ANY, codes.get('pCtrlObjSP'))
        self.rbManualSetpoint = wx.RadioButton(self, wx.ID_ANY, codes.get('pCtrlManSP'))
        self.rbRemoteControl = wx.RadioButton(self, wx.ID_ANY, codes.get('pCtrlRemCtrl'))
        self.rbRemoteControl.Disable()

        column1 = wx.BoxSizer(wx.VERTICAL)
        column1.Add(self.rbObjectSetpoint)
        column1.Add(self.rbManualSetpoint)
        column1.Add(self.rbRemoteControl)
        column2 = wx.BoxSizer(wx.HORIZONTAL)
        column2.Add(self.butStart)
        column2.Add(self.butStop)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(column1)
        sizer.AddSpacer(40)
        sizer.Add(column2)

        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=codes.get('pCtrlTitle')), wx.VERTICAL)
        comSizer.Add(sizer, flag=wx.EXPAND | wx.ALL, border=10)
        self.SetSizer(comSizer)

        self.Bind(wx.EVT_RADIOBUTTON, self.OnObjSetpointRadBut, id=self.rbObjectSetpoint.GetId())
        self.Bind(wx.EVT_RADIOBUTTON, self.OnManSetpointRadBut, id=self.rbManualSetpoint.GetId())
        self.Bind(wx.EVT_BUTTON, self.OnBtnStart, self.butStart)
        self.Bind(wx.EVT_BUTTON, self.OnBtnStop, self.butStop)
Example #2
0
    def __init__(self, parent, id, codes, resources):
        SimplePanel.__init__(self, parent, id)

        self._setpoint = resources.getSetPoint()

        captions = self.CreateCaptionPanel(codes)
        fields = self.CreateFieldsPanel()
        controls = self.CreateControlPanel(codes)

        sizer = wx.FlexGridSizer(1, 3, 5, 5)
        sizer.Add(captions, flag=wx.EXPAND | wx.RIGHT, border=10)
        sizer.Add(fields, flag=wx.EXPAND | wx.RIGHT, border=20)
        sizer.Add(controls, flag=wx.EXPAND)

        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=codes.get('pSetpoint')), wx.VERTICAL)
        comSizer.Add(sizer, flag=wx.EXPAND | wx.ALL, border=10)
        self.SetSizer(comSizer)
        self.Hide()

        self.Bind(wx.EVT_SHOW, self.OnShow)
        self.Bind(wx.EVT_BUTTON, self.OnButtonUp, self.butIncRA)
        self.Bind(wx.EVT_BUTTON, self.OnButtonDown, self.butDecRA)
        self.Bind(wx.EVT_BUTTON, self.OnButtonLeft, self.butDecDEC)
        self.Bind(wx.EVT_BUTTON, self.OnButtonRight, self.butIncDEC)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.OnButtonSelHour, self.butSelHour)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.OnButtonSelMin, self.butSelMin)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.OnButtonSelSec, self.butSelSec)
Example #3
0
 def __init__(self, parent, id, codes):
     SimplePanel.__init__(self, parent, id)
     self.codes = codes
     comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=codes.get("pObject")), wx.VERTICAL)
     comSizer.Add(self.CreateCoordinatesGrid(codes), flag=wx.ALL, border=10)
     comSizer.Add(wx.StaticLine(self, wx.ID_ANY, style=wx.LI_HORIZONTAL), flag=wx.ALL | wx.EXPAND)
     comSizer.Add(self.CreateBottomPanel(codes), flag=wx.ALL | wx.EXPAND)
     self.SetSizer(comSizer)
Example #4
0
    def __init__(self, parent, codes, tsStatus):
        SimplePanel.__init__(self, parent)

        sizer = wx.GridSizer(0, 2, 5, 5)

        self._codes = codes
        self._statusRepr = tsStatus
        labels = self._statusRepr.getLabels()
        self._fields = self._addFields(sizer, labels)

        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=self._codes.get('pStatus')), wx.VERTICAL)
        comSizer.Add(sizer, flag=wx.ALL | wx.EXPAND, border=10)
        self.SetSizer(comSizer)
Example #5
0
    def __init__(self, parent, codes, mode):
        SimplePanel.__init__(self, parent)

        self._codes = codes
        self._mode = mode

        sizer = wx.GridSizer(0, 2, 5, 10)

        labels = self._mode.getLabels()
        self._fields = self._addFields(sizer, labels)

        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=self._codes.get('pTelescope')), wx.VERTICAL)
        comSizer.Add(sizer, flag=wx.ALL | wx.EXPAND, border=10)
        self.SetSizer(comSizer)
Example #6
0
    def __init__(self, parent, id=wx.ID_ANY, codes=None):
        SimplePanel.__init__(self, parent, id)

        pPosSizer = wx.GridSizer(4, 3, 5, 10)

        self.curHA = self.CreateField()
        self.taskHA = self.CreateField()
        self.curRA = self.CreateField()
        self.taskRA = self.CreateField()
        self.curDEC = self.CreateField()
        self.taskDEC = self.CreateField()
        self.curFocus = self.CreateField()
        self.curDome = self.CreateField()
        self.taskDome = self.CreateField()

        pPosSizer.Add(self.CreateField())
        pPosSizer.Add(self.CreateCaption(codes.get('pPosCur')), flag=wx.ALL | wx.ALIGN_CENTER_HORIZONTAL)
        pPosSizer.Add(self.CreateCaption(codes.get('pPosEnd')), flag=wx.ALL | wx.ALIGN_CENTER_HORIZONTAL)

        pPosSizer.Add(self.CreateCaption(codes.get('pPosHA')), flag=wx.ALL | wx.ALIGN_RIGHT)
        pPosSizer.Add(self.curHA, flag=wx.ALL | wx.ALIGN_CENTER)
        pPosSizer.Add(self.taskHA, flag=wx.ALL | wx.ALIGN_CENTER)

        pPosSizer.Add(self.CreateCaption(codes.get('pPosRA')), flag=wx.ALL | wx.ALIGN_RIGHT)
        pPosSizer.Add(self.curRA, flag=wx.ALL | wx.ALIGN_CENTER)
        pPosSizer.Add(self.taskRA, flag=wx.ALL | wx.ALIGN_CENTER)

        pPosSizer.Add(self.CreateCaption(codes.get('pPosDEC')), flag=wx.ALL | wx.ALIGN_RIGHT)
        pPosSizer.Add(self.curDEC, flag=wx.ALL | wx.ALIGN_CENTER)
        pPosSizer.Add(self.taskDEC, flag=wx.ALL | wx.ALIGN_CENTER)

        pPosSizer.Add(self.CreateCaption(codes.get('pPosFoc')), flag=wx.ALL | wx.ALIGN_RIGHT)
        pPosSizer.Add(self.curFocus, flag=wx.ALL | wx.ALIGN_CENTER)
        pPosSizer.Add(self.CreateField())

        pPosSizer.Add(self.CreateCaption(codes.get('pPosDome')), flag=wx.ALL | wx.ALIGN_RIGHT)
        pPosSizer.Add(self.curDome, flag=wx.ALL | wx.ALIGN_CENTER)
        pPosSizer.Add(self.taskDome, flag=wx.ALL | wx.ALIGN_CENTER)

        #Positioning panel sizer
        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=codes.get('pPos')), wx.VERTICAL)
        comSizer.Add(pPosSizer, flag=wx.ALL, border=10)

        self.SetSizer(comSizer)
Example #7
0
    def __init__(self, parent, id=wx.ID_ANY, codes=None):
        SimplePanel.__init__(self, parent, id)

        sizer = wx.GridSizer(4, 2, 5, 10)

        self.LT = self.CreateField()
        self.UTC = self.CreateField()
        self.JD = self.CreateField()
        self.LST = self.CreateField()

        sizer.Add(self.CreateCaption(codes.get('pTimeLT')), flag=wx.ALL | wx.ALIGN_RIGHT)
        sizer.Add(self.LT, flag=wx.ALL | wx.EXPAND | wx.CENTER)
        sizer.Add(self.CreateCaption(codes.get('pTimeUTC')), flag=wx.ALL | wx.ALIGN_RIGHT)
        sizer.Add(self.UTC, flag=wx.ALL | wx.EXPAND | wx.CENTER)
        sizer.Add(self.CreateCaption(codes.get('pTimeJD')), flag=wx.ALL | wx.ALIGN_RIGHT)
        sizer.Add(self.JD, flag=wx.ALL | wx.EXPAND | wx.CENTER)
        sizer.Add(self.CreateCaption(codes.get('pTimeLST')), flag=wx.ALL | wx.ALIGN_RIGHT)
        sizer.Add(self.LST, flag=wx.ALL | wx.EXPAND | wx.CENTER)

        comSizer = wx.StaticBoxSizer(wx.StaticBox(self, label=codes.get('pTime')), wx.VERTICAL)
        comSizer.Add(sizer, flag=wx.ALL | wx.EXPAND, border=10)
        self.SetSizer(comSizer)
        self.SetMinSize((290, -1))