def setupUi(self, DockWidget): DockWidget.setObjectName("DockWidget") DockWidget.resize(703, 632) self.dockWidgetContents = QtWidgets.QWidget() self.dockWidgetContents.setObjectName("dockWidgetContents") self.gridLayout = QtWidgets.QGridLayout(self.dockWidgetContents) self.gridLayout.setObjectName("gridLayout") self.textBrowser = QtWidgets.QTextBrowser(self.dockWidgetContents) self.textBrowser.setMinimumSize(QtCore.QSize(0, 0)) self.textBrowser.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.textBrowser.setObjectName("textBrowser") self.gridLayout.addWidget(self.textBrowser, 2, 1, 1, 1) self.label_77 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_77.setFont(font) self.label_77.setObjectName("label_77") self.gridLayout.addWidget(self.label_77, 0, 1, 1, 1) self.label_78 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_78.setFont(font) self.label_78.setObjectName("label_78") self.gridLayout.addWidget(self.label_78, 0, 2, 1, 1) self.label_3 = QtWidgets.QLabel(self.dockWidgetContents) self.label_3.setMinimumSize(QtCore.QSize(0, 0)) self.label_3.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1) self.label_79 = QtWidgets.QLabel(self.dockWidgetContents) self.label_79.setEnabled(False) self.label_79.setObjectName("label_79") self.gridLayout.addWidget(self.label_79, 1, 2, 1, 1) self.label_4 = QtWidgets.QLabel(self.dockWidgetContents) self.label_4.setMinimumSize(QtCore.QSize(0, 0)) self.label_4.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.gridLayout.addWidget(self.label_4, 2, 0, 1, 1) self.textBrowserDis = QtWidgets.QTextBrowser(self.dockWidgetContents) self.textBrowserDis.setEnabled(False) self.textBrowserDis.setObjectName("textBrowserDis") self.gridLayout.addWidget(self.textBrowserDis, 2, 2, 1, 1) self.label_5 = QtWidgets.QLabel(self.dockWidgetContents) self.label_5.setMinimumSize(QtCore.QSize(0, 0)) self.label_5.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1) self.graphicsView = QtWidgets.QGraphicsView(self.dockWidgetContents) self.graphicsView.setMinimumSize(QtCore.QSize(0, 0)) self.graphicsView.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.graphicsView.setObjectName("graphicsView") self.gridLayout.addWidget(self.graphicsView, 3, 1, 1, 1) self.graphicsViewDis = QtWidgets.QGraphicsView(self.dockWidgetContents) self.graphicsViewDis.setEnabled(False) self.graphicsViewDis.setObjectName("graphicsViewDis") self.gridLayout.addWidget(self.graphicsViewDis, 3, 2, 1, 1) self.label_6 = QtWidgets.QLabel(self.dockWidgetContents) self.label_6.setMinimumSize(QtCore.QSize(0, 0)) self.label_6.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.gridLayout.addWidget(self.label_6, 4, 0, 1, 1) self.calendarWidget = QtWidgets.QCalendarWidget( self.dockWidgetContents) self.calendarWidget.setMinimumSize(QtCore.QSize(0, 0)) self.calendarWidget.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.calendarWidget.setObjectName("calendarWidget") self.gridLayout.addWidget(self.calendarWidget, 4, 1, 1, 1) self.calendarWidgetDis = QtWidgets.QCalendarWidget( self.dockWidgetContents) self.calendarWidgetDis.setEnabled(False) self.calendarWidgetDis.setObjectName("calendarWidgetDis") self.gridLayout.addWidget(self.calendarWidgetDis, 4, 2, 1, 1) self.lcdNumberDis = QtWidgets.QLCDNumber(self.dockWidgetContents) self.lcdNumberDis.setEnabled(False) self.lcdNumberDis.setObjectName("lcdNumberDis") self.gridLayout.addWidget(self.lcdNumberDis, 5, 2, 1, 1) self.label_7 = QtWidgets.QLabel(self.dockWidgetContents) self.label_7.setMinimumSize(QtCore.QSize(0, 0)) self.label_7.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.gridLayout.addWidget(self.label_7, 5, 0, 1, 1) self.lcdNumber = QtWidgets.QLCDNumber(self.dockWidgetContents) self.lcdNumber.setMinimumSize(QtCore.QSize(0, 0)) self.lcdNumber.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lcdNumber.setObjectName("lcdNumber") self.gridLayout.addWidget(self.lcdNumber, 5, 1, 1, 1) self.label_8 = QtWidgets.QLabel(self.dockWidgetContents) self.label_8.setMinimumSize(QtCore.QSize(0, 0)) self.label_8.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setObjectName("label_8") self.gridLayout.addWidget(self.label_8, 6, 0, 1, 1) self.progressBar = QtWidgets.QProgressBar(self.dockWidgetContents) self.progressBar.setMinimumSize(QtCore.QSize(0, 0)) self.progressBar.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.progressBar.setProperty("value", 24) self.progressBar.setObjectName("progressBar") self.gridLayout.addWidget(self.progressBar, 6, 1, 1, 1) self.progressBarDis = QtWidgets.QProgressBar(self.dockWidgetContents) self.progressBarDis.setEnabled(False) self.progressBarDis.setProperty("value", 24) self.progressBarDis.setObjectName("progressBarDis") self.gridLayout.addWidget(self.progressBarDis, 6, 2, 1, 1) self.label_9 = QtWidgets.QLabel(self.dockWidgetContents) self.label_9.setMinimumSize(QtCore.QSize(0, 0)) self.label_9.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_9.setFont(font) self.label_9.setObjectName("label_9") self.gridLayout.addWidget(self.label_9, 7, 0, 1, 1) self.lineH = QtWidgets.QFrame(self.dockWidgetContents) self.lineH.setMinimumSize(QtCore.QSize(0, 0)) self.lineH.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lineH.setFrameShape(QtWidgets.QFrame.HLine) self.lineH.setFrameShadow(QtWidgets.QFrame.Sunken) self.lineH.setObjectName("lineH") self.gridLayout.addWidget(self.lineH, 7, 1, 1, 1) self.lineHDis = QtWidgets.QFrame(self.dockWidgetContents) self.lineHDis.setEnabled(False) self.lineHDis.setFrameShape(QtWidgets.QFrame.HLine) self.lineHDis.setFrameShadow(QtWidgets.QFrame.Sunken) self.lineHDis.setObjectName("lineHDis") self.gridLayout.addWidget(self.lineHDis, 7, 2, 1, 1) self.label_10 = QtWidgets.QLabel(self.dockWidgetContents) self.label_10.setMinimumSize(QtCore.QSize(0, 0)) self.label_10.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_10.setFont(font) self.label_10.setObjectName("label_10") self.gridLayout.addWidget(self.label_10, 8, 0, 1, 1) self.lineV = QtWidgets.QFrame(self.dockWidgetContents) self.lineV.setMinimumSize(QtCore.QSize(0, 50)) self.lineV.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lineV.setFrameShape(QtWidgets.QFrame.VLine) self.lineV.setFrameShadow(QtWidgets.QFrame.Sunken) self.lineV.setObjectName("lineV") self.gridLayout.addWidget(self.lineV, 8, 1, 1, 1) self.lineVDis = QtWidgets.QFrame(self.dockWidgetContents) self.lineVDis.setEnabled(False) self.lineVDis.setMinimumSize(QtCore.QSize(0, 50)) self.lineVDis.setFrameShape(QtWidgets.QFrame.VLine) self.lineVDis.setFrameShadow(QtWidgets.QFrame.Sunken) self.lineVDis.setObjectName("lineVDis") self.gridLayout.addWidget(self.lineVDis, 8, 2, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 9, 0, 1, 1) self.label_37 = QtWidgets.QLabel(self.dockWidgetContents) self.label_37.setAlignment(QtCore.Qt.AlignCenter) self.label_37.setObjectName("label_37") self.gridLayout.addWidget(self.label_37, 10, 0, 1, 3) self.label_2 = QtWidgets.QLabel(self.dockWidgetContents) self.label_2.setMinimumSize(QtCore.QSize(0, 0)) self.label_2.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) self.calendarWidget.currentPageChanged['int', 'int'].connect( self.calendarWidgetDis.setCurrentPage) self.calendarWidget.clicked['QDate'].connect( self.calendarWidgetDis.setSelectedDate) self.progressBar.valueChanged['int'].connect( self.progressBarDis.setValue) QtCore.QMetaObject.connectSlotsByName(DockWidget)
def setupUi(self, DockWidget): DockWidget.setObjectName("DockWidget") DockWidget.resize(497, 566) self.dockWidgetContents = QtWidgets.QWidget() self.dockWidgetContents.setObjectName("dockWidgetContents") self.gridLayout_45 = QtWidgets.QGridLayout(self.dockWidgetContents) self.gridLayout_45.setObjectName("gridLayout_45") self.label_126 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_126.setFont(font) self.label_126.setObjectName("label_126") self.gridLayout_45.addWidget(self.label_126, 0, 3, 2, 1) self.label_124 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_124.setFont(font) self.label_124.setObjectName("label_124") self.gridLayout_45.addWidget(self.label_124, 0, 2, 2, 1) self.label_133 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_133.setFont(font) self.label_133.setObjectName("label_133") self.gridLayout_45.addWidget(self.label_133, 8, 0, 1, 2) self.groupBoxDis_2 = QtWidgets.QGroupBox(self.dockWidgetContents) self.groupBoxDis_2.setEnabled(False) self.groupBoxDis_2.setObjectName("groupBoxDis_2") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.groupBoxDis_2) self.verticalLayout_4.setObjectName("verticalLayout_4") self.label_7 = QtWidgets.QLabel(self.groupBoxDis_2) self.label_7.setObjectName("label_7") self.verticalLayout_4.addWidget(self.label_7) self.gridLayout_45.addWidget(self.groupBoxDis_2, 2, 3, 1, 1) self.stackedWidget_2 = QtWidgets.QStackedWidget( self.dockWidgetContents) self.stackedWidget_2.setObjectName("stackedWidget_2") self.page1_2 = QtWidgets.QWidget() self.page1_2.setObjectName("page1_2") self.gridLayout_35 = QtWidgets.QGridLayout(self.page1_2) self.gridLayout_35.setObjectName("gridLayout_35") self.label_57 = QtWidgets.QLabel(self.page1_2) self.label_57.setObjectName("label_57") self.gridLayout_35.addWidget(self.label_57, 0, 0, 1, 1) self.stackedWidget_2.addWidget(self.page1_2) self.page2_2 = QtWidgets.QWidget() self.page2_2.setObjectName("page2_2") self.gridLayout_36 = QtWidgets.QGridLayout(self.page2_2) self.gridLayout_36.setObjectName("gridLayout_36") self.label_58 = QtWidgets.QLabel(self.page2_2) self.label_58.setObjectName("label_58") self.gridLayout_36.addWidget(self.label_58, 0, 0, 1, 1) self.stackedWidget_2.addWidget(self.page2_2) self.gridLayout_45.addWidget(self.stackedWidget_2, 5, 2, 1, 1) self.stackedWidgetDis_2 = QtWidgets.QStackedWidget( self.dockWidgetContents) self.stackedWidgetDis_2.setEnabled(False) self.stackedWidgetDis_2.setObjectName("stackedWidgetDis_2") self.page1Dis_2 = QtWidgets.QWidget() self.page1Dis_2.setObjectName("page1Dis_2") self.gridLayout_37 = QtWidgets.QGridLayout(self.page1Dis_2) self.gridLayout_37.setObjectName("gridLayout_37") self.label_113 = QtWidgets.QLabel(self.page1Dis_2) self.label_113.setObjectName("label_113") self.gridLayout_37.addWidget(self.label_113, 0, 0, 1, 1) self.stackedWidgetDis_2.addWidget(self.page1Dis_2) self.page2Dis_2 = QtWidgets.QWidget() self.page2Dis_2.setObjectName("page2Dis_2") self.gridLayout_38 = QtWidgets.QGridLayout(self.page2Dis_2) self.gridLayout_38.setObjectName("gridLayout_38") self.label_114 = QtWidgets.QLabel(self.page2Dis_2) self.label_114.setObjectName("label_114") self.gridLayout_38.addWidget(self.label_114, 0, 0, 1, 1) self.stackedWidgetDis_2.addWidget(self.page2Dis_2) self.gridLayout_45.addWidget(self.stackedWidgetDis_2, 5, 3, 1, 1) self.label_131 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_131.setFont(font) self.label_131.setObjectName("label_131") self.gridLayout_45.addWidget(self.label_131, 6, 0, 1, 1) self.frame_2 = QtWidgets.QFrame(self.dockWidgetContents) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.gridLayout_43 = QtWidgets.QGridLayout(self.frame_2) self.gridLayout_43.setObjectName("gridLayout_43") self.label_9 = QtWidgets.QLabel(self.frame_2) self.label_9.setObjectName("label_9") self.gridLayout_43.addWidget(self.label_9, 0, 0, 1, 1) self.gridLayout_45.addWidget(self.frame_2, 6, 2, 1, 1) self.frameDis_2 = QtWidgets.QFrame(self.dockWidgetContents) self.frameDis_2.setEnabled(False) self.frameDis_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frameDis_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frameDis_2.setObjectName("frameDis_2") self.gridLayout_40 = QtWidgets.QGridLayout(self.frameDis_2) self.gridLayout_40.setObjectName("gridLayout_40") self.label_8 = QtWidgets.QLabel(self.frameDis_2) self.label_8.setObjectName("label_8") self.gridLayout_40.addWidget(self.label_8, 0, 0, 1, 1) self.gridLayout_45.addWidget(self.frameDis_2, 6, 3, 1, 1) self.label_132 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_132.setFont(font) self.label_132.setObjectName("label_132") self.gridLayout_45.addWidget(self.label_132, 7, 0, 1, 2) self.groupBox_2 = QtWidgets.QGroupBox(self.dockWidgetContents) self.groupBox_2.setObjectName("groupBox_2") self.gridLayout_7 = QtWidgets.QGridLayout(self.groupBox_2) self.gridLayout_7.setObjectName("gridLayout_7") self.label_10 = QtWidgets.QLabel(self.groupBox_2) self.label_10.setObjectName("label_10") self.gridLayout_7.addWidget(self.label_10, 0, 0, 1, 1) self.gridLayout_45.addWidget(self.groupBox_2, 2, 2, 1, 1) self.mdiAreaDis_2 = QtWidgets.QMdiArea(self.dockWidgetContents) self.mdiAreaDis_2.setEnabled(False) self.mdiAreaDis_2.setObjectName("mdiAreaDis_2") self.subwindow1Dis_2 = QtWidgets.QWidget() self.subwindow1Dis_2.setObjectName("subwindow1Dis_2") self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.subwindow1Dis_2) self.verticalLayout_9.setObjectName("verticalLayout_9") self.label_111 = QtWidgets.QLabel(self.subwindow1Dis_2) self.label_111.setObjectName("label_111") self.verticalLayout_9.addWidget(self.label_111) self.subwindow2Dis_2 = QtWidgets.QWidget() self.subwindow2Dis_2.setObjectName("subwindow2Dis_2") self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.subwindow2Dis_2) self.verticalLayout_10.setObjectName("verticalLayout_10") self.label_112 = QtWidgets.QLabel(self.subwindow2Dis_2) self.label_112.setObjectName("label_112") self.verticalLayout_10.addWidget(self.label_112) self.gridLayout_45.addWidget(self.mdiAreaDis_2, 8, 3, 1, 1) self.label_127 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_127.setFont(font) self.label_127.setObjectName("label_127") self.gridLayout_45.addWidget(self.label_127, 2, 0, 1, 2) self.widget_2 = QtWidgets.QWidget(self.dockWidgetContents) self.widget_2.setObjectName("widget_2") self.gridLayout_39 = QtWidgets.QGridLayout(self.widget_2) self.gridLayout_39.setObjectName("gridLayout_39") self.label_59 = QtWidgets.QLabel(self.widget_2) self.label_59.setObjectName("label_59") self.gridLayout_39.addWidget(self.label_59, 0, 0, 1, 1) self.gridLayout_45.addWidget(self.widget_2, 7, 2, 1, 1) self.widgetDis_2 = QtWidgets.QWidget(self.dockWidgetContents) self.widgetDis_2.setEnabled(False) self.widgetDis_2.setObjectName("widgetDis_2") self.gridLayout_44 = QtWidgets.QGridLayout(self.widgetDis_2) self.gridLayout_44.setObjectName("gridLayout_44") self.label_125 = QtWidgets.QLabel(self.widgetDis_2) self.label_125.setObjectName("label_125") self.gridLayout_44.addWidget(self.label_125, 0, 0, 1, 1) self.gridLayout_45.addWidget(self.widgetDis_2, 7, 3, 1, 1) self.mdiArea_2 = QtWidgets.QMdiArea(self.dockWidgetContents) self.mdiArea_2.setObjectName("mdiArea_2") self.subwindow1_2 = QtWidgets.QWidget() self.subwindow1_2.setObjectName("subwindow1_2") self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.subwindow1_2) self.verticalLayout_11.setObjectName("verticalLayout_11") self.label_29 = QtWidgets.QLabel(self.subwindow1_2) self.label_29.setObjectName("label_29") self.verticalLayout_11.addWidget(self.label_29) self.subwindow2_2 = QtWidgets.QWidget() self.subwindow2_2.setObjectName("subwindow2_2") self.verticalLayout_12 = QtWidgets.QVBoxLayout(self.subwindow2_2) self.verticalLayout_12.setObjectName("verticalLayout_12") self.label_56 = QtWidgets.QLabel(self.subwindow2_2) self.label_56.setObjectName("label_56") self.verticalLayout_12.addWidget(self.label_56) self.gridLayout_45.addWidget(self.mdiArea_2, 8, 2, 1, 1) self.label_128 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_128.setFont(font) self.label_128.setObjectName("label_128") self.gridLayout_45.addWidget(self.label_128, 3, 0, 1, 2) self.scrollArea_2 = QtWidgets.QScrollArea(self.dockWidgetContents) self.scrollArea_2.setWidgetResizable(True) self.scrollArea_2.setObjectName("scrollArea_2") self.scrollAreaWidgetContents_2 = QtWidgets.QWidget() self.scrollAreaWidgetContents_2.setGeometry( QtCore.QRect(0, 0, 181, 246)) self.scrollAreaWidgetContents_2.setObjectName( "scrollAreaWidgetContents_2") self.verticalLayout_14 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContents_2) self.verticalLayout_14.setObjectName("verticalLayout_14") self.label_70 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_70.setObjectName("label_70") self.verticalLayout_14.addWidget(self.label_70) self.label_71 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_71.setObjectName("label_71") self.verticalLayout_14.addWidget(self.label_71) self.label_75 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_75.setObjectName("label_75") self.verticalLayout_14.addWidget(self.label_75) self.label_76 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_76.setObjectName("label_76") self.verticalLayout_14.addWidget(self.label_76) self.label_77 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_77.setObjectName("label_77") self.verticalLayout_14.addWidget(self.label_77) self.label_78 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_78.setObjectName("label_78") self.verticalLayout_14.addWidget(self.label_78) self.label_79 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_79.setObjectName("label_79") self.verticalLayout_14.addWidget(self.label_79) self.label_80 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_80.setObjectName("label_80") self.verticalLayout_14.addWidget(self.label_80) self.label_81 = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) self.label_81.setObjectName("label_81") self.verticalLayout_14.addWidget(self.label_81) self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) self.gridLayout_45.addWidget(self.scrollArea_2, 3, 2, 1, 1) self.scrollAreaDis_2 = QtWidgets.QScrollArea(self.dockWidgetContents) self.scrollAreaDis_2.setEnabled(False) self.scrollAreaDis_2.setWidgetResizable(True) self.scrollAreaDis_2.setObjectName("scrollAreaDis_2") self.scrollAreaWidgetContentsDis_2 = QtWidgets.QWidget() self.scrollAreaWidgetContentsDis_2.setGeometry( QtCore.QRect(0, 0, 181, 246)) self.scrollAreaWidgetContentsDis_2.setObjectName( "scrollAreaWidgetContentsDis_2") self.verticalLayout_13 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContentsDis_2) self.verticalLayout_13.setObjectName("verticalLayout_13") self.label_115 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_115.setObjectName("label_115") self.verticalLayout_13.addWidget(self.label_115) self.label_116 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_116.setObjectName("label_116") self.verticalLayout_13.addWidget(self.label_116) self.label_117 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_117.setObjectName("label_117") self.verticalLayout_13.addWidget(self.label_117) self.label_118 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_118.setObjectName("label_118") self.verticalLayout_13.addWidget(self.label_118) self.label_119 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_119.setObjectName("label_119") self.verticalLayout_13.addWidget(self.label_119) self.label_120 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_120.setObjectName("label_120") self.verticalLayout_13.addWidget(self.label_120) self.label_121 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_121.setObjectName("label_121") self.verticalLayout_13.addWidget(self.label_121) self.label_122 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_122.setObjectName("label_122") self.verticalLayout_13.addWidget(self.label_122) self.label_123 = QtWidgets.QLabel(self.scrollAreaWidgetContentsDis_2) self.label_123.setObjectName("label_123") self.verticalLayout_13.addWidget(self.label_123) self.scrollAreaDis_2.setWidget(self.scrollAreaWidgetContentsDis_2) self.gridLayout_45.addWidget(self.scrollAreaDis_2, 3, 3, 1, 1) self.label_129 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_129.setFont(font) self.label_129.setObjectName("label_129") self.gridLayout_45.addWidget(self.label_129, 4, 0, 1, 2) self.toolBox_2 = QtWidgets.QToolBox(self.dockWidgetContents) self.toolBox_2.setObjectName("toolBox_2") self.page_3 = QtWidgets.QWidget() self.page_3.setGeometry(QtCore.QRect(0, 0, 196, 73)) self.page_3.setObjectName("page_3") self.gridLayout_41 = QtWidgets.QGridLayout(self.page_3) self.gridLayout_41.setObjectName("gridLayout_41") self.label_60 = QtWidgets.QLabel(self.page_3) self.label_60.setObjectName("label_60") self.gridLayout_41.addWidget(self.label_60, 2, 0, 1, 1) self.toolBox_2.addItem(self.page_3, "") self.page_8 = QtWidgets.QWidget() self.page_8.setGeometry(QtCore.QRect(0, 0, 163, 38)) self.page_8.setObjectName("page_8") self.gridLayout_42 = QtWidgets.QGridLayout(self.page_8) self.gridLayout_42.setObjectName("gridLayout_42") self.label_61 = QtWidgets.QLabel(self.page_8) self.label_61.setObjectName("label_61") self.gridLayout_42.addWidget(self.label_61, 0, 0, 1, 1) self.toolBox_2.addItem(self.page_8, "") self.gridLayout_45.addWidget(self.toolBox_2, 4, 2, 1, 1) self.toolBoxDis_2 = QtWidgets.QToolBox(self.dockWidgetContents) self.toolBoxDis_2.setEnabled(False) self.toolBoxDis_2.setObjectName("toolBoxDis_2") self.page_6 = QtWidgets.QWidget() self.page_6.setGeometry(QtCore.QRect(0, 0, 196, 73)) self.page_6.setObjectName("page_6") self.gridLayout_29 = QtWidgets.QGridLayout(self.page_6) self.gridLayout_29.setObjectName("gridLayout_29") self.label_109 = QtWidgets.QLabel(self.page_6) self.label_109.setObjectName("label_109") self.gridLayout_29.addWidget(self.label_109, 2, 0, 1, 1) self.toolBoxDis_2.addItem(self.page_6, "") self.page_7 = QtWidgets.QWidget() self.page_7.setGeometry(QtCore.QRect(0, 0, 163, 38)) self.page_7.setObjectName("page_7") self.gridLayout_34 = QtWidgets.QGridLayout(self.page_7) self.gridLayout_34.setObjectName("gridLayout_34") self.label_110 = QtWidgets.QLabel(self.page_7) self.label_110.setObjectName("label_110") self.gridLayout_34.addWidget(self.label_110, 0, 0, 1, 1) self.toolBoxDis_2.addItem(self.page_7, "") self.gridLayout_45.addWidget(self.toolBoxDis_2, 4, 3, 1, 1) self.label_130 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_130.setFont(font) self.label_130.setObjectName("label_130") self.gridLayout_45.addWidget(self.label_130, 5, 0, 1, 2) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) self.stackedWidget_2.setCurrentIndex(1) self.stackedWidgetDis_2.setCurrentIndex(1) self.toolBox_2.setCurrentIndex(0) self.toolBoxDis_2.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(DockWidget)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1023, 932) MainWindow.setMouseTracking(True) MainWindow.setAcceptDrops(True) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/main.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) MainWindow.setWindowIcon(icon) self.central_widget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.central_widget.sizePolicy().hasHeightForWidth()) self.central_widget.setSizePolicy(sizePolicy) self.central_widget.setObjectName("central_widget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.central_widget) self.verticalLayout_2.setObjectName("verticalLayout_2") self.main_splitter = QtWidgets.QSplitter(self.central_widget) self.main_splitter.setOrientation(QtCore.Qt.Horizontal) self.main_splitter.setObjectName("main_splitter") self.left_splitter = QtWidgets.QSplitter(self.main_splitter) self.left_splitter.setMinimumSize(QtCore.QSize(450, 0)) self.left_splitter.setOrientation(QtCore.Qt.Vertical) self.left_splitter.setObjectName("left_splitter") self.curve_area = QtWidgets.QWidget(self.left_splitter) self.curve_area.setObjectName("curve_area") self.verticalLayout_31 = QtWidgets.QVBoxLayout(self.curve_area) self.verticalLayout_31.setContentsMargins(0, 0, 0, 0) self.verticalLayout_31.setObjectName("verticalLayout_31") self.main_panel = QtWidgets.QTabWidget(self.curve_area) self.main_panel.setTabPosition(QtWidgets.QTabWidget.West) self.main_panel.setObjectName("main_panel") self.mechanism_tab = QtWidgets.QWidget() self.mechanism_tab.setObjectName("mechanism_tab") self.verticalLayout_27 = QtWidgets.QVBoxLayout(self.mechanism_tab) self.verticalLayout_27.setContentsMargins(3, 3, 3, 3) self.verticalLayout_27.setObjectName("verticalLayout_27") self.mechanism_panel_splitter = QtWidgets.QSplitter(self.mechanism_tab) self.mechanism_panel_splitter.setOrientation(QtCore.Qt.Vertical) self.mechanism_panel_splitter.setObjectName("mechanism_panel_splitter") self.EntitiesTabWidget = QtWidgets.QWidget( self.mechanism_panel_splitter) self.EntitiesTabWidget.setObjectName("EntitiesTabWidget") self.verticalLayout_29 = QtWidgets.QVBoxLayout(self.EntitiesTabWidget) self.verticalLayout_29.setContentsMargins(3, 3, 3, 3) self.verticalLayout_29.setObjectName("verticalLayout_29") self.entities_tab = QtWidgets.QTabWidget(self.EntitiesTabWidget) self.entities_tab.setObjectName("entities_tab") self.PointsTab = QtWidgets.QWidget() self.PointsTab.setObjectName("PointsTab") self.verticalLayout_9 = QtWidgets.QVBoxLayout(self.PointsTab) self.verticalLayout_9.setContentsMargins(6, 6, 6, 6) self.verticalLayout_9.setObjectName("verticalLayout_9") self.entities_point_widget = QtWidgets.QWidget(self.PointsTab) self.entities_point_widget.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) self.entities_point_widget.setObjectName("entities_point_widget") self.entities_point_layout = QtWidgets.QVBoxLayout( self.entities_point_widget) self.entities_point_layout.setContentsMargins(0, 0, 0, 0) self.entities_point_layout.setObjectName("entities_point_layout") self.verticalLayout_9.addWidget(self.entities_point_widget) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/bearing.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.entities_tab.addTab(self.PointsTab, icon1, "") self.LinksTab = QtWidgets.QWidget() self.LinksTab.setObjectName("LinksTab") self.verticalLayout_19 = QtWidgets.QVBoxLayout(self.LinksTab) self.verticalLayout_19.setContentsMargins(6, 6, 6, 6) self.verticalLayout_19.setObjectName("verticalLayout_19") self.entities_link_widget = QtWidgets.QWidget(self.LinksTab) self.entities_link_widget.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) self.entities_link_widget.setObjectName("entities_link_widget") self.entities_link_layout = QtWidgets.QVBoxLayout( self.entities_link_widget) self.entities_link_layout.setContentsMargins(0, 0, 0, 0) self.entities_link_layout.setObjectName("entities_link_layout") self.verticalLayout_19.addWidget(self.entities_link_widget) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/link.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.entities_tab.addTab(self.LinksTab, icon2, "") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.tab) self.verticalLayout_8.setObjectName("verticalLayout_8") self.EntitiesExpr_widget = QtWidgets.QWidget(self.tab) self.EntitiesExpr_widget.setContextMenuPolicy( QtCore.Qt.CustomContextMenu) self.EntitiesExpr_widget.setObjectName("EntitiesExpr_widget") self.entities_expr_layout = QtWidgets.QVBoxLayout( self.EntitiesExpr_widget) self.entities_expr_layout.setContentsMargins(0, 0, 0, 0) self.entities_expr_layout.setObjectName("entities_expr_layout") self.verticalLayout_8.addWidget(self.EntitiesExpr_widget) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/configure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.entities_tab.addTab(self.tab, icon3, "") self.verticalLayout_29.addWidget(self.entities_tab) self.MechanismsTabWidget = QtWidgets.QWidget( self.mechanism_panel_splitter) self.MechanismsTabWidget.setObjectName("MechanismsTabWidget") self.verticalLayout_21 = QtWidgets.QVBoxLayout( self.MechanismsTabWidget) self.verticalLayout_21.setContentsMargins(0, 0, 0, 0) self.verticalLayout_21.setObjectName("verticalLayout_21") self.MechanismPanelSplitterLine = QtWidgets.QFrame( self.MechanismsTabWidget) self.MechanismPanelSplitterLine.setLineWidth(3) self.MechanismPanelSplitterLine.setFrameShape(QtWidgets.QFrame.HLine) self.MechanismPanelSplitterLine.setFrameShadow(QtWidgets.QFrame.Sunken) self.MechanismPanelSplitterLine.setObjectName( "MechanismPanelSplitterLine") self.verticalLayout_21.addWidget(self.MechanismPanelSplitterLine) self.horizontalLayout_9 = QtWidgets.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.horizontalLayout_11 = QtWidgets.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.mechanism_storage_name_tag_text = QtWidgets.QLabel( self.MechanismsTabWidget) self.mechanism_storage_name_tag_text.setObjectName( "mechanism_storage_name_tag_text") self.horizontalLayout_11.addWidget( self.mechanism_storage_name_tag_text) self.mechanism_storage_name_tag = QtWidgets.QLineEdit( self.MechanismsTabWidget) self.mechanism_storage_name_tag.setClearButtonEnabled(True) self.mechanism_storage_name_tag.setObjectName( "mechanism_storage_name_tag") self.horizontalLayout_11.addWidget(self.mechanism_storage_name_tag) self.verticalLayout_4.addLayout(self.horizontalLayout_11) self.mechanism_storage = QtWidgets.QListWidget( self.MechanismsTabWidget) self.mechanism_storage.setObjectName("mechanism_storage") self.verticalLayout_4.addWidget(self.mechanism_storage) self.horizontalLayout_9.addLayout(self.verticalLayout_4) self.verticalLayout_20 = QtWidgets.QVBoxLayout() self.verticalLayout_20.setObjectName("verticalLayout_20") self.mechanism_storage_add = QtWidgets.QPushButton( self.MechanismsTabWidget) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/data.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mechanism_storage_add.setIcon(icon4) self.mechanism_storage_add.setObjectName("mechanism_storage_add") self.verticalLayout_20.addWidget(self.mechanism_storage_add) self.mechanism_storage_restore = QtWidgets.QPushButton( self.MechanismsTabWidget) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mechanism_storage_restore.setIcon(icon5) self.mechanism_storage_restore.setObjectName( "mechanism_storage_restore") self.verticalLayout_20.addWidget(self.mechanism_storage_restore) self.line_4 = QtWidgets.QFrame(self.MechanismsTabWidget) self.line_4.setFrameShape(QtWidgets.QFrame.HLine) self.line_4.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_4.setObjectName("line_4") self.verticalLayout_20.addWidget(self.line_4) self.mechanism_storage_copy = QtWidgets.QPushButton( self.MechanismsTabWidget) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mechanism_storage_copy.setIcon(icon6) self.mechanism_storage_copy.setObjectName("mechanism_storage_copy") self.verticalLayout_20.addWidget(self.mechanism_storage_copy) self.mechanism_storage_paste = QtWidgets.QPushButton( self.MechanismsTabWidget) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/paste.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mechanism_storage_paste.setIcon(icon7) self.mechanism_storage_paste.setObjectName("mechanism_storage_paste") self.verticalLayout_20.addWidget(self.mechanism_storage_paste) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_20.addItem(spacerItem) self.mechanism_storage_delete = QtWidgets.QPushButton( self.MechanismsTabWidget) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.mechanism_storage_delete.setIcon(icon8) self.mechanism_storage_delete.setObjectName("mechanism_storage_delete") self.verticalLayout_20.addWidget(self.mechanism_storage_delete) self.horizontalLayout_9.addLayout(self.verticalLayout_20) self.verticalLayout_21.addLayout(self.horizontalLayout_9) self.verticalLayout_27.addWidget(self.mechanism_panel_splitter) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/mechanism.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.main_panel.addTab(self.mechanism_tab, icon9, "") self.inputs_tab = QtWidgets.QWidget() self.inputs_tab.setObjectName("inputs_tab") self.inputs_tab_layout = QtWidgets.QVBoxLayout(self.inputs_tab) self.inputs_tab_layout.setObjectName("inputs_tab_layout") icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/motor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.main_panel.addTab(self.inputs_tab, icon10, "") self.synthesis_tab = QtWidgets.QWidget() self.synthesis_tab.setObjectName("synthesis_tab") self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.synthesis_tab) self.verticalLayout_10.setObjectName("verticalLayout_10") self.synthesis_tab_widget = QtWidgets.QTabWidget(self.synthesis_tab) self.synthesis_tab_widget.setObjectName("synthesis_tab_widget") self.verticalLayout_10.addWidget(self.synthesis_tab_widget) self.synthesis_progress = QtWidgets.QProgressBar(self.synthesis_tab) self.synthesis_progress.setStyleSheet( "QProgressBar {\n" " border: 2px solid grey;\n" " border-radius: 5px;\n" "}\n" "\n" "QProgressBar::chunk {\n" " background-color: #05B8CC;\n" " width: 20px;\n" "}") self.synthesis_progress.setMaximum(3) self.synthesis_progress.setTextVisible(False) self.synthesis_progress.setObjectName("synthesis_progress") self.verticalLayout_10.addWidget(self.synthesis_progress) icon11 = QtGui.QIcon() icon11.addPixmap(QtGui.QPixmap(":/icons/synthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.main_panel.addTab(self.synthesis_tab, icon11, "") self.project_tab = QtWidgets.QWidget() self.project_tab.setObjectName("project_tab") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.project_tab) self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) self.verticalLayout_5.setObjectName("verticalLayout_5") self.project_layout = QtWidgets.QVBoxLayout() self.project_layout.setObjectName("project_layout") self.verticalLayout_5.addLayout(self.project_layout) icon12 = QtGui.QIcon() icon12.addPixmap(QtGui.QPixmap(":/icons/id.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.main_panel.addTab(self.project_tab, icon12, "") self.verticalLayout_31.addWidget(self.main_panel) self.RightSplitter = QtWidgets.QSplitter(self.main_splitter) self.RightSplitter.setOrientation(QtCore.Qt.Vertical) self.RightSplitter.setObjectName("RightSplitter") self.histogramArea = QtWidgets.QWidget(self.RightSplitter) self.histogramArea.setObjectName("histogramArea") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.histogramArea) self.horizontalLayout_2.setContentsMargins(3, 3, 3, 3) self.horizontalLayout_2.setSpacing(3) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.line = QtWidgets.QFrame(self.histogramArea) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setLineWidth(4) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setObjectName("line") self.horizontalLayout_2.addWidget(self.line) self.canvas_splitter = QtWidgets.QSplitter(self.histogramArea) self.canvas_splitter.setOrientation(QtCore.Qt.Vertical) self.canvas_splitter.setHandleWidth(3) self.canvas_splitter.setObjectName("canvas_splitter") self.BrowserWidget = QtWidgets.QWidget(self.canvas_splitter) self.BrowserWidget.setMaximumSize(QtCore.QSize(16777215, 50)) self.BrowserWidget.setObjectName("BrowserWidget") self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.BrowserWidget) self.horizontalLayout_7.setContentsMargins(3, 3, 3, 3) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.zoom_bar = QtWidgets.QSlider(self.BrowserWidget) self.zoom_bar.setMinimum(10) self.zoom_bar.setMaximum(2000) self.zoom_bar.setSingleStep(50) self.zoom_bar.setPageStep(50) self.zoom_bar.setProperty("value", 200) self.zoom_bar.setSliderPosition(200) self.zoom_bar.setOrientation(QtCore.Qt.Horizontal) self.zoom_bar.setInvertedControls(False) self.zoom_bar.setTickPosition(QtWidgets.QSlider.TicksBelow) self.zoom_bar.setTickInterval(200) self.zoom_bar.setObjectName("zoom_bar") self.horizontalLayout_7.addWidget(self.zoom_bar) self.zoom_button = QtWidgets.QPushButton(self.BrowserWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.zoom_button.sizePolicy().hasHeightForWidth()) self.zoom_button.setSizePolicy(sizePolicy) self.zoom_button.setObjectName("zoom_button") self.horizontalLayout_7.addWidget(self.zoom_button) self.ResetCanvas = QtWidgets.QPushButton(self.BrowserWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.ResetCanvas.sizePolicy().hasHeightForWidth()) self.ResetCanvas.setSizePolicy(sizePolicy) icon13 = QtGui.QIcon() icon13.addPixmap(QtGui.QPixmap(":/icons/aim.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ResetCanvas.setIcon(icon13) self.ResetCanvas.setIconSize(QtCore.QSize(32, 32)) self.ResetCanvas.setObjectName("ResetCanvas") self.horizontalLayout_7.addWidget(self.ResetCanvas) self.free_move_button = QtWidgets.QPushButton(self.BrowserWidget) icon14 = QtGui.QIcon() icon14.addPixmap(QtGui.QPixmap(":/icons/free_move_off.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.free_move_button.setIcon(icon14) self.free_move_button.setIconSize(QtCore.QSize(32, 32)) self.free_move_button.setObjectName("free_move_button") self.horizontalLayout_7.addWidget(self.free_move_button) self.line_3 = QtWidgets.QFrame(self.BrowserWidget) self.line_3.setFrameShape(QtWidgets.QFrame.VLine) self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_3.setObjectName("line_3") self.horizontalLayout_7.addWidget(self.line_3) self.DOFLable = QtWidgets.QLabel(self.BrowserWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.DOFLable.sizePolicy().hasHeightForWidth()) self.DOFLable.setSizePolicy(sizePolicy) self.DOFLable.setObjectName("DOFLable") self.horizontalLayout_7.addWidget(self.DOFLable) self.DOFview = QtWidgets.QLabel(self.BrowserWidget) self.DOFview.setText("") self.DOFview.setObjectName("DOFview") self.horizontalLayout_7.addWidget(self.DOFview) self.conflict = QtWidgets.QLabel(self.BrowserWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.conflict.sizePolicy().hasHeightForWidth()) self.conflict.setSizePolicy(sizePolicy) self.conflict.setTextFormat(QtCore.Qt.RichText) self.conflict.setObjectName("conflict") self.horizontalLayout_7.addWidget(self.conflict) self.console_widget = QtWidgets.QWidget(self.canvas_splitter) self.console_widget.setObjectName("console_widget") self.verticalLayout_11 = QtWidgets.QVBoxLayout(self.console_widget) self.verticalLayout_11.setContentsMargins(3, 3, 3, 3) self.verticalLayout_11.setObjectName("verticalLayout_11") self.line_6 = QtWidgets.QFrame(self.console_widget) self.line_6.setFrameShape(QtWidgets.QFrame.HLine) self.line_6.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_6.setObjectName("line_6") self.verticalLayout_11.addWidget(self.line_6) self.widget = QtWidgets.QWidget(self.console_widget) self.widget.setObjectName("widget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.widget) self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.label_3 = QtWidgets.QLabel(self.widget) self.label_3.setObjectName("label_3") self.horizontalLayout_5.addWidget(self.label_3) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem1) self.console_disconnect_button = QtWidgets.QPushButton(self.widget) icon15 = QtGui.QIcon() icon15.addPixmap(QtGui.QPixmap(":/icons/disconnect.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.console_disconnect_button.setIcon(icon15) self.console_disconnect_button.setObjectName( "console_disconnect_button") self.horizontalLayout_5.addWidget(self.console_disconnect_button) self.console_connect_button = QtWidgets.QPushButton(self.widget) icon16 = QtGui.QIcon() icon16.addPixmap(QtGui.QPixmap(":/icons/connect.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.console_connect_button.setIcon(icon16) self.console_connect_button.setObjectName("console_connect_button") self.horizontalLayout_5.addWidget(self.console_connect_button) self.line_2 = QtWidgets.QFrame(self.widget) self.line_2.setFrameShape(QtWidgets.QFrame.VLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.horizontalLayout_5.addWidget(self.line_2) self.clearConsole = QtWidgets.QPushButton(self.widget) icon17 = QtGui.QIcon() icon17.addPixmap(QtGui.QPixmap(":/icons/clean.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.clearConsole.setIcon(icon17) self.clearConsole.setObjectName("clearConsole") self.horizontalLayout_5.addWidget(self.clearConsole) self.verticalLayout_11.addWidget(self.widget) self.console_widget_browser = QtWidgets.QTextBrowser( self.console_widget) self.console_widget_browser.setObjectName("console_widget_browser") self.verticalLayout_11.addWidget(self.console_widget_browser) self.horizontalLayout_2.addWidget(self.canvas_splitter) self.verticalLayout_2.addWidget(self.main_splitter) MainWindow.setCentralWidget(self.central_widget) self.menu_bar = QtWidgets.QMenuBar(MainWindow) self.menu_bar.setGeometry(QtCore.QRect(0, 0, 1023, 25)) self.menu_bar.setObjectName("menu_bar") self.menu_file = QtWidgets.QMenu(self.menu_bar) self.menu_file.setStatusTip("") self.menu_file.setObjectName("menu_file") self.menu_mechanism = QtWidgets.QMenu(self.menu_bar) self.menu_mechanism.setObjectName("menu_mechanism") self.menu_options = QtWidgets.QMenu(self.menu_bar) self.menu_options.setObjectName("menu_options") self.menu_help = QtWidgets.QMenu(self.menu_bar) self.menu_help.setObjectName("menu_help") self.menu_edit = QtWidgets.QMenu(self.menu_bar) self.menu_edit.setObjectName("menu_edit") MainWindow.setMenuBar(self.menu_bar) self.status_bar = QtWidgets.QStatusBar(MainWindow) self.status_bar.setObjectName("status_bar") MainWindow.setStatusBar(self.status_bar) self.action_new_workbook = QtWidgets.QAction(MainWindow) icon18 = QtGui.QIcon() icon18.addPixmap(QtGui.QPixmap(":/icons/new_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_new_workbook.setIcon(icon18) self.action_new_workbook.setShortcutContext(QtCore.Qt.WindowShortcut) self.action_new_workbook.setObjectName("action_new_workbook") self.action_new_point = QtWidgets.QAction(MainWindow) self.action_new_point.setIcon(icon1) self.action_new_point.setObjectName("action_new_point") self.action_new_link = QtWidgets.QAction(MainWindow) self.action_new_link.setIcon(icon2) self.action_new_link.setObjectName("action_new_link") self.action_exit = QtWidgets.QAction(MainWindow) self.action_exit.setCheckable(False) icon19 = QtGui.QIcon() icon19.addPixmap(QtGui.QPixmap(":/icons/exit.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_exit.setIcon(icon19) self.action_exit.setObjectName("action_exit") self.action_mde_tw = QtWidgets.QAction(MainWindow) icon20 = QtGui.QIcon() icon20.addPixmap(QtGui.QPixmap(":/icons/kmol.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_mde_tw.setIcon(icon20) self.action_mde_tw.setObjectName("action_mde_tw") self.action_github_repository = QtWidgets.QAction(MainWindow) icon21 = QtGui.QIcon() icon21.addPixmap(QtGui.QPixmap(":/icons/github.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_github_repository.setIcon(icon21) self.action_github_repository.setObjectName("action_github_repository") self.action_about = QtWidgets.QAction(MainWindow) self.action_about.setIcon(icon) self.action_about.setObjectName("action_about") self.action_full_screen = QtWidgets.QAction(MainWindow) self.action_full_screen.setCheckable(True) icon22 = QtGui.QIcon() icon22.addPixmap(QtGui.QPixmap(":/icons/fullscreen.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_full_screen.setIcon(icon22) self.action_full_screen.setObjectName("action_full_screen") self.action_delete_point = QtWidgets.QAction(MainWindow) self.action_delete_point.setObjectName("action_delete_point") self.action_delete_link = QtWidgets.QAction(MainWindow) self.action_delete_link.setObjectName("action_delete_link") self.action_edit_point = QtWidgets.QAction(MainWindow) self.action_edit_point.setObjectName("action_edit_point") self.action_edit_link = QtWidgets.QAction(MainWindow) self.action_edit_link.setObjectName("action_edit_link") self.action_show_dimensions = QtWidgets.QAction(MainWindow) self.action_show_dimensions.setCheckable(True) self.action_show_dimensions.setObjectName("action_show_dimensions") self.action_show_point_mark = QtWidgets.QAction(MainWindow) self.action_show_point_mark.setCheckable(True) self.action_show_point_mark.setChecked(True) self.action_show_point_mark.setObjectName("action_show_point_mark") self.action_about_qt = QtWidgets.QAction(MainWindow) icon23 = QtGui.QIcon() icon23.addPixmap(QtGui.QPixmap(":/icons/qt.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_about_qt.setIcon(icon23) self.action_about_qt.setObjectName("action_about_qt") self.action_load_file = QtWidgets.QAction(MainWindow) icon24 = QtGui.QIcon() icon24.addPixmap(QtGui.QPixmap(":/icons/loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_load_file.setIcon(icon24) self.action_load_file.setObjectName("action_load_file") self.action_zoom_to_fit = QtWidgets.QAction(MainWindow) self.action_zoom_to_fit.setIcon(icon13) self.action_zoom_to_fit.setObjectName("action_zoom_to_fit") self.action_path_style = QtWidgets.QAction(MainWindow) self.action_path_style.setCheckable(True) self.action_path_style.setChecked(True) self.action_path_style.setObjectName("action_path_style") self.action_pyslvs_com = QtWidgets.QAction(MainWindow) self.action_pyslvs_com.setIcon(icon) self.action_pyslvs_com.setObjectName("action_pyslvs_com") self.action_show_console = QtWidgets.QAction(MainWindow) self.action_show_console.setCheckable(True) icon25 = QtGui.QIcon() icon25.addPixmap(QtGui.QPixmap(":/icons/konsole.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_show_console.setIcon(icon25) self.action_show_console.setObjectName("action_show_console") self.action_example = QtWidgets.QAction(MainWindow) icon26 = QtGui.QIcon() icon26.addPixmap(QtGui.QPixmap(":/icons/example.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_example.setIcon(icon26) self.action_example.setObjectName("action_example") self.action_check_update = QtWidgets.QAction(MainWindow) self.action_check_update.setObjectName("action_check_update") self.action_new_window = QtWidgets.QAction(MainWindow) icon27 = QtGui.QIcon() icon27.addPixmap(QtGui.QPixmap(":/icons/new_window.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_new_window.setIcon(icon27) self.action_new_window.setObjectName("action_new_window") self.action_scale_points = QtWidgets.QAction(MainWindow) self.action_scale_points.setObjectName("action_scale_points") self.action_save = QtWidgets.QAction(MainWindow) icon28 = QtGui.QIcon() icon28.addPixmap(QtGui.QPixmap(":/icons/yaml.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_save.setIcon(icon28) self.action_save.setObjectName("action_save") self.action_save_as = QtWidgets.QAction(MainWindow) self.action_save_as.setIcon(icon28) self.action_save_as.setObjectName("action_save_as") self.action_documentation = QtWidgets.QAction(MainWindow) icon29 = QtGui.QIcon() icon29.addPixmap(QtGui.QPixmap(":/icons/collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_documentation.setIcon(icon29) self.action_documentation.setObjectName("action_documentation") self.action_set_link_length = QtWidgets.QAction(MainWindow) self.action_set_link_length.setObjectName("action_set_link_length") self.action_preference = QtWidgets.QAction(MainWindow) icon30 = QtGui.QIcon() icon30.addPixmap(QtGui.QPixmap(":/icons/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.action_preference.setIcon(icon30) self.action_preference.setObjectName("action_preference") self.menu_file.addAction(self.action_new_workbook) self.menu_file.addAction(self.action_load_file) self.menu_file.addAction(self.action_example) self.menu_file.addSeparator() self.menu_file.addAction(self.action_save) self.menu_file.addAction(self.action_save_as) self.menu_file.addSeparator() self.menu_file.addAction(self.action_full_screen) self.menu_file.addAction(self.action_new_window) self.menu_file.addAction(self.action_exit) self.menu_mechanism.addAction(self.action_new_point) self.menu_mechanism.addAction(self.action_new_link) self.menu_mechanism.addSeparator() self.menu_mechanism.addAction(self.action_edit_point) self.menu_mechanism.addAction(self.action_edit_link) self.menu_mechanism.addSeparator() self.menu_mechanism.addAction(self.action_delete_point) self.menu_mechanism.addAction(self.action_delete_link) self.menu_mechanism.addSeparator() self.menu_mechanism.addAction(self.action_scale_points) self.menu_mechanism.addAction(self.action_set_link_length) self.menu_options.addAction(self.action_show_console) self.menu_options.addSeparator() self.menu_options.addAction(self.action_zoom_to_fit) self.menu_options.addAction(self.action_show_point_mark) self.menu_options.addAction(self.action_show_dimensions) self.menu_options.addAction(self.action_path_style) self.menu_options.addSeparator() self.menu_options.addAction(self.action_preference) self.menu_help.addAction(self.action_pyslvs_com) self.menu_help.addAction(self.action_github_repository) self.menu_help.addAction(self.action_documentation) self.menu_help.addAction(self.action_mde_tw) self.menu_help.addSeparator() self.menu_help.addAction(self.action_check_update) self.menu_help.addSeparator() self.menu_help.addAction(self.action_about_qt) self.menu_help.addAction(self.action_about) self.menu_bar.addAction(self.menu_file.menuAction()) self.menu_bar.addAction(self.menu_edit.menuAction()) self.menu_bar.addAction(self.menu_mechanism.menuAction()) self.menu_bar.addAction(self.menu_options.menuAction()) self.menu_bar.addAction(self.menu_help.menuAction()) self.retranslateUi(MainWindow) self.synthesis_tab_widget.setCurrentIndex(-1) self.action_exit.triggered.connect(MainWindow.close) self.action_show_console.toggled['bool'].connect( self.console_widget.setVisible) self.clearConsole.clicked.connect(self.console_widget_browser.clear) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def __init__(self): super().__init__() self.setMinimumSize(400, 300) self.setWindowTitle('QtAwesome Icon Browser') qtawesome._instance() fontMaps = qtawesome._resource['iconic'].charmap iconNames = [] for fontCollection, fontData in fontMaps.items(): for iconName in fontData: iconNames.append('%s.%s' % (fontCollection, iconName)) self._filterTimer = QtCore.QTimer(self) self._filterTimer.setSingleShot(True) self._filterTimer.setInterval(AUTO_SEARCH_TIMEOUT) self._filterTimer.timeout.connect(self._updateFilter) model = IconModel(self.palette().color(QtGui.QPalette.Text)) model.setStringList(sorted(iconNames)) self._proxyModel = QtCore.QSortFilterProxyModel() self._proxyModel.setSourceModel(model) self._proxyModel.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive) self._listView = IconListView(self) self._listView.setUniformItemSizes(True) self._listView.setViewMode(QtWidgets.QListView.IconMode) self._listView.setModel(self._proxyModel) self._listView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self._listView.doubleClicked.connect(self._copyIconText) self._lineEdit = QtWidgets.QLineEdit(self) self._lineEdit.setAlignment(QtCore.Qt.AlignCenter) self._lineEdit.textChanged.connect(self._triggerDelayedUpdate) self._lineEdit.returnPressed.connect(self._triggerImmediateUpdate) self._comboBox = QtWidgets.QComboBox(self) self._comboBox.setMinimumWidth(75) self._comboBox.currentIndexChanged.connect( self._triggerImmediateUpdate) self._comboBox.addItems([ALL_COLLECTIONS] + sorted(fontMaps.keys())) lyt = QtWidgets.QHBoxLayout() lyt.setContentsMargins(0, 0, 0, 0) lyt.addWidget(self._comboBox) lyt.addWidget(self._lineEdit) searchBarFrame = QtWidgets.QFrame(self) searchBarFrame.setLayout(lyt) self._copyButton = QtWidgets.QPushButton('Copy Name', self) self._copyButton.clicked.connect(self._copyIconText) lyt = QtWidgets.QVBoxLayout() lyt.addWidget(searchBarFrame) lyt.addWidget(self._listView) lyt.addWidget(self._copyButton) frame = QtWidgets.QFrame(self) frame.setLayout(lyt) self.setCentralWidget(frame) QtWidgets.QShortcut( QtGui.QKeySequence(QtCore.Qt.Key_Return), self, self._copyIconText, ) self._lineEdit.setFocus() geo = self.geometry() desktop = QtWidgets.QApplication.desktop() screen = desktop.screenNumber(desktop.cursor().pos()) centerPoint = desktop.screenGeometry(screen).center() geo.moveCenter(centerPoint) self.setGeometry(geo)
def __init__(self, colorNeg=None, colorPos=None, value=0, center=0, maxAbs=1, parent=None, label=True, probability=False, *args, **kwargs): """ Parameters: colorNeg: str hex color code, for values below the center colorPos: str hex color code, for values above the center value: float initial value of bar center: float center point of the bar, highlights values different to this maxAbs: float maximum difference from center that will be shown parent: QtWidget parent widget label: bool whether or not to write the value above the bar probability: bool if true, show percentage """ QtWidgets.QFrame.__init__(self, parent=parent, *args, **kwargs) self.setObjectName('valueBar') self.probability = probability self.grid = QtWidgets.QGridLayout() self.setLayout(self.grid) self.setContentsMargins(0,0,0,0) self.grid.setSpacing(0) self.grid.setRowStretch(0, 2) self.grid.setRowStretch(1, 1) self.grid.setRowStretch(2, 1) if colorNeg is None: colorNeg = 'color_2' if colorPos is None: colorPos = 'color_1' self.hasLabel = label if self.hasLabel: self.label=QtWidgets.QLabel(FormatNumber(value, self.probability, rng=maxAbs)) self.label.setAlignment(QtCore.Qt.AlignCenter) self.grid.addWidget(self.label, 0, 0, 1, 4) f = QtWidgets.QFrame() f.setObjectName('background') self.grid.addWidget(f,1,0) f = QtWidgets.QFrame() f.setObjectName(colorNeg) self.grid.addWidget(f,1,1) f = QtWidgets.QFrame() f.setObjectName(colorPos) self.grid.addWidget(f,1,2) f = QtWidgets.QFrame() f.setObjectName('background') self.grid.addWidget(f,1,3) self.ChangeValue(value, center, maxAbs)
def __init__(self, layout): line = QtWidgets.QFrame() line.setFrameShape(QtWidgets.QFrame.HLine) line.setFrameShadow(QtWidgets.QFrame.Sunken) layout.addWidget(line)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1120, 717) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_7 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_7.setObjectName("gridLayout_7") self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget) self.groupBox_2.setObjectName("groupBox_2") self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2) self.gridLayout.setObjectName("gridLayout") self.tabWidget = QtWidgets.QTabWidget(self.groupBox_2) self.tabWidget.setObjectName("tabWidget") self.tab = QtWidgets.QWidget() self.tab.setObjectName("tab") self.gridLayout_4 = QtWidgets.QGridLayout(self.tab) self.gridLayout_4.setObjectName("gridLayout_4") self.groupBox_3 = QtWidgets.QGroupBox(self.tab) self.groupBox_3.setObjectName("groupBox_3") self.gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_3) self.gridLayout_5.setObjectName("gridLayout_5") self.label_2 = QtWidgets.QLabel(self.groupBox_3) self.label_2.setObjectName("label_2") self.gridLayout_5.addWidget(self.label_2, 0, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(self.groupBox_3) self.lineEdit.setObjectName("lineEdit") self.gridLayout_5.addWidget(self.lineEdit, 0, 1, 1, 1) self.frame = QtWidgets.QFrame(self.groupBox_3) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.formLayout = QtWidgets.QFormLayout(self.frame) self.formLayout.setFieldGrowthPolicy( QtWidgets.QFormLayout.AllNonFixedFieldsGrow) self.formLayout.setObjectName("formLayout") self.label_3 = QtWidgets.QLabel(self.frame) self.label_3.setObjectName("label_3") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3) self.lineEdit_2 = QtWidgets.QLineEdit(self.frame) self.lineEdit_2.setObjectName("lineEdit_2") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.lineEdit_2) self.listWidget_2 = QtWidgets.QListWidget(self.frame) self.listWidget_2.setObjectName("listWidget_2") item = QtWidgets.QListWidgetItem() self.listWidget_2.addItem(item) self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.listWidget_2) self.gridLayout_5.addWidget(self.frame, 2, 0, 1, 2) self.listWidget = QtWidgets.QListWidget(self.groupBox_3) self.listWidget.setObjectName("listWidget") item = QtWidgets.QListWidgetItem() self.listWidget.addItem(item) self.gridLayout_5.addWidget(self.listWidget, 1, 1, 1, 1) self.gridLayout_4.addWidget(self.groupBox_3, 1, 0, 1, 1) self.tabWidget.addTab(self.tab, "") self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName("tab_2") self.gridLayout_6 = QtWidgets.QGridLayout(self.tab_2) self.gridLayout_6.setObjectName("gridLayout_6") self.label_4 = QtWidgets.QLabel(self.tab_2) self.label_4.setObjectName("label_4") self.gridLayout_6.addWidget(self.label_4, 0, 0, 1, 1) self.tabWidget.addTab(self.tab_2, "") self.tab_3 = QtWidgets.QWidget() self.tab_3.setObjectName("tab_3") self.tabWidget.addTab(self.tab_3, "") self.tab_4 = QtWidgets.QWidget() self.tab_4.setObjectName("tab_4") self.tabWidget.addTab(self.tab_4, "") self.tab_5 = QtWidgets.QWidget() self.tab_5.setObjectName("tab_5") self.tabWidget.addTab(self.tab_5, "") self.tab_6 = QtWidgets.QWidget() self.tab_6.setObjectName("tab_6") self.tabWidget.addTab(self.tab_6, "") self.tab_7 = QtWidgets.QWidget() self.tab_7.setObjectName("tab_7") self.tabWidget.addTab(self.tab_7, "") self.tab_8 = QtWidgets.QWidget() self.tab_8.setObjectName("tab_8") self.tabWidget.addTab(self.tab_8, "") self.tab_9 = QtWidgets.QWidget() self.tab_9.setObjectName("tab_9") self.tabWidget.addTab(self.tab_9, "") self.tab_10 = QtWidgets.QWidget() self.tab_10.setObjectName("tab_10") self.tabWidget.addTab(self.tab_10, "") self.tab_11 = QtWidgets.QWidget() self.tab_11.setObjectName("tab_11") self.tabWidget.addTab(self.tab_11, "") self.tab_12 = QtWidgets.QWidget() self.tab_12.setObjectName("tab_12") self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_12) self.gridLayout_3.setObjectName("gridLayout_3") self.tabWidget.addTab(self.tab_12, "") self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) self.gridLayout_7.addWidget(self.groupBox_2, 0, 0, 1, 1) self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setObjectName("groupBox") self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_2.setObjectName("gridLayout_2") self.label = QtWidgets.QLabel(self.groupBox) self.label.setLineWidth(0) self.label.setTextFormat(QtCore.Qt.RichText) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setWordWrap(True) self.label.setOpenExternalLinks(True) self.label.setTextInteractionFlags(QtCore.Qt.TextBrowserInteraction) self.label.setObjectName("label") self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1) self.gridLayout_7.addWidget(self.groupBox, 1, 0, 1, 1) self.label_71 = QtWidgets.QLabel(self.centralwidget) self.label_71.setAlignment(QtCore.Qt.AlignCenter) self.label_71.setObjectName("label_71") self.gridLayout_7.addWidget(self.label_71, 2, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1120, 23)) self.menubar.setObjectName("menubar") self.menuMenu = QtWidgets.QMenu(self.menubar) self.menuMenu.setObjectName("menuMenu") self.menuMenuSub = QtWidgets.QMenu(self.menuMenu) self.menuMenuSub.setObjectName("menuMenuSub") self.menuMenuDelayed = QtWidgets.QMenu(self.menubar) self.menuMenuDelayed.setObjectName("menuMenuDelayed") self.menuMenuSubDelayed = QtWidgets.QMenu(self.menuMenuDelayed) self.menuMenuSubDelayed.setObjectName("menuMenuSubDelayed") self.menuMenuCheckale = QtWidgets.QMenu(self.menubar) self.menuMenuCheckale.setObjectName("menuMenuCheckale") self.menuNew = QtWidgets.QMenu(self.menuMenuCheckale) self.menuNew.setObjectName("menuNew") self.menuAbout = QtWidgets.QMenu(self.menubar) self.menuAbout.setObjectName("menuAbout") self.menuHelp = QtWidgets.QMenu(self.menubar) self.menuHelp.setObjectName("menuHelp") self.menuMenuActionDis = QtWidgets.QMenu(self.menubar) self.menuMenuActionDis.setEnabled(True) self.menuMenuActionDis.setObjectName("menuMenuActionDis") self.menuMenuDisabled = QtWidgets.QMenu(self.menubar) self.menuMenuDisabled.setEnabled(False) self.menuMenuDisabled.setObjectName("menuMenuDisabled") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.toolBar = QtWidgets.QToolBar(MainWindow) self.toolBar.setEnabled(True) self.toolBar.setIconSize(QtCore.QSize(16, 16)) self.toolBar.setObjectName("toolBar") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar) self.toolBarDelayed = QtWidgets.QToolBar(MainWindow) self.toolBarDelayed.setObjectName("toolBarDelayed") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBarDelayed) self.toolBarCheckable = QtWidgets.QToolBar(MainWindow) self.toolBarCheckable.setObjectName("toolBarCheckable") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBarCheckable) MainWindow.insertToolBarBreak(self.toolBarCheckable) self.toolBarActionDis = QtWidgets.QToolBar(MainWindow) self.toolBarActionDis.setObjectName("toolBarActionDis") MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBarActionDis) self.actionActionA = QtWidgets.QAction(MainWindow) self.actionActionA.setObjectName("actionActionA") self.actionActionSubA = QtWidgets.QAction(MainWindow) self.actionActionSubA.setObjectName("actionActionSubA") self.actionActionSubB = QtWidgets.QAction(MainWindow) self.actionActionSubB.setObjectName("actionActionSubB") self.actionActionDelayedA = QtWidgets.QAction(MainWindow) self.actionActionDelayedA.setObjectName("actionActionDelayedA") self.actionActionDelayedSubA = QtWidgets.QAction(MainWindow) self.actionActionDelayedSubA.setObjectName("actionActionDelayedSubA") self.actionActionCheckableA = QtWidgets.QAction(MainWindow) self.actionActionCheckableA.setCheckable(True) self.actionActionCheckableA.setObjectName("actionActionCheckableA") self.actionActionCheckableSubAChecked = QtWidgets.QAction(MainWindow) self.actionActionCheckableSubAChecked.setCheckable(True) self.actionActionCheckableSubAChecked.setChecked(True) self.actionActionCheckableSubAChecked.setObjectName( "actionActionCheckableSubAChecked") self.actionActionCheckableSubAUnchecked = QtWidgets.QAction(MainWindow) self.actionActionCheckableSubAUnchecked.setCheckable(True) self.actionActionCheckableSubAUnchecked.setObjectName( "actionActionCheckableSubAUnchecked") self.actionNewB = QtWidgets.QAction(MainWindow) self.actionNewB.setObjectName("actionNewB") self.actionNewC = QtWidgets.QAction(MainWindow) self.actionNewC.setObjectName("actionNewC") self.actionNewD = QtWidgets.QAction(MainWindow) self.actionNewD.setObjectName("actionNewD") self.actionNewE = QtWidgets.QAction(MainWindow) self.actionNewE.setObjectName("actionNewE") self.actionActionIconADis = QtWidgets.QAction(MainWindow) self.actionActionIconADis.setEnabled(False) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/qss_icons/rc/window_undock_focus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionActionIconADis.setIcon(icon) self.actionActionIconADis.setObjectName("actionActionIconADis") self.actionActionIconB = QtWidgets.QAction(MainWindow) self.actionActionIconB.setEnabled(True) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/qss_icons/rc/window_close_focus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionActionIconB.setIcon(icon1) self.actionActionIconB.setObjectName("actionActionIconB") self.actionActionIconC = QtWidgets.QAction(MainWindow) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/qss_icons/rc/arrow_right_focus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionActionIconC.setIcon(icon2) self.actionActionIconC.setObjectName("actionActionIconC") self.actionActionDis = QtWidgets.QAction(MainWindow) self.actionActionDis.setEnabled(False) self.actionActionDis.setObjectName("actionActionDis") self.actionActionCheckableCheckedDis = QtWidgets.QAction(MainWindow) self.actionActionCheckableCheckedDis.setCheckable(True) self.actionActionCheckableCheckedDis.setChecked(True) self.actionActionCheckableCheckedDis.setEnabled(False) self.actionActionCheckableCheckedDis.setObjectName( "actionActionCheckableCheckedDis") self.actionActionCheckableUncheckedDis = QtWidgets.QAction(MainWindow) self.actionActionCheckableUncheckedDis.setCheckable(True) self.actionActionCheckableUncheckedDis.setEnabled(False) self.actionActionCheckableUncheckedDis.setObjectName( "actionActionCheckableUncheckedDis") self.menuMenuSub.addAction(self.actionActionSubA) self.menuMenuSub.addAction(self.actionActionSubB) self.menuMenu.addAction(self.actionActionA) self.menuMenu.addAction(self.menuMenuSub.menuAction()) self.menuMenu.addAction(self.actionActionIconADis) self.menuMenu.addAction(self.actionActionIconB) self.menuMenu.addAction(self.actionActionIconC) self.menuMenuSubDelayed.addAction(self.actionActionDelayedSubA) self.menuMenuDelayed.addAction(self.actionActionDelayedA) self.menuMenuDelayed.addAction(self.actionActionCheckableA) self.menuMenuDelayed.addAction(self.menuMenuSubDelayed.menuAction()) self.menuNew.addSeparator() self.menuNew.addAction(self.actionNewB) self.menuNew.addAction(self.actionNewD) self.menuNew.addAction(self.actionNewC) self.menuNew.addSeparator() self.menuNew.addAction(self.actionNewE) self.menuMenuCheckale.addAction(self.actionActionCheckableA) self.menuMenuCheckale.addAction(self.actionActionIconADis) self.menuMenuCheckale.addAction(self.actionActionIconB) self.menuMenuCheckale.addAction(self.actionActionIconC) self.menuMenuCheckale.addSeparator() self.menuMenuCheckale.addAction(self.menuNew.menuAction()) self.menuMenuActionDis.addAction(self.actionActionDis) self.menuMenuActionDis.addAction(self.actionActionCheckableCheckedDis) self.menuMenuActionDis.addAction( self.actionActionCheckableUncheckedDis) self.menuMenuActionDis.addAction(self.actionActionIconADis) self.menuMenuActionDis.addAction(self.actionActionIconB) self.menuMenuActionDis.addAction(self.actionActionIconC) self.menubar.addAction(self.menuMenu.menuAction()) self.menubar.addAction(self.menuMenuDelayed.menuAction()) self.menubar.addAction(self.menuMenuCheckale.menuAction()) self.menubar.addAction(self.menuMenuActionDis.menuAction()) self.menubar.addAction(self.menuMenuDisabled.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.menubar.addAction(self.menuAbout.menuAction()) self.toolBar.addAction(self.actionActionA) self.toolBar.addSeparator() self.toolBar.addAction(self.actionActionSubA) self.toolBar.addAction(self.actionActionSubB) self.toolBar.addSeparator() self.toolBar.addAction(self.actionActionIconADis) self.toolBar.addAction(self.actionActionIconB) self.toolBar.addAction(self.actionActionIconC) self.toolBarDelayed.addAction(self.actionActionDelayedA) self.toolBarDelayed.addSeparator() self.toolBarDelayed.addAction(self.actionActionDelayedSubA) self.toolBarCheckable.addAction(self.actionActionCheckableA) self.toolBarCheckable.addSeparator() self.toolBarCheckable.addAction(self.actionActionCheckableSubAChecked) self.toolBarCheckable.addAction( self.actionActionCheckableSubAUnchecked) self.toolBarActionDis.addAction(self.actionActionDis) self.toolBarActionDis.addAction(self.actionActionCheckableCheckedDis) self.toolBarActionDis.addAction(self.actionActionCheckableUncheckedDis) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow) MainWindow.setTabOrder(self.lineEdit, self.tabWidget) MainWindow.setTabOrder(self.tabWidget, self.lineEdit_2)
def set_data(self, data): """ Change datasets :parm data: :class:`~glue.core.data.Data` instance """ # remove old widgets self._clear() self._data = data if data is None or data.ndim < 3: return # create slider widget for each dimension... for i, s in enumerate(data.shape): # TODO: For now we simply pass a single set of world coordinates, # but we will need to generalize this in future. We deliberately # check the type of data.coords here since we want to treat # subclasses differently. if type(data.coords) != Coordinates: world = data.coords.world_axis(data, i) world_unit = data.coords.world_axis_unit(i) world_warning = len(data.coords.dependent_axes(i)) > 1 else: world = None world_unit = None world_warning = False slider = SliceWidget(data.get_world_component_id(i).label, hi=s - 1, world=world, world_unit=world_unit, world_warning=world_warning) if i == self.ndim - 1: slider.mode = 'x' elif i == self.ndim - 2: slider.mode = 'y' else: slider.mode = 'slice' self._slices.append(slider) # save ref to prevent PySide segfault self.__on_slice = partial(self._on_slice, i) self.__on_mode = partial(self._on_mode, i) slider.slice_changed.connect(self.__on_slice) slider.mode_changed.connect(self.__on_mode) if s == 1: slider.freeze() # ... and add to the layout for s in self._slices[::-1]: self.layout.addWidget(s) if s is not self._slices[0]: line = QtWidgets.QFrame() line.setFrameShape(QtWidgets.QFrame.HLine) line.setFrameShadow(QtWidgets.QFrame.Sunken) self.layout.addWidget(line) s.show() # this somehow fixes #342 self.layout.addStretch(5)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(511, 700) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/dimensional_synthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_4 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_4.setObjectName("verticalLayout_4") self.main_splitter = QtWidgets.QSplitter(Form) self.main_splitter.setOrientation(QtCore.Qt.Vertical) self.main_splitter.setObjectName("main_splitter") self.verticalGroupBox = QtWidgets.QGroupBox(self.main_splitter) self.verticalGroupBox.setObjectName("verticalGroupBox") self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.verticalGroupBox) self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.result_list = QtWidgets.QListWidget(self.verticalGroupBox) self.result_list.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarAsNeeded) self.result_list.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.result_list.setObjectName("result_list") self.verticalLayout_13.addWidget(self.result_list) self.horizontalLayout_10 = QtWidgets.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.result_load_settings = QtWidgets.QPushButton( self.verticalGroupBox) self.result_load_settings.setEnabled(False) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.result_load_settings.setIcon(icon1) self.result_load_settings.setObjectName("result_load_settings") self.horizontalLayout_10.addWidget(self.result_load_settings) self.result_clipboard = QtWidgets.QPushButton(self.verticalGroupBox) self.result_clipboard.setEnabled(False) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.result_clipboard.setIcon(icon2) self.result_clipboard.setObjectName("result_clipboard") self.horizontalLayout_10.addWidget(self.result_clipboard) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_10.addItem(spacerItem) self.delete_button = QtWidgets.QPushButton(self.verticalGroupBox) self.delete_button.setEnabled(False) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.delete_button.setIcon(icon3) self.delete_button.setObjectName("delete_button") self.horizontalLayout_10.addWidget(self.delete_button) self.merge_button = QtWidgets.QPushButton(self.verticalGroupBox) self.merge_button.setEnabled(False) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/merge.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.merge_button.setIcon(icon4) self.merge_button.setObjectName("merge_button") self.horizontalLayout_10.addWidget(self.merge_button) self.verticalLayout_13.addLayout(self.horizontalLayout_10) self.target_label = QtWidgets.QLabel(self.verticalGroupBox) self.target_label.setWordWrap(True) self.target_label.setObjectName("target_label") self.verticalLayout_13.addWidget(self.target_label) self.horizontalLayout_6.addLayout(self.verticalLayout_13) self.options_tab = QtWidgets.QTabWidget(self.main_splitter) self.options_tab.setObjectName("options_tab") self.structure = QtWidgets.QWidget() self.structure.setObjectName("structure") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.structure) self.verticalLayout_6.setObjectName("verticalLayout_6") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.load_profile = QtWidgets.QPushButton(self.structure) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.load_profile.setIcon(icon5) self.load_profile.setObjectName("load_profile") self.horizontalLayout_7.addWidget(self.load_profile) self.save_profile = QtWidgets.QPushButton(self.structure) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/save_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_profile.setIcon(icon6) self.save_profile.setObjectName("save_profile") self.horizontalLayout_7.addWidget(self.save_profile) self.profile_name = QtWidgets.QLineEdit(self.structure) self.profile_name.setReadOnly(True) self.profile_name.setObjectName("profile_name") self.horizontalLayout_7.addWidget(self.profile_name) self.clear_button = QtWidgets.QPushButton(self.structure) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/clean.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.clear_button.setIcon(icon7) self.clear_button.setObjectName("clear_button") self.horizontalLayout_7.addWidget(self.clear_button) self.verticalLayout_6.addLayout(self.horizontalLayout_7) self.horizontalLayout_17 = QtWidgets.QHBoxLayout() self.horizontalLayout_17.setObjectName("horizontalLayout_17") self.expression_string = QtWidgets.QLineEdit(self.structure) self.expression_string.setReadOnly(True) self.expression_string.setObjectName("expression_string") self.horizontalLayout_17.addWidget(self.expression_string) self.expr_copy = QtWidgets.QPushButton(self.structure) self.expr_copy.setIcon(icon2) self.expr_copy.setObjectName("expr_copy") self.horizontalLayout_17.addWidget(self.expr_copy) self.verticalLayout_6.addLayout(self.horizontalLayout_17) self.up_splitter = QtWidgets.QSplitter(self.structure) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.up_splitter.sizePolicy().hasHeightForWidth()) self.up_splitter.setSizePolicy(sizePolicy) self.up_splitter.setOrientation(QtCore.Qt.Horizontal) self.up_splitter.setObjectName("up_splitter") self.parameter_list = QtWidgets.QTableWidget(self.up_splitter) self.parameter_list.setSelectionBehavior( QtWidgets.QAbstractItemView.SelectRows) self.parameter_list.setVerticalScrollMode( QtWidgets.QAbstractItemView.ScrollPerPixel) self.parameter_list.setHorizontalScrollMode( QtWidgets.QAbstractItemView.ScrollPerPixel) self.parameter_list.setObjectName("parameter_list") self.parameter_list.setColumnCount(5) self.parameter_list.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.parameter_list.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.parameter_list.setHorizontalHeaderItem(1, item) item = QtWidgets.QTableWidgetItem() self.parameter_list.setHorizontalHeaderItem(2, item) item = QtWidgets.QTableWidgetItem() self.parameter_list.setHorizontalHeaderItem(3, item) item = QtWidgets.QTableWidgetItem() self.parameter_list.setHorizontalHeaderItem(4, item) self.preview_box = QtWidgets.QGroupBox(self.up_splitter) self.preview_box.setObjectName("preview_box") self.preview_layout = QtWidgets.QVBoxLayout(self.preview_box) self.preview_layout.setObjectName("preview_layout") self.show_solutions = QtWidgets.QCheckBox(self.preview_box) self.show_solutions.setChecked(True) self.show_solutions.setObjectName("show_solutions") self.preview_layout.addWidget(self.show_solutions) self.verticalLayout_6.addWidget(self.up_splitter) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/structure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.options_tab.addTab(self.structure, icon8, "") self.target_path = QtWidgets.QWidget() self.target_path.setObjectName("target_path") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.target_path) self.verticalLayout_2.setObjectName("verticalLayout_2") self.down_splitter = QtWidgets.QSplitter(self.target_path) self.down_splitter.setOrientation(QtCore.Qt.Horizontal) self.down_splitter.setObjectName("down_splitter") self.verticalLayoutWidget = QtWidgets.QWidget(self.down_splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.target_points = QtWidgets.QListWidget(self.verticalLayoutWidget) self.target_points.setObjectName("target_points") self.verticalLayout.addWidget(self.target_points) self.ordered_option = QtWidgets.QCheckBox(self.verticalLayoutWidget) self.ordered_option.setChecked(True) self.ordered_option.setObjectName("ordered_option") self.verticalLayout.addWidget(self.ordered_option) self.shape_only_option = QtWidgets.QCheckBox(self.verticalLayoutWidget) self.shape_only_option.setObjectName("shape_only_option") self.verticalLayout.addWidget(self.shape_only_option) self.wavelet_mode_option = QtWidgets.QCheckBox( self.verticalLayoutWidget) self.wavelet_mode_option.setObjectName("wavelet_mode_option") self.verticalLayout.addWidget(self.wavelet_mode_option) self.layoutWidget = QtWidgets.QWidget(self.down_splitter) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout_5 = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout_8 = QtWidgets.QVBoxLayout() self.verticalLayout_8.setObjectName("verticalLayout_8") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.point_num = QtWidgets.QLabel(self.layoutWidget) self.point_num.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.point_num.setObjectName("point_num") self.horizontalLayout_2.addWidget(self.point_num) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.path_paste = QtWidgets.QPushButton(self.layoutWidget) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/paste.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.path_paste.setIcon(icon9) self.path_paste.setObjectName("path_paste") self.horizontalLayout_2.addWidget(self.path_paste) self.path_copy = QtWidgets.QPushButton(self.layoutWidget) self.path_copy.setIcon(icon2) self.path_copy.setObjectName("path_copy") self.horizontalLayout_2.addWidget(self.path_copy) self.path_clear = QtWidgets.QPushButton(self.layoutWidget) self.path_clear.setIcon(icon7) self.path_clear.setAutoDefault(False) self.path_clear.setObjectName("path_clear") self.horizontalLayout_2.addWidget(self.path_clear) self.verticalLayout_8.addLayout(self.horizontalLayout_2) self.path_list = QtWidgets.QListWidget(self.layoutWidget) self.path_list.setObjectName("path_list") self.verticalLayout_8.addWidget(self.path_list) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.point_up = QtWidgets.QPushButton(self.layoutWidget) icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/arrow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.point_up.setIcon(icon10) self.point_up.setObjectName("point_up") self.horizontalLayout_8.addWidget(self.point_up) self.point_down = QtWidgets.QPushButton(self.layoutWidget) icon11 = QtGui.QIcon() icon11.addPixmap(QtGui.QPixmap(":/icons/arrow_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.point_down.setIcon(icon11) self.point_down.setObjectName("point_down") self.horizontalLayout_8.addWidget(self.point_down) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem2) self.point_delete = QtWidgets.QPushButton(self.layoutWidget) self.point_delete.setIcon(icon3) self.point_delete.setObjectName("point_delete") self.horizontalLayout_8.addWidget(self.point_delete) self.close_path = QtWidgets.QPushButton(self.layoutWidget) icon12 = QtGui.QIcon() icon12.addPixmap(QtGui.QPixmap(":/icons/free_move_off.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.close_path.setIcon(icon12) self.close_path.setObjectName("close_path") self.horizontalLayout_8.addWidget(self.close_path) self.edit_target_point_button = QtWidgets.QPushButton( self.layoutWidget) icon13 = QtGui.QIcon() icon13.addPixmap(QtGui.QPixmap(":/icons/translate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.edit_target_point_button.setIcon(icon13) self.edit_target_point_button.setCheckable(True) self.edit_target_point_button.setChecked(True) self.edit_target_point_button.setObjectName("edit_target_point_button") self.horizontalLayout_8.addWidget(self.edit_target_point_button) self.verticalLayout_8.addLayout(self.horizontalLayout_8) self.horizontalLayout_5.addLayout(self.verticalLayout_8) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.save_path_button = QtWidgets.QPushButton(self.layoutWidget) self.save_path_button.setIcon(icon6) self.save_path_button.setIconSize(QtCore.QSize(40, 40)) self.save_path_button.setObjectName("save_path_button") self.verticalLayout_3.addWidget(self.save_path_button) self.import_csv_button = QtWidgets.QPushButton(self.layoutWidget) self.import_csv_button.setText("") icon14 = QtGui.QIcon() icon14.addPixmap(QtGui.QPixmap(":/icons/loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.import_csv_button.setIcon(icon14) self.import_csv_button.setIconSize(QtCore.QSize(40, 40)) self.import_csv_button.setObjectName("import_csv_button") self.verticalLayout_3.addWidget(self.import_csv_button) self.import_xlsx_button = QtWidgets.QPushButton(self.layoutWidget) self.import_xlsx_button.setText("") icon15 = QtGui.QIcon() icon15.addPixmap(QtGui.QPixmap(":/icons/excel.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.import_xlsx_button.setIcon(icon15) self.import_xlsx_button.setIconSize(QtCore.QSize(40, 40)) self.import_xlsx_button.setObjectName("import_xlsx_button") self.verticalLayout_3.addWidget(self.import_xlsx_button) self.line = QtWidgets.QFrame(self.layoutWidget) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_3.addWidget(self.line) self.edit_path_button = QtWidgets.QPushButton(self.layoutWidget) icon16 = QtGui.QIcon() icon16.addPixmap(QtGui.QPixmap(":/icons/formula.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.edit_path_button.setIcon(icon16) self.edit_path_button.setIconSize(QtCore.QSize(40, 40)) self.edit_path_button.setObjectName("edit_path_button") self.verticalLayout_3.addWidget(self.edit_path_button) self.efd_button = QtWidgets.QPushButton(self.layoutWidget) icon17 = QtGui.QIcon() icon17.addPixmap(QtGui.QPixmap(":/icons/efd.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.efd_button.setIcon(icon17) self.efd_button.setIconSize(QtCore.QSize(40, 40)) self.efd_button.setObjectName("efd_button") self.verticalLayout_3.addWidget(self.efd_button) self.norm_path_button = QtWidgets.QPushButton(self.layoutWidget) icon18 = QtGui.QIcon() icon18.addPixmap(QtGui.QPixmap(":/icons/normalization.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.norm_path_button.setIcon(icon18) self.norm_path_button.setIconSize(QtCore.QSize(40, 40)) self.norm_path_button.setObjectName("norm_path_button") self.verticalLayout_3.addWidget(self.norm_path_button) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem3) self.horizontalLayout_5.addLayout(self.verticalLayout_3) self.verticalLayout_2.addWidget(self.down_splitter) self.options_tab.addTab(self.target_path, icon, "") self.algorithm = QtWidgets.QWidget() self.algorithm.setObjectName("algorithm") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.algorithm) self.verticalLayout_7.setObjectName("verticalLayout_7") self.algorithm_layout = QtWidgets.QVBoxLayout() self.algorithm_layout.setObjectName("algorithm_layout") self.verticalLayout_7.addLayout(self.algorithm_layout) self.advance_button = QtWidgets.QPushButton(self.algorithm) icon19 = QtGui.QIcon() icon19.addPixmap(QtGui.QPixmap(":/icons/properties.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.advance_button.setIcon(icon19) self.advance_button.setObjectName("advance_button") self.verticalLayout_7.addWidget(self.advance_button) spacerItem4 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_7.addItem(spacerItem4) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label_7 = QtWidgets.QLabel(self.algorithm) self.label_7.setObjectName("label_7") self.horizontalLayout.addWidget(self.label_7) spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem5) self.timeShow = QtWidgets.QLabel(self.algorithm) self.timeShow.setObjectName("timeShow") self.horizontalLayout.addWidget(self.timeShow) self.verticalLayout_7.addLayout(self.horizontalLayout) icon20 = QtGui.QIcon() icon20.addPixmap(QtGui.QPixmap(":/icons/synthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.options_tab.addTab(self.algorithm, icon20, "") self.verticalLayout_4.addWidget(self.main_splitter) self.synthesis_button = QtWidgets.QPushButton(Form) self.synthesis_button.setEnabled(False) self.synthesis_button.setMinimumSize(QtCore.QSize(120, 0)) icon21 = QtGui.QIcon() icon21.addPixmap(QtGui.QPixmap(":/icons/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.synthesis_button.setIcon(icon21) self.synthesis_button.setAutoDefault(True) self.synthesis_button.setObjectName("synthesis_button") self.verticalLayout_4.addWidget(self.synthesis_button) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, parent=None): QtWidgets.QWidget.__init__(self, parent) self.setWindowTitle("QECoverage") self.grid = QtWidgets.QVBoxLayout() self.setLayout(self.grid) self.mainframe = QtWidgets.QFrame(self) self.mainframe_grid = QtWidgets.QHBoxLayout() self.mainframe.setLayout(self.mainframe_grid) # Left panel - inputs self.tabs = QtWidgets.QTabWidget(self) # Direct geometry spectrometer tab self.tab_direct = QtWidgets.QWidget(self.tabs) self.direct_grid = QtWidgets.QVBoxLayout() self.tab_direct.setLayout(self.direct_grid) self.direct_inst_list = ['LET', 'MAPS', 'MARI', 'MERLIN', 'ARCS', 'CNCS', 'HYSPEC', 'SEQUOIA', 'IN4', 'IN5', 'IN6', 'FOCUS', 'MIBEMOL', 'DNS', 'TOFTOF'] self.direct_inst_box = QtWidgets.QComboBox(self.tab_direct) for inst in self.direct_inst_list: self.direct_inst_box.addItem(inst) self.direct_grid.addWidget(self.direct_inst_box) self.direct_inst_box.activated[str].connect(self.onDirectInstActivated) self.direct_ei = QtWidgets.QFrame(self.tab_direct) self.direct_ei_grid = QtWidgets.QHBoxLayout() self.direct_ei.setLayout(self.direct_ei_grid) self.direct_ei_label = QtWidgets.QLabel("Ei", self.direct_ei) self.direct_ei_grid.addWidget(self.direct_ei_label) self.direct_ei_input = QtWidgets.QLineEdit("55", self.direct_ei) self.direct_ei_input.setToolTip("Incident Energy in meV") self.direct_ei_grid.addWidget(self.direct_ei_input) self.emptyfield_msgbox = QtWidgets.QMessageBox() self.emptyfield_msgbox.setText("Invalid input has been provided for Ei or Emin! Please try again") self.ei_msgbox = QtWidgets.QMessageBox() self.ei_msgbox.setText("Ei cannot be negative! Please try again") self.ei_emin_msgbox = QtWidgets.QMessageBox() self.ei_emin_msgbox.setText("Emin must be less than the values provided for Ei! Please try again") self.direct_grid.addWidget(self.direct_ei) self.emaxfield_msgbox = QtWidgets.QMessageBox() self.direct_plotover = QtWidgets.QCheckBox("Plot Over", self.tab_direct) self.direct_plotover.setToolTip("Hold this plot?") self.direct_grid.addWidget(self.direct_plotover) self.direct_plotover.stateChanged.connect(self.onDirectPlotOverChanged) self.direct_createws = QtWidgets.QCheckBox("Create Workspace", self.tab_direct) self.direct_createws.setToolTip("Create a Mantid workspace?") self.direct_grid.addWidget(self.direct_createws) self.direct_createws.stateChanged.connect(self.onDirectCreateWSChanged) self.direct_emin = QtWidgets.QFrame(self.tab_direct) self.direct_emin_grid = QtWidgets.QHBoxLayout() self.direct_emin.setLayout(self.direct_emin_grid) self.direct_emin_label = QtWidgets.QLabel("Emin", self.direct_emin) self.direct_emin_grid.addWidget(self.direct_emin_label) self.direct_emin_input = QtWidgets.QLineEdit("-10", self.direct_emin) self.direct_emin_input.setToolTip("Minimum energy transfer to plot down to.") self.direct_emin_grid.addWidget(self.direct_emin_input) self.direct_grid.addWidget(self.direct_emin) self.direct_plotbtn = QtWidgets.QPushButton("Plot Q-E", self.tab_direct) self.direct_grid.addWidget(self.direct_plotbtn) self.direct_plotbtn.clicked.connect(self.onClickDirectPlot) self.direct_s2 = QtWidgets.QFrame(self.tab_direct) self.direct_s2_grid = QtWidgets.QHBoxLayout() self.direct_s2.setLayout(self.direct_s2_grid) self.direct_s2_label = QtWidgets.QLabel("s2", self.direct_s2) self.direct_s2_grid.addWidget(self.direct_s2_label) self.direct_s2_input = QtWidgets.QLineEdit("30", self.direct_s2) self.direct_s2_input.setToolTip("Scattering angle of middle of the HYSPEC detector bank.") self.direct_s2_grid.addWidget(self.direct_s2_input) self.direct_s2_input.textChanged[str].connect(self.onS2Changed) self.direct_grid.addWidget(self.direct_s2) self.direct_s2.hide() self.direct_grid.addStretch(10) self.tabs.addTab(self.tab_direct, "Direct") self.tthlims = [2.65, 140] # Indirect geometry spectrometer tab self.tab_indirect = QtWidgets.QWidget(self.tabs) self.indirect_grid = QtWidgets.QVBoxLayout() self.tab_indirect.setLayout(self.indirect_grid) self.indirect_inst_list = ['IRIS', 'OSIRIS', 'TOSCA', 'VESUVIO', 'BASIS', 'VISION'] self.indirect_inst_box = QtWidgets.QComboBox(self.tab_indirect) for inst in self.indirect_inst_list: self.indirect_inst_box.addItem(inst) self.indirect_grid.addWidget(self.indirect_inst_box) self.indirect_inst_box.activated[str].connect(self.onIndirectInstActivated) self.indirect_ef = QtWidgets.QFrame(self.tab_indirect) self.indirect_ef_grid = QtWidgets.QHBoxLayout() self.indirect_ef.setLayout(self.indirect_ef_grid) self.indirect_ef_label = QtWidgets.QLabel("Ef", self.indirect_ef) self.indirect_ef_grid.addWidget(self.indirect_ef_label) self.indirect_ef_input = QtWidgets.QComboBox(self.indirect_ef) self.indirect_analysers = \ {'IRIS': {'PG002': 1.84, 'PG004': 7.38, 'Mica002': 0.207, 'Mica004': 0.826, 'Mica006': 1.86}, 'OSIRIS': {'PG002': 1.84, 'PG004': 7.38}, # Assuming the PG analysers scatter through 90deg (theta=45deg) 'TOSCA': {'PG002': 3.634}, 'VESUVIO': {'AuFoil': 4897}, 'BASIS': {'Si111': 2.08, 'Si311': 7.64}, # From IDF - implies analyser scattering angle is 90deg 'VISION': {'PG002': 3.64}} for ana in self.indirect_analysers[str(self.indirect_inst_box.currentText())]: self.indirect_ef_input.addItem(ana) self.indirect_ef_grid.addWidget(self.indirect_ef_input) self.indirect_ef_input.activated[str].connect(self.onIndirectEfActivated) self.indirect_grid.addWidget(self.indirect_ef) self.indirect_plotover = QtWidgets.QCheckBox("Plot Over", self.tab_indirect) self.indirect_plotover.setToolTip("Hold this plot?") self.indirect_grid.addWidget(self.indirect_plotover) self.indirect_plotover.stateChanged.connect(self.onIndirectPlotOverChanged) self.indirect_createws = QtWidgets.QCheckBox("Create Workspace", self.tab_indirect) self.indirect_createws.setToolTip("Create a Mantid workspace?") self.indirect_grid.addWidget(self.indirect_createws) self.indirect_createws.stateChanged.connect(self.onIndirectCreateWSChanged) self.indirect_emax = QtWidgets.QFrame(self.tab_direct) self.indirect_emax = QtWidgets.QFrame(self.tab_indirect) self.indirect_emax_grid = QtWidgets.QHBoxLayout() self.indirect_emax.setLayout(self.indirect_emax_grid) self.indirect_emax_label = QtWidgets.QLabel("Emax", self.indirect_emax) self.indirect_emax_grid.addWidget(self.indirect_emax_label) self.indirect_emax_input = QtWidgets.QLineEdit("10", self.indirect_emax) self.indirect_emax_input.setToolTip("Max energy loss to plot up to.") self.indirect_emax_grid.addWidget(self.indirect_emax_input) self.indirect_grid.addWidget(self.indirect_emax) self.indirect_plotbtn = QtWidgets.QPushButton("Plot Q-E", self.tab_indirect) self.indirect_grid.addWidget(self.indirect_plotbtn) self.indirect_plotbtn.clicked.connect(self.onClickIndirectPlot) self.indirect_grid.addStretch(10) self.tabs.addTab(self.tab_indirect, "Indirect") self.mainframe_grid.addWidget(self.tabs) self.tabs.currentChanged.connect(self.onTabChange) # Right panel, matplotlib figure to show Q-E self.figure_frame = QtWidgets.QFrame(self.mainframe) self.figure_grid = QtWidgets.QVBoxLayout() self.figure_frame.setLayout(self.figure_grid) self.figure = Figure() self.figure.patch.set_facecolor('white') self.canvas = FigureCanvas(self.figure) self.axes = self.figure.add_subplot(111) self.axes.axhline(color='k') self.axes.set_xlabel(r'$|Q|$ ($\AA^{-1}$)') self.axes.set_ylabel('Energy Transfer (meV)') self.mainframe_grid.addWidget(self.canvas) self.figure_grid.addWidget(self.canvas) self.figure_controls = NavigationToolbar2QT(self.canvas, self.figure_frame) self.figure_grid.addWidget(self.figure_controls) self.mainframe_grid.addWidget(self.figure_frame) self.grid.addWidget(self.mainframe) self.helpbtn = QtWidgets.QPushButton("?", self) self.helpbtn.setMaximumWidth(30) self.helpbtn.clicked.connect(self.onHelp) self.grid.addWidget(self.helpbtn) # Matplotlib does seem to rescale x-axis properly after axes.clear() self.xlim = 0 #help self.assistant_process = QtCore.QProcess(self) # pylint: disable=protected-access self.mantidplot_name='QE Coverage' self.collection_file = os.path.join(mantid._bindir, '../docs/qthelp/MantidProject.qhc') version = ".".join(mantid.__version__.split(".")[:2]) self.qt_url = 'qthelp://org.sphinx.mantidproject.' + version + '/doc/interfaces/QE Coverage.html' self.external_url = 'http://docs.mantidproject.org/nightly/interfaces/QE Coverage.html' #register startup mantid.UsageService.registerFeatureUsage("Interface","QECoverage",False)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(811, 659) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_2.setObjectName("verticalLayout_2") self.information_tab = QtWidgets.QTabWidget(Dialog) self.information_tab.setObjectName("information_tab") self.geometry_tab = QtWidgets.QWidget() self.geometry_tab.setObjectName("geometry_tab") self.verticalLayout = QtWidgets.QVBoxLayout(self.geometry_tab) self.verticalLayout.setObjectName("verticalLayout") self.geo_splitter = QtWidgets.QSplitter(self.geometry_tab) self.geo_splitter.setOrientation(QtCore.Qt.Horizontal) self.geo_splitter.setObjectName("geo_splitter") self.leftWidget = QtWidgets.QWidget(self.geo_splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.leftWidget.sizePolicy().hasHeightForWidth()) self.leftWidget.setSizePolicy(sizePolicy) self.leftWidget.setObjectName("leftWidget") self.left_layout = QtWidgets.QHBoxLayout(self.leftWidget) self.left_layout.setContentsMargins(0, 0, 0, 0) self.left_layout.setObjectName("left_layout") self.line = QtWidgets.QFrame(self.leftWidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.left_layout.addWidget(self.line) self.splitter = QtWidgets.QSplitter(self.geo_splitter) self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.setObjectName("splitter") self.basic_groupbox = QtWidgets.QGroupBox(self.splitter) self.basic_groupbox.setObjectName("basic_groupbox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.basic_groupbox) self.verticalLayout_4.setContentsMargins(6, 6, 6, 6) self.verticalLayout_4.setObjectName("verticalLayout_4") self.scrollArea = QtWidgets.QScrollArea(self.basic_groupbox) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName("scrollArea") self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 738, 80)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.verticalLayout_6 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContents) self.verticalLayout_6.setObjectName("verticalLayout_6") self.basic_label = QtWidgets.QLabel(self.scrollAreaWidgetContents) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.basic_label.sizePolicy().hasHeightForWidth()) self.basic_label.setSizePolicy(sizePolicy) self.basic_label.setObjectName("basic_label") self.verticalLayout_6.addWidget(self.basic_label) spacerItem = QtWidgets.QSpacerItem(20, 47, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_6.addItem(spacerItem) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.verticalLayout_4.addWidget(self.scrollArea) self.algorithm_groupbox = QtWidgets.QGroupBox(self.splitter) self.algorithm_groupbox.setObjectName("algorithm_groupbox") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.algorithm_groupbox) self.verticalLayout_7.setContentsMargins(6, 6, 6, 6) self.verticalLayout_7.setObjectName("verticalLayout_7") self.scrollArea_2 = QtWidgets.QScrollArea(self.algorithm_groupbox) self.scrollArea_2.setWidgetResizable(True) self.scrollArea_2.setObjectName("scrollArea_2") self.scrollAreaWidgetContents_2 = QtWidgets.QWidget() self.scrollAreaWidgetContents_2.setGeometry( QtCore.QRect(0, 0, 738, 158)) self.scrollAreaWidgetContents_2.setObjectName( "scrollAreaWidgetContents_2") self.verticalLayout_5 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContents_2) self.verticalLayout_5.setObjectName("verticalLayout_5") self.algorithm_label = QtWidgets.QLabel( self.scrollAreaWidgetContents_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.algorithm_label.sizePolicy().hasHeightForWidth()) self.algorithm_label.setSizePolicy(sizePolicy) self.algorithm_label.setObjectName("algorithm_label") self.verticalLayout_5.addWidget(self.algorithm_label) spacerItem1 = QtWidgets.QSpacerItem(20, 201, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem1) self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) self.verticalLayout_7.addWidget(self.scrollArea_2) self.hardware_groupbox = QtWidgets.QGroupBox(self.splitter) self.hardware_groupbox.setObjectName("hardware_groupbox") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.hardware_groupbox) self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.scrollArea_3 = QtWidgets.QScrollArea(self.hardware_groupbox) self.scrollArea_3.setWidgetResizable(True) self.scrollArea_3.setObjectName("scrollArea_3") self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() self.scrollAreaWidgetContents_3.setGeometry( QtCore.QRect(0, 0, 738, 158)) self.scrollAreaWidgetContents_3.setObjectName( "scrollAreaWidgetContents_3") self.verticalLayout_8 = QtWidgets.QVBoxLayout( self.scrollAreaWidgetContents_3) self.verticalLayout_8.setObjectName("verticalLayout_8") self.hardware_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.hardware_label.sizePolicy().hasHeightForWidth()) self.hardware_label.setSizePolicy(sizePolicy) self.hardware_label.setObjectName("hardware_label") self.verticalLayout_8.addWidget(self.hardware_label) spacerItem2 = QtWidgets.QSpacerItem(20, 201, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_8.addItem(spacerItem2) self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3) self.verticalLayout_3.addWidget(self.scrollArea_3) self.verticalLayout.addWidget(self.geo_splitter) self.information_tab.addTab(self.geometry_tab, "") self.path_cmp_tab = QtWidgets.QWidget() self.path_cmp_tab.setObjectName("path_cmp_tab") self.verticalLayout_10 = QtWidgets.QVBoxLayout(self.path_cmp_tab) self.verticalLayout_10.setObjectName("verticalLayout_10") self.path_cmp_splitter = QtWidgets.QSplitter(self.path_cmp_tab) self.path_cmp_splitter.setOrientation(QtCore.Qt.Horizontal) self.path_cmp_splitter.setObjectName("path_cmp_splitter") self.verticalLayoutWidget = QtWidgets.QWidget(self.path_cmp_splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.path_cmp_layout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.path_cmp_layout.setContentsMargins(0, 0, 0, 0) self.path_cmp_layout.setObjectName("path_cmp_layout") self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.path_cmp_splitter) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.verticalLayout_9 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget_2) self.verticalLayout_9.setContentsMargins(0, 0, 0, 0) self.verticalLayout_9.setObjectName("verticalLayout_9") self.plot_joint_label = QtWidgets.QLabel(self.verticalLayoutWidget_2) self.plot_joint_label.setObjectName("plot_joint_label") self.verticalLayout_9.addWidget(self.plot_joint_label) self.plot_joint = QtWidgets.QComboBox(self.verticalLayoutWidget_2) self.plot_joint.setObjectName("plot_joint") self.verticalLayout_9.addWidget(self.plot_joint) self.cc_plot_label = QtWidgets.QLabel(self.verticalLayoutWidget_2) self.cc_plot_label.setObjectName("cc_plot_label") self.verticalLayout_9.addWidget(self.cc_plot_label) self.cc_plot_button = QtWidgets.QPushButton( self.verticalLayoutWidget_2) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icons:formula.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.cc_plot_button.setIcon(icon) self.cc_plot_button.setObjectName("cc_plot_button") self.verticalLayout_9.addWidget(self.cc_plot_button) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_9.addItem(spacerItem3) self.verticalLayout_10.addWidget(self.path_cmp_splitter) self.information_tab.addTab(self.path_cmp_tab, "") self.verticalLayout_2.addWidget(self.information_tab) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.mouse_pos_label = QtWidgets.QLabel(Dialog) self.mouse_pos_label.setObjectName("mouse_pos_label") self.horizontalLayout.addWidget(self.mouse_pos_label) self.mouse_pos = QtWidgets.QLabel(Dialog) self.mouse_pos.setObjectName("mouse_pos") self.horizontalLayout.addWidget(self.mouse_pos) spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem4) self.verticalLayout_2.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(368, 580) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/motor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_8 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_8.setContentsMargins(0, 0, 0, 0) self.verticalLayout_8.setObjectName("verticalLayout_8") self.tab_widget = QtWidgets.QTabWidget(Form) self.tab_widget.setObjectName("tab_widget") self.inputs_tab = QtWidgets.QWidget() self.inputs_tab.setObjectName("inputs_tab") self.verticalLayout = QtWidgets.QVBoxLayout(self.inputs_tab) self.verticalLayout.setObjectName("verticalLayout") self.joint_groupbox = QtWidgets.QGroupBox(self.inputs_tab) self.joint_groupbox.setObjectName("joint_groupbox") self.horizontalLayout = QtWidgets.QHBoxLayout(self.joint_groupbox) self.horizontalLayout.setContentsMargins(6, 6, 6, 6) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.joint_list_lable = QtWidgets.QLabel(self.joint_groupbox) self.joint_list_lable.setObjectName("joint_list_lable") self.verticalLayout_13.addWidget(self.joint_list_lable) self.joint_list = QtWidgets.QListWidget(self.joint_groupbox) self.joint_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.joint_list.setObjectName("joint_list") self.verticalLayout_13.addWidget(self.joint_list) self.horizontalLayout.addLayout(self.verticalLayout_13) self.inputs_label_right2 = QtWidgets.QLabel(self.joint_groupbox) self.inputs_label_right2.setObjectName("inputs_label_right2") self.horizontalLayout.addWidget(self.inputs_label_right2) self.verticalLayout_16 = QtWidgets.QVBoxLayout() self.verticalLayout_16.setObjectName("verticalLayout_16") self.driver_list_lable = QtWidgets.QLabel(self.joint_groupbox) self.driver_list_lable.setObjectName("driver_list_lable") self.verticalLayout_16.addWidget(self.driver_list_lable) self.driver_list = QtWidgets.QListWidget(self.joint_groupbox) self.driver_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.driver_list.setObjectName("driver_list") self.verticalLayout_16.addWidget(self.driver_list) self.variable_add = QtWidgets.QPushButton(self.joint_groupbox) self.variable_add.setEnabled(False) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/arrow_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_add.setIcon(icon1) self.variable_add.setObjectName("variable_add") self.verticalLayout_16.addWidget(self.variable_add) self.horizontalLayout.addLayout(self.verticalLayout_16) self.verticalLayout.addWidget(self.joint_groupbox) self.variable_groupbox = QtWidgets.QGroupBox(self.inputs_tab) self.variable_groupbox.setObjectName("variable_groupbox") self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.variable_groupbox) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.variable_up = QtWidgets.QPushButton(self.variable_groupbox) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/arrow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_up.setIcon(icon2) self.variable_up.setObjectName("variable_up") self.horizontalLayout_2.addWidget(self.variable_up) self.variable_down = QtWidgets.QPushButton(self.variable_groupbox) self.variable_down.setIcon(icon1) self.variable_down.setObjectName("variable_down") self.horizontalLayout_2.addWidget(self.variable_down) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.variable_remove = QtWidgets.QPushButton(self.variable_groupbox) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_remove.setIcon(icon3) self.variable_remove.setObjectName("variable_remove") self.horizontalLayout_2.addWidget(self.variable_remove) self.verticalLayout_5.addLayout(self.horizontalLayout_2) self.variable_list = QtWidgets.QListWidget(self.variable_groupbox) self.variable_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.variable_list.setObjectName("variable_list") self.verticalLayout_5.addWidget(self.variable_list) self.horizontalLayout_7.addLayout(self.verticalLayout_5) self.line_5 = QtWidgets.QFrame(self.variable_groupbox) self.line_5.setFrameShape(QtWidgets.QFrame.VLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.horizontalLayout_7.addWidget(self.line_5) self.inputs_dial_layout = QtWidgets.QVBoxLayout() self.inputs_dial_layout.setObjectName("inputs_dial_layout") self.dial_spinbox = QtWidgets.QDoubleSpinBox(self.variable_groupbox) self.dial_spinbox.setEnabled(False) self.dial_spinbox.setMaximum(360.0) self.dial_spinbox.setObjectName("dial_spinbox") self.inputs_dial_layout.addWidget(self.dial_spinbox) self.update_pos = QtWidgets.QPushButton(self.variable_groupbox) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/translate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_pos.setIcon(icon4) self.update_pos.setObjectName("update_pos") self.inputs_dial_layout.addWidget(self.update_pos) self.horizontalLayout_7.addLayout(self.inputs_dial_layout) self.verticalLayout.addWidget(self.variable_groupbox) self.groupBox = QtWidgets.QGroupBox(self.inputs_tab) self.groupBox.setObjectName("groupBox") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_18 = QtWidgets.QVBoxLayout() self.verticalLayout_18.setObjectName("verticalLayout_18") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.variable_speed_label = QtWidgets.QLabel(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.variable_speed_label.sizePolicy().hasHeightForWidth()) self.variable_speed_label.setSizePolicy(sizePolicy) self.variable_speed_label.setObjectName("variable_speed_label") self.horizontalLayout_4.addWidget(self.variable_speed_label) self.variable_speed = QtWidgets.QSpinBox(self.groupBox) self.variable_speed.setEnabled(False) self.variable_speed.setMinimum(-100) self.variable_speed.setMaximum(100) self.variable_speed.setSingleStep(5) self.variable_speed.setProperty("value", -10) self.variable_speed.setObjectName("variable_speed") self.horizontalLayout_4.addWidget(self.variable_speed) self.verticalLayout_18.addLayout(self.horizontalLayout_4) self.extremeRebound = QtWidgets.QCheckBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.extremeRebound.sizePolicy().hasHeightForWidth()) self.extremeRebound.setSizePolicy(sizePolicy) self.extremeRebound.setChecked(True) self.extremeRebound.setObjectName("extremeRebound") self.verticalLayout_18.addWidget(self.extremeRebound) self.horizontalLayout_3.addLayout(self.verticalLayout_18) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.variable_play = QtWidgets.QPushButton(self.groupBox) self.variable_play.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.variable_play.sizePolicy().hasHeightForWidth()) self.variable_play.setSizePolicy(sizePolicy) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon5.addPixmap(QtGui.QPixmap(":/icons/pause.png"), QtGui.QIcon.Active, QtGui.QIcon.On) self.variable_play.setIcon(icon5) self.variable_play.setCheckable(True) self.variable_play.setObjectName("variable_play") self.verticalLayout_3.addWidget(self.variable_play) self.variable_stop = QtWidgets.QPushButton(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.variable_stop.sizePolicy().hasHeightForWidth()) self.variable_stop.setSizePolicy(sizePolicy) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/interrupted.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_stop.setIcon(icon6) self.variable_stop.setObjectName("variable_stop") self.verticalLayout_3.addWidget(self.variable_stop) self.horizontalLayout_3.addLayout(self.verticalLayout_3) self.verticalLayout.addWidget(self.groupBox) self.tab_widget.addTab(self.inputs_tab, icon, "") self.analysis_tab = QtWidgets.QWidget() self.analysis_tab.setObjectName("analysis_tab") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.analysis_tab) self.verticalLayout_6.setObjectName("verticalLayout_6") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.record_show = QtWidgets.QCheckBox(self.analysis_tab) self.record_show.setChecked(True) self.record_show.setObjectName("record_show") self.horizontalLayout_6.addWidget(self.record_show) self.show_all_button = QtWidgets.QPushButton(self.analysis_tab) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/merge.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.show_all_button.setIcon(icon7) self.show_all_button.setObjectName("show_all_button") self.horizontalLayout_6.addWidget(self.show_all_button) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.record_interval_label = QtWidgets.QLabel(self.analysis_tab) self.record_interval_label.setObjectName("record_interval_label") self.horizontalLayout_6.addWidget(self.record_interval_label) self.record_interval = QtWidgets.QDoubleSpinBox(self.analysis_tab) self.record_interval.setDecimals(2) self.record_interval.setMinimum(0.01) self.record_interval.setMaximum(6.0) self.record_interval.setProperty("value", 1.0) self.record_interval.setObjectName("record_interval") self.horizontalLayout_6.addWidget(self.record_interval) self.verticalLayout_6.addLayout(self.horizontalLayout_6) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.record_list = QtWidgets.QListWidget(self.analysis_tab) self.record_list.setObjectName("record_list") self.horizontalLayout_8.addWidget(self.record_list) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.update_preview_button = QtWidgets.QPushButton(self.analysis_tab) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_preview_button.setIcon(icon8) self.update_preview_button.setObjectName("update_preview_button") self.verticalLayout_2.addWidget(self.update_preview_button) self.copy_path = QtWidgets.QPushButton(self.analysis_tab) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.copy_path.setIcon(icon9) self.copy_path.setObjectName("copy_path") self.verticalLayout_2.addWidget(self.copy_path) self.record_start = QtWidgets.QPushButton(self.analysis_tab) icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/record.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.record_start.setIcon(icon10) self.record_start.setCheckable(True) self.record_start.setObjectName("record_start") self.verticalLayout_2.addWidget(self.record_start) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem3) self.record_remove = QtWidgets.QPushButton(self.analysis_tab) self.record_remove.setIcon(icon3) self.record_remove.setObjectName("record_remove") self.verticalLayout_2.addWidget(self.record_remove) self.horizontalLayout_8.addLayout(self.verticalLayout_2) self.verticalLayout_6.addLayout(self.horizontalLayout_8) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.plot_joint = QtWidgets.QComboBox(self.analysis_tab) self.plot_joint.setObjectName("plot_joint") self.horizontalLayout_5.addWidget(self.plot_joint) self.plot_button = QtWidgets.QPushButton(self.analysis_tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plot_button.sizePolicy().hasHeightForWidth()) self.plot_button.setSizePolicy(sizePolicy) icon11 = QtGui.QIcon() icon11.addPixmap(QtGui.QPixmap(":/icons/formula.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.plot_button.setIcon(icon11) self.plot_button.setObjectName("plot_button") self.horizontalLayout_5.addWidget(self.plot_button) self.animate_button = QtWidgets.QPushButton(self.analysis_tab) self.animate_button.setIcon(icon) self.animate_button.setObjectName("animate_button") self.horizontalLayout_5.addWidget(self.animate_button) self.verticalLayout_6.addLayout(self.horizontalLayout_5) self.horizontalLayout_9 = QtWidgets.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.cp_data_button = QtWidgets.QPushButton(self.analysis_tab) self.cp_data_button.setIcon(icon9) self.cp_data_button.setObjectName("cp_data_button") self.horizontalLayout_9.addWidget(self.cp_data_button) self.show_button = QtWidgets.QPushButton(self.analysis_tab) self.show_button.setIcon(icon7) self.show_button.setObjectName("show_button") self.horizontalLayout_9.addWidget(self.show_button) self.verticalLayout_6.addLayout(self.horizontalLayout_9) self.plot_groupbox = QtWidgets.QGroupBox(self.analysis_tab) self.plot_groupbox.setObjectName("plot_groupbox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.plot_groupbox) self.verticalLayout_4.setObjectName("verticalLayout_4") self.horizontalLayout_11 = QtWidgets.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.c_coord_sys = QtWidgets.QRadioButton(self.plot_groupbox) self.c_coord_sys.setChecked(True) self.c_coord_sys.setObjectName("c_coord_sys") self.horizontalLayout_11.addWidget(self.c_coord_sys) self.p_coord_sys = QtWidgets.QRadioButton(self.plot_groupbox) self.p_coord_sys.setObjectName("p_coord_sys") self.horizontalLayout_11.addWidget(self.p_coord_sys) self.verticalLayout_4.addLayout(self.horizontalLayout_11) self.horizontalLayout_10 = QtWidgets.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.wrt_label = QtWidgets.QCheckBox(self.plot_groupbox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.wrt_label.sizePolicy().hasHeightForWidth()) self.wrt_label.setSizePolicy(sizePolicy) self.wrt_label.setObjectName("wrt_label") self.horizontalLayout_10.addWidget(self.wrt_label) self.wrt_joint = QtWidgets.QComboBox(self.plot_groupbox) self.wrt_joint.setEnabled(False) self.wrt_joint.setObjectName("wrt_joint") self.horizontalLayout_10.addWidget(self.wrt_joint) self.verticalLayout_4.addLayout(self.horizontalLayout_10) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.plot_jerk = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_jerk.setObjectName("plot_jerk") self.gridLayout.addWidget(self.plot_jerk, 3, 0, 1, 1) self.plot_vel = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_vel.setObjectName("plot_vel") self.gridLayout.addWidget(self.plot_vel, 1, 0, 1, 1) self.plot_acc = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_acc.setObjectName("plot_acc") self.gridLayout.addWidget(self.plot_acc, 2, 0, 1, 1) self.plot_pos = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_pos.setChecked(True) self.plot_pos.setObjectName("plot_pos") self.gridLayout.addWidget(self.plot_pos, 0, 0, 1, 1) self.plot_curvature = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_curvature.setObjectName("plot_curvature") self.gridLayout.addWidget(self.plot_curvature, 0, 1, 1, 1) self.plot_signature = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_signature.setObjectName("plot_signature") self.gridLayout.addWidget(self.plot_signature, 1, 1, 1, 1) self.verticalLayout_4.addLayout(self.gridLayout) self.verticalLayout_6.addWidget(self.plot_groupbox) self.tab_widget.addTab(self.analysis_tab, icon11, "") self.verticalLayout_8.addWidget(self.tab_widget) self.retranslateUi(Form) self.record_list.setCurrentRow(-1) self.wrt_label.toggled['bool'].connect(self.wrt_joint.setEnabled) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self): super().__init__() self.setMinimumSize(400, 300) self.setWindowTitle('QtAwesome Icon Browser') qtawesome._instance() fontMaps = qtawesome._resource['iconic'].charmap iconNames = [] for fontCollection, fontData in fontMaps.items(): for iconName in fontData: iconNames.append('%s.%s' % (fontCollection, iconName)) self._filterTimer = QtCore.QTimer(self) self._filterTimer.setSingleShot(True) self._filterTimer.setInterval(AUTO_SEARCH_TIMEOUT) self._filterTimer.timeout.connect(self._updateFilter) model = IconModel() model.setStringList(sorted(iconNames)) self._proxyModel = QtCore.QSortFilterProxyModel() self._proxyModel.setSourceModel(model) self._proxyModel.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive) self._listView = IconListView(self) self._listView.setUniformItemSizes(True) self._listView.setViewMode(QtWidgets.QListView.IconMode) self._listView.setModel(self._proxyModel) self._listView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self._listView.doubleClicked.connect(self._copyIconText) self._listView.selectionModel().selectionChanged.connect(self._updateNameField) self._lineEdit = QtWidgets.QLineEdit(self) self._lineEdit.setAlignment(QtCore.Qt.AlignCenter) self._lineEdit.textChanged.connect(self._triggerDelayedUpdate) self._lineEdit.returnPressed.connect(self._triggerImmediateUpdate) self._comboBox = QtWidgets.QComboBox(self) self._comboBox.setMinimumWidth(75) self._comboBox.currentIndexChanged.connect(self._triggerImmediateUpdate) self._comboBox.addItems([ALL_COLLECTIONS] + sorted(fontMaps.keys())) lyt = QtWidgets.QHBoxLayout() lyt.setContentsMargins(0, 0, 0, 0) lyt.addWidget(self._comboBox) lyt.addWidget(self._lineEdit) self._combo_style = QtWidgets.QComboBox(self) self._combo_style.addItems([ qtawesome.styles.DEFAULT_DARK_PALETTE, qtawesome.styles.DEFAULT_LIGHT_PALETTE]) self._combo_style.currentTextChanged.connect(self._updateStyle) lyt.addWidget(self._combo_style) searchBarFrame = QtWidgets.QFrame(self) searchBarFrame.setLayout(lyt) self._nameField = QtWidgets.QLineEdit(self) self._nameField.setAlignment(QtCore.Qt.AlignCenter) self._nameField.setReadOnly(True) self._copyButton = QtWidgets.QPushButton('Copy Name', self) self._copyButton.clicked.connect(self._copyIconText) lyt = QtWidgets.QVBoxLayout() lyt.addWidget(searchBarFrame) lyt.addWidget(self._listView) lyt.addWidget(self._nameField) lyt.addWidget(self._copyButton) frame = QtWidgets.QFrame(self) frame.setLayout(lyt) self.setCentralWidget(frame) self.setTabOrder(self._comboBox, self._lineEdit) self.setTabOrder(self._lineEdit, self._combo_style) self.setTabOrder(self._combo_style, self._listView) self.setTabOrder(self._listView, self._nameField) self.setTabOrder(self._nameField, self._copyButton) self.setTabOrder(self._copyButton, self._comboBox) QtWidgets.QShortcut( QtGui.QKeySequence(QtCore.Qt.Key_Return), self, self._copyIconText, ) QtWidgets.QShortcut( QtGui.QKeySequence("Ctrl+F"), self, self._lineEdit.setFocus, ) self._lineEdit.setFocus() geo = self.geometry() # QApplication.desktop() has been removed in Qt 6. # Instead, QGuiApplication.screenAt(QPoint) is supported # in Qt 5.10 or later. try: screen = QtGui.QGuiApplication.screenAt(QtGui.QCursor.pos()) centerPoint = screen.geometry().center() except AttributeError: desktop = QtWidgets.QApplication.desktop() screen = desktop.screenNumber(desktop.cursor().pos()) centerPoint = desktop.screenGeometry(screen).center() geo.moveCenter(centerPoint) self.setGeometry(geo)
def __init__(self): super(IntegrationImgDisplayWidget, self).__init__() self.frame = QtWidgets.QFrame() self.frame.setObjectName('img_frame') self._frame_layout = QtWidgets.QVBoxLayout() self._frame_layout.setContentsMargins(0, 0, 0, 0) self._frame_layout.setSpacing(0) self.img_pg_layout = GraphicsLayoutWidget() self.img_view = IntegrationImgWidget(self.img_pg_layout, orientation='horizontal') self._frame_layout.addWidget(self.img_pg_layout) self.position_and_unit_widget = QtWidgets.QWidget() self.position_and_unit_widget.setObjectName('img_position_and_unit_widget') self._position_and_unit_layout = QtWidgets.QHBoxLayout() self._position_and_unit_layout.setContentsMargins(0, 0, 0, 0) self.mouse_pos_widget = MouseCurrentAndClickedWidget(CLICKED_COLOR) self.mouse_unit_widget = MouseUnitCurrentAndClickedWidget(CLICKED_COLOR) self._position_and_unit_layout.addWidget(self.mouse_pos_widget) self._position_and_unit_layout.addSpacerItem(HorizontalSpacerItem()) self._position_and_unit_layout.addWidget(self.mouse_unit_widget) self.position_and_unit_widget.setLayout(self._position_and_unit_layout) self._frame_layout.addWidget(self.position_and_unit_widget) self._control_layout = QtWidgets.QHBoxLayout() self._control_layout.setContentsMargins(6, 6, 6, 6) self._control_layout.setSpacing(6) self.save_image_btn = FlatButton() self.save_image_btn.setToolTip("Save Image") self.roi_btn = CheckableFlatButton('ROI') self.mode_btn = FlatButton('Cake') self.cake_shift_azimuth_sl = QtWidgets.QSlider(QtCore.Qt.Horizontal) self.mask_btn = CheckableFlatButton('Mask') self.show_background_subtracted_img_btn = CheckableFlatButton('bg') self.transparent_cb = QtWidgets.QCheckBox('trans') self.autoscale_btn = CheckableFlatButton('AutoScale') self.undock_btn = FlatButton('Undock') self._control_layout.addWidget(self.save_image_btn) self._control_layout.addWidget(self.roi_btn) self._control_layout.addWidget(self.mode_btn) self._control_layout.addWidget(self.cake_shift_azimuth_sl) self._control_layout.addWidget(self.mask_btn) self._control_layout.addWidget(self.transparent_cb) self._control_layout.addWidget(self.show_background_subtracted_img_btn) self._control_layout.addSpacerItem(HorizontalSpacerItem()) self._control_layout.addWidget(self.autoscale_btn) self._control_layout.addWidget(self.undock_btn) self._frame_layout.addLayout(self._control_layout) self.frame.setLayout(self._frame_layout) self._layout = QtWidgets.QVBoxLayout() self._layout.setContentsMargins(0, 0, 0, 0) self._layout.setSpacing(0) self._layout.addWidget(self.frame) self.setLayout(self._layout) self.style_widgets() self.cake_shift_azimuth_sl.setVisible(False) self.show_background_subtracted_img_btn.setVisible(False)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(415, 781) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/id.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_2.setObjectName("verticalLayout_2") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.file_name_title = QtWidgets.QLabel(Form) self.file_name_title.setObjectName("file_name_title") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.file_name_title) self.file_name_label = QtWidgets.QLineEdit(Form) self.file_name_label.setReadOnly(True) self.file_name_label.setObjectName("file_name_label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.file_name_label) self.path_title = QtWidgets.QLabel(Form) self.path_title.setObjectName("path_title") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.path_title) self.path_label = QtWidgets.QLineEdit(Form) self.path_label.setReadOnly(True) self.path_label.setObjectName("path_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.path_label) self.owner_title = QtWidgets.QLabel(Form) self.owner_title.setObjectName("owner_title") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.owner_title) self.owner_label = QtWidgets.QLabel(Form) self.owner_label.setObjectName("owner_label") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.owner_label) self.last_modified_title = QtWidgets.QLabel(Form) self.last_modified_title.setObjectName("last_modified_title") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.last_modified_title) self.last_modified_label = QtWidgets.QLabel(Form) self.last_modified_label.setObjectName("last_modified_label") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.last_modified_label) self.file_size_title = QtWidgets.QLabel(Form) self.file_size_title.setObjectName("file_size_title") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.file_size_title) self.file_size_label = QtWidgets.QLabel(Form) self.file_size_label.setObjectName("file_size_label") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.file_size_label) self.type_title = QtWidgets.QLabel(Form) self.type_title.setObjectName("type_title") self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.type_title) self.type_label = QtWidgets.QLabel(Form) self.type_label.setObjectName("type_label") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.type_label) self.verticalLayout_2.addLayout(self.formLayout) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_2.addWidget(self.line) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.overview_button = QtWidgets.QPushButton(Form) self.overview_button.setIcon(icon) self.overview_button.setObjectName("overview_button") self.horizontalLayout_2.addWidget(self.overview_button) self.ex_expression_button = QtWidgets.QPushButton(Form) self.ex_expression_button.setIcon(icon) self.ex_expression_button.setObjectName("ex_expression_button") self.horizontalLayout_2.addWidget(self.ex_expression_button) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.export_group = QtWidgets.QGroupBox(Form) self.export_group.setObjectName("export_group") self.gridLayout = QtWidgets.QGridLayout(self.export_group) self.gridLayout.setObjectName("gridLayout") self.ex_dxf_button = QtWidgets.QPushButton(self.export_group) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/dxf.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_dxf_button.setIcon(icon1) self.ex_dxf_button.setIconSize(QtCore.QSize(50, 50)) self.ex_dxf_button.setObjectName("ex_dxf_button") self.gridLayout.addWidget(self.ex_dxf_button, 0, 0, 1, 1) self.ex_slvs_button = QtWidgets.QPushButton(self.export_group) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/solvespace.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_slvs_button.setIcon(icon2) self.ex_slvs_button.setIconSize(QtCore.QSize(50, 50)) self.ex_slvs_button.setObjectName("ex_slvs_button") self.gridLayout.addWidget(self.ex_slvs_button, 0, 1, 1, 1) self.ex_py_button = QtWidgets.QPushButton(self.export_group) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/script.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_py_button.setIcon(icon3) self.ex_py_button.setIconSize(QtCore.QSize(50, 50)) self.ex_py_button.setObjectName("ex_py_button") self.gridLayout.addWidget(self.ex_py_button, 1, 0, 1, 1) self.ex_image_button = QtWidgets.QPushButton(self.export_group) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/picture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_image_button.setIcon(icon4) self.ex_image_button.setIconSize(QtCore.QSize(50, 50)) self.ex_image_button.setObjectName("ex_image_button") self.gridLayout.addWidget(self.ex_image_button, 1, 1, 1, 1) self.ex_pmks_button = QtWidgets.QPushButton(self.export_group) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/pmks.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_pmks_button.setIcon(icon5) self.ex_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.ex_pmks_button.setObjectName("ex_pmks_button") self.gridLayout.addWidget(self.ex_pmks_button, 0, 2, 1, 1) self.ex_capture_button = QtWidgets.QPushButton(self.export_group) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/capture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_capture_button.setIcon(icon6) self.ex_capture_button.setIconSize(QtCore.QSize(50, 50)) self.ex_capture_button.setObjectName("ex_capture_button") self.gridLayout.addWidget(self.ex_capture_button, 1, 2, 1, 1) self.horizontalLayout.addWidget(self.export_group) self.import_group = QtWidgets.QGroupBox(Form) self.import_group.setObjectName("import_group") self.verticalLayout = QtWidgets.QVBoxLayout(self.import_group) self.verticalLayout.setObjectName("verticalLayout") self.im_example_button = QtWidgets.QPushButton(self.import_group) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/example.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.im_example_button.setIcon(icon7) self.im_example_button.setIconSize(QtCore.QSize(50, 50)) self.im_example_button.setObjectName("im_example_button") self.verticalLayout.addWidget(self.im_example_button) self.im_pmks_button = QtWidgets.QPushButton(self.import_group) self.im_pmks_button.setIcon(icon5) self.im_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.im_pmks_button.setObjectName("im_pmks_button") self.verticalLayout.addWidget(self.im_pmks_button) self.horizontalLayout.addWidget(self.import_group) self.verticalLayout_2.addLayout(self.horizontalLayout) self.history_tabs = QtWidgets.QTabWidget(Form) self.history_tabs.setObjectName("history_tabs") self.verticalLayout_2.addWidget(self.history_tabs) self.retranslateUi(Form) self.history_tabs.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(811, 659) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_2.setObjectName("verticalLayout_2") self.information_tab = QtWidgets.QTabWidget(Dialog) self.information_tab.setObjectName("information_tab") self.geometry = QtWidgets.QWidget() self.geometry.setObjectName("geometry") self.verticalLayout = QtWidgets.QVBoxLayout(self.geometry) self.verticalLayout.setObjectName("verticalLayout") self.main_splitter = QtWidgets.QSplitter(self.geometry) self.main_splitter.setOrientation(QtCore.Qt.Horizontal) self.main_splitter.setObjectName("main_splitter") self.leftWidget = QtWidgets.QWidget(self.main_splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.leftWidget.sizePolicy().hasHeightForWidth()) self.leftWidget.setSizePolicy(sizePolicy) self.leftWidget.setObjectName("leftWidget") self.left_layout = QtWidgets.QHBoxLayout(self.leftWidget) self.left_layout.setContentsMargins(0, 0, 0, 0) self.left_layout.setObjectName("left_layout") self.line = QtWidgets.QFrame(self.leftWidget) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.left_layout.addWidget(self.line) self.splitter = QtWidgets.QSplitter(self.main_splitter) self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.setObjectName("splitter") self.basic_groupbox = QtWidgets.QGroupBox(self.splitter) self.basic_groupbox.setObjectName("basic_groupbox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.basic_groupbox) self.verticalLayout_4.setContentsMargins(6, 6, 6, 6) self.verticalLayout_4.setObjectName("verticalLayout_4") self.scrollArea = QtWidgets.QScrollArea(self.basic_groupbox) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName("scrollArea") self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 717, 85)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents) self.verticalLayout_6.setObjectName("verticalLayout_6") self.basic_label = QtWidgets.QLabel(self.scrollAreaWidgetContents) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.basic_label.sizePolicy().hasHeightForWidth()) self.basic_label.setSizePolicy(sizePolicy) self.basic_label.setObjectName("basic_label") self.verticalLayout_6.addWidget(self.basic_label) spacerItem = QtWidgets.QSpacerItem(20, 47, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_6.addItem(spacerItem) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.verticalLayout_4.addWidget(self.scrollArea) self.algorithm_groupbox = QtWidgets.QGroupBox(self.splitter) self.algorithm_groupbox.setObjectName("algorithm_groupbox") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.algorithm_groupbox) self.verticalLayout_7.setContentsMargins(6, 6, 6, 6) self.verticalLayout_7.setObjectName("verticalLayout_7") self.scrollArea_2 = QtWidgets.QScrollArea(self.algorithm_groupbox) self.scrollArea_2.setWidgetResizable(True) self.scrollArea_2.setObjectName("scrollArea_2") self.scrollAreaWidgetContents_2 = QtWidgets.QWidget() self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 717, 197)) self.scrollAreaWidgetContents_2.setObjectName("scrollAreaWidgetContents_2") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents_2) self.verticalLayout_5.setObjectName("verticalLayout_5") self.algorithm_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.algorithm_label.sizePolicy().hasHeightForWidth()) self.algorithm_label.setSizePolicy(sizePolicy) self.algorithm_label.setObjectName("algorithm_label") self.verticalLayout_5.addWidget(self.algorithm_label) spacerItem1 = QtWidgets.QSpacerItem(20, 201, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem1) self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_2) self.verticalLayout_7.addWidget(self.scrollArea_2) self.hardware_groupbox = QtWidgets.QGroupBox(self.splitter) self.hardware_groupbox.setObjectName("hardware_groupbox") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.hardware_groupbox) self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.scrollArea_3 = QtWidgets.QScrollArea(self.hardware_groupbox) self.scrollArea_3.setWidgetResizable(True) self.scrollArea_3.setObjectName("scrollArea_3") self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 717, 196)) self.scrollAreaWidgetContents_3.setObjectName("scrollAreaWidgetContents_3") self.verticalLayout_8 = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents_3) self.verticalLayout_8.setObjectName("verticalLayout_8") self.hardware_label = QtWidgets.QLabel(self.scrollAreaWidgetContents_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.hardware_label.sizePolicy().hasHeightForWidth()) self.hardware_label.setSizePolicy(sizePolicy) self.hardware_label.setObjectName("hardware_label") self.verticalLayout_8.addWidget(self.hardware_label) spacerItem2 = QtWidgets.QSpacerItem(20, 201, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_8.addItem(spacerItem2) self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_3) self.verticalLayout_3.addWidget(self.scrollArea_3) self.verticalLayout.addWidget(self.main_splitter) self.information_tab.addTab(self.geometry, "") self.verticalLayout_2.addWidget(self.information_tab) self.retranslateUi(Dialog) self.information_tab.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(444, 654) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/number.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.edges_label = QtWidgets.QLabel(Form) self.edges_label.setObjectName("edges_label") self.horizontalLayout_4.addWidget(self.edges_label) self.edges_text = QtWidgets.QLineEdit(Form) self.edges_text.setReadOnly(True) self.edges_text.setObjectName("edges_text") self.horizontalLayout_4.addWidget(self.edges_text) self.expr_copy = QtWidgets.QPushButton(Form) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.expr_copy.setIcon(icon1) self.expr_copy.setObjectName("expr_copy") self.horizontalLayout_4.addWidget(self.expr_copy) self.expr_add_collection = QtWidgets.QPushButton(Form) self.expr_add_collection.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.expr_add_collection.setIcon(icon2) self.expr_add_collection.setObjectName("expr_add_collection") self.horizontalLayout_4.addWidget(self.expr_add_collection) self.from_mechanism_button = QtWidgets.QPushButton(Form) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/merge_from.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.from_mechanism_button.setIcon(icon3) self.from_mechanism_button.setAutoDefault(True) self.from_mechanism_button.setDefault(True) self.from_mechanism_button.setObjectName("from_mechanism_button") self.horizontalLayout_4.addWidget(self.from_mechanism_button) self.verticalLayout.addLayout(self.horizontalLayout_4) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout.addWidget(self.line) self.main_splitter = QtWidgets.QSplitter(Form) self.main_splitter.setOrientation(QtCore.Qt.Vertical) self.main_splitter.setObjectName("main_splitter") self.verticalLayoutWidget = QtWidgets.QWidget(self.main_splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout_2 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.nj_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.nj_label.setObjectName("nj_label") self.gridLayout.addWidget(self.nj_label, 0, 1, 1, 1) self.nl_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.nl_label.setObjectName("nl_label") self.gridLayout.addWidget(self.nl_label, 0, 0, 1, 1) self.nl_input = QtWidgets.QSpinBox(self.verticalLayoutWidget) self.nl_input.setMinimum(4) self.nl_input.setObjectName("nl_input") self.gridLayout.addWidget(self.nl_input, 2, 0, 1, 1) self.nj_input = QtWidgets.QSpinBox(self.verticalLayoutWidget) self.nj_input.setMinimum(4) self.nj_input.setObjectName("nj_input") self.gridLayout.addWidget(self.nj_input, 2, 1, 1, 1) self.dof_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.dof_label.setObjectName("dof_label") self.gridLayout.addWidget(self.dof_label, 0, 2, 1, 1) self.dof = QtWidgets.QSpinBox(self.verticalLayoutWidget) self.dof.setEnabled(False) self.dof.setMinimum(-99) self.dof.setProperty("value", 1) self.dof.setObjectName("dof") self.gridLayout.addWidget(self.dof, 2, 2, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.graph_degenerate = QtWidgets.QComboBox(self.verticalLayoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.graph_degenerate.sizePolicy().hasHeightForWidth()) self.graph_degenerate.setSizePolicy(sizePolicy) self.graph_degenerate.setObjectName("graph_degenerate") self.graph_degenerate.addItem("") self.graph_degenerate.addItem("") self.graph_degenerate.addItem("") self.horizontalLayout_7.addWidget(self.graph_degenerate) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem) self.keep_dof = QtWidgets.QCheckBox(self.verticalLayoutWidget) self.keep_dof.setChecked(True) self.keep_dof.setObjectName("keep_dof") self.horizontalLayout_7.addWidget(self.keep_dof) self.verticalLayout_2.addLayout(self.horizontalLayout_7) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.number_synthesis_button = QtWidgets.QPushButton( self.verticalLayoutWidget) self.number_synthesis_button.setAutoDefault(True) self.number_synthesis_button.setObjectName("number_synthesis_button") self.horizontalLayout_2.addWidget(self.number_synthesis_button) self.assortment_clear_button = QtWidgets.QPushButton( self.verticalLayoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.assortment_clear_button.sizePolicy().hasHeightForWidth()) self.assortment_clear_button.setSizePolicy(sizePolicy) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/clean.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.assortment_clear_button.setIcon(icon4) self.assortment_clear_button.setObjectName("assortment_clear_button") self.horizontalLayout_2.addWidget(self.assortment_clear_button) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.link_assortment_list = QtWidgets.QTreeWidget( self.verticalLayoutWidget) self.link_assortment_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.link_assortment_list.setIndentation(10) self.link_assortment_list.setObjectName("link_assortment_list") self.verticalLayout_2.addWidget(self.link_assortment_list) self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.main_splitter) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.verticalLayout_3 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget_2) self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.graph_engine = QtWidgets.QComboBox(self.verticalLayoutWidget_2) self.graph_engine.setObjectName("graph_engine") self.horizontalLayout.addWidget(self.graph_engine) self.reload_atlas = QtWidgets.QPushButton(self.verticalLayoutWidget_2) self.reload_atlas.setText("") icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.reload_atlas.setIcon(icon5) self.reload_atlas.setObjectName("reload_atlas") self.horizontalLayout.addWidget(self.reload_atlas) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem1) self.graph_link_as_node = QtWidgets.QCheckBox( self.verticalLayoutWidget_2) self.graph_link_as_node.setObjectName("graph_link_as_node") self.horizontalLayout.addWidget(self.graph_link_as_node) self.graph_show_label = QtWidgets.QCheckBox( self.verticalLayoutWidget_2) self.graph_show_label.setChecked(True) self.graph_show_label.setObjectName("graph_show_label") self.horizontalLayout.addWidget(self.graph_show_label) self.verticalLayout_3.addLayout(self.horizontalLayout) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.structure_synthesis_all_button = QtWidgets.QPushButton( self.verticalLayoutWidget_2) self.structure_synthesis_all_button.setMaximumSize( QtCore.QSize(100, 16777215)) self.structure_synthesis_all_button.setAutoDefault(True) self.structure_synthesis_all_button.setObjectName( "structure_synthesis_all_button") self.horizontalLayout_5.addWidget(self.structure_synthesis_all_button) self.structure_synthesis_button = QtWidgets.QPushButton( self.verticalLayoutWidget_2) self.structure_synthesis_button.setObjectName( "structure_synthesis_button") self.horizontalLayout_5.addWidget(self.structure_synthesis_button) self.structure_list_clear_button = QtWidgets.QPushButton( self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.structure_list_clear_button.sizePolicy().hasHeightForWidth()) self.structure_list_clear_button.setSizePolicy(sizePolicy) self.structure_list_clear_button.setIcon(icon4) self.structure_list_clear_button.setObjectName( "structure_list_clear_button") self.horizontalLayout_5.addWidget(self.structure_list_clear_button) self.verticalLayout_3.addLayout(self.horizontalLayout_5) self.structure_list = QtWidgets.QListWidget( self.verticalLayoutWidget_2) self.structure_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.structure_list.setIconSize(QtCore.QSize(200, 200)) self.structure_list.setResizeMode(QtWidgets.QListView.Adjust) self.structure_list.setViewMode(QtWidgets.QListView.IconMode) self.structure_list.setUniformItemSizes(True) self.structure_list.setObjectName("structure_list") self.verticalLayout_3.addWidget(self.structure_list) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.save_edges = QtWidgets.QPushButton(self.verticalLayoutWidget_2) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/save_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_edges.setIcon(icon6) self.save_edges.setObjectName("save_edges") self.horizontalLayout_3.addWidget(self.save_edges) self.save_atlas = QtWidgets.QPushButton(self.verticalLayoutWidget_2) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/picture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_atlas.setIcon(icon7) self.save_atlas.setObjectName("save_atlas") self.horizontalLayout_3.addWidget(self.save_atlas) self.edges2atlas_button = QtWidgets.QPushButton( self.verticalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.edges2atlas_button.sizePolicy().hasHeightForWidth()) self.edges2atlas_button.setSizePolicy(sizePolicy) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/edges_to_atlas.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.edges2atlas_button.setIcon(icon8) self.edges2atlas_button.setIconSize(QtCore.QSize(40, 16)) self.edges2atlas_button.setObjectName("edges2atlas_button") self.horizontalLayout_3.addWidget(self.edges2atlas_button) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.time_title_label = QtWidgets.QLabel(self.verticalLayoutWidget_2) self.time_title_label.setObjectName("time_title_label") self.horizontalLayout_6.addWidget(self.time_title_label) self.time_label = QtWidgets.QLabel(self.verticalLayoutWidget_2) self.time_label.setObjectName("time_label") self.horizontalLayout_6.addWidget(self.time_label) self.paint_time_title_label = QtWidgets.QLabel( self.verticalLayoutWidget_2) self.paint_time_title_label.setObjectName("paint_time_title_label") self.horizontalLayout_6.addWidget(self.paint_time_title_label) self.paint_time_label = QtWidgets.QLabel(self.verticalLayoutWidget_2) self.paint_time_label.setObjectName("paint_time_label") self.horizontalLayout_6.addWidget(self.paint_time_label) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.verticalLayout_3.addLayout(self.horizontalLayout_6) self.verticalLayout.addWidget(self.main_splitter) self.retranslateUi(Form) self.graph_degenerate.setCurrentIndex(1) self.graph_engine.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self): super(IntegrationPatternWidget, self).__init__() self.frame = QtWidgets.QFrame() self.frame.setObjectName('pattern_frame') self._frame_layout = QtWidgets.QVBoxLayout() self._frame_layout.setContentsMargins(0, 0, 6, 0) self._top_control_layout = QtWidgets.QHBoxLayout() self._top_control_layout.setContentsMargins(8, 8, 0, 0) self.save_pattern_btn = FlatButton() self.save_pattern_btn.setToolTip("Save Pattern") self.as_overlay_btn = FlatButton('As Overlay') self.as_bkg_btn = FlatButton('As Bkg') self.load_calibration_btn = FlatButton('Load Calibration') self.calibration_lbl = LabelAlignRight('None') self._top_control_layout.addWidget(self.save_pattern_btn) self._top_control_layout.addWidget(self.as_overlay_btn) self._top_control_layout.addWidget(self.as_bkg_btn) self._top_control_layout.addSpacerItem(HorizontalSpacerItem()) self._top_control_layout.addWidget(self.load_calibration_btn) self._top_control_layout.addWidget(self.calibration_lbl) self._frame_layout.addLayout(self._top_control_layout) self.right_control_widget = QtWidgets.QWidget() self.right_control_widget.setObjectName('pattern_right_control_widget') self._right_control_layout = QtWidgets.QVBoxLayout() self._right_control_layout.setContentsMargins(0, 0, 0, 6) self._right_control_layout.setSpacing(4) self.tth_btn = CheckableFlatButton(u"2θ") self.q_btn = CheckableFlatButton('Q') self.d_btn = CheckableFlatButton('d') self.unit_btn_group = QtWidgets.QButtonGroup() self.unit_btn_group.addButton(self.tth_btn) self.unit_btn_group.addButton(self.q_btn) self.unit_btn_group.addButton(self.d_btn) self.background_btn = CheckableFlatButton('bg') self.background_inspect_btn = CheckableFlatButton('I') self.antialias_btn = CheckableFlatButton('AA') self.auto_range_btn = CheckableFlatButton('A') self._right_control_layout.addWidget(self.tth_btn) self._right_control_layout.addWidget(self.q_btn) self._right_control_layout.addWidget(self.d_btn) self._right_control_layout.addSpacerItem(VerticalSpacerItem()) self._right_control_layout.addWidget(self.background_btn) self._right_control_layout.addWidget(self.background_inspect_btn) self._right_control_layout.addSpacerItem(VerticalSpacerItem()) self._right_control_layout.addWidget(self.antialias_btn) self._right_control_layout.addSpacerItem(VerticalSpacerItem()) self._right_control_layout.addWidget(self.auto_range_btn) self.right_control_widget.setLayout(self._right_control_layout) self._central_layout = QtWidgets.QHBoxLayout() self._central_layout.setSpacing(0) self.pattern_pg_layout = GraphicsLayoutWidget() self.pattern_view = PatternWidget(self.pattern_pg_layout) self.pattern_pg_layout.ci.layout.setContentsMargins(5, 0, 0, 5) self._central_layout.addWidget(self.pattern_pg_layout) self._central_layout.addWidget(self.right_control_widget) self._frame_layout.addLayout(self._central_layout) self.frame.setLayout(self._frame_layout) self._layout = QtWidgets.QVBoxLayout() self._layout.addWidget(self.frame) self._layout.setContentsMargins(0, 0, 0, 0) self.setLayout(self._layout) self.style_widgets()
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(651, 532) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_4 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_4.setObjectName("verticalLayout_4") self.main_splitter = QtWidgets.QSplitter(Dialog) self.main_splitter.setOrientation(QtCore.Qt.Horizontal) self.main_splitter.setObjectName("main_splitter") self.preview_box = QtWidgets.QGroupBox(self.main_splitter) self.preview_box.setObjectName("preview_box") self.preview_layout = QtWidgets.QVBoxLayout(self.preview_box) self.preview_layout.setObjectName("preview_layout") self.show_solutions = QtWidgets.QCheckBox(self.preview_box) self.show_solutions.setChecked(True) self.show_solutions.setObjectName("show_solutions") self.preview_layout.addWidget(self.show_solutions) self.sub_splitter = QtWidgets.QSplitter(self.main_splitter) self.sub_splitter.setOrientation(QtCore.Qt.Vertical) self.sub_splitter.setObjectName("sub_splitter") self.layoutWidget = QtWidgets.QWidget(self.sub_splitter) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.common_label = QtWidgets.QLabel(self.layoutWidget) self.common_label.setObjectName("common_label") self.verticalLayout_2.addWidget(self.common_label) self.common_list = QtWidgets.QListWidget(self.layoutWidget) self.common_list.setObjectName("common_list") self.verticalLayout_2.addWidget(self.common_list) self.common_load = QtWidgets.QPushButton(self.layoutWidget) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/data.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.common_load.setIcon(icon1) self.common_load.setObjectName("common_load") self.verticalLayout_2.addWidget(self.common_load) self.verticalLayoutWidget = QtWidgets.QWidget(self.sub_splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout_3 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget) self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) self.verticalLayout_3.setObjectName("verticalLayout_3") self.line = QtWidgets.QFrame(self.verticalLayoutWidget) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_3.addWidget(self.line) self.Collections_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.Collections_label.setObjectName("Collections_label") self.verticalLayout_3.addWidget(self.Collections_label) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.collections_list = QtWidgets.QListWidget( self.verticalLayoutWidget) self.collections_list.setObjectName("collections_list") self.horizontalLayout_2.addWidget(self.collections_list) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.project_button = QtWidgets.QPushButton(self.verticalLayoutWidget) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/mechanism.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.project_button.setIcon(icon2) self.project_button.setObjectName("project_button") self.verticalLayout.addWidget(self.project_button) self.line_2 = QtWidgets.QFrame(self.verticalLayoutWidget) self.line_2.setFrameShape(QtWidgets.QFrame.HLine) self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_2.setObjectName("line_2") self.verticalLayout.addWidget(self.line_2) self.rename_button = QtWidgets.QPushButton(self.verticalLayoutWidget) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/rename.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.rename_button.setIcon(icon3) self.rename_button.setAutoDefault(False) self.rename_button.setObjectName("rename_button") self.verticalLayout.addWidget(self.rename_button) self.copy_button = QtWidgets.QPushButton(self.verticalLayoutWidget) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.copy_button.setIcon(icon4) self.copy_button.setObjectName("copy_button") self.verticalLayout.addWidget(self.copy_button) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem) self.delete_button = QtWidgets.QPushButton(self.verticalLayoutWidget) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.delete_button.setIcon(icon5) self.delete_button.setAutoDefault(False) self.delete_button.setObjectName("delete_button") self.verticalLayout.addWidget(self.delete_button) self.horizontalLayout_2.addLayout(self.verticalLayout) self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.verticalLayout_4.addWidget(self.main_splitter) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close | QtWidgets.QDialogButtonBox.Open) self.button_box.setObjectName("button_box") self.horizontalLayout_3.addWidget(self.button_box) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) self.button_box.accepted.connect(Dialog.accept) self.common_load.clicked.connect(Dialog.accept) QtCore.QMetaObject.connectSlotsByName(Dialog)
def __init__(self, *, main_window, parent=None): super().__init__(parent=parent) self.main = main_window self.setAttribute(Qt.WA_ShowWithoutActivating, True) self.setWindowFlag(Qt.FramelessWindowHint, True) self.setWindowFlag(Qt.WindowStaysOnTopHint, True) self.setWindowFlag(Qt.Popup, True) # Using SplashScreen and WindowDoesNotAcceptFocus to address issue when # running with OSX and XForwarding. Without the flag below it will make # the Dialog show its Title bar and appear over the search box which # makes the search useless. self.setWindowFlag(Qt.SplashScreen, True) self.setWindowFlag(Qt.WindowDoesNotAcceptFocus, True) # Using BypassWindowManagerHint to address issue when running with # linux. Without the flag below it will make the Dialog capture the # focus from the line edit and clear the search result display along # with the overlay. self.setWindowFlag(Qt.BypassWindowManagerHint, True) if hasattr(parent, 'key_pressed'): parent.key_pressed.connect(self._handle_search_keypress) # [match list] # [option frame] layout = QtWidgets.QVBoxLayout() self.match_list = SearchMatchList(self) self.models = {} # TODO: FIFO bounded dict self.setLayout(layout) layout.addWidget(self.match_list) self.proxy_model = QtCore.QSortFilterProxyModel() self.proxy_model.setSortRole(Qt.UserRole) self.proxy_model.setDynamicSortFilter(True) self.proxy_model.sort(0, Qt.DescendingOrder) self.match_list.setModel(self.proxy_model) # option frame: # [ grid screens happi ] option_frame = QtWidgets.QFrame() option_frame.setContentsMargins(0, 0, 0, 0) layout.addWidget(option_frame) option_layout = QtWidgets.QHBoxLayout() option_frame.setLayout(option_layout) self.option_grid = QtWidgets.QCheckBox('&Grid') self.option_screens = QtWidgets.QCheckBox('&Screens') self.option_happi = QtWidgets.QCheckBox('&Happi') self.refresh_button = QtWidgets.QPushButton('&Refresh') for w in (self.option_grid, self.option_screens, self.option_happi): option_layout.addWidget(w) w.setChecked(True) w.stateChanged.connect( lambda state: self._search_settings_changed()) option_layout.addWidget(self.refresh_button) def refresh_clicked(): self.search(self.text, force_update=True) self.refresh_button.clicked.connect(refresh_clicked)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(326, 588) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/id.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_2.setObjectName("verticalLayout_2") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.file_name_title = QtWidgets.QLabel(Form) self.file_name_title.setObjectName("file_name_title") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.file_name_title) self.file_name_label = QtWidgets.QLineEdit(Form) self.file_name_label.setReadOnly(True) self.file_name_label.setObjectName("file_name_label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.file_name_label) self.path_title = QtWidgets.QLabel(Form) self.path_title.setObjectName("path_title") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.path_title) self.path_label = QtWidgets.QLineEdit(Form) self.path_label.setReadOnly(True) self.path_label.setObjectName("path_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.path_label) self.owner_title = QtWidgets.QLabel(Form) self.owner_title.setObjectName("owner_title") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.owner_title) self.owner_label = QtWidgets.QLabel(Form) self.owner_label.setObjectName("owner_label") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.owner_label) self.last_modified_title = QtWidgets.QLabel(Form) self.last_modified_title.setObjectName("last_modified_title") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.last_modified_title) self.last_modified_label = QtWidgets.QLabel(Form) self.last_modified_label.setObjectName("last_modified_label") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.last_modified_label) self.file_size_title = QtWidgets.QLabel(Form) self.file_size_title.setObjectName("file_size_title") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.file_size_title) self.file_size_label = QtWidgets.QLabel(Form) self.file_size_label.setObjectName("file_size_label") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.file_size_label) self.type_title = QtWidgets.QLabel(Form) self.type_title.setObjectName("type_title") self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.type_title) self.type_label = QtWidgets.QLabel(Form) self.type_label.setObjectName("type_label") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.type_label) self.background_label = QtWidgets.QLabel(Form) self.background_label.setObjectName("background_label") self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.background_label) self.background_layout = QtWidgets.QHBoxLayout() self.background_layout.setObjectName("background_layout") self.background_option = QtWidgets.QLineEdit(Form) self.background_option.setClearButtonEnabled(True) self.background_option.setObjectName("background_option") self.background_layout.addWidget(self.background_option) self.background_choose_dir = QtWidgets.QToolButton(Form) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.background_choose_dir.setIcon(icon1) self.background_choose_dir.setObjectName("background_choose_dir") self.background_layout.addWidget(self.background_choose_dir) self.formLayout.setLayout(6, QtWidgets.QFormLayout.FieldRole, self.background_layout) self.background_scale_label = QtWidgets.QLabel(Form) self.background_scale_label.setObjectName("background_scale_label") self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.background_scale_label) self.background_scale_option = QtWidgets.QDoubleSpinBox(Form) self.background_scale_option.setMinimum(0.01) self.background_scale_option.setMaximum(10.0) self.background_scale_option.setSingleStep(0.02) self.background_scale_option.setObjectName("background_scale_option") self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.background_scale_option) self.background_offset_label = QtWidgets.QLabel(Form) self.background_offset_label.setObjectName("background_offset_label") self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.background_offset_label) self.background_offset_layout = QtWidgets.QHBoxLayout() self.background_offset_layout.setObjectName("background_offset_layout") self.background_x_option = QtWidgets.QDoubleSpinBox(Form) self.background_x_option.setMinimum(-999999.0) self.background_x_option.setMaximum(999999.0) self.background_x_option.setObjectName("background_x_option") self.background_offset_layout.addWidget(self.background_x_option) self.background_y_option = QtWidgets.QDoubleSpinBox(Form) self.background_y_option.setMinimum(-999999.0) self.background_y_option.setMaximum(999999.0) self.background_y_option.setObjectName("background_y_option") self.background_offset_layout.addWidget(self.background_y_option) self.formLayout.setLayout(8, QtWidgets.QFormLayout.FieldRole, self.background_offset_layout) self.background_opacity_label = QtWidgets.QLabel(Form) self.background_opacity_label.setObjectName("background_opacity_label") self.formLayout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.background_opacity_label) self.background_opacity_option = QtWidgets.QDoubleSpinBox(Form) self.background_opacity_option.setMaximum(1.0) self.background_opacity_option.setSingleStep(0.1) self.background_opacity_option.setProperty("value", 1.0) self.background_opacity_option.setObjectName( "background_opacity_option") self.formLayout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.background_opacity_option) self.verticalLayout_2.addLayout(self.formLayout) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_2.addWidget(self.line) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.overview_button = QtWidgets.QPushButton(Form) self.overview_button.setIcon(icon) self.overview_button.setObjectName("overview_button") self.horizontalLayout_2.addWidget(self.overview_button) self.ex_expression_button = QtWidgets.QPushButton(Form) self.ex_expression_button.setIcon(icon) self.ex_expression_button.setObjectName("ex_expression_button") self.horizontalLayout_2.addWidget(self.ex_expression_button) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.export_group = QtWidgets.QGroupBox(Form) self.export_group.setObjectName("export_group") self.gridLayout = QtWidgets.QGridLayout(self.export_group) self.gridLayout.setObjectName("gridLayout") self.ex_dxf_button = QtWidgets.QPushButton(self.export_group) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/dxf.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_dxf_button.setIcon(icon2) self.ex_dxf_button.setIconSize(QtCore.QSize(50, 50)) self.ex_dxf_button.setObjectName("ex_dxf_button") self.gridLayout.addWidget(self.ex_dxf_button, 0, 0, 1, 1) self.ex_slvs_button = QtWidgets.QPushButton(self.export_group) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/solvespace.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_slvs_button.setIcon(icon3) self.ex_slvs_button.setIconSize(QtCore.QSize(50, 50)) self.ex_slvs_button.setObjectName("ex_slvs_button") self.gridLayout.addWidget(self.ex_slvs_button, 0, 1, 1, 1) self.ex_py_button = QtWidgets.QPushButton(self.export_group) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/script.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_py_button.setIcon(icon4) self.ex_py_button.setIconSize(QtCore.QSize(50, 50)) self.ex_py_button.setObjectName("ex_py_button") self.gridLayout.addWidget(self.ex_py_button, 1, 0, 1, 1) self.ex_image_button = QtWidgets.QPushButton(self.export_group) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/picture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_image_button.setIcon(icon5) self.ex_image_button.setIconSize(QtCore.QSize(50, 50)) self.ex_image_button.setObjectName("ex_image_button") self.gridLayout.addWidget(self.ex_image_button, 1, 1, 1, 1) self.ex_pmks_button = QtWidgets.QPushButton(self.export_group) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/pmks.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_pmks_button.setIcon(icon6) self.ex_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.ex_pmks_button.setObjectName("ex_pmks_button") self.gridLayout.addWidget(self.ex_pmks_button, 0, 2, 1, 1) self.ex_capture_button = QtWidgets.QPushButton(self.export_group) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/capture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_capture_button.setIcon(icon7) self.ex_capture_button.setIconSize(QtCore.QSize(50, 50)) self.ex_capture_button.setObjectName("ex_capture_button") self.gridLayout.addWidget(self.ex_capture_button, 1, 2, 1, 1) self.horizontalLayout.addWidget(self.export_group) self.import_group = QtWidgets.QGroupBox(Form) self.import_group.setObjectName("import_group") self.verticalLayout = QtWidgets.QVBoxLayout(self.import_group) self.verticalLayout.setObjectName("verticalLayout") self.im_example_button = QtWidgets.QPushButton(self.import_group) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/example.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.im_example_button.setIcon(icon8) self.im_example_button.setIconSize(QtCore.QSize(50, 50)) self.im_example_button.setObjectName("im_example_button") self.verticalLayout.addWidget(self.im_example_button) self.im_pmks_button = QtWidgets.QPushButton(self.import_group) self.im_pmks_button.setIcon(icon6) self.im_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.im_pmks_button.setObjectName("im_pmks_button") self.verticalLayout.addWidget(self.im_pmks_button) self.horizontalLayout.addWidget(self.import_group) self.verticalLayout_2.addLayout(self.horizontalLayout) self.history_tabs = QtWidgets.QTabWidget(Form) self.history_tabs.setObjectName("history_tabs") self.verticalLayout_2.addWidget(self.history_tabs) self.retranslateUi(Form) self.history_tabs.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form)
def show_pipeline_details_overview(self): """ Creates and shows a dialog containing the output of the :meth:`~prism.Pipeline.details` method for all emulator iterations. %(qt_slot)s """ # Make a details dialog details_box = QW.QDialog(self) details_box.setWindowModality(QC.Qt.NonModal) details_box.setAttribute(QC.Qt.WA_DeleteOnClose) details_box.setWindowFlags(QC.Qt.MSWindowsOwnDC | QC.Qt.Window | QC.Qt.WindowTitleHint | QC.Qt.WindowSystemMenuHint | QC.Qt.WindowCloseButtonHint) details_box.setWindowTitle("%s: Pipeline details" % (APP_NAME)) # Create a layout for this dialog layout = QW.QVBoxLayout(details_box) # Obtain the latest emul_i emul_i = self.pipe._emulator._emul_i # Create a details tab widget tab_widget = QW.QTabWidget() tab_widget.setCornerWidget(QW.QLabel("Emulator iteration:"), QC.Qt.TopLeftCorner) tab_widget.setUsesScrollButtons(True) tab_widget.setStyleSheet(""" QTabWidget::pane { padding: 1px;} QTabWidget::tab-bar { left: 10px;} """) layout.addWidget(tab_widget) # Loop over all emulator iterations and add their pages for i in range(1, emul_i + 1): # Initialize a StringIO stream to capture the output with with StringIO() as string_stream: # Use this stream to capture the overview of details() with redirect_stdout(string_stream): # Obtain the details at specified emulator iteration self.pipe._make_call('details', i) # Save the entire string stream as a separate object details = string_stream.getvalue() # Strip gathered details of all whitespaces details = details.strip() # Cut everything off before "GENERAL" index = details.find("GENERAL") details = details[index:] # Now split details up line-by-line details = details.splitlines() # Remove all empty lines in details while True: try: details.remove('') except ValueError: break # Search for lines that are in all caps, which are group titles group_idx = [ j for j, line in enumerate(details) if line.isupper() and line[0].isalpha() ] group_idx.append(-1) # Create an empty ordered dict with groups groups = odict() # Split details at these indices for j, k in zip(group_idx[:-1], group_idx[1:]): # Extract the part of the list for this group group = details[j:k] # Extract the name and entry for this group name = group[0].capitalize() entry = group[1:] # If first or last lines contain dashes, remove if (entry[-1].count('-') == len(entry[-1])): entry.pop(-1) if (entry[0].count('-') == len(entry[0])): entry.pop(0) # Loop over all remaining lines in entry and split at \t entry = [line.split('\t') for line in entry] # Add this group entry to the dict groups[name] = entry # Make a details layout details_layout = QW.QVBoxLayout() details_layout.setSizeConstraint(QW.QLayout.SetFixedSize) # Make QGroupBoxes for all groups for name, entry in groups.items(): # Make a QGroupBox for this group group = QW.QGroupBox(name) details_layout.addWidget(group) group_layout = QW.QFormLayout() group.setLayout(group_layout) # Loop over all lines in this group's entry for line in entry: # If line is a list with one element, it spans both columns if (len(line) == 1): # Extract this one element line = line[0] # If line is solely dashes, add a separator if (line.count('-') == len(line)): sep_line = QW.QFrame() sep_line.setFrameShape(sep_line.HLine) sep_line.setFrameShadow(sep_line.Sunken) group_layout.addRow(sep_line) # If not, add line as a QLabel else: group_layout.addRow(QW.QLabel(line)) # Else, it contains two elements else: group_layout.addRow(*map(QW.QLabel, line)) # Add a stretch to the layout details_layout.addStretch() # Add this details_layout to a new widget details_tab = QW.QWidget(details_box) details_tab.setLayout(details_layout) # Add the tab to a scrollarea scrollarea = QW.QScrollArea(details_box) scrollarea.setFrameStyle(QW.QFrame.NoFrame) scrollarea.setContentsMargins(0, 0, 0, 0) scrollarea.setWidgetResizable(True) scrollarea.setHorizontalScrollBarPolicy(QC.Qt.ScrollBarAlwaysOff) scrollarea.horizontalScrollBar().setEnabled(False) scrollarea.setWidget(details_tab) # Set size constraints on the scrollarea scrollarea.setMaximumHeight(details_tab.height() + 2) # Add it to the tab_widget tab_widget.addTab(scrollarea, "&%i" % (i)) # Set size constraints on the details box details_box.setFixedWidth(tab_widget.sizeHint().width() + scrollarea.verticalScrollBar().width() + layout.contentsMargins().left() + layout.contentsMargins().right()) details_box.setMaximumHeight(scrollarea.maximumHeight() + tab_widget.tabBar().sizeHint().height() + layout.contentsMargins().top() + layout.contentsMargins().bottom()) # Show the details message box details_box.show()
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(361, 397) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/configure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_4 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_4.setObjectName("verticalLayout_4") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.load_button = QtWidgets.QPushButton(Form) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/collections.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.load_button.setIcon(icon1) self.load_button.setObjectName("load_button") self.horizontalLayout_4.addWidget(self.load_button) self.save_button = QtWidgets.QPushButton(Form) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/save_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_button.setIcon(icon2) self.save_button.setObjectName("save_button") self.horizontalLayout_4.addWidget(self.save_button) self.profile_name = QtWidgets.QLineEdit(Form) self.profile_name.setReadOnly(True) self.profile_name.setObjectName("profile_name") self.horizontalLayout_4.addWidget(self.profile_name) self.add_collection_button = QtWidgets.QPushButton(Form) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/structure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.add_collection_button.setIcon(icon3) self.add_collection_button.setObjectName("add_collection_button") self.horizontalLayout_4.addWidget(self.add_collection_button) self.clipboard_button = QtWidgets.QPushButton(Form) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.clipboard_button.setIcon(icon4) self.clipboard_button.setObjectName("clipboard_button") self.horizontalLayout_4.addWidget(self.clipboard_button) self.line_5 = QtWidgets.QFrame(Form) self.line_5.setFrameShape(QtWidgets.QFrame.VLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.horizontalLayout_4.addWidget(self.line_5) self.clear_button = QtWidgets.QPushButton(Form) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/clean.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.clear_button.setIcon(icon5) self.clear_button.setObjectName("clear_button") self.horizontalLayout_4.addWidget(self.clear_button) self.verticalLayout_4.addLayout(self.horizontalLayout_4) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_4.addWidget(self.line) self.main_splitter = QtWidgets.QSplitter(Form) self.main_splitter.setOrientation(QtCore.Qt.Vertical) self.main_splitter.setObjectName("main_splitter") self.verticalLayoutWidget = QtWidgets.QWidget(self.main_splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.main_layout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.main_layout.setContentsMargins(0, 0, 0, 0) self.main_layout.setObjectName("main_layout") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.joint_name = QtWidgets.QComboBox(self.verticalLayoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.joint_name.sizePolicy().hasHeightForWidth()) self.joint_name.setSizePolicy(sizePolicy) self.joint_name.setObjectName("joint_name") self.horizontalLayout_2.addWidget(self.joint_name) self.add_customization = QtWidgets.QPushButton(self.verticalLayoutWidget) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/properties.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.add_customization.setIcon(icon6) self.add_customization.setObjectName("add_customization") self.horizontalLayout_2.addWidget(self.add_customization) self.main_layout.addLayout(self.horizontalLayout_2) self.layoutWidget = QtWidgets.QWidget(self.main_splitter) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.layoutWidget) self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) self.verticalLayout_5.setObjectName("verticalLayout_5") self.line_3 = QtWidgets.QFrame(self.layoutWidget) self.line_3.setLineWidth(3) self.line_3.setFrameShape(QtWidgets.QFrame.HLine) self.line_3.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_3.setObjectName("line_3") self.verticalLayout_5.addWidget(self.line_3) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setSpacing(0) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.target_label = QtWidgets.QLabel(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.target_label.sizePolicy().hasHeightForWidth()) self.target_label.setSizePolicy(sizePolicy) self.target_label.setObjectName("target_label") self.horizontalLayout_7.addWidget(self.target_label) self.target_button = QtWidgets.QPushButton(self.layoutWidget) self.target_button.setObjectName("target_button") self.horizontalLayout_7.addWidget(self.target_button) self.verticalLayout_3.addLayout(self.horizontalLayout_7) self.target_list = QtWidgets.QListWidget(self.layoutWidget) self.target_list.setObjectName("target_list") self.verticalLayout_3.addWidget(self.target_list) self.horizontalLayout.addLayout(self.verticalLayout_3) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.driver_base = QtWidgets.QComboBox(self.layoutWidget) self.driver_base.setObjectName("driver_base") self.horizontalLayout_5.addWidget(self.driver_base) self.driver_arrow_label = QtWidgets.QLabel(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.driver_arrow_label.sizePolicy().hasHeightForWidth()) self.driver_arrow_label.setSizePolicy(sizePolicy) self.driver_arrow_label.setObjectName("driver_arrow_label") self.horizontalLayout_5.addWidget(self.driver_arrow_label) self.driver_rotator = QtWidgets.QComboBox(self.layoutWidget) self.driver_rotator.setObjectName("driver_rotator") self.horizontalLayout_5.addWidget(self.driver_rotator) self.verticalLayout_2.addLayout(self.horizontalLayout_5) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.driver_add = QtWidgets.QPushButton(self.layoutWidget) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/motor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.driver_add.setIcon(icon7) self.driver_add.setObjectName("driver_add") self.horizontalLayout_3.addWidget(self.driver_add) self.driver_del = QtWidgets.QPushButton(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.driver_del.sizePolicy().hasHeightForWidth()) self.driver_del.setSizePolicy(sizePolicy) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.driver_del.setIcon(icon8) self.driver_del.setObjectName("driver_del") self.horizontalLayout_3.addWidget(self.driver_del) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.driver_label = QtWidgets.QLabel(self.layoutWidget) self.driver_label.setObjectName("driver_label") self.verticalLayout.addWidget(self.driver_label) self.driver_list = QtWidgets.QListWidget(self.layoutWidget) self.driver_list.setObjectName("driver_list") self.verticalLayout.addWidget(self.driver_list) self.horizontalLayout_8.addLayout(self.verticalLayout) self.verticalLayout_15 = QtWidgets.QVBoxLayout() self.verticalLayout_15.setObjectName("verticalLayout_15") self.grounded_label = QtWidgets.QLabel(self.layoutWidget) self.grounded_label.setObjectName("grounded_label") self.verticalLayout_15.addWidget(self.grounded_label) self.grounded_list = QtWidgets.QListWidget(self.layoutWidget) self.grounded_list.setObjectName("grounded_list") self.verticalLayout_15.addWidget(self.grounded_list) self.horizontalLayout_8.addLayout(self.verticalLayout_15) self.verticalLayout_2.addLayout(self.horizontalLayout_8) self.horizontalLayout.addLayout(self.verticalLayout_2) self.verticalLayout_5.addLayout(self.horizontalLayout) self.verticalLayout_4.addWidget(self.main_splitter) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.expression_label = QtWidgets.QLabel(Form) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.expression_label.sizePolicy().hasHeightForWidth()) self.expression_label.setSizePolicy(sizePolicy) self.expression_label.setObjectName("expression_label") self.horizontalLayout_6.addWidget(self.expression_label) self.expr_show = QtWidgets.QLineEdit(Form) self.expr_show.setReadOnly(True) self.expr_show.setObjectName("expr_show") self.horizontalLayout_6.addWidget(self.expr_show) self.verticalLayout_4.addLayout(self.horizontalLayout_6) self.main_splitter.raise_() self.line.raise_() self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, parent=None): super(HappiDeviceExplorer, self).__init__(parent=parent) self.view = happi.qt.model.HappiDeviceTreeView(self) self.view.groups = [v for _, v in self._GROUP_KEYS.items()] self.group_label = QtWidgets.QLabel("&Group By") self.group_combo = QtWidgets.QComboBox() self.group_label.setBuddy(self.group_combo) for display, val in self._GROUP_KEYS.items(): self.group_combo.addItem(display, val) def set_group(_): key = self.group_combo.currentData() self.view.group_by(key) self.group_combo.currentIndexChanged.connect(set_group) self.filter_label = QtWidgets.QLabel("&Filter") self.filter_edit = QtWidgets.QLineEdit() self.filter_label.setBuddy(self.filter_edit) def set_filter(text): self.view.proxy_model.setFilterRegExp(text) self.filter_edit.textEdited.connect(set_filter) self.setLayout(QtWidgets.QVBoxLayout()) self.filter_frame = QtWidgets.QFrame() self.filter_frame.setLayout(QtWidgets.QGridLayout()) self.filter_frame.layout().addWidget(self.filter_label, 1, 0) self.filter_frame.layout().addWidget(self.filter_edit, 1, 1) self.filter_frame.layout().addWidget(self.group_label, 2, 0) self.filter_frame.layout().addWidget(self.group_combo, 2, 1) self.splitter = QtWidgets.QSplitter() self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.addWidget(self.filter_frame) self.splitter.addWidget(self.view) self.splitter.setSizes([0, 1]) self.splitter.setHandleWidth(10) self.splitter.setStretchFactor(0, 0) self.splitter.setStretchFactor(1, 1) self.splitter.setCollapsible(1, False) handle = self.splitter.handle(1) layout = QtWidgets.QHBoxLayout() layout.setContentsMargins(0, 0, 0, 0) button = QtWidgets.QToolButton(handle) button.setArrowType(QtCore.Qt.DownArrow) button.clicked.connect(lambda: self.handle_splitter_button(True)) layout.addWidget(button) button = QtWidgets.QToolButton(handle) button.setArrowType(QtCore.Qt.UpArrow) button.clicked.connect(lambda: self.handle_splitter_button(False)) layout.addWidget(button) handle.setLayout(layout) self.layout().addWidget(self.splitter)
def AddQHLine(layout): line = QtWidgets.QFrame() line.setFrameShape(QtWidgets.QFrame.HLine) line.setFrameShadow(QtWidgets.QFrame.Sunken) layout.addWidget(line) return line
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(518, 745) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/structure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.add_by_files_button = QtWidgets.QPushButton(Form) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.add_by_files_button.setIcon(icon1) self.add_by_files_button.setObjectName("add_by_files_button") self.horizontalLayout.addWidget(self.add_by_files_button) self.add_by_edges_button = QtWidgets.QPushButton(Form) self.add_by_edges_button.setIcon(icon) self.add_by_edges_button.setObjectName("add_by_edges_button") self.horizontalLayout.addWidget(self.add_by_edges_button) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.VLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.horizontalLayout.addWidget(self.line) self.save_edges = QtWidgets.QPushButton(Form) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/save_file.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_edges.setIcon(icon2) self.save_edges.setObjectName("save_edges") self.horizontalLayout.addWidget(self.save_edges) self.save_atlas = QtWidgets.QPushButton(Form) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/picture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.save_atlas.setIcon(icon3) self.save_atlas.setObjectName("save_atlas") self.horizontalLayout.addWidget(self.save_atlas) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.delete_button = QtWidgets.QPushButton(Form) self.delete_button.setEnabled(False) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.delete_button.setIcon(icon4) self.delete_button.setObjectName("delete_button") self.horizontalLayout.addWidget(self.delete_button) self.clear_button = QtWidgets.QPushButton(Form) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/clean.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.clear_button.setIcon(icon5) self.clear_button.setObjectName("clear_button") self.horizontalLayout.addWidget(self.clear_button) self.verticalLayout_2.addLayout(self.horizontalLayout) self.splitter = QtWidgets.QSplitter(Form) self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.setObjectName("splitter") self.collection_list = QtWidgets.QListWidget(self.splitter) self.collection_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.collection_list.setIconSize(QtCore.QSize(100, 100)) self.collection_list.setMovement(QtWidgets.QListView.Static) self.collection_list.setResizeMode(QtWidgets.QListView.Adjust) self.collection_list.setViewMode(QtWidgets.QListView.IconMode) self.collection_list.setUniformItemSizes(True) self.collection_list.setObjectName("collection_list") self.verticalLayoutWidget = QtWidgets.QWidget(self.splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.graph_engine = QtWidgets.QComboBox(self.verticalLayoutWidget) self.graph_engine.setObjectName("graph_engine") self.horizontalLayout_7.addWidget(self.graph_engine) self.reload_atlas = QtWidgets.QPushButton(self.verticalLayoutWidget) self.reload_atlas.setText("") icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.reload_atlas.setIcon(icon6) self.reload_atlas.setObjectName("reload_atlas") self.horizontalLayout_7.addWidget(self.reload_atlas) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem1) self.graph_link_as_node = QtWidgets.QCheckBox(self.verticalLayoutWidget) self.graph_link_as_node.setObjectName("graph_link_as_node") self.horizontalLayout_7.addWidget(self.graph_link_as_node) self.graph_show_label = QtWidgets.QCheckBox(self.verticalLayoutWidget) self.graph_show_label.setChecked(True) self.graph_show_label.setObjectName("graph_show_label") self.horizontalLayout_7.addWidget(self.graph_show_label) self.verticalLayout.addLayout(self.horizontalLayout_7) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.edges_text = QtWidgets.QLineEdit(self.verticalLayoutWidget) self.edges_text.setReadOnly(True) self.edges_text.setObjectName("edges_text") self.horizontalLayout_3.addWidget(self.edges_text) self.expr_copy = QtWidgets.QPushButton(self.verticalLayoutWidget) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.expr_copy.setIcon(icon7) self.expr_copy.setObjectName("expr_copy") self.horizontalLayout_3.addWidget(self.expr_copy) self.capture_graph = QtWidgets.QPushButton(self.verticalLayoutWidget) self.capture_graph.setIcon(icon3) self.capture_graph.setObjectName("capture_graph") self.horizontalLayout_3.addWidget(self.capture_graph) self.verticalLayout.addLayout(self.horizontalLayout_3) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.selection_window = QtWidgets.QListWidget(self.verticalLayoutWidget) self.selection_window.setMinimumSize(QtCore.QSize(210, 230)) self.selection_window.setMaximumSize(QtCore.QSize(210, 230)) self.selection_window.setSelectionMode(QtWidgets.QAbstractItemView.NoSelection) self.selection_window.setIconSize(QtCore.QSize(200, 200)) self.selection_window.setMovement(QtWidgets.QListView.Static) self.selection_window.setViewMode(QtWidgets.QListView.IconMode) self.selection_window.setObjectName("selection_window") self.horizontalLayout_2.addWidget(self.selection_window) self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.nl_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.nl_text.setObjectName("nl_text") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.nl_text) self.nl_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.nl_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.nl_label.setObjectName("nl_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.nl_label) self.nj_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.nj_text.setObjectName("nj_text") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.nj_text) self.nj_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.nj_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.nj_label.setObjectName("nj_label") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.nj_label) self.dof_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.dof_text.setObjectName("dof_text") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.dof_text) self.dof_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.dof_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.dof_label.setObjectName("dof_label") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.dof_label) self.is_degenerate_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.is_degenerate_text.setObjectName("is_degenerate_text") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.is_degenerate_text) self.is_degenerate_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.is_degenerate_label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.is_degenerate_label.setObjectName("is_degenerate_label") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.is_degenerate_label) self.verticalLayout_5.addLayout(self.formLayout) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.link_assortment_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.link_assortment_text.setObjectName("link_assortment_text") self.verticalLayout_4.addWidget(self.link_assortment_text) self.link_assortment_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.link_assortment_label.setObjectName("link_assortment_label") self.verticalLayout_4.addWidget(self.link_assortment_label) self.contracted_link_assortment_text = QtWidgets.QLabel(self.verticalLayoutWidget) self.contracted_link_assortment_text.setObjectName("contracted_link_assortment_text") self.verticalLayout_4.addWidget(self.contracted_link_assortment_text) self.contracted_link_assortment_label = QtWidgets.QLabel(self.verticalLayoutWidget) self.contracted_link_assortment_label.setObjectName("contracted_link_assortment_label") self.verticalLayout_4.addWidget(self.contracted_link_assortment_label) self.duplicate_button = QtWidgets.QPushButton(self.verticalLayoutWidget) self.duplicate_button.setEnabled(False) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/reflect.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.duplicate_button.setIcon(icon8) self.duplicate_button.setObjectName("duplicate_button") self.verticalLayout_4.addWidget(self.duplicate_button) self.configure_button = QtWidgets.QPushButton(self.verticalLayoutWidget) self.configure_button.setEnabled(False) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/configure.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.configure_button.setIcon(icon9) self.configure_button.setObjectName("configure_button") self.verticalLayout_4.addWidget(self.configure_button) self.merge_button = QtWidgets.QPushButton(self.verticalLayoutWidget) self.merge_button.setEnabled(False) icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/merge.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.merge_button.setIcon(icon10) self.merge_button.setObjectName("merge_button") self.verticalLayout_4.addWidget(self.merge_button) self.verticalLayout_5.addLayout(self.verticalLayout_4) self.horizontalLayout_2.addLayout(self.verticalLayout_5) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.grounded_list = QtWidgets.QListWidget(self.verticalLayoutWidget) self.grounded_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.grounded_list.setIconSize(QtCore.QSize(150, 150)) self.grounded_list.setMovement(QtWidgets.QListView.Static) self.grounded_list.setResizeMode(QtWidgets.QListView.Adjust) self.grounded_list.setViewMode(QtWidgets.QListView.IconMode) self.grounded_list.setUniformItemSizes(True) self.grounded_list.setObjectName("grounded_list") self.horizontalLayout_4.addWidget(self.grounded_list) self.verticalLayout.addLayout(self.horizontalLayout_4) self.verticalLayout_2.addWidget(self.splitter) self.retranslateUi(Form) self.graph_engine.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form)
def setup_ui(self): """Create the UI elements for the form.""" self.setWindowTitle("QtPyVCP Widget Rules Editor") vlayout = QtWidgets.QVBoxLayout() vlayout.setContentsMargins(5, 5, 5, 5) vlayout.setSpacing(5) self.setLayout(vlayout) hlayout = QtWidgets.QHBoxLayout() hlayout.setContentsMargins(0, 0, 0, 0) hlayout.setSpacing(5) vlayout.addLayout(hlayout) # Creating the widgets for the String List and # buttons to add and remove actions list_frame = QtWidgets.QFrame(parent=self) list_frame.setMinimumHeight(300) list_frame.setMinimumWidth(240) list_frame.setLineWidth(1) list_frame.setFrameShadow(QtWidgets.QFrame.Raised) list_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) lf_layout = QtWidgets.QVBoxLayout() list_frame.setLayout(lf_layout) lf_btn_layout = QtWidgets.QHBoxLayout() lf_btn_layout.setContentsMargins(0, 0, 0, 0) lf_btn_layout.setSpacing(5) self.btn_add_rule = QtWidgets.QPushButton(parent=self) self.btn_add_rule.setAutoDefault(False) self.btn_add_rule.setDefault(False) self.btn_add_rule.setText("Add Rule") self.btn_add_rule.clicked.connect(self.add_rule) self.btn_del_rule = QtWidgets.QPushButton(parent=self) self.btn_del_rule.setAutoDefault(False) self.btn_del_rule.setDefault(False) self.btn_del_rule.setText("Remove Rule") self.btn_del_rule.clicked.connect(self.del_rule) lf_btn_layout.addWidget(self.btn_add_rule) lf_btn_layout.addWidget(self.btn_del_rule) lf_layout.addLayout(lf_btn_layout) self.lst_rules = QtWidgets.QListWidget() self.lst_rules.setSizePolicy( QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)) self.lst_rules.itemSelectionChanged.connect(self.load_from_list) lf_layout.addWidget(self.lst_rules) hlayout.addWidget(list_frame) # open help button btn_help = QtWidgets.QPushButton() btn_help.setAutoDefault(False) btn_help.setDefault(False) btn_help.setText("Help") btn_help.setStyleSheet("background-color: rgb(176, 227, 255);") btn_help.clicked.connect(functools.partial(self.open_help, open=True)) # save button save_btn = QtWidgets.QPushButton("Save", parent=self) save_btn.setAutoDefault(False) save_btn.setDefault(False) save_btn.clicked.connect(self.saveChanges) # cancel button cancel_btn = QtWidgets.QPushButton("Cancel", parent=self) cancel_btn.setAutoDefault(False) cancel_btn.setDefault(False) cancel_btn.clicked.connect(self.cancelChanges) # add buttons to layout buttons_layout = QtWidgets.QHBoxLayout() buttons_layout.addWidget(btn_help) buttons_layout.addStretch() buttons_layout.addWidget(cancel_btn) buttons_layout.addWidget(save_btn) vlayout.addLayout(buttons_layout) # Creating the widgets that we will use to compose the # rule parameters self.frm_edit = QtWidgets.QFrame() self.frm_edit.setEnabled(False) self.frm_edit.setLineWidth(1) self.frm_edit.setFrameShadow(QtWidgets.QFrame.Raised) self.frm_edit.setFrameShape(QtWidgets.QFrame.StyledPanel) frm_edit_layout = QtWidgets.QVBoxLayout() self.frm_edit.setLayout(frm_edit_layout) hlayout.addWidget(self.frm_edit) edit_name_layout = QtWidgets.QFormLayout() edit_name_layout.setFieldGrowthPolicy( QtWidgets.QFormLayout.ExpandingFieldsGrow) lbl_name = QtWidgets.QLabel("Rule Name:") self.txt_name = QtWidgets.QLineEdit() self.txt_name.editingFinished.connect(self.name_changed) edit_name_layout.addRow(lbl_name, self.txt_name) lbl_property = QtWidgets.QLabel("Property:") self.cmb_property = QtWidgets.QComboBox() for name, prop in self.available_properties.items(): self.cmb_property.addItem(name, prop) self.cmb_property.model().sort(0) edit_name_layout.addRow(lbl_property, self.cmb_property) frm_edit_layout.addLayout(edit_name_layout) btn_add_remove_layout = QtWidgets.QHBoxLayout() self.btn_add_channel = QtWidgets.QPushButton() self.btn_add_channel.setAutoDefault(False) self.btn_add_channel.setDefault(False) self.btn_add_channel.setText("Add Channel") self.btn_add_channel.setIconSize(QtCore.QSize(16, 16)) self.btn_add_channel.clicked.connect(self.add_channel) self.btn_del_channel = QtWidgets.QPushButton() self.btn_del_channel.setAutoDefault(False) self.btn_del_channel.setDefault(False) self.btn_del_channel.setText("Remove Channel") self.btn_del_channel.setIconSize(QtCore.QSize(16, 16)) self.btn_del_channel.clicked.connect(self.del_channel) btn_add_remove_layout.addWidget(self.btn_add_channel) btn_add_remove_layout.addWidget(self.btn_del_channel) frm_edit_layout.addLayout(btn_add_remove_layout) self.tbl_channels = QtWidgets.QTableWidget() self.tbl_channels.setMinimumWidth(350) self.tbl_channels.setShowGrid(True) self.tbl_channels.setCornerButtonEnabled(False) delegate = CompleterDelegate(self.tbl_channels) self.tbl_channels.setItemDelegateForColumn(0, delegate) self.tbl_channels.model().dataChanged.connect( self.tbl_channels_changed) headers = ["Channel", "Trigger", "Type"] self.tbl_channels.setColumnCount(len(headers)) self.tbl_channels.setHorizontalHeaderLabels(headers) header = self.tbl_channels.horizontalHeader() header.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch) header.setSectionResizeMode(1, QtWidgets.QHeaderView.ResizeToContents) header.setSectionResizeMode(2, QtWidgets.QHeaderView.ResizeToContents) # header.setSectionResizeMode(3, QtWidgets.QHeaderView.ResizeToContents) self.tbl_channels.setColumnWidth(3, 8) frm_edit_layout.addWidget(self.tbl_channels) expression_layout = QtWidgets.QFormLayout() expression_layout.setFieldGrowthPolicy( QtWidgets.QFormLayout.ExpandingFieldsGrow) lbl_expected = QtWidgets.QLabel("Exp Type:") self.lbl_expected_type = QtWidgets.QLabel(parent=self) # self.lbl_expected_type.setText("") self.lbl_expected_type.setStyleSheet( "color: rgb(0, 128, 255); font-weight: bold;") hbox = QtWidgets.QHBoxLayout() hbox.addWidget(self.lbl_expected_type) hbox.addStretch() self.btn_chan_info = QtWidgets.QPushButton("Info ...") self.btn_chan_info.setAutoDefault(False) self.btn_chan_info.pressed.connect(self.show_chan_info) hbox.addWidget(self.btn_chan_info) expression_layout.addRow(lbl_expected, hbox) lbl_expression = QtWidgets.QLabel("Expression:") expr_help_layout = QtWidgets.QHBoxLayout() self.txt_expression = QtWidgets.QLineEdit() self.txt_expression.editingFinished.connect(self.expression_changed) expr_help_layout.addWidget(self.txt_expression) expression_layout.addRow(lbl_expression, expr_help_layout) self.cmb_property.currentIndexChanged.connect(self.property_changed) self.cmb_property.setCurrentText(self.default_property) frm_edit_layout.addLayout(expression_layout)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(430, 763) self.verticalLayout_6 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_6.setObjectName("verticalLayout_6") self.joint_groupBox = QtWidgets.QGroupBox(Form) self.joint_groupBox.setObjectName("joint_groupBox") self.horizontalLayout = QtWidgets.QHBoxLayout(self.joint_groupBox) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.joint_list_lable = QtWidgets.QLabel(self.joint_groupBox) self.joint_list_lable.setObjectName("joint_list_lable") self.verticalLayout_13.addWidget(self.joint_list_lable) self.joint_list = QtWidgets.QListWidget(self.joint_groupBox) self.joint_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.joint_list.setObjectName("joint_list") self.verticalLayout_13.addWidget(self.joint_list) self.horizontalLayout.addLayout(self.verticalLayout_13) self.inputs_label_right2 = QtWidgets.QLabel(self.joint_groupBox) self.inputs_label_right2.setObjectName("inputs_label_right2") self.horizontalLayout.addWidget(self.inputs_label_right2) self.verticalLayout_16 = QtWidgets.QVBoxLayout() self.verticalLayout_16.setObjectName("verticalLayout_16") self.driver_list_lable = QtWidgets.QLabel(self.joint_groupBox) self.driver_list_lable.setObjectName("driver_list_lable") self.verticalLayout_16.addWidget(self.driver_list_lable) self.driver_list = QtWidgets.QListWidget(self.joint_groupBox) self.driver_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.driver_list.setObjectName("driver_list") self.verticalLayout_16.addWidget(self.driver_list) self.variable_add = QtWidgets.QPushButton(self.joint_groupBox) self.variable_add.setEnabled(False) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/arrow_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_add.setIcon(icon) self.variable_add.setObjectName("variable_add") self.verticalLayout_16.addWidget(self.variable_add) self.horizontalLayout.addLayout(self.verticalLayout_16) self.verticalLayout_6.addWidget(self.joint_groupBox) self.variable_groupBox = QtWidgets.QGroupBox(Form) self.variable_groupBox.setObjectName("variable_groupBox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.variable_groupBox) self.verticalLayout_4.setObjectName("verticalLayout_4") self.inputs_dial_layout = QtWidgets.QHBoxLayout() self.inputs_dial_layout.setObjectName("inputs_dial_layout") self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.variable_up = QtWidgets.QPushButton(self.variable_groupBox) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/arrow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_up.setIcon(icon1) self.variable_up.setObjectName("variable_up") self.verticalLayout_5.addWidget(self.variable_up) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem) self.variable_down = QtWidgets.QPushButton(self.variable_groupBox) self.variable_down.setIcon(icon) self.variable_down.setObjectName("variable_down") self.verticalLayout_5.addWidget(self.variable_down) self.variable_remove = QtWidgets.QPushButton(self.variable_groupBox) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_remove.setIcon(icon2) self.variable_remove.setObjectName("variable_remove") self.verticalLayout_5.addWidget(self.variable_remove) self.inputs_dial_layout.addLayout(self.verticalLayout_5) self.variable_list = QtWidgets.QListWidget(self.variable_groupBox) self.variable_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.variable_list.setObjectName("variable_list") self.inputs_dial_layout.addWidget(self.variable_list) self.line_5 = QtWidgets.QFrame(self.variable_groupBox) self.line_5.setFrameShape(QtWidgets.QFrame.VLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.inputs_dial_layout.addWidget(self.line_5) self.verticalLayout_4.addLayout(self.inputs_dial_layout) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_18 = QtWidgets.QVBoxLayout() self.verticalLayout_18.setObjectName("verticalLayout_18") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.variable_speed_label = QtWidgets.QLabel(self.variable_groupBox) self.variable_speed_label.setObjectName("variable_speed_label") self.horizontalLayout_4.addWidget(self.variable_speed_label) self.variable_speed = QtWidgets.QSpinBox(self.variable_groupBox) self.variable_speed.setEnabled(False) self.variable_speed.setMinimum(-100) self.variable_speed.setMaximum(100) self.variable_speed.setSingleStep(5) self.variable_speed.setProperty("value", -10) self.variable_speed.setObjectName("variable_speed") self.horizontalLayout_4.addWidget(self.variable_speed) self.verticalLayout_18.addLayout(self.horizontalLayout_4) self.extremeRebound = QtWidgets.QCheckBox(self.variable_groupBox) self.extremeRebound.setChecked(True) self.extremeRebound.setObjectName("extremeRebound") self.verticalLayout_18.addWidget(self.extremeRebound) self.horizontalLayout_3.addLayout(self.verticalLayout_18) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.variable_play = QtWidgets.QPushButton(self.variable_groupBox) self.variable_play.setEnabled(False) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon3.addPixmap(QtGui.QPixmap(":/icons/pause.png"), QtGui.QIcon.Active, QtGui.QIcon.On) self.variable_play.setIcon(icon3) self.variable_play.setCheckable(True) self.variable_play.setObjectName("variable_play") self.verticalLayout_3.addWidget(self.variable_play) self.variable_stop = QtWidgets.QPushButton(self.variable_groupBox) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/interrupted.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_stop.setIcon(icon4) self.variable_stop.setObjectName("variable_stop") self.verticalLayout_3.addWidget(self.variable_stop) self.horizontalLayout_3.addLayout(self.verticalLayout_3) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.dial_spinbox = QtWidgets.QDoubleSpinBox(self.variable_groupBox) self.dial_spinbox.setEnabled(False) self.dial_spinbox.setMaximum(360.0) self.dial_spinbox.setObjectName("dial_spinbox") self.verticalLayout.addWidget(self.dial_spinbox) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.update_pos_option = QtWidgets.QCheckBox(self.variable_groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.update_pos_option.sizePolicy().hasHeightForWidth()) self.update_pos_option.setSizePolicy(sizePolicy) self.update_pos_option.setObjectName("update_pos_option") self.horizontalLayout_2.addWidget(self.update_pos_option) self.update_pos = QtWidgets.QPushButton(self.variable_groupBox) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_pos.setIcon(icon5) self.update_pos.setObjectName("update_pos") self.horizontalLayout_2.addWidget(self.update_pos) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3.addLayout(self.verticalLayout) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.verticalLayout_6.addWidget(self.variable_groupBox) self.record_groupBox = QtWidgets.QGroupBox(Form) self.record_groupBox.setObjectName("record_groupBox") self.verticalLayout_22 = QtWidgets.QVBoxLayout(self.record_groupBox) self.verticalLayout_22.setObjectName("verticalLayout_22") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.record_show = QtWidgets.QCheckBox(self.record_groupBox) self.record_show.setChecked(True) self.record_show.setObjectName("record_show") self.horizontalLayout_6.addWidget(self.record_show) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.record_interval_label = QtWidgets.QLabel(self.record_groupBox) self.record_interval_label.setObjectName("record_interval_label") self.horizontalLayout_6.addWidget(self.record_interval_label) self.record_interval = QtWidgets.QDoubleSpinBox(self.record_groupBox) self.record_interval.setDecimals(2) self.record_interval.setMinimum(0.5) self.record_interval.setMaximum(6.0) self.record_interval.setProperty("value", 1.0) self.record_interval.setObjectName("record_interval") self.horizontalLayout_6.addWidget(self.record_interval) self.verticalLayout_22.addLayout(self.horizontalLayout_6) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.record_list = QtWidgets.QListWidget(self.record_groupBox) self.record_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.record_list.setObjectName("record_list") item = QtWidgets.QListWidgetItem() self.record_list.addItem(item) self.horizontalLayout_8.addWidget(self.record_list) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.update_preview_button = QtWidgets.QPushButton( self.record_groupBox) self.update_preview_button.setIcon(icon5) self.update_preview_button.setObjectName("update_preview_button") self.verticalLayout_2.addWidget(self.update_preview_button) self.record_start = QtWidgets.QPushButton(self.record_groupBox) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/record.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.record_start.setIcon(icon6) self.record_start.setCheckable(True) self.record_start.setObjectName("record_start") self.verticalLayout_2.addWidget(self.record_start) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem3) self.record_remove = QtWidgets.QPushButton(self.record_groupBox) self.record_remove.setIcon(icon2) self.record_remove.setObjectName("record_remove") self.verticalLayout_2.addWidget(self.record_remove) self.horizontalLayout_8.addLayout(self.verticalLayout_2) self.verticalLayout_22.addLayout(self.horizontalLayout_8) self.verticalLayout_6.addWidget(self.record_groupBox) self.retranslateUi(Form) self.record_list.setCurrentRow(0) QtCore.QMetaObject.connectSlotsByName(Form)