예제 #1
0
def main(plugin_file, init=True, title='test'):
    """
    this method start a DAQ_Move object with this defined plugin as actuator
    Returns
    -------

    """
    import sys
    from qtpy import QtWidgets
    from pymodaq.daq_move.daq_move_main import DAQ_Move
    from pathlib import Path
    app = QtWidgets.QApplication(sys.argv)
    if config('style', 'darkstyle'):
        import qdarkstyle
        app.setStyleSheet(qdarkstyle.load_stylesheet())

    Form = QtWidgets.QWidget()
    prog = DAQ_Move(
        Form,
        title=title,
    )
    Form.show()
    prog.actuator = Path(plugin_file).stem[9:]
    if init:
        prog.init()

    sys.exit(app.exec_())
def main():
    import sys
    from PyQt5 import QtWidgets
    from pymodaq.daq_move.daq_move_main import DAQ_Move
    from pathlib import Path
    app = QtWidgets.QApplication(sys.argv)
    Form = QtWidgets.QWidget()
    prog = DAQ_Move(Form, title="test",)
    Form.show()
    prog.actuator = Path(__file__).stem[9:]
    prog.init()

    sys.exit(app.exec_())