當前位置: 首頁>>代碼示例>>Python>>正文


Python panel.Panel類代碼示例

本文整理匯總了Python中panel.Panel的典型用法代碼示例。如果您正苦於以下問題:Python Panel類的具體用法?Python Panel怎麽用?Python Panel使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Panel類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

    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,代碼行數:30,代碼來源:lt2_coordinator.py

示例2: __init__

 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,代碼行數:7,代碼來源:statusbar.py

示例3: __init__

    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,代碼行數:27,代碼來源:example_panel.py

示例4: __init__

    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,代碼行數:25,代碼來源:lt2_coordinator_panel.py

示例5: __init__

    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,代碼行數:28,代碼來源:cavity_laser_scan_panel.py

示例6: __init__

    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,代碼行數:7,代碼來源:command0r_panel.py

示例7: __init__

    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,代碼行數:26,代碼來源:counters.py

示例8: __init__

    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,代碼行數:29,代碼來源:optimize2d_panel.py

示例9: __init__

	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,代碼行數:9,代碼來源:consolePanel.py

示例10: _instrument_changed

    def _instrument_changed(self, changes):
        Panel._instrument_changed(self, changes)

        if 'data_reset' in changes or 'data_update' in changes:
            self._replot()

        for k in ['x_position', 'y_position']:
            if k in changes:
                self.position[k] = changes[k]
開發者ID:machielblok,項目名稱:qtlab-user-diamond-master,代碼行數:9,代碼來源:scan2d.py

示例11: __init__

 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,代碼行數:11,代碼來源:expedition_widget.py

示例12: __init__

    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,代碼行數:12,代碼來源:counts_v2_panel.py

示例13: appendPanelElement

 def appendPanelElement(self, panelElement):
     '''
     Append an element to the first panel that has room
     if there is no free spot create a panel and put the element inside
     '''
     for panel in self.panels:
         if panel.appendPanelElement(panelElement):
             break
     else:
         panel = Panel(1)
         self.panels.append(panel)
         return panel.appendPanelElement(panelElement)
     return True
開發者ID:MobileWebApps,項目名稱:splunk-search-tools-app,代碼行數:13,代碼來源:row.py

示例14: __init__

    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,代碼行數:14,代碼來源:lt1_coordinator.py

示例15: main

def main():
    lMonitors = parseMonitors()

    config = Configuration("test.conf")
    panel_threads = []

    # only handling 'all' case for now.
    if config.location['monitor'] == 'all':
        for m in lMonitors:
            p = Panel(config)
            p.launch(m)
            t = threading.Thread(target=p.run, kwargs={'monitor': m})
            t.start()

    pass
開發者ID:Nilocshot,項目名稱:lemonade,代碼行數:15,代碼來源:lemonade.py


注:本文中的panel.Panel類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。