From f9b79e1b2f69ff936df342a1817becb014957d30 Mon Sep 17 00:00:00 2001 From: physics group account Date: Tue, 30 Jun 2020 04:03:13 -0700 Subject: [PATCH 1/2] added python file and made changes to devPanelMaddy.ui --- Maddy/devPanelMaddy.py | 29 +++++++++++++++++++++++++++++ Maddy/devPanelMaddy.ui | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 Maddy/devPanelMaddy.py diff --git a/Maddy/devPanelMaddy.py b/Maddy/devPanelMaddy.py new file mode 100644 index 0000000..fe3e6be --- /dev/null +++ b/Maddy/devPanelMaddy.py @@ -0,0 +1,29 @@ +from pydm import Display +from PyQt5 import QtGui, QtCore, QtWidgets +import sys + +class devPanelMaddy(Display): + + + + def __init__(self, parent=None, args=None): + super(devPanelMaddy, self).__init__(parent=parent, args=args) + self.ui.WIZARD.clicked.connect(lambda:self.updateOutput("You're a WIZARD, Harry")) + self.ui.what_wizard.stateChanged.connect(self.buttonToggled) + + + def ui_filename(self): + return 'devPanelMaddy.ui' + + def updateOutput(self, output): + print(output) + self.ui.wizard_text.setText(output) + + def buttonToggled(self): + self.ui.wizard_text.setText("An amazing one o'course!" + if self.ui.what_wizard.isChecked() + else "I hope you have a Felix Felicis type of day!") + +intelclass = devPanelMaddy + + diff --git a/Maddy/devPanelMaddy.ui b/Maddy/devPanelMaddy.ui index 63577ec..66b3351 100644 --- a/Maddy/devPanelMaddy.ui +++ b/Maddy/devPanelMaddy.ui @@ -14,6 +14,16 @@ Form + + + + + + + Click here to become a Wizard today! + + + @@ -29,14 +39,46 @@ + + + + + + + What type of wizard are you? + + + + + + + + + + + + PyDMLineEdit + QLineEdit +
pydm.widgets.line_edit
+
+ + PyDMPushButton + QPushButton +
pydm.widgets.pushbutton
+
PyDMShellCommand QPushButton
pydm.widgets.shell_command
+ + PyDMCheckbox + QCheckBox +
pydm.widgets.checkbox
+
From 27e3f7eb5c07db042f2b060f6eaa299321f2302b Mon Sep 17 00:00:00 2001 From: physics group account Date: Tue, 30 Jun 2020 04:09:02 -0700 Subject: [PATCH 2/2] button path to .py file instead of .ui file --- opsDevPanel.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opsDevPanel.ui b/opsDevPanel.ui index d7301b5..266986e 100644 --- a/opsDevPanel.ui +++ b/opsDevPanel.ui @@ -168,7 +168,7 @@ - Maddy/devPanelMaddy.ui + Maddy/devPanelMaddy.py