def runPyDM(ui=None, disp_args=[], pfmon=None, mcro=None): app = PyDMApplication(ui_file=ui, command_line_args=disp_args, perfmon=pfmon, macros=mcro) app.exec_()
def main(): _parse_arguments() app = PyDMApplication(command_line_args=sys.argv, hide_nav_bar=True, hide_menu_bar=True, hide_status_bar=True, use_main_window=False) pydm_chartsdipslay = PyDMChartingDisplay() pydm_chartsdipslay.setMinimumSize(1600, 800) pydm_chartsdipslay.show() sys.exit(app.exec_())
def main(): parser = argparse.ArgumentParser(description="Python Display Manager") parser.add_argument( 'displayfile', help= 'A PyDM file to display. Can be either a Qt .ui file, or a Python file.', nargs='?', default=None) parser.add_argument( '--perfmon', action='store_true', help= 'Enable performance monitoring, and print CPU usage to the terminal.') parser.add_argument('--hide-nav-bar', action='store_true', help='Start PyDM with the navigation bar hidden.') parser.add_argument('--hide-menu-bar', action='store_true', help='Start PyDM with the menu bar hidden.') parser.add_argument('--hide-status-bar', action='store_true', help='Start PyDM with the status bar hidden.') parser.add_argument('--read-only', action='store_true', help='Start PyDM in a Read-Only mode.') parser.add_argument( '-m', '--macro', help= 'Specify macro replacements to use, in JSON object format. Reminder: JSON requires double quotes for strings, so you should wrap this whole argument in single quotes. Example: -m \'{"sector": "LI25", "facility": "LCLS"}' ) parser.add_argument( 'display_args', help= 'Arguments to be passed to the PyDM client application (which is a QApplication subclass).', nargs=argparse.REMAINDER) pydm_args = parser.parse_args() macros = None if pydm_args.macro is not None: try: macros = json.loads(pydm_args.macro) except ValueError: raise ValueError("Could not parse macro argument as JSON.") app = PyDMApplication(ui_file=pydm_args.displayfile, command_line_args=pydm_args.display_args, perfmon=pydm_args.perfmon, hide_nav_bar=pydm_args.hide_nav_bar, hide_menu_bar=pydm_args.hide_menu_bar, hide_status_bar=pydm_args.hide_status_bar, read_only=pydm_args.read_only, macros=macros) sys.exit(app.exec_())
return True except: return False def errorMessage(self, message): self.showDialog("---Attention---", message) ''' ____________________________________________________________________________________________________________________________________ Functions not used ''' if __name__ == "__main__": import sys app = PyDMApplication(use_main_window=False) Ui_MainWindow_Ocean = QtWidgets.QMainWindow() ui = PressureSystem() ui.setupUi(Ui_MainWindow_Ocean) ui.setFlowControl(oceanPV="SOL3", motorPV="SOL:galil:test:A", LS="XDS:LS") Ui_MainWindow_Ocean.show() app.establish_widget_connections(widget=Ui_MainWindow_Ocean) sys.exit(app.exec_()) ''' self.ui.lblAcquiring.linkActivated.connect(self.pri1) self.ui.lblAcquiring.linkHovered.connect(self.pri1) #self.ui.lblAcquiring.channel. self.ui.lblProgress.value_changed(0) self.ui.cmbAcquisition.send_value_signal.connect(self.pri1) '''