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


Python application.TaurusApplication类代码示例

本文整理汇总了Python中taurus.qt.qtgui.application.TaurusApplication的典型用法代码示例。如果您正苦于以下问题:Python TaurusApplication类的具体用法?Python TaurusApplication怎么用?Python TaurusApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: TaurusPanelMain

def TaurusPanelMain():
    '''A launcher for TaurusPanel.'''
    # NOTE: DON'T PUT TEST CODE HERE.
    # THIS IS CALLED FROM THE LAUNCHER SCRIPT (<taurus>/scripts/tauruspanel)
    from taurus.qt.qtgui.application import TaurusApplication
    from taurus.core.util import argparse
    import sys

    parser = argparse.get_taurus_parser()
    parser.set_usage("%prog [options] [devname]")
    parser.set_description("Taurus Application inspired in Jive and Atk Panel")

    app = TaurusApplication(cmd_line_parser=parser, app_name="tauruspanel",
                            app_version=taurus.Release.version)
    args = app.get_command_line_args()
    options = app.get_command_line_options()

    w = TaurusDevPanel()

    if options.tango_host is None:
        options.tango_host = taurus.Authority().getNormalName()
    w.setTangoHost(options.tango_host)

    if len(args) == 1:
        w.setDevice(args[0])

    w.show()

    sys.exit(app.exec_())
开发者ID:cmft,项目名称:taurus,代码行数:29,代码来源:taurusdevicepanel.py

示例2: launcherButtonMain

def launcherButtonMain():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()

    # Creating button giving the widget
    # from taurus.qt.qtgui.plot import TaurusPlot
    # w = TaurusPlot()
    # form = TaurusLauncherButton(parent=None, designMode=False, widget=w,
    #                             icon='logos:taurus.png'), text='show')

    # Creating button giving the widget class name
    # form = TaurusLauncherButton(parent=None, designMode=False,
    #                             widget='TaurusPlot', icon='logos:taurus.png',
    #                             text='show')

    # Creating button using a derived class with the name widget class
    # hardcoded
    class MyButton(TaurusLauncherButton):
        _widgetClassName = 'TaurusPlot'
        _icon = 'logos:taurus.png'
        _text = 'show'
    form = MyButton()

    form.setModel('sys/tg_test/1/wave')
    form.show()
    sys.exit(app.exec_())
开发者ID:cmft,项目名称:taurus,代码行数:28,代码来源:taurusbutton.py

示例3: demo3

def demo3():
    '''simple demo including more than one widget'''

    import sys
    from taurus.qt.qtgui.application import TaurusApplication
    from taurus.qt.qtgui.display import TaurusLabel, TaurusLed
    from taurus.qt.qtgui.input import TaurusValueLineEdit, TaurusValueCheckBox

    app = TaurusApplication()

    w1 = TaurusReadWriteSwitcher(readWClass=TaurusLabel,
                                 writeWClass=TaurusValueLineEdit)
    w1.model = "sys/tg_test/1/long_scalar"

    w2 = TaurusReadWriteSwitcher(readWClass=TaurusLed,
                                 writeWClass=TaurusValueCheckBox)
    w2.model = "sys/tg_test/1/boolean_scalar"

    f = Qt.QWidget()
    f.setLayout(Qt.QVBoxLayout())
    f.layout().addWidget(w1)
    f.layout().addWidget(w2)
    f.layout().addWidget(TaurusReadWriteSwitcher())  # add non-initialized switcher
    f.show()

    sys.exit(app.exec_())
开发者ID:cmft,项目名称:taurus,代码行数:26,代码来源:abstractswitcher.py

示例4: taurusTrendMain

def taurusTrendMain():
    from taurus.qt.qtgui.extra_guiqwt.builder import make
    from taurus.qt.qtgui.application import TaurusApplication
    from guiqwt.plot import CurveDialog
    from guiqwt.tools import HRangeTool
    import taurus.core.util.argparse
    import sys

    parser = taurus.core.util.argparse.get_taurus_parser()
    parser.set_usage("%prog [options] [<model1> [<model2>] ...]")
    parser.set_description("a taurus application for plotting 1D data sets")
    parser.add_option("-x", "--x-axis-mode", dest="x_axis_mode", default='d', metavar="t|d|e",
                      help="interpret X values as timestamps (t), time deltas (d) or event numbers (e). Accepted values: t|d|e")
    parser.add_option("-b", "--buffer", dest="max_buffer_size", default='16384',
                      help="maximum number of values to be plotted (when reached, the oldest values will be discarded)")
    parser.add_option("-a", "--use-archiving",
                      action="store_true", dest="use_archiving", default=False)
    parser.add_option("--demo", action="store_true", dest="demo",
                      default=False, help="show a demo of the widget")
    app = TaurusApplication(
        cmd_line_parser=parser, app_name="taurusplot2", app_version=taurus.Release.version)
    args = app.get_command_line_args()
    options = app.get_command_line_options()

    # check & process options
    stackModeMap = dict(t='datetime', d='deltatime', e='event')
    if options.x_axis_mode.lower() not in stackModeMap:
        parser.print_help(sys.stderr)
        sys.exit(1)

    stackMode = stackModeMap[options.x_axis_mode.lower()]

    if options.demo:
        args.append('eval:rand()')

    w = CurveDialog(edit=False, toolbar=True, wintitle="Taurus Trend")

    # set archiving
    if options.use_archiving:
        raise NotImplementedError('Archiving support is not yet implemented')
        w.setUseArchiving(True)

    w.add_tool(HRangeTool)
    # w.add_tool(TaurusCurveChooserTool)
    # w.add_tool(TimeAxisTool)

    if len(args) == 0:
        parser.print_help(sys.stderr)
        sys.exit(1)

    plot = w.get_plot()
    for a in args:
        item = TaurusTrendItem(stackMode=stackMode,
                               buffersize=int(options.max_buffer_size))
        plot.add_item(item)
        item.setModel(a)

    w.show()
    sys.exit(app.exec_())
开发者ID:cmft,项目名称:taurus,代码行数:59,代码来源:curve.py

示例5: main

def main():
    """launcher of QIconCatalog"""
    import sys
    from taurus import Release
    app = TaurusApplication(app_version=Release.version)
    w = QIconCatalog()
    w.setWindowTitle('Taurus Icon Catalog')
    w.show()
    sys.exit(app.exec_())
开发者ID:cmft,项目名称:taurus,代码行数:9,代码来源:catalog.py

示例6: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    # model = ''
    panel = BaseLLRFWidget()
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:10,代码来源:basellrfwidget.py

示例7: main

def main():
    app = TaurusApplication()
    motors_list = ['motor/motctrl01/1',
                   'motor/motctrl01/2',
                   'motor/motctrl01/3',
                   'motor/motctrl01/4']
    main_window = UiMainWindow(motors_list)
    main_window.setWindowTitle('OperatorGUI')
    main_window.show()
    sys.exit(app.exec_())
开发者ID:LJBD,项目名称:studies-scada-tango-sardana-showcase,代码行数:10,代码来源:operator_gui.py

示例8: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = "ws/rf/pynutaq_1"
    panel = PolarDiag()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:polardiag.py

示例9: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = ['ws/rf/llrf-1', 'ws/rf/llrfdiags_1']
    panel = LlrfSimple()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:llrfsimple.py

示例10: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = 'ws/rf/pynutaq_1'
    panel = AutoTuningSimple()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:autotuningsimple.py

示例11: create_application

def create_application(name, parser):
    """
    Create the application and return an (application, taurusgui) tuple.

    :return: Tuple compose by a TaurusApplication and a TaurusGUI
    :rtype: tuple
    """
    app = TaurusApplication(app_name=name, cmd_line_parser=parser)
    app.setOrganizationName(ORGANIZATION)
    gui = TaurusGui()
    return app, gui
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:main.py

示例12: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = 'ws/rf/pynutaq_1'
    panel = IqLoopsSettings()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:iqloopssettings.py

示例13: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = 'ws/rf/pynutaqdiags_1'
    panel = Landau()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:landau.py

示例14: main

def main():
    from taurus.qt.qtgui.application import TaurusApplication
    app = TaurusApplication()

    w = build_gui()
    tree = TreeQObjectWidget(qobject_root=w)
    tree.show()
    #import pprint
    # pprint.pprint(get_qobject_tree_str())
    w.dumpObjectTree()
    app.exec_()
开发者ID:cmft,项目名称:taurus,代码行数:11,代码来源:tauruswidgettree.py

示例15: main

def main():
    import sys
    from taurus.qt.qtgui.application import TaurusApplication

    app = TaurusApplication()
    model = ['ws/rf/pynutaq_1', 'ws/rf/pynutaqdiags_1']
    panel = FpgaVersion()
    panel.setModel(model)
    panel.show()

    sys.exit(app.exec_())
开发者ID:amilan,项目名称:app-maxiv-llrfexpert,代码行数:11,代码来源:fpgaversion.py


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