update probe basic
This commit is contained in:
@@ -9,8 +9,9 @@ from qtpy.QtWidgets import QWidget, QPushButton
|
||||
from qtpyvcp.actions import machine_actions
|
||||
from qtpyvcp.plugins import getPlugin
|
||||
from qtpyvcp.utilities import logger
|
||||
from widgets.conversational.float_line_edit import FloatLineEdit
|
||||
|
||||
# from widgets.conversational.float_line_edit import VCPLineEdit
|
||||
# from qtpyvcp.widgets.input_widgets import line_edit
|
||||
from qtpyvcp.widgets.input_widgets.line_edit import VCPLineEdit
|
||||
LOG = logger.getLogger(__name__)
|
||||
|
||||
STATUS = getPlugin('status')
|
||||
@@ -35,7 +36,7 @@ class UserTab(QWidget):
|
||||
ui_file = os.path.splitext(os.path.basename(__file__))[0] + ".ui"
|
||||
uic.loadUi(os.path.join(os.path.dirname(__file__), ui_file), self)
|
||||
|
||||
self.position_inputs: list[FloatLineEdit] = self.findChildren(FloatLineEdit)
|
||||
self.position_inputs: list[VCPLineEdit] = self.findChildren(VCPLineEdit)
|
||||
self.move_buttons: list[QPushButton] = self.findChildren(QPushButton)
|
||||
|
||||
self._connect_signals()
|
||||
@@ -56,9 +57,9 @@ class UserTab(QWidget):
|
||||
button.clicked.connect(self._on_move_button_clicked)
|
||||
|
||||
def _format_sender_float_value(self):
|
||||
"""Formats the text of the sending FloatLineEdit to its specified format."""
|
||||
"""Formats the text of the sending VCPLineEdit to its specified format."""
|
||||
sender_widget = self.sender()
|
||||
if not isinstance(sender_widget, FloatLineEdit):
|
||||
if not isinstance(sender_widget, VCPLineEdit):
|
||||
return
|
||||
|
||||
LOG.debug(f"Formatting float for {sender_widget.objectName()}")
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="abs_x_input">
|
||||
<widget class="VCPLineEdit" name="abs_x_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="security" stdset="0">
|
||||
<number>0</number>
|
||||
@@ -83,12 +83,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="abs_y_input">
|
||||
<widget class="VCPLineEdit" name="abs_y_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[{"name": "position_y", "property": "Text", "expression": "ch[0]", "channels": [{"url": "position:abs?string&axis=y", "trigger": true}]}]</string>
|
||||
@@ -122,12 +122,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="abs_z_input">
|
||||
<widget class="VCPLineEdit" name="abs_z_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[{"name": "position_z", "property": "Text", "expression": "ch[0]", "channels": [{"url": "position:abs?string&axis=z", "trigger": true}]}]</string>
|
||||
@@ -179,7 +179,7 @@
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@@ -207,12 +207,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="wcs_x_input">
|
||||
<widget class="VCPLineEdit" name="wcs_x_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="security" stdset="0">
|
||||
<number>0</number>
|
||||
@@ -246,12 +246,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="wcs_y_input">
|
||||
<widget class="VCPLineEdit" name="wcs_y_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[{"name": "position_y", "property": "Text", "expression": "ch[0]", "channels": [{"url": "position:Relative?string&axis=y", "trigger": true}]}]</string>
|
||||
@@ -282,12 +282,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="wcs_z_input">
|
||||
<widget class="VCPLineEdit" name="wcs_z_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[{"name": "position_z", "property": "Text", "expression": "ch[0]", "channels": [{"url": "position:Relative?string&axis=z", "trigger": true}]}]</string>
|
||||
@@ -336,7 +336,7 @@
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
@@ -364,12 +364,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="rel_x_input">
|
||||
<widget class="VCPLineEdit" name="rel_x_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="security" stdset="0">
|
||||
<number>0</number>
|
||||
@@ -403,12 +403,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="rel_y_input">
|
||||
<widget class="VCPLineEdit" name="rel_y_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[]</string>
|
||||
@@ -439,12 +439,12 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="FloatLineEdit" name="rel_z_input">
|
||||
<widget class="VCPLineEdit" name="rel_z_input">
|
||||
<property name="text">
|
||||
<string> 0.0000</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||
</property>
|
||||
<property name="rules" stdset="0">
|
||||
<string>[]</string>
|
||||
@@ -503,11 +503,6 @@
|
||||
<extends>QLineEdit</extends>
|
||||
<header>qtpyvcp.widgets.input_widgets.line_edit</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FloatLineEdit</class>
|
||||
<extends>VCPLineEdit</extends>
|
||||
<header>widgets.conversational.float_line_edit</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user