Example #1
0
def start_app(arg):
    global app
    cout("Starting GUI\n")

    if not app:
        app = QtGui.QApplication.instance()
        if not app:
            if type(arg) == list:
                app = QtGui.QApplication(arg)
            else:
                app = QtGui.QApplication(['__builtin__'])

    w = IMainWindow()

    if type(arg) == list and len(arg) >= 2:
        w.load(arg[1])
    elif type(arg) == str:
        w.load(arg)
    else:
        cout('viewing...')
        w.view(arg)
        #w.setFocus()
    w.show()
    app.exec_()

    try:
        w.hide()
        del w
    except RuntimeError:
        pass
Example #2
0
def test_tracepane():
    import sys
    import ienv

    app = QtGui.QApplication( sys.argv )
    tracedata = trace.open_trace( sys.argv[1] ).tracedata()

    pane = TracePane( tracedata, TraceView )
    pane.set_env( ienv.IEnv() )
    pane.init_layout()
    pane.set_split(4)
    pane.show()
    app.exec_()
Example #3
0
def test_sequencepane():
    import sys
    import msa
    import ienv

    app = QtGui.QApplication(sys.argv)
    msa = msa.MSA()
    msa.open(sys.argv[1])
    msa.set_type()

    pane = SequencePane(msa, SequenceView)
    pane.set_env(ienv.IEnv())
    pane.init_layout(header=RulerView(pane))
    pane.show()
    app.exec_()
Example #4
0
def test_labelpane():
    import sys
    import msa
    import ienv

    app = QtGui.QApplication(sys.argv)
    msa = msa.MSA()
    msa.open(sys.argv[1])
    msa.set_type()

    pane = LabelPane(msa, LabelView)
    pane.set_env(ienv.IEnv())
    pane.init_layout()
    pane.show()
    app.exec_()