Ejemplo n.º 1
0
    from openalea.oalab.gui.splittablewindow import TestMainWin
    instance = QtGui.QApplication.instance()

    if instance is None:
        app = QtGui.QApplication([])
    else:
        app = instance

    tests = [
        test_all_interfaces,
        test_all_lpy_controls,
        disp_controls,
        sample_controls
    ]

    layout = ({0: [1, 2]},
              {0: None, 1: 0, 2: 0},
              {0: {'amount': 0.4619140625, 'splitDirection': 1},
               1: {'widget': {'position': 0, 'applet': [u'ControlManager']}},
               2: {'widget': {'position': 0, 'applet': [u'ShellWidget']}}})

    mw = TestMainWin(default_layout=layout, tests=tests, layout_file='.test_control_manager.lay')

    mw.resize(1024, 768)
    mw.show()

    mw.initialize()

    if instance is None:
        app.exec_()
Ejemplo n.º 2
0
                 {'applets': [
                     {'name': u'EditorManager'}],
                  'properties': {'position': 0}}},
            12: {'widget':
                 {'applets': [
                     {'name': u'ShellWidget'},
                     {'name': u'HistoryWidget'},
                     {'name': u'HelpWidget'},
                     {'name': u'Logger'}],
                  'properties': {'position': 2}
                  }}
        }}

    def hello_world():
        print 'Hello OpenAleaLab world'

    from openalea.core.service.plugin import PIM
    PIM.debug = True
    TestMainWin.DEFAULT_LAYOUT = tissuelab_conf
    mw = TestMainWin(tests=[hello_world])

    mw.resize(1024, 768)
    mw.showMaximized()
    mw.show()
    mw.set_edit_mode(False)

    mw.initialize()

    if instance is None:
        app.exec_()