当前位置: 首页>>代码示例>>Python>>正文


Python Panel.__init__方法代码示例

本文整理汇总了Python中panel.Panel.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Panel.__init__方法的具体用法?Python Panel.__init__怎么用?Python Panel.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在panel.Panel的用法示例。


在下文中一共展示了Panel.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui  
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        # set values from instruments
        # Front
        self.ui.z.setValue(self._ins.get_mos_z())
        self.ui.z_slider.setValue(int(self._ins.get_mos_z()*10))

        # Back
        #self.ui.back_z.setValue(self._ins.get_mos_back_z())
        #self.ui.back_z_slider.setValue(int(self._ins.get_mos_back_z()*10))

        # Stage
        self.ui.x.setValue(self._ins.get_mos_x())
        self.ui.y.setValue(self._ins.get_mos_y())

        # Back
        #self.ui.back_x.setValue(self._ins.get_mos_rearsm_x())
        #self.ui.back_y.setValue(self._ins.get_mos_rearsm_y())

        # Detsm
        #self.ui.detsm_x.setValue(self._ins.get_mos_detsm_x())
        #self.ui.detsm_y.setValue(self._ins.get_mos_detsm_y())

        # Other
        self.ui.keyword.setText(self._ins.get_keyword())
开发者ID:AdriaanRol,项目名称:measurement,代码行数:32,代码来源:lt2_coordinator.py

示例2: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui:
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        for p in [self.ui.plot1, self.ui.plot2]:
            p.left_axis.title = 'counts [Hz]'
            p.plot.padding = 5
            p.plot.padding_bottom = 30
            p.plot.padding_left = 100
            plot = p.plot.plots['trace'][0]
            plot.padding = 0
            plot.color = 'green'
            plot.marker = 'circle'
            plot.marker_size = 3
            

        for c in [self.ui.counts1, self.ui.counts2]:
            c.setText('0.0')

        # set other defaults
        self.ui.plot1.display_time = 20
        self.ui.plot2.display_time = 20
        self.ui.t_range.setValue(20)
开发者ID:AdriaanRol,项目名称:measurement,代码行数:28,代码来源:counters.py

示例3: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # UI
        self.ui = Ui_Panel()
        self.ui.setupUi(self, evalfunc=self._ins.evaluate,
                execfunc=self._ins.execute)
开发者ID:AdriaanRol,项目名称:measurement,代码行数:9,代码来源:command0r_panel.py

示例4: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.scan_length.setValue(self._ins.get_scan_length())
        self.ui.pixel_time.setValue(self._ins.get_pixel_time())
        self.ui.nr_of_points.setValue(self._ins.get_nr_of_points())
        self.ui.gaussian_fit.setChecked(self._ins.get_gaussian_fit())
        self.ui.counter.setValue(self._ins.get_counter())

        self.ui.scan_length.valueChanged.connect(self._set_scan_length)
        self.ui.pixel_time.valueChanged.connect(self._set_pixel_time)
        self.ui.nr_of_points.valueChanged.connect(self._set_nr_of_points)
        self.ui.gaussian_fit.toggled.connect(self._set_gaussian_fit)
        self.ui.counter.valueChanged.connect(self._set_counter)

        self.ui.start.pressed.connect(self._start)

        # set up plot
        for p in self.ui.xplot, self.ui.yplot:
            p.bottom_axis.title = 'x [um]'
            p.left_axis.title = 'counts [Hz]'
            p.plot.padding = 5
            p.plot.padding_bottom = 30
            p.plot.padding_left = 70
        self.ui.yplot.bottom_axis.title = 'y [um]'
开发者ID:AdriaanRol,项目名称:measurement,代码行数:31,代码来源:optimize2d_panel.py

示例5: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.doubleSpinBox_start_F.setValue(self._ins.get_doubleSpinBox_start_F())
        self.ui.doubleSpinBox_stop_f.setValue(self._ins.get_doubleSpinBox_stop_f())
        self.ui.doubleSpinBox_step_f.setValue(self._ins.get_doubleSpinBox_step_f())
        self.ui.doubleSpinBox_coarse_wav.setValue(self._ins.get_doubleSpinBox_coarse_wav())
        self.ui.doubleSpinBox_int_time.setValue(self._ins.get_doubleSpinBox_int_time())

        self.ui.doubleSpinBox_start_F.valueChanged.connect(self._set_doubleSpinBox_start_F)
        self.ui.doubleSpinBox_stop_f.valueChanged.connect(self._set_doubleSpinBox_stop_f)
        self.ui.doubleSpinBox_step_f.valueChanged.connect(self._set_doubleSpinBox_step_f)
        self.ui.doubleSpinBox_coarse_wav.valueChanged.connect(self._set_doubleSpinBox_coarse_wav)
        self.ui.doubleSpinBox_int_time.valueChanged.connect(self._set_doubleSpinBox_int_time)

        self.ui.start_scan_button.pressed.connect(self._start_scan_button)
        self.ui.stop_scan_button.pressed.connect(self._stop_scan_button)
        self.ui.save_scan_button.pressed.connect(self._save_scan_button)

        self.ui.plot.bottom_axis.title = 'frequency [GHz]'
        self.ui.plot.left_axis.title = 'intensity'
        self.ui.plot.plot.padding = 5
        #self.ui.plot.plot.padding_bottom = 30
        self.ui.plot.plot.padding_left = 70
开发者ID:teamdiamond,项目名称:cyclops_cavity,代码行数:30,代码来源:cavity_laser_scan_panel.py

示例6: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.keyword.setText(self._ins.get_keyword())
        self.ui.x.setValue(self._ins.get_x())
        self.ui.y.setValue(self._ins.get_y())
        self.ui.z.setValue(self._ins.get_z())
        self.ui.z_slider.setValue(self._ins.get_z_slider())
        self.ui.step.setValue(self._ins.get_step())

        self.ui.keyword.textEdited.connect(self._set_keyword)
        self.ui.x.valueChanged.connect(self._set_x)
        self.ui.y.valueChanged.connect(self._set_y)
        self.ui.z.valueChanged.connect(self._set_z)
        self.ui.z_slider.sliderMoved.connect(self._set_z_slider)
        self.ui.step.valueChanged.connect(self._set_step)

        self.ui.step_up.pressed.connect(self._step_up)
        self.ui.step_left.pressed.connect(self._step_left)
        self.ui.step_right.pressed.connect(self._step_right)
        self.ui.step_down.pressed.connect(self._step_down)
开发者ID:AdriaanRol,项目名称:measurement,代码行数:27,代码来源:lt2_coordinator_panel.py

示例7: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.test_value.setValue(self._ins.get_test_value())
        self.ui.float_test_value.setValue(self._ins.get_float_test_value())
        self.ui.string_test_value.setText(self._ins.get_string_test_value())
        self.ui.slider_value.setValue(self._ins.get_slider_value())
        self.ui.check_value.setChecked(self._ins.get_check_value())
        self.ui.radio1.setChecked(self._ins.get_radio1())
        self.ui.radio2.setChecked(self._ins.get_radio2())
        self.ui.radio3.setChecked(self._ins.get_radio3())

        self.ui.test_value.valueChanged.connect(self._set_test_value)
        self.ui.float_test_value.valueChanged.connect(self._set_float_test_value)
        self.ui.string_test_value.textEdited.connect(self._set_string_test_value)
        self.ui.slider_value.sliderMoved.connect(self._set_slider_value)
        self.ui.check_value.toggled.connect(self._set_check_value)
        self.ui.radio1.toggled.connect(self._set_radio1)
        self.ui.radio2.toggled.connect(self._set_radio2)
        self.ui.radio3.toggled.connect(self._set_radio3)

        self.ui.do_something.pressed.connect(self._do_something)
        self.ui.do_something_else.pressed.connect(self._do_something_else)
开发者ID:teamdiamond,项目名称:cyclops,代码行数:29,代码来源:example_panel.py

示例8: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
 def __init__(self, parent, **kwargs):
     Panel.__init__(self, parent, top=parent.height-30, left=0, width=parent.width, height=30)
     self.border_style = BORDER_LOWERED
     self._grip = TkSizeGrip(self._ctrl)
     self._grip.pack(side=RIGHT, fill=Y)
     # TODO: fix bug when toggling packed objects visibility (need to know original setup to reposition)
     self.align = ALIGN_BOTTOM
开发者ID:todd-x86,项目名称:tkplus,代码行数:9,代码来源:statusbar.py

示例9: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
	def __init__(self):
		
		self.console = None
		self.outText = None
		self.inText = None
		self.outTextScroller = None
		self.nestedInputPanel = None
		self.directoryText = None
		Panel.__init__(self, "insets 0 0 0 0")
开发者ID:doctorOb,项目名称:bashED,代码行数:11,代码来源:consolePanel.py

示例10: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
 def __init__(self, x, y, expedition):
     Panel.__init__(self, x, y, 200, 80)
     self.expedition = expedition
     self.specialists_label = Label(0, 0, "Workers/Warriors: %d/%d" % (expedition.workers, expedition.warriors))
     self.people_label = Label(0, 20, "Population: %d" % expedition.people)
     self.destination_label = Label(0, 40, "Destination: (%d, %d)" % (expedition.path[0].x, expedition.path[0].y))
     self.regularity_label = Label(0, 60, "Regular: %s" % ("Yes" if expedition.regular else "No"))
     self.add(self.specialists_label)
     self.add(self.people_label)
     self.add(self.destination_label)
     self.add(self.regularity_label)
开发者ID:trid,项目名称:anticivilization,代码行数:13,代码来源:expedition_widget.py

示例11: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.t_range.setValue(self._ins.get_t_range())
        self.ui.integration_time.setValue(self._ins.get_integration_time())

        self.ui.t_range.valueChanged.connect(self._set_t_range)
        self.ui.integration_time.valueChanged.connect(self._set_integration_time)
开发者ID:AdriaanRol,项目名称:measurement,代码行数:14,代码来源:counts_v2_panel.py

示例12: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        
        self.ui.x.setValue(self._ins.get_mos_x())
        self.ui.y.setValue(self._ins.get_mos_y())
        self.ui.z.setValue(self._ins.get_mos_z())
        self.ui.z_slider.setValue(int(self._ins.get_mos_z()*10))

        self.ui.keyword.setText(self._ins.get_keyword())
开发者ID:AdriaanRol,项目名称:measurement,代码行数:16,代码来源:lt1_coordinator.py

示例13: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
  def __init__ (self, *args, **kwargs):
    Panel.__init__ (self, *args, **kwargs)
    self.parent = args[0]

    self.sizer = wx.BoxSizer (wx.VERTICAL) 
    self.textctrl = outputctrl.OutputCtrl(self, style=wx.TE_MULTILINE|wx.TE_AUTO_SCROLL)
    self.sizer.Add (self.textctrl, -1, wx.EXPAND, 0)

    # clear button

    self.btnClear = wx.Button (self, 0, label="Ausgabe leeren")
    self.sizer.Add (self.btnClear)
    self.Bind (wx.EVT_BUTTON, self.onClear, self.btnClear)

    self.SetSizer (self.sizer)
    self.Layout ()
开发者ID:escaped,项目名称:EasyClimatePlot,代码行数:18,代码来源:outputpanel.py

示例14: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.AOM_on_ADwin.setChecked(self._ins.get_AOMonADwin())
        self.ui.LT_settings.setChecked(self._ins.get_LT_settings())
        self.ui.TemperatureA.setValue(self._ins.get_TemperatureA())
        self.ui.TemperatureB.setValue(self._ins.get_TemperatureB())
        self.ui.z_Position.setValue(self._ins.get_z_Position())
        if self._ins.get_LT_settings() == 0:
            self.ui.z_Position_Slider.setValue(self.ui.z_Position.value() * 1000 / 24)
        else:
            self.ui.z_Position_Slider.setValue(self.ui.z_Position.value() * 1000 / 15)

        self.ui.BlockMillennia.clicked.connect(self.BlockMillennia)
        self.ui.UnblockMillennia.clicked.connect(self.UnblockMillennia)
        self.ui.BlockChA.clicked.connect(self.BlockChA)
        self.ui.UnblockChA.clicked.connect(self.UnblockChA)
        self.ui.BlockChB.clicked.connect(self.BlockChB)
        self.ui.UnblockChB.clicked.connect(self.UnblockChB)
        self.ui.BlockNewFocus.clicked.connect(self.BlockNewFocus)
        self.ui.UnblockNewFocus.clicked.connect(self.UnblockNewFocus)
        self.ui.PowermeterIn.clicked.connect(self.PowermeterIn)
        self.ui.PowermeterOut.clicked.connect(self.PowermeterOut)
        self.ui.FlipBeamPath.clicked.connect(self.FlipBeamPath)
        self.ui.DefaultSettings.clicked.connect(self.DefaultSettings)
        self.ui.SetPowerGreen.clicked.connect(self.SetPowerGreen)
        self.ui.GetPowerGreen.clicked.connect(self.GetPowerGreen)
        self.ui.CalibrateGreenAOM.clicked.connect(self.CalibrateGreenAOM)
        self.ui.SetPowerRed.clicked.connect(self.SetPowerRed)
        self.ui.GetPowerRed.clicked.connect(self.GetPowerRed)
        self.ui.CalibrateRedAOM.clicked.connect(self.CalibrateRedAOM)
        self.ui.AttocubeUp.clicked.connect(self.AttocubeUp)
        self.ui.AttocubeDown.clicked.connect(self.AttocubeDown)
        self.ui.PiezoMirrorPlus.clicked.connect(self.PiezoMirrorPlus)
        self.ui.PiezoMirrorMinus.clicked.connect(self.PiezoMirrorMinus)
        self.ui.PiezoMirrorMax.clicked.connect(self.PiezoMirrorMax)
        self.ui.AOM_on_ADwin.stateChanged.connect(self.AOM_on_ADwin_Changed)
        self.ui.LT_settings.stateChanged.connect(self.LT_settings_Changed)
        self.ui.OptimizeXY.clicked.connect(self.OptimizeXY)
        self.ui.OptimizeZ.clicked.connect(self.OptimizeZ)
        self.ui.z_Position_Slider.valueChanged.connect(self.z_Position_Changed)
        self.ui.GetTemperatureA.clicked.connect(self.GetTemperatureA)
        self.ui.GetTemperatureB.clicked.connect(self.GetTemperatureB)
开发者ID:wpfff,项目名称:teamdiamond_measuring,代码行数:49,代码来源:setup.py

示例15: __init__

# 需要导入模块: from panel import Panel [as 别名]
# 或者: from panel.Panel import __init__ [as 别名]
    def __init__(self, parent, *arg, **kw):
        Panel.__init__(self, parent, *arg, **kw)

        # designer ui
        self.ui = Ui_Panel()
        self.ui.setupUi(self)

        self.ui.doubleSpinBox_start_F.setValue(self._ins.get_doubleSpinBox_start_F())
        self.ui.doubleSpinBox_stop_f.setValue(self._ins.get_doubleSpinBox_stop_f())
        self.ui.doubleSpinBox_step_f.setValue(self._ins.get_doubleSpinBox_step_f())

        self.ui.doubleSpinBox_start_F.valueChanged.connect(self._set_doubleSpinBox_start_F)
        self.ui.doubleSpinBox_stop_f.valueChanged.connect(self._set_doubleSpinBox_stop_f)
        self.ui.doubleSpinBox_step_f.valueChanged.connect(self._set_doubleSpinBox_step_f)

        self.ui.start_scan_button.pressed.connect(self._start_scan_button)
        self.ui.stop_scan_button.pressed.connect(self._stop_scan_button)
        self.ui.save_scan_button.pressed.connect(self._save_scan_button)
开发者ID:teamdiamond,项目名称:cyclops,代码行数:20,代码来源:example2_panel.py


注:本文中的panel.Panel.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。