feat:added launch script

This commit is contained in:
2024-06-17 16:43:09 +02:00
parent f9b3e6264e
commit 768acba338
2 changed files with 34 additions and 4 deletions
+4 -4
View File
@@ -8,12 +8,12 @@ import bec_widgets
def main():
os.environ["PYSIDE_DESIGNER_PLUGINS"] = os.path.join(
"/Users/janwyzula/PSI/bec_widgets/bec_widgets/plugin"
)
# os.environ["PYSIDE_DESIGNER_PLUGINS"] = os.path.join(
# os.path.dirname(bec_widgets.__file__), "widgets/motor_control/selection"
# "/Users/janwyzula/PSI/bec_widgets/bec_widgets/plugin"
# )
os.environ["PYSIDE_DESIGNER_PLUGINS"] = os.path.join(
os.path.dirname(bec_widgets.__file__), "widgets/motor_control/selection"
)
# os.environ["PYTHONFRAMEWORKPREFIX"] = os.path.join(
# os.path.dirname(bec_widgets.__file__), "widgets/motor_control/selection"
# )
@@ -0,0 +1,30 @@
import qdarktheme
from qtpy.QtWidgets import QApplication
from bec_widgets.utils.bec_dispatcher import BECDispatcher
from bec_widgets.widgets.motor_control.selection.selection import MotorControlSelection
CONFIG_DEFAULT = {
"motor_control": {
"motor_x": "samx",
"motor_y": "samy",
"step_size_x": 3,
"step_size_y": 5,
"precision": 4,
"step_x_y_same": False,
"move_with_arrows": False,
}
}
if __name__ == "__main__":
bec_dispatcher = BECDispatcher()
# BECclient global variables
client = bec_dispatcher.client
client.start()
app = QApplication([])
qdarktheme.setup_theme("auto")
motor_control = MotorControlSelection(client=client, config=CONFIG_DEFAULT)
window = motor_control
window.show()
app.exec()