mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-05-12 01:25:46 +02:00
feat:added launch script
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user