diff --git a/example/example.py b/example/example.py new file mode 100644 index 0000000..98712d3 --- /dev/null +++ b/example/example.py @@ -0,0 +1,23 @@ +from pydm import Display +from PyQt5 import QtGui + +class Example(Display): + + def __init__(self, parent=None, args=None): + super(Example, self).__init__(parent=parent, args=args) + self.ui.testButton.clicked.connect(lambda:self.updateOutput("Button Pushed")) + self.ui.testCheckBox.stateChanged.connect(self.buttonToggled) + + def ui_filename(self): + return 'example.ui' + + def updateOutput(self, output): + print(output) + self.ui.outputBox.setText(output) + + def buttonToggled(self): + self.ui.outputBox.setText("Checkbox is " + ("checked" + if self.ui.testCheckBox.isChecked() + else "not checked")) + +intelclass = Example diff --git a/example/example.ui b/example/example.ui new file mode 100644 index 0000000..94d965e --- /dev/null +++ b/example/example.ui @@ -0,0 +1,65 @@ + + + Form + + + + 0 + 0 + 640 + 480 + + + + Form + + + + + + + + + Test Button + + + + + + + + + + Test Checkbox + + + + + + + + + + + + + + + PyDMLineEdit + QLineEdit +
pydm.widgets.line_edit
+
+ + PyDMPushButton + QPushButton +
pydm.widgets.pushbutton
+
+ + PyDMCheckbox + QCheckBox +
pydm.widgets.checkbox
+
+
+ + +
diff --git a/opsDevPanel.ui b/opsDevPanel.ui index b4ed5d8..0195117 100644 --- a/opsDevPanel.ui +++ b/opsDevPanel.ui @@ -29,6 +29,21 @@ + + + + + + + Example Dev Panel + + + + example/example.py + + + +