def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(648, 335) Form.setStyleSheet( _fromUtf8("#Form {\n" " background-color: rgb(0,0,0)\n" "}\n" "\n" "QLabel{\n" " color: white\n" "}")) self.verticalLayout = QtGui.QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.pg_layout = GraphicsLayoutWidget(Form) self.pg_layout.setObjectName(_fromUtf8("pg_layout")) self.horizontalLayout.addWidget(self.pg_layout) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.bench_btn = QtGui.QPushButton(Form) self.bench_btn.setObjectName(_fromUtf8("bench_btn")) self.horizontalLayout_2.addWidget(self.bench_btn) self.pos_lbl = QtGui.QLabel(Form) self.pos_lbl.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.pos_lbl.setObjectName(_fromUtf8("pos_lbl")) self.horizontalLayout_2.addWidget(self.pos_lbl) self.verticalLayout.addLayout(self.horizontalLayout_2) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, parent=None): super().__init__(parent=parent) # Settings for the image self.viewport = GraphicsLayoutWidget() self.view = self.viewport.addViewBox(lockAspect=False, enableMenu=True) self.img = pg.ImageItem() self.view.addItem(self.img) self.imv = pg.ImageView(view=self.view, imageItem=self.img) self.scene().sigMouseClicked.connect(self.mouse_clicked) # Add everything to the widget layout = self.get_layout() layout.addWidget(self.imv) self.show_roi_lines = False # ROI lines are shown or not self.show_cross_hair = False # Cross hair is shown or not self.show_cross_cut = False # Cross cut is shown or not self.cross_hair_setup = False # Cross hair was setup or not self.cross_cut_setup = False # Cross cut was setup or not self.rois = [] self.corner_roi = [0, 0] # Initial ROI corner for the camera self.first_image = True self.logger = get_logger() self.last_image = None self.add_actions_to_menu() self.setup_mouse_tracking()
def setupUi(self, WaterfallNoise): WaterfallNoise.setObjectName(_fromUtf8("WaterfallNoise")) WaterfallNoise.resize(793, 684) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/icons/Icons/realtime_noise_64x64.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) WaterfallNoise.setWindowIcon(icon) self.horizontalLayout_2 = QtGui.QHBoxLayout(WaterfallNoise) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.ui_waterfall_plot = GraphicsLayoutWidget(WaterfallNoise) self.ui_waterfall_plot.setObjectName(_fromUtf8("ui_waterfall_plot")) self.horizontalLayout.addWidget(self.ui_waterfall_plot) self.ui_histogram_layout = GraphicsLayoutWidget(WaterfallNoise) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.ui_histogram_layout.sizePolicy().hasHeightForWidth()) self.ui_histogram_layout.setSizePolicy(sizePolicy) self.ui_histogram_layout.setMinimumSize(QtCore.QSize(200, 0)) self.ui_histogram_layout.setObjectName(_fromUtf8("ui_histogram_layout")) self.horizontalLayout.addWidget(self.ui_histogram_layout) self.horizontalLayout_2.addLayout(self.horizontalLayout) self.retranslateUi(WaterfallNoise) QtCore.QMetaObject.connectSlotsByName(WaterfallNoise)
def __init__(self, *args, **kwargs): super(CalibrationDisplayWidget, self).__init__(*args, **kwargs) self._layout = QtGui.QVBoxLayout(self) self._layout.setContentsMargins(0, 0, 0, 0) self.img_layout_widget = GraphicsLayoutWidget() self.cake_layout_widget = GraphicsLayoutWidget() self.spectrum_layout_widget = GraphicsLayoutWidget() self.img_widget = MaskImgWidget(self.img_layout_widget) self.cake_widget = CalibrationCakeWidget(self.cake_layout_widget) self.spectrum_widget = SpectrumWidget(self.spectrum_layout_widget) self.tab_widget = QtGui.QTabWidget() self.tab_widget.addTab(self.img_layout_widget, 'Image') self.tab_widget.addTab(self.cake_layout_widget, 'Cake') self.tab_widget.addTab(self.spectrum_layout_widget, 'Pattern') self._layout.addWidget(self.tab_widget) self._status_layout = QtGui.QHBoxLayout() self.calibrate_btn = FlatButton("Calibrate") self.refine_btn = FlatButton("Refine") self.position_lbl = QtGui.QLabel("position_lbl") self._status_layout.addWidget(self.calibrate_btn) self._status_layout.addWidget(self.refine_btn) self._status_layout.addSpacerItem(QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)) self._status_layout.addWidget(self.position_lbl) self._layout.addLayout(self._status_layout) self.setLayout(self._layout) self.style_widgets()
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(535, 311) self.gridLayout = QtWidgets.QGridLayout(Form) self.gridLayout.setObjectName("gridLayout") self.graphicsView = GraphicsLayoutWidget(Form) self.graphicsView.setObjectName("graphicsView") self.gridLayout.addWidget(self.graphicsView, 0, 1, 1, 1) self.frame_overview = QtWidgets.QFrame(Form) self.frame_overview.setMaximumSize(QtCore.QSize(180, 16777215)) self.frame_overview.setFrameShape(QtWidgets.QFrame.NoFrame) self.frame_overview.setFrameShadow(QtWidgets.QFrame.Plain) self.frame_overview.setObjectName("frame_overview") self.gridLayout_2 = QtWidgets.QGridLayout(self.frame_overview) self.gridLayout_2.setContentsMargins(0, 0, 0, 0) self.gridLayout_2.setSpacing(0) self.gridLayout_2.setObjectName("gridLayout_2") self.gridLayout.addWidget(self.frame_overview, 0, 0, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): _translate = QtCore.QCoreApplication.translate Form.setWindowTitle(_translate("Form", "Form"))
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(1064, 816) font = QtGui.QFont() font.setPointSize(15) Dialog.setFont(font) self.comSelectBox = QtWidgets.QComboBox(Dialog) self.comSelectBox.setGeometry(QtCore.QRect(870, 70, 151, 31)) self.comSelectBox.setMaxVisibleItems(6) self.comSelectBox.setObjectName("comSelectBox") self.label = QtWidgets.QLabel(Dialog) self.label.setGeometry(QtCore.QRect(770, 70, 81, 31)) self.label.setObjectName("label") self.beginButton = QtWidgets.QPushButton(Dialog) self.beginButton.setGeometry(QtCore.QRect(880, 260, 141, 41)) self.beginButton.setObjectName("beginButton") self.graphicsView = GraphicsLayoutWidget(Dialog) self.graphicsView.setGeometry(QtCore.QRect(30, 190, 731, 591)) self.graphicsView.setObjectName("graphicsView") self.verticalLayoutWidget = QtWidgets.QWidget(Dialog) self.verticalLayoutWidget.setGeometry(QtCore.QRect(30, 190, 731, 591)) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.graph_layout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.graph_layout.setContentsMargins(0, 0, 0, 0) self.graph_layout.setObjectName("graph_layout") self.retranslateUi(Dialog) QtCore.QMetaObject.connectSlotsByName(Dialog)
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) self.layout = QtGui.QHBoxLayout(self) self.viewport = GraphicsLayoutWidget() self.view = self.viewport.addViewBox(colspan=3, rowspan=3, lockAspect=False, enableMenu=True) self.img = pg.ImageItem() self.view.addItem(self.img) # Get the colormap colormap = cm.get_cmap("jet") colormap._init() lut = (colormap._lut * 255).view( np.ndarray ) # Convert matplotlib colormap from 0-1 to 0 -255 for Qt # Apply the colormap self.img.setLookupTable(lut) self.h = self.viewport.addViewBox(enableMenu=False, colspan=3) self.hist = pg.HistogramLUTItem(image=self.img, fillHistogram=False) self.hist.setImageItem(self.img) self.h.addItem(self.hist) self.imv = pg.ImageView(view=self.view, imageItem=self.img) self.layout.addWidget(self.imv) self.setLayout(self.layout)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(670, 140, 75, 23)) self.pushButton.setObjectName("pushButton") self.pyqtgraph1 = GraphicsLayoutWidget(self.centralwidget) self.pyqtgraph1.setGeometry(QtCore.QRect(10, 10, 601, 201)) self.pyqtgraph1.setObjectName("pyqtgraph1") self.pyqtgraph2 = GraphicsLayoutWidget(self.centralwidget) self.pyqtgraph2.setGeometry(QtCore.QRect(10, 220, 381, 351)) self.pyqtgraph2.setObjectName("pyqtgraph2") self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget) self.pushButton_2.setGeometry(QtCore.QRect(430, 380, 75, 23)) self.pushButton_2.setObjectName("pushButton_2") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def addGraphPlot(self): graph = GraphicsLayoutWidget(self.stockTab2) graph.setObjectName("stock UI") p1 = graph.addPlot(row=1, col=0) p2 = graph.addPlot(row=2, col=0) p1.showGrid(x=True, y=True, alpha=0.5) return graph
class Ui_Form(object): def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(648, 335) self.horizontalLayout = QtGui.QHBoxLayout(Form) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.tabWidget = QtGui.QTabWidget(Form) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.verticalLayout = QtGui.QVBoxLayout(self.tab) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.pg_layout = GraphicsLayoutWidget(self.tab) self.pg_layout.setObjectName(_fromUtf8("pg_layout")) self.verticalLayout.addWidget(self.pg_layout) self.tabWidget.addTab(self.tab, _fromUtf8("")) self.tab_2 = QtGui.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.horizontalLayout.addWidget(self.tabWidget) self.pg_layout2 = GraphicsLayoutWidget(Form) self.pg_layout2.setObjectName(_fromUtf8("pg_layout2")) self.horizontalLayout.addWidget(self.pg_layout2) self.retranslateUi(Form) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Form) def retranslateUi(self, Form): Form.setWindowTitle(_translate("Form", "Form", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("Form", "Tab 1", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("Form", "Tab 2", None))
class Ui_GraphicWindow(object): def setupUi(self, GraphicWindow): GraphicWindow.setObjectName("GraphicWindow") GraphicWindow.resize(935, 567) self.verticalLayout = QtWidgets.QVBoxLayout(GraphicWindow) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.pushButtonPlay = QtWidgets.QPushButton(GraphicWindow) self.pushButtonPlay.setObjectName("pushButtonPlay") self.verticalLayout.addWidget(self.pushButtonPlay) self.pushButton = QtWidgets.QPushButton(GraphicWindow) self.pushButton.setObjectName("pushButton") self.verticalLayout.addWidget(self.pushButton) self.graphicsView = GraphicsLayoutWidget(GraphicWindow) self.graphicsView.setObjectName("graphicsView") self.verticalLayout.addWidget(self.graphicsView) self.retranslateUi(GraphicWindow) QtCore.QMetaObject.connectSlotsByName(GraphicWindow) def retranslateUi(self, GraphicWindow): _translate = QtCore.QCoreApplication.translate GraphicWindow.setWindowTitle( _translate("GraphicWindow", "GraphicWindow")) self.pushButtonPlay.setText(_translate("GraphicWindow", "Play")) self.pushButton.setText(_translate("GraphicWindow", "View Spectrum"))
class Ui_plotdialog(object): def setupUi(self, plotdialog): plotdialog.setObjectName(_fromUtf8("plotdialog")) plotdialog.resize(854, 610) self.graphicsView = GraphicsLayoutWidget(plotdialog) self.graphicsView.setGeometry(QtCore.QRect(30, 10, 811, 481)) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.hslider = QtGui.QSlider(plotdialog) self.hslider.setGeometry(QtCore.QRect(20, 510, 431, 29)) self.hslider.setMaximum(100) self.hslider.setOrientation(QtCore.Qt.Horizontal) self.hslider.setTickPosition(QtGui.QSlider.TicksBothSides) self.hslider.setObjectName(_fromUtf8("hslider")) self.comboBox = QtGui.QComboBox(plotdialog) self.comboBox.setGeometry(QtCore.QRect(30, 550, 141, 31)) self.comboBox.setObjectName(_fromUtf8("comboBox")) self.showbtn = QtGui.QToolButton(plotdialog) self.showbtn.setGeometry(QtCore.QRect(240, 550, 151, 31)) self.showbtn.setObjectName(_fromUtf8("showbtn")) self.retranslateUi(plotdialog) QtCore.QMetaObject.connectSlotsByName(plotdialog) def retranslateUi(self, plotdialog): plotdialog.setWindowTitle(QtGui.QApplication.translate("plotdialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8)) self.showbtn.setText(QtGui.QApplication.translate("plotdialog", "Show/Hide PF", None, QtGui.QApplication.UnicodeUTF8))
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) # General layout of the widget to hold an image and a histogram self.layout = QtGui.QHBoxLayout(self) # Settings for the image self.viewport = GraphicsLayoutWidget() self.view = self.viewport.addViewBox(lockAspect=False, enableMenu=True) self.autoScale = QtGui.QAction("Auto Range", self.view.menu) self.autoScale.triggered.connect(self.doAutoScale) self.view.menu.addAction(self.autoScale) self.img = pg.ImageItem() self.view.addItem(self.img) self.imv = pg.ImageView(view=self.view, imageItem=self.img) # Add everything to the widget self.layout.addWidget(self.imv) self.setLayout(self.layout) self.showCrosshair = False self.showCrossCut = False
class Ui_DockWidget(object): def setupUi(self, DockWidget): DockWidget.setObjectName(_fromUtf8("DockWidget")) DockWidget.resize(948, 856) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.gridLayout = QtGui.QGridLayout(self.dockWidgetContents) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.featureMapRB = QtGui.QRadioButton(self.dockWidgetContents) self.featureMapRB.setObjectName(_fromUtf8("featureMapRB")) self.horizontalLayout_3.addWidget(self.featureMapRB) self.chromatogramRB = QtGui.QRadioButton(self.dockWidgetContents) self.chromatogramRB.setObjectName(_fromUtf8("chromatogramRB")) self.horizontalLayout_3.addWidget(self.chromatogramRB) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.plots = GraphicsLayoutWidget(self.dockWidgetContents) self.plots.setObjectName(_fromUtf8("plots")) self.verticalLayout_3.addWidget(self.plots) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.prevButton = QtGui.QPushButton(self.dockWidgetContents) self.prevButton.setObjectName(_fromUtf8("prevButton")) self.horizontalLayout.addWidget(self.prevButton) self.nextButton = QtGui.QPushButton(self.dockWidgetContents) self.nextButton.setObjectName(_fromUtf8("nextButton")) self.horizontalLayout.addWidget(self.nextButton) self.label = QtGui.QLabel(self.dockWidgetContents) self.label.setObjectName(_fromUtf8("label")) self.horizontalLayout.addWidget(self.label) self.rowsLE = QtGui.QLineEdit(self.dockWidgetContents) self.rowsLE.setObjectName(_fromUtf8("rowsLE")) self.horizontalLayout.addWidget(self.rowsLE) self.label_2 = QtGui.QLabel(self.dockWidgetContents) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout.addWidget(self.label_2) self.colsLE = QtGui.QLineEdit(self.dockWidgetContents) self.colsLE.setObjectName(_fromUtf8("colsLE")) self.horizontalLayout.addWidget(self.colsLE) self.verticalLayout_3.addLayout(self.horizontalLayout) self.gridLayout.addLayout(self.verticalLayout_3, 0, 0, 1, 1) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) QtCore.QMetaObject.connectSlotsByName(DockWidget) def retranslateUi(self, DockWidget): DockWidget.setWindowTitle( _translate("DockWidget", "EIC Explorer", None)) self.featureMapRB.setText(_translate("DockWidget", "Feature Map", None)) self.chromatogramRB.setText( _translate("DockWidget", "Chromatograms", None)) self.prevButton.setText(_translate("DockWidget", "Previous", None)) self.nextButton.setText(_translate("DockWidget", "Next", None)) self.label.setText(_translate("DockWidget", "rows", None)) self.label_2.setText(_translate("DockWidget", "cols", None))
def populate_spectrogram_widget(self, widget: GraphicsLayoutWidget, game_name: str, player_name: PlayerName, electrode_name: str): # https://stackoverflow.com/questions/51312923/plotting-the-spectrum-of-a-wavfile-in-pyqtgraph-using-scipy-signal-spectrogram f, t, Sxx = self._acquire_spectrogram_signal(game_name, player_name, electrode_name) plot = widget.addPlot() plot.setTitle('Frequency over time for electrode %s' % ELECTRODES[electrode_name]) img = ImageItem() plot.addItem(img) hist = HistogramLUTItem() hist.setImageItem(img) widget.addItem(hist) hist.setLevels(np.min(Sxx), np.max(Sxx)) hist.gradient.restoreState({ 'mode': 'rgb', 'ticks': [(0.5, (0, 182, 188, 255)), (1.0, (246, 111, 0, 255)), (0.0, (75, 0, 113, 255))] }) img.setImage(Sxx) img.scale(t[-1] / np.size(Sxx, axis=1), f[-1] / np.size(Sxx, axis=0)) plot.setLimits(xMin=0, xMax=t[-1], yMin=0, yMax=f[-1]) plot.setLabel('bottom', "Time", units='s') plot.setLabel('left', "Frequency", units='Hz')
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(648, 335) self.horizontalLayout = QtGui.QHBoxLayout(Form) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.tabWidget = QtGui.QTabWidget(Form) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.verticalLayout = QtGui.QVBoxLayout(self.tab) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.pg_layout = GraphicsLayoutWidget(self.tab) self.pg_layout.setObjectName(_fromUtf8("pg_layout")) self.verticalLayout.addWidget(self.pg_layout) self.tabWidget.addTab(self.tab, _fromUtf8("")) self.tab_2 = QtGui.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.horizontalLayout.addWidget(self.tabWidget) self.pg_layout2 = GraphicsLayoutWidget(Form) self.pg_layout2.setObjectName(_fromUtf8("pg_layout2")) self.horizontalLayout.addWidget(self.pg_layout2) self.retranslateUi(Form) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self): super(PlotWindow, self).__init__() self.layout = QHBoxLayout(self) pg.setConfigOptions(imageAxisOrder='row-major') self.viewport = GraphicsLayoutWidget() self.video_view = self.viewport.addViewBox() self.video = pg.ImageItem() # self.video_view.clicked.connect(self.btn_state) self.video_view.addItem(self.video) self.video_view.setMouseEnabled(x=False, y=False)#make it can not move self.img_label = 'no image' self.viewport.setToolTip(str(self.img_label)) self.setLayout(self.layout) self.layout.addWidget(self.viewport) # self.push_btn = QPushButton("sent", self) # self.push_btn.clicked.connect(self.btn_state) # self.save_btn = QPushButton("save", self) # self.save_btn.clicked.connect(self.save_image) # self.horizontalLayout = QVBoxLayout() # self.horizontalLayout.addWidget(self.push_btn) # self.horizontalLayout.addWidget(self.save_btn) # self.horizontalLayout.addWidget(self.img_label) # self.layout.addLayout(self.horizontalLayout) screen = QtGui.QDesktopWidget().screenGeometry() # print(screen) self.setFixedSize(screen.width() * 15 / 100, screen.width() * (9/16)*(14 / 100))
def setupGraph(self): self.date_axis = TimeAxisItem(orientation='bottom') self.graph = GraphicsLayoutWidget() self.graph.setObjectName("Graph UI") self.date_axis = TimeAxisItem(orientation='bottom') self.label = pg.LabelItem(justify='right') self.graph.addItem(self.label) self.p1 = self.graph.addPlot(row=1, col=0, axisItems={'bottom': self.date_axis}) #p1 zoom in/out, move viewbox can auto scaling Y, Important! self.p1.vb.sigXRangeChanged.connect(self.setYRange) self.PlotDataItemList = self.setPlot() self.PlotLocalMaximaData = pg.ScatterPlotItem(pen='r', brush='b', symbol='d', pxMode=True, size=10) self.PlotLocalMinimaData = pg.ScatterPlotItem(pen='g', brush='b', symbol='t', pxMode=True, size=10)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(903, 678) self.widget = QtWidgets.QWidget(Form) self.widget.setGeometry(QtCore.QRect(60, 100, 731, 451)) self.widget.setObjectName("widget") self.gridLayout = QtWidgets.QGridLayout(self.widget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.pyqtgraph = GraphicsLayoutWidget(self.widget) self.pyqtgraph.setMinimumSize(QtCore.QSize(100, 50)) self.pyqtgraph.setObjectName("pyqtgraph") self.horizontalLayout.addWidget(self.pyqtgraph) self.pyqtgraph2 = GraphicsLayoutWidget(self.widget) self.pyqtgraph2.setMinimumSize(QtCore.QSize(100, 50)) self.pyqtgraph2.setObjectName("pyqtgraph2") self.horizontalLayout.addWidget(self.pyqtgraph2) self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 3) self.pushButton = QtWidgets.QPushButton(self.widget) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 1, 0, 1, 1) self.pushButton_2 = QtWidgets.QPushButton(self.widget) self.pushButton_2.setObjectName("pushButton_2") self.gridLayout.addWidget(self.pushButton_2, 1, 1, 1, 1) self.quit_btn = QtWidgets.QPushButton(self.widget) self.quit_btn.setObjectName("quit_btn") self.gridLayout.addWidget(self.quit_btn, 1, 2, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, DockWidget): DockWidget.setObjectName(_fromUtf8("DockWidget")) DockWidget.resize(946, 750) font = QtGui.QFont() font.setBold(True) font.setWeight(75) DockWidget.setFont(font) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.verticalLayout = QtGui.QVBoxLayout(self.dockWidgetContents) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.groupBox = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.gridLayout = QtGui.QGridLayout(self.groupBox) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.massAccuracyLayout = GraphicsLayoutWidget(self.groupBox) self.massAccuracyLayout.setObjectName(_fromUtf8("massAccuracyLayout")) self.gridLayout.addWidget(self.massAccuracyLayout, 0, 0, 1, 1) self.verticalLayout.addWidget(self.groupBox) self.groupBox_2 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.rtDriftLayout = GraphicsLayoutWidget(self.groupBox_2) self.rtDriftLayout.setObjectName(_fromUtf8("rtDriftLayout")) self.gridLayout_2.addWidget(self.rtDriftLayout, 0, 0, 1, 1) self.verticalLayout.addWidget(self.groupBox_2) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) QtCore.QMetaObject.connectSlotsByName(DockWidget)
def __init__(self, parent=None): super().__init__(parent=parent) # General layout of the widget to hold an image and a histogram self.layout = QHBoxLayout(self) # Settings for the image self.viewport = GraphicsLayoutWidget() self.view = self.viewport.addViewBox(lockAspect=False, enableMenu=True) self.autoScale = QAction("Auto Range", self.view.menu) self.autoScale.triggered.connect(self.do_auto_scale) self.view.menu.addAction(self.autoScale) self.img = pg.ImageItem() self.marker = pg.PlotDataItem(pen=None) self.marker.setBrush(255, 0, 0, 255) self.view.addItem(self.img) self.view.addItem(self.marker) self.imv = pg.ImageView(view=self.view, imageItem=self.img) # Add everything to the widget self.layout.addWidget(self.imv) self.setLayout(self.layout) self.showCrosshair = False self.showCrossCut = False self.rois = [] self.radius_circle = 10 # The radius to draw around particles self.corner_roi = [0, 0] # Initial ROI corner for the camera self.first_image = True
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(802, 468) font = QtGui.QFont() font.setFamily("MS Gothic") font.setPointSize(10) MainWindow.setFont(font) MainWindow.setContextMenuPolicy(QtCore.Qt.NoContextMenu) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.graphicsView = GraphicsLayoutWidget(self.centralwidget) self.graphicsView.setGeometry(QtCore.QRect(30, 60, 361, 331)) self.graphicsView.setObjectName("graphicsView") self.graphicsView_2 = GraphicsLayoutWidget(self.centralwidget) self.graphicsView_2.setGeometry(QtCore.QRect(410, 60, 361, 331)) self.graphicsView_2.setObjectName("graphicsView_2") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(110, 20, 211, 41)) font = QtGui.QFont() font.setFamily("微軟正黑體 Light") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self.centralwidget) self.label_2.setGeometry(QtCore.QRect(500, 20, 211, 41)) font = QtGui.QFont() font.setFamily("微軟正黑體 Light") font.setPointSize(14) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.pushButton_exit = QtWidgets.QPushButton(self.centralwidget) self.pushButton_exit.setGeometry(QtCore.QRect(680, 410, 91, 31)) font = QtGui.QFont() font.setFamily("微軟正黑體 Light") font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton_exit.setFont(font) self.pushButton_exit.setObjectName("pushButton_exit") self.pushButton_start = QtWidgets.QPushButton(self.centralwidget) self.pushButton_start.setGeometry(QtCore.QRect(30, 410, 151, 31)) font = QtGui.QFont() font.setFamily("微軟正黑體 Light") font.setBold(True) font.setItalic(False) font.setWeight(75) self.pushButton_start.setFont(font) self.pushButton_start.setObjectName("pushButton_start") MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(740, 626) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setObjectName("groupBox") self.verticalLayout = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout.setObjectName("verticalLayout") self.plotGroupWidget = QtWidgets.QWidget(self.groupBox) self.plotGroupWidget.setObjectName("plotGroupWidget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.plotGroupWidget) self.verticalLayout_2.setObjectName("verticalLayout_2") self.filterHLayout = QtWidgets.QHBoxLayout() self.filterHLayout.setObjectName("filterHLayout") self.cutoffLowLabel = QtWidgets.QLabel(self.plotGroupWidget) self.cutoffLowLabel.setObjectName("cutoffLowLabel") self.filterHLayout.addWidget(self.cutoffLowLabel) self.cutoffLowSpinBox = QtWidgets.QDoubleSpinBox(self.plotGroupWidget) self.cutoffLowSpinBox.setMaximum(99999.99) self.cutoffLowSpinBox.setObjectName("cutoffLowSpinBox") self.filterHLayout.addWidget(self.cutoffLowSpinBox) self.cutoffHighLabel = QtWidgets.QLabel(self.plotGroupWidget) self.cutoffHighLabel.setObjectName("cutoffHighLabel") self.filterHLayout.addWidget(self.cutoffHighLabel) self.cutoffHighSpinBox = QtWidgets.QDoubleSpinBox(self.plotGroupWidget) self.cutoffHighSpinBox.setEnabled(True) self.cutoffHighSpinBox.setMaximum(99999.99) self.cutoffHighSpinBox.setObjectName("cutoffHighSpinBox") self.filterHLayout.addWidget(self.cutoffHighSpinBox) self.filterCheckBox = QtWidgets.QCheckBox(self.plotGroupWidget) self.filterCheckBox.setObjectName("filterCheckBox") self.filterHLayout.addWidget(self.filterCheckBox) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.filterHLayout.addItem(spacerItem) self.verticalLayout_2.addLayout(self.filterHLayout) self.plotWidget = GraphicsLayoutWidget(self.plotGroupWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plotWidget.sizePolicy().hasHeightForWidth()) self.plotWidget.setSizePolicy(sizePolicy) self.plotWidget.setMinimumSize(QtCore.QSize(200, 200)) self.plotWidget.setObjectName("plotWidget") self.verticalLayout_2.addWidget(self.plotWidget) self.verticalLayout.addWidget(self.plotGroupWidget) self.gridLayout.addWidget(self.groupBox, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self): #MainWindow.setObjectName("MainWindow") ## MainWindow.setFixedSize self.setMinimumSize(QtCore.QSize(754, 603)) self.setMaximumSize(QtCore.QSize(754, 603)) self.centralwidget = QtWidgets.QWidget() self.centralwidget.setObjectName("centralwidget") self.graphicsView = GraphicsLayoutWidget(self.centralwidget) self.graphicsView.setGeometry(QtCore.QRect(10, 80, 741, 541)) self.graphicsView.setObjectName("graphicsView") self.widget = QtWidgets.QWidget(self.centralwidget) self.widget.setGeometry(QtCore.QRect(10, 10, 740, 62)) self.widget.setObjectName("widget") self.gridLayout = QtWidgets.QGridLayout(self.widget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.loadIrisButton = QtWidgets.QPushButton(self.widget) self.loadIrisButton.setObjectName("loadIrisButton") self.gridLayout.addWidget(self.loadIrisButton, 0, 0, 1, 2) self.checkDateButton = QtWidgets.QPushButton(self.widget) self.checkDateButton.setObjectName("checkDateButton") self.gridLayout.addWidget(self.checkDateButton, 0, 4, 1, 3) self.generateButton = QtWidgets.QPushButton(self.widget) self.generateButton.setObjectName("generateButton") self.gridLayout.addWidget(self.generateButton, 1, 0, 1, 1) self.label_3 = QtWidgets.QLabel(self.widget) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 1, 1, 1, 1) self.spinBoxClasses = QtWidgets.QSpinBox(self.widget) self.spinBoxClasses.setMinimum(2) self.spinBoxClasses.setMaximum(8) self.spinBoxClasses.setObjectName("spinBoxClasses") self.gridLayout.addWidget(self.spinBoxClasses, 1, 2, 1, 1) self.label_2 = QtWidgets.QLabel(self.widget) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 3, 1, 1) self.spinBoxElements = QtWidgets.QSpinBox(self.widget) self.spinBoxElements.setMinimum(1) self.spinBoxElements.setProperty("value", 20) self.spinBoxElements.setObjectName("spinBoxElements") self.gridLayout.addWidget(self.spinBoxElements, 1, 4, 1, 1) self.label = QtWidgets.QLabel(self.widget) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 1, 5, 1, 1) self.spinBoxK = QtWidgets.QSpinBox(self.widget) self.spinBoxK.setMinimum(3) self.spinBoxK.setSingleStep(2) self.spinBoxK.setObjectName("spinBoxK") self.gridLayout.addWidget(self.spinBoxK, 1, 6, 1, 1) self.retranslateUi() QtCore.QMetaObject.connectSlotsByName(self) self.w1 = self.graphicsView.addPlot() self.w1.scene().sigMouseClicked.connect(self.onClick) self.generateButton.clicked.connect(self.generateDate) self.loadIrisButton.clicked.connect(self.loadIris) self.checkDateButton.clicked.connect(self.checkTest) self.setCentralWidget(self.centralwidget)
def _init_plots(self): self.plots = GraphicsLayoutWidget() self._plots_napari_widget = self.napari_viewer.window.add_dock_widget(self.plots, name='Blik - Plots', area='bottom') # use napari hide and show methods self.plots.show = self._plots_napari_widget.show self.plots.hide = self._plots_napari_widget.hide self.plots.hide()
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(747, 788) self.widget = QtGui.QWidget(Form) self.widget.setGeometry(QtCore.QRect(90, 60, 591, 681)) self.widget.setObjectName(_fromUtf8("widget")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.plotArea = GraphicsLayoutWidget(self.widget) self.plotArea.setObjectName(_fromUtf8("plotArea")) self.verticalLayout_2.addWidget(self.plotArea) self.verticalLayout = QtGui.QVBoxLayout() self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.add = QtGui.QPushButton(self.widget) self.add.setObjectName(_fromUtf8("add")) self.horizontalLayout_3.addWidget(self.add) self.remove = QtGui.QPushButton(self.widget) self.remove.setObjectName(_fromUtf8("remove")) self.horizontalLayout_3.addWidget(self.remove) self.listItems = QtGui.QPushButton(self.widget) self.listItems.setObjectName(_fromUtf8("listItems")) self.horizontalLayout_3.addWidget(self.listItems) self.clear = QtGui.QPushButton(self.widget) self.clear.setObjectName(_fromUtf8("clear")) self.horizontalLayout_3.addWidget(self.clear) self.UpdateData = QtGui.QPushButton(self.widget) self.UpdateData.setObjectName(_fromUtf8("UpdateData")) self.horizontalLayout_3.addWidget(self.UpdateData) self.verticalLayout.addLayout(self.horizontalLayout_3) self.horizontalLayout_4 = QtGui.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.label = QtGui.QLabel(self.widget) self.label.setObjectName(_fromUtf8("label")) self.horizontalLayout.addWidget(self.label) self.rows = QtGui.QLineEdit(self.widget) self.rows.setObjectName(_fromUtf8("rows")) self.horizontalLayout.addWidget(self.rows) self.horizontalLayout_4.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.label_2 = QtGui.QLabel(self.widget) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout_2.addWidget(self.label_2) self.cols = QtGui.QLineEdit(self.widget) self.cols.setObjectName(_fromUtf8("cols")) self.horizontalLayout_2.addWidget(self.cols) self.horizontalLayout_4.addLayout(self.horizontalLayout_2) self.verticalLayout.addLayout(self.horizontalLayout_4) self.verticalLayout_2.addLayout(self.verticalLayout) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(704, 558) MainWindow.setMinimumSize(QtCore.QSize(0, 0)) MainWindow.setStyleSheet("") MainWindow.setTabShape(QtWidgets.QTabWidget.Rounded) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.Layout_controls = QtWidgets.QGridLayout() self.Layout_controls.setObjectName("Layout_controls") self.cBox_Speed = QtWidgets.QComboBox(self.centralwidget) self.cBox_Speed.setEditable(True) self.cBox_Speed.setObjectName("cBox_Speed") self.Layout_controls.addWidget(self.cBox_Speed, 1, 1, 1, 1) self.pButton_Stop = QtWidgets.QPushButton(self.centralwidget) self.pButton_Stop.setObjectName("pButton_Stop") self.Layout_controls.addWidget(self.pButton_Stop, 1, 3, 1, 1) self.cBox_Port = QtWidgets.QComboBox(self.centralwidget) self.cBox_Port.setEditable(True) self.cBox_Port.setObjectName("cBox_Port") self.Layout_controls.addWidget(self.cBox_Port, 0, 1, 1, 1) self.cBox_Source = QtWidgets.QComboBox(self.centralwidget) self.cBox_Source.setObjectName("cBox_Source") self.Layout_controls.addWidget(self.cBox_Source, 0, 0, 1, 1) self.pButton_Start = QtWidgets.QPushButton(self.centralwidget) self.pButton_Start.setMinimumSize(QtCore.QSize(0, 0)) self.pButton_Start.setObjectName("pButton_Start") self.Layout_controls.addWidget(self.pButton_Start, 0, 3, 1, 1) self.sBox_Samples = QtWidgets.QSpinBox(self.centralwidget) self.sBox_Samples.setMinimum(1) self.sBox_Samples.setMaximum(100000) self.sBox_Samples.setProperty("value", 500) self.sBox_Samples.setObjectName("sBox_Samples") self.Layout_controls.addWidget(self.sBox_Samples, 0, 2, 1, 1) self.chBox_export = QtWidgets.QCheckBox(self.centralwidget) self.chBox_export.setEnabled(True) self.chBox_export.setObjectName("chBox_export") self.Layout_controls.addWidget(self.chBox_export, 1, 2, 1, 1) self.gridLayout.addLayout(self.Layout_controls, 7, 0, 1, 2) self.Layout_graphs = QtWidgets.QGridLayout() self.Layout_graphs.setObjectName("Layout_graphs") self.plt = GraphicsLayoutWidget(self.centralwidget) self.plt.setAutoFillBackground(False) self.plt.setStyleSheet("border: 0px;") self.plt.setFrameShape(QtWidgets.QFrame.StyledPanel) self.plt.setFrameShadow(QtWidgets.QFrame.Plain) self.plt.setLineWidth(0) self.plt.setObjectName("plt") self.Layout_graphs.addWidget(self.plt, 0, 0, 1, 1) self.gridLayout.addLayout(self.Layout_graphs, 2, 1, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1112, 525) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_2.setObjectName("gridLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.timecourse_graphicsView = GraphicsLayoutWidget(self.centralwidget) self.timecourse_graphicsView.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.timecourse_graphicsView.sizePolicy().hasHeightForWidth()) self.timecourse_graphicsView.setSizePolicy(sizePolicy) self.timecourse_graphicsView.setMinimumSize(QtCore.QSize(610, 100)) self.timecourse_graphicsView.setMaximumSize(QtCore.QSize(3000, 1000)) self.timecourse_graphicsView.setSizeIncrement(QtCore.QSize(1, 1)) self.timecourse_graphicsView.setObjectName("timecourse_graphicsView") self.gridLayout.addWidget(self.timecourse_graphicsView, 0, 0, 1, 1) self.spectrum_graphicsView = GraphicsLayoutWidget(self.centralwidget) self.spectrum_graphicsView.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy( QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.spectrum_graphicsView.sizePolicy().hasHeightForWidth()) self.spectrum_graphicsView.setSizePolicy(sizePolicy) self.spectrum_graphicsView.setMinimumSize(QtCore.QSize(610, 100)) self.spectrum_graphicsView.setMaximumSize(QtCore.QSize(3000, 1000)) self.spectrum_graphicsView.setSizeIncrement(QtCore.QSize(1, 1)) self.spectrum_graphicsView.setObjectName("spectrum_graphicsView") self.gridLayout.addWidget(self.spectrum_graphicsView, 1, 0, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) self.label = QtWidgets.QLabel(self.centralwidget) self.label.setObjectName("label") self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1112, 24)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, ROI): ROI.setObjectName(_fromUtf8("ROI")) ROI.resize(625, 300) self.horizontalLayout = QtGui.QHBoxLayout(ROI) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.graphicsView = GraphicsLayoutWidget(ROI) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.horizontalLayout.addWidget(self.graphicsView) self.retranslateUi(ROI) QtCore.QMetaObject.connectSlotsByName(ROI)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.verticalLayout = QtWidgets.QVBoxLayout(Form) self.verticalLayout.setObjectName("verticalLayout") self.canvas = GraphicsLayoutWidget(Form) self.canvas.setObjectName("canvas") self.verticalLayout.addWidget(self.canvas) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, GraphicWindow): GraphicWindow.setObjectName("GraphicWindow") GraphicWindow.resize(935, 567) self.verticalLayout = QtWidgets.QVBoxLayout(GraphicWindow) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.graphicsView = GraphicsLayoutWidget(GraphicWindow) self.graphicsView.setObjectName("graphicsView") self.verticalLayout.addWidget(self.graphicsView) self.retranslateUi(GraphicWindow) QtCore.QMetaObject.connectSlotsByName(GraphicWindow)
class Ui_ROI(object): def setupUi(self, ROI): ROI.setObjectName(_fromUtf8("ROI")) ROI.resize(625, 300) self.horizontalLayout = QtGui.QHBoxLayout(ROI) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.graphicsView = GraphicsLayoutWidget(ROI) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.horizontalLayout.addWidget(self.graphicsView) self.retranslateUi(ROI) QtCore.QMetaObject.connectSlotsByName(ROI) def retranslateUi(self, ROI): ROI.setWindowTitle(_translate("ROI", "Form", None))
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(648, 335) Form.setStyleSheet(_fromUtf8("#Form {\n" " background-color: rgb(0,0,0)\n" "}\n" "\n" "QLabel{\n" " color: white\n" "}")) self.verticalLayout = QtGui.QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.pg_layout = GraphicsLayoutWidget(Form) self.pg_layout.setObjectName(_fromUtf8("pg_layout")) self.horizontalLayout.addWidget(self.pg_layout) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.bench_btn = QtGui.QPushButton(Form) self.bench_btn.setObjectName(_fromUtf8("bench_btn")) self.horizontalLayout_2.addWidget(self.bench_btn) self.pos_lbl = QtGui.QLabel(Form) self.pos_lbl.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.pos_lbl.setObjectName(_fromUtf8("pos_lbl")) self.horizontalLayout_2.addWidget(self.pos_lbl) self.verticalLayout.addLayout(self.horizontalLayout_2) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, MainWindow): """This function is converted from the .ui file from the designer""" MainWindow.setObjectName(_fromUtf8("Scope Window")) MainWindow.resize(1200, 600) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) # Graphics layout self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.graphicsLayout = QtGui.QHBoxLayout() self.graphicsLayout.setObjectName(_fromUtf8("graphicsLayout")) self.graphicsView = GraphicsLayoutWidget(self.centralwidget) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.graphicsLayout.addWidget(self.graphicsView) self.horizontalLayout.addLayout(self.graphicsLayout) # Side panel layout: initialize as a list view self.sideDockPanel = QtGui.QDockWidget("Settings", self) self.sideDockPanel.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea) self.sideDockPanel.setObjectName(_fromUtf8("sideDockPanel")) self.sideDockPanel.hide() # self.sidePanelLayout = QtGui.QHBoxLayout() # self.sidePanelLayout.setObjectName(_fromUtf8("sidePanelLayout")) self.listView = QtGui.QListView(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listView.sizePolicy().hasHeightForWidth()) self.listView.setSizePolicy(sizePolicy) self.listView.setObjectName(_fromUtf8("listView")) self.sideDockPanel.setWidget(self.listView) self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.sideDockPanel) # self.sidePanelLayout.addWidget(self.listView) # self.horizontalLayout.addLayout(self.sidePanelLayout) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1225, 26)) self.menubar.setObjectName(_fromUtf8("menubar")) self.setMenuBarItems() MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, plotdialog): plotdialog.setObjectName(_fromUtf8("plotdialog")) plotdialog.resize(854, 610) self.graphicsView = GraphicsLayoutWidget(plotdialog) self.graphicsView.setGeometry(QtCore.QRect(30, 10, 811, 481)) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.hslider = QtGui.QSlider(plotdialog) self.hslider.setGeometry(QtCore.QRect(20, 510, 431, 29)) self.hslider.setMaximum(100) self.hslider.setOrientation(QtCore.Qt.Horizontal) self.hslider.setTickPosition(QtGui.QSlider.TicksBothSides) self.hslider.setObjectName(_fromUtf8("hslider")) self.comboBox = QtGui.QComboBox(plotdialog) self.comboBox.setGeometry(QtCore.QRect(30, 550, 141, 31)) self.comboBox.setObjectName(_fromUtf8("comboBox")) self.retranslateUi(plotdialog) QtCore.QMetaObject.connectSlotsByName(plotdialog)
class Ui_SAXSgui(object): def setupUi(self, SAXSgui): SAXSgui.setObjectName(_fromUtf8("SAXSgui")) SAXSgui.resize(925, 630) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(SAXSgui.sizePolicy().hasHeightForWidth()) SAXSgui.setSizePolicy(sizePolicy) SAXSgui.setMinimumSize(QtCore.QSize(925, 630)) SAXSgui.setFocusPolicy(QtCore.Qt.StrongFocus) SAXSgui.setWindowOpacity(1.0) SAXSgui.setAutoFillBackground(False) SAXSgui.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(SAXSgui) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.Console = QtGui.QTabWidget(self.centralwidget) self.Console.setGeometry(QtCore.QRect(50, 30, 821, 541)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Console.sizePolicy().hasHeightForWidth()) self.Console.setSizePolicy(sizePolicy) self.Console.setObjectName(_fromUtf8("Console")) self.fourierspace_tab = QtGui.QWidget() self.fourierspace_tab.setObjectName(_fromUtf8("fourierspace_tab")) self.fourierView = GraphicsLayoutWidget(self.fourierspace_tab) self.fourierView.setGeometry(QtCore.QRect(10, 0, 511, 491)) self.fourierView.setObjectName(_fromUtf8("fourierView")) self.checkLogY = QtGui.QCheckBox(self.fourierspace_tab) self.checkLogY.setGeometry(QtCore.QRect(540, 10, 131, 20)) self.checkLogY.setObjectName(_fromUtf8("checkLogY")) self.checkLogX = QtGui.QCheckBox(self.fourierspace_tab) self.checkLogX.setGeometry(QtCore.QRect(540, 40, 131, 20)) self.checkLogX.setObjectName(_fromUtf8("checkLogX")) self.beamview = GraphicsLayoutWidget(self.fourierspace_tab) self.beamview.setGeometry(QtCore.QRect(540, 300, 261, 191)) self.beamview.setObjectName(_fromUtf8("beamview")) self.label_8 = QtGui.QLabel(self.fourierspace_tab) self.label_8.setGeometry(QtCore.QRect(550, 280, 121, 16)) self.label_8.setObjectName(_fromUtf8("label_8")) self.nskip_spinbox = QtGui.QSpinBox(self.fourierspace_tab) self.nskip_spinbox.setGeometry(QtCore.QRect(550, 80, 57, 24)) self.nskip_spinbox.setMaximum(1000) self.nskip_spinbox.setObjectName(_fromUtf8("nskip_spinbox")) self.label_19 = QtGui.QLabel(self.fourierspace_tab) self.label_19.setGeometry(QtCore.QRect(620, 80, 161, 16)) self.label_19.setObjectName(_fromUtf8("label_19")) self.nskip2_spinbox = QtGui.QSpinBox(self.fourierspace_tab) self.nskip2_spinbox.setGeometry(QtCore.QRect(550, 110, 57, 24)) self.nskip2_spinbox.setMinimum(0) self.nskip2_spinbox.setMaximum(1000) self.nskip2_spinbox.setProperty("value", 0) self.nskip2_spinbox.setObjectName(_fromUtf8("nskip2_spinbox")) self.label_20 = QtGui.QLabel(self.fourierspace_tab) self.label_20.setGeometry(QtCore.QRect(620, 110, 161, 16)) self.label_20.setObjectName(_fromUtf8("label_20")) self.label_22 = QtGui.QLabel(self.fourierspace_tab) self.label_22.setGeometry(QtCore.QRect(550, 160, 62, 16)) self.label_22.setObjectName(_fromUtf8("label_22")) self.label_23 = QtGui.QLabel(self.fourierspace_tab) self.label_23.setGeometry(QtCore.QRect(550, 180, 62, 16)) self.label_23.setObjectName(_fromUtf8("label_23")) self.qmin_label = QtGui.QLabel(self.fourierspace_tab) self.qmin_label.setGeometry(QtCore.QRect(605, 160, 206, 16)) self.qmin_label.setObjectName(_fromUtf8("qmin_label")) self.qmax_label = QtGui.QLabel(self.fourierspace_tab) self.qmax_label.setGeometry(QtCore.QRect(605, 180, 206, 16)) self.qmax_label.setObjectName(_fromUtf8("qmax_label")) self.Console.addTab(self.fourierspace_tab, _fromUtf8("")) self.guinierkratky_tab = QtGui.QWidget() self.guinierkratky_tab.setObjectName(_fromUtf8("guinierkratky_tab")) self.primaryanalysis_view = GraphicsLayoutWidget(self.guinierkratky_tab) self.primaryanalysis_view.setGeometry(QtCore.QRect(20, 10, 781, 401)) self.primaryanalysis_view.setObjectName(_fromUtf8("primaryanalysis_view")) self.groupBox_4 = QtGui.QGroupBox(self.guinierkratky_tab) self.groupBox_4.setEnabled(False) self.groupBox_4.setGeometry(QtCore.QRect(20, 410, 341, 91)) self.groupBox_4.setObjectName(_fromUtf8("groupBox_4")) self.qRgmin = QtGui.QDoubleSpinBox(self.groupBox_4) self.qRgmin.setGeometry(QtCore.QRect(10, 30, 62, 24)) self.qRgmin.setMaximum(1.0) self.qRgmin.setSingleStep(0.05) self.qRgmin.setProperty("value", 1.0) self.qRgmin.setObjectName(_fromUtf8("qRgmin")) self.label_16 = QtGui.QLabel(self.groupBox_4) self.label_16.setGeometry(QtCore.QRect(80, 30, 62, 16)) self.label_16.setObjectName(_fromUtf8("label_16")) self.label_17 = QtGui.QLabel(self.groupBox_4) self.label_17.setGeometry(QtCore.QRect(80, 60, 62, 16)) self.label_17.setObjectName(_fromUtf8("label_17")) self.qRgmax = QtGui.QDoubleSpinBox(self.groupBox_4) self.qRgmax.setGeometry(QtCore.QRect(10, 60, 62, 24)) self.qRgmax.setMaximum(3.0) self.qRgmax.setSingleStep(0.05) self.qRgmax.setProperty("value", 1.3) self.qRgmax.setObjectName(_fromUtf8("qRgmax")) self.guinierminpts = QtGui.QLineEdit(self.groupBox_4) self.guinierminpts.setGeometry(QtCore.QRect(180, 30, 61, 21)) self.guinierminpts.setObjectName(_fromUtf8("guinierminpts")) self.label_18 = QtGui.QLabel(self.groupBox_4) self.label_18.setGeometry(QtCore.QRect(250, 30, 71, 16)) self.label_18.setObjectName(_fromUtf8("label_18")) self.label_24 = QtGui.QLabel(self.groupBox_4) self.label_24.setGeometry(QtCore.QRect(185, 60, 151, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_24.setFont(font) self.label_24.setObjectName(_fromUtf8("label_24")) self.runprimaryanalysis = QtGui.QPushButton(self.guinierkratky_tab) self.runprimaryanalysis.setGeometry(QtCore.QRect(690, 440, 106, 51)) self.runprimaryanalysis.setStyleSheet(_fromUtf8("background-color: #F1BF29; font-size: 20px; color: blue;")) self.runprimaryanalysis.setObjectName(_fromUtf8("runprimaryanalysis")) self.lb_guinier_spinbox = QtGui.QSpinBox(self.guinierkratky_tab) self.lb_guinier_spinbox.setGeometry(QtCore.QRect(410, 435, 57, 24)) self.lb_guinier_spinbox.setObjectName(_fromUtf8("lb_guinier_spinbox")) self.ub_guinier_spinbox = QtGui.QSpinBox(self.guinierkratky_tab) self.ub_guinier_spinbox.setGeometry(QtCore.QRect(495, 435, 57, 24)) self.ub_guinier_spinbox.setMaximum(200) self.ub_guinier_spinbox.setObjectName(_fromUtf8("ub_guinier_spinbox")) self.label_6 = QtGui.QLabel(self.guinierkratky_tab) self.label_6.setGeometry(QtCore.QRect(475, 440, 16, 16)) self.label_6.setObjectName(_fromUtf8("label_6")) self.label_7 = QtGui.QLabel(self.guinierkratky_tab) self.label_7.setGeometry(QtCore.QRect(380, 440, 26, 16)) self.label_7.setObjectName(_fromUtf8("label_7")) self.label_21 = QtGui.QLabel(self.guinierkratky_tab) self.label_21.setGeometry(QtCore.QRect(375, 470, 91, 16)) self.label_21.setObjectName(_fromUtf8("label_21")) self.qRg_label = QtGui.QLabel(self.guinierkratky_tab) self.qRg_label.setGeometry(QtCore.QRect(465, 470, 126, 16)) self.qRg_label.setObjectName(_fromUtf8("qRg_label")) self.label_4 = QtGui.QLabel(self.guinierkratky_tab) self.label_4.setGeometry(QtCore.QRect(375, 490, 36, 16)) self.label_4.setObjectName(_fromUtf8("label_4")) self.label_5 = QtGui.QLabel(self.guinierkratky_tab) self.label_5.setGeometry(QtCore.QRect(470, 490, 36, 16)) self.label_5.setObjectName(_fromUtf8("label_5")) self.guinierRg_label = QtGui.QLabel(self.guinierkratky_tab) self.guinierRg_label.setGeometry(QtCore.QRect(405, 490, 62, 16)) self.guinierRg_label.setObjectName(_fromUtf8("guinierRg_label")) self.I0_label = QtGui.QLabel(self.guinierkratky_tab) self.I0_label.setGeometry(QtCore.QRect(500, 490, 151, 16)) self.I0_label.setObjectName(_fromUtf8("I0_label")) self.Console.addTab(self.guinierkratky_tab, _fromUtf8("")) self.realspace_tab = QtGui.QWidget() self.realspace_tab.setObjectName(_fromUtf8("realspace_tab")) self.realspaceView = GraphicsLayoutWidget(self.realspace_tab) self.realspaceView.setGeometry(QtCore.QRect(10, 0, 531, 491)) self.realspaceView.setObjectName(_fromUtf8("realspaceView")) self.groupBox_3 = QtGui.QGroupBox(self.realspace_tab) self.groupBox_3.setGeometry(QtCore.QRect(550, 0, 261, 141)) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.Nr_input = QtGui.QLineEdit(self.groupBox_3) self.Nr_input.setGeometry(QtCore.QRect(10, 100, 71, 21)) self.Nr_input.setObjectName(_fromUtf8("Nr_input")) self.label_2 = QtGui.QLabel(self.groupBox_3) self.label_2.setGeometry(QtCore.QRect(90, 70, 166, 16)) self.label_2.setObjectName(_fromUtf8("label_2")) self.label = QtGui.QLabel(self.groupBox_3) self.label.setGeometry(QtCore.QRect(90, 40, 41, 16)) self.label.setObjectName(_fromUtf8("label")) self.label_3 = QtGui.QLabel(self.groupBox_3) self.label_3.setGeometry(QtCore.QRect(90, 100, 121, 16)) self.label_3.setObjectName(_fromUtf8("label_3")) self.logalpha_input = QtGui.QLineEdit(self.groupBox_3) self.logalpha_input.setGeometry(QtCore.QRect(10, 70, 71, 21)) self.logalpha_input.setObjectName(_fromUtf8("logalpha_input")) self.dmax_input = QtGui.QLineEdit(self.groupBox_3) self.dmax_input.setGeometry(QtCore.QRect(10, 40, 71, 21)) self.dmax_input.setObjectName(_fromUtf8("dmax_input")) self.groupBox = QtGui.QGroupBox(self.realspace_tab) self.groupBox.setGeometry(QtCore.QRect(550, 210, 151, 101)) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.varianceweighted = QtGui.QCheckBox(self.groupBox) self.varianceweighted.setGeometry(QtCore.QRect(10, 30, 131, 20)) self.varianceweighted.setObjectName(_fromUtf8("varianceweighted")) self.smeared = QtGui.QCheckBox(self.groupBox) self.smeared.setGeometry(QtCore.QRect(10, 55, 87, 20)) self.smeared.setObjectName(_fromUtf8("smeared")) self.solvepr_button = QtGui.QPushButton(self.realspace_tab) self.solvepr_button.setGeometry(QtCore.QRect(630, 440, 114, 32)) self.solvepr_button.setStyleSheet(_fromUtf8("background-color: #0085ff; color: #ffffff;")) self.solvepr_button.setObjectName(_fromUtf8("solvepr_button")) self.iftresultout = QtGui.QLineEdit(self.realspace_tab) self.iftresultout.setGeometry(QtCore.QRect(550, 400, 261, 21)) self.iftresultout.setObjectName(_fromUtf8("iftresultout")) self.saveiftresult = QtGui.QCheckBox(self.realspace_tab) self.saveiftresult.setGeometry(QtCore.QRect(550, 370, 241, 20)) self.saveiftresult.setObjectName(_fromUtf8("saveiftresult")) self.Console.addTab(self.realspace_tab, _fromUtf8("")) self.bayesianift_tab = QtGui.QWidget() self.bayesianift_tab.setObjectName(_fromUtf8("bayesianift_tab")) self.biftgridView = matplotlibWidget(self.bayesianift_tab) self.biftgridView.setGeometry(QtCore.QRect(10, 0, 401, 411)) self.biftgridView.setObjectName(_fromUtf8("biftgridView")) self.groupBox_2 = QtGui.QGroupBox(self.bayesianift_tab) self.groupBox_2.setGeometry(QtCore.QRect(420, 0, 381, 161)) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.Nalpha = QtGui.QLineEdit(self.groupBox_2) self.Nalpha.setGeometry(QtCore.QRect(10, 30, 51, 21)) self.Nalpha.setObjectName(_fromUtf8("Nalpha")) self.Ndmax = QtGui.QLineEdit(self.groupBox_2) self.Ndmax.setGeometry(QtCore.QRect(10, 60, 51, 21)) self.Ndmax.setObjectName(_fromUtf8("Ndmax")) self.label_9 = QtGui.QLabel(self.groupBox_2) self.label_9.setGeometry(QtCore.QRect(70, 30, 91, 16)) self.label_9.setObjectName(_fromUtf8("label_9")) self.label_10 = QtGui.QLabel(self.groupBox_2) self.label_10.setGeometry(QtCore.QRect(70, 60, 101, 16)) self.label_10.setObjectName(_fromUtf8("label_10")) self.minlogalpha = QtGui.QDoubleSpinBox(self.groupBox_2) self.minlogalpha.setGeometry(QtCore.QRect(20, 120, 62, 24)) self.minlogalpha.setMinimum(-100.0) self.minlogalpha.setMaximum(100.0) self.minlogalpha.setObjectName(_fromUtf8("minlogalpha")) self.label_11 = QtGui.QLabel(self.groupBox_2) self.label_11.setGeometry(QtCore.QRect(20, 100, 111, 16)) self.label_11.setObjectName(_fromUtf8("label_11")) self.maxlogalpha = QtGui.QDoubleSpinBox(self.groupBox_2) self.maxlogalpha.setGeometry(QtCore.QRect(110, 120, 62, 24)) self.maxlogalpha.setMinimum(-100.0) self.maxlogalpha.setMaximum(100.0) self.maxlogalpha.setObjectName(_fromUtf8("maxlogalpha")) self.label_13 = QtGui.QLabel(self.groupBox_2) self.label_13.setGeometry(QtCore.QRect(220, 100, 111, 16)) self.label_13.setObjectName(_fromUtf8("label_13")) self.mindmax = QtGui.QDoubleSpinBox(self.groupBox_2) self.mindmax.setGeometry(QtCore.QRect(220, 120, 62, 24)) self.mindmax.setDecimals(3) self.mindmax.setMaximum(1000.0) self.mindmax.setObjectName(_fromUtf8("mindmax")) self.maxdmax = QtGui.QDoubleSpinBox(self.groupBox_2) self.maxdmax.setGeometry(QtCore.QRect(310, 120, 62, 24)) self.maxdmax.setDecimals(3) self.maxdmax.setMaximum(1000.0) self.maxdmax.setObjectName(_fromUtf8("maxdmax")) self.calcbiftgrid = QtGui.QPushButton(self.bayesianift_tab) self.calcbiftgrid.setGeometry(QtCore.QRect(520, 180, 191, 51)) font = QtGui.QFont() font.setFamily(_fromUtf8("Helvetica")) font.setPointSize(18) font.setBold(True) font.setWeight(75) self.calcbiftgrid.setFont(font) self.calcbiftgrid.setStyleSheet(_fromUtf8("background-color: #6495ed; color: #ffffff;")) self.calcbiftgrid.setObjectName(_fromUtf8("calcbiftgrid")) self.label_12 = QtGui.QLabel(self.bayesianift_tab) self.label_12.setGeometry(QtCore.QRect(510, 120, 10, 16)) self.label_12.setObjectName(_fromUtf8("label_12")) self.label_14 = QtGui.QLabel(self.bayesianift_tab) self.label_14.setGeometry(QtCore.QRect(710, 120, 10, 16)) self.label_14.setObjectName(_fromUtf8("label_14")) self.Ncalcerror_input = QtGui.QLineEdit(self.bayesianift_tab) self.Ncalcerror_input.setGeometry(QtCore.QRect(430, 310, 61, 20)) self.Ncalcerror_input.setObjectName(_fromUtf8("Ncalcerror_input")) self.label_15 = QtGui.QLabel(self.bayesianift_tab) self.label_15.setGeometry(QtCore.QRect(500, 310, 211, 16)) self.label_15.setObjectName(_fromUtf8("label_15")) self.refinebift = QtGui.QPushButton(self.bayesianift_tab) self.refinebift.setGeometry(QtCore.QRect(510, 350, 211, 51)) font = QtGui.QFont() font.setFamily(_fromUtf8("Helvetica")) font.setPointSize(14) font.setBold(True) font.setWeight(75) self.refinebift.setFont(font) self.refinebift.setStyleSheet(_fromUtf8("background-color:#87cc83; color: #ffffff;")) self.refinebift.setObjectName(_fromUtf8("refinebift")) self.line = QtGui.QFrame(self.bayesianift_tab) self.line.setGeometry(QtCore.QRect(420, 270, 391, 16)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.Console.addTab(self.bayesianift_tab, _fromUtf8("")) SAXSgui.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(SAXSgui) self.menubar.setGeometry(QtCore.QRect(0, 0, 925, 22)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) SAXSgui.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(SAXSgui) self.statusbar.setObjectName(_fromUtf8("statusbar")) SAXSgui.setStatusBar(self.statusbar) self.actionOpen = QtGui.QAction(SAXSgui) self.actionOpen.setObjectName(_fromUtf8("actionOpen")) self.actionClose = QtGui.QAction(SAXSgui) self.actionClose.setObjectName(_fromUtf8("actionClose")) self.actionExit = QtGui.QAction(SAXSgui) self.actionExit.setShortcutContext(QtCore.Qt.WindowShortcut) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionGuinier_Plot = QtGui.QAction(SAXSgui) self.actionGuinier_Plot.setObjectName(_fromUtf8("actionGuinier_Plot")) self.actionKratky_Plot = QtGui.QAction(SAXSgui) self.actionKratky_Plot.setObjectName(_fromUtf8("actionKratky_Plot")) self.actionSAXSMoW = QtGui.QAction(SAXSgui) self.actionSAXSMoW.setObjectName(_fromUtf8("actionSAXSMoW")) self.actionFoXS_fit = QtGui.QAction(SAXSgui) self.actionFoXS_fit.setObjectName(_fromUtf8("actionFoXS_fit")) self.actionLoad_Beam_Profile = QtGui.QAction(SAXSgui) self.actionLoad_Beam_Profile.setObjectName(_fromUtf8("actionLoad_Beam_Profile")) self.actionSave_as_GNOM_file = QtGui.QAction(SAXSgui) self.actionSave_as_GNOM_file.setObjectName(_fromUtf8("actionSave_as_GNOM_file")) self.actionSAXSMoW_2 = QtGui.QAction(SAXSgui) self.actionSAXSMoW_2.setObjectName(_fromUtf8("actionSAXSMoW_2")) self.menuFile.addAction(self.actionOpen) self.menuFile.addAction(self.actionSave_as_GNOM_file) self.menuFile.addAction(self.actionLoad_Beam_Profile) self.menuFile.addAction(self.actionClose) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(SAXSgui) self.Console.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(SAXSgui) def retranslateUi(self, SAXSgui): SAXSgui.setWindowTitle(_translate("SAXSgui", "UCSFsaxs v0.4a", None)) self.checkLogY.setText(_translate("SAXSgui", "Log-scale Y-axis", None)) self.checkLogX.setText(_translate("SAXSgui", "Log-scale X-axis", None)) self.label_8.setText(_translate("SAXSgui", "Beam Profile", None)) self.label_19.setText(_translate("SAXSgui", "Initial Points to skip", None)) self.label_20.setText(_translate("SAXSgui", "End Points to skip", None)) self.label_22.setText(_translate("SAXSgui", "q_min : ", None)) self.label_23.setText(_translate("SAXSgui", "q_max : ", None)) self.qmin_label.setText(_translate("SAXSgui", "None", None)) self.qmax_label.setText(_translate("SAXSgui", "None", None)) self.Console.setTabText(self.Console.indexOf(self.fourierspace_tab), _translate("SAXSgui", "Fourier Space (Scattering)", None)) self.groupBox_4.setTitle(_translate("SAXSgui", "Automated Guinier Analysis", None)) self.label_16.setText(_translate("SAXSgui", "qRg_min", None)) self.label_17.setText(_translate("SAXSgui", "qRg_max", None)) self.guinierminpts.setText(_translate("SAXSgui", "10", None)) self.label_18.setText(_translate("SAXSgui", "Min. points", None)) self.label_24.setText(_translate("SAXSgui", "Temporarily broken... sorry :(", None)) self.runprimaryanalysis.setText(_translate("SAXSgui", "Do it!", None)) self.label_6.setText(_translate("SAXSgui", "to", None)) self.label_7.setText(_translate("SAXSgui", "Fit", None)) self.label_21.setText(_translate("SAXSgui", "current qRg : ", None)) self.qRg_label.setText(_translate("SAXSgui", "None", None)) self.label_4.setText(_translate("SAXSgui", "Rg : ", None)) self.label_5.setText(_translate("SAXSgui", "I(0):", None)) self.guinierRg_label.setText(_translate("SAXSgui", "None", None)) self.I0_label.setText(_translate("SAXSgui", "None", None)) self.Console.setTabText(self.Console.indexOf(self.guinierkratky_tab), _translate("SAXSgui", "Guinier, Kratky Plots", None)) self.groupBox_3.setTitle(_translate("SAXSgui", "IFT parameters", None)) self.label_2.setText(_translate("SAXSgui", "Log(alpha) - Smoothness", None)) self.label.setText(_translate("SAXSgui", "Dmax", None)) self.label_3.setText(_translate("SAXSgui", "# of points in P(r)", None)) self.groupBox.setTitle(_translate("SAXSgui", "Data Parameters", None)) self.varianceweighted.setText(_translate("SAXSgui", "σ^2 weighted", None)) self.smeared.setText(_translate("SAXSgui", "Smeared", None)) self.solvepr_button.setText(_translate("SAXSgui", "Solve P(r)!", None)) self.saveiftresult.setText(_translate("SAXSgui", "Save File? Enter file name below:", None)) self.Console.setTabText(self.Console.indexOf(self.realspace_tab), _translate("SAXSgui", "Real Space", None)) self.groupBox_2.setTitle(_translate("SAXSgui", "Grid Search Parameters", None)) self.label_9.setText(_translate("SAXSgui", "No. of alpha", None)) self.label_10.setText(_translate("SAXSgui", "No. of Dmax", None)) self.label_11.setText(_translate("SAXSgui", "log(alpha) Range", None)) self.label_13.setText(_translate("SAXSgui", "Dmax Range", None)) self.calcbiftgrid.setText(_translate("SAXSgui", "Calculate Grid", None)) self.label_12.setText(_translate("SAXSgui", "-", None)) self.label_14.setText(_translate("SAXSgui", "-", None)) self.label_15.setText(_translate("SAXSgui", "No. of error calculations (>100)", None)) self.refinebift.setText(_translate("SAXSgui", "Refine Solution (Simplex)", None)) self.Console.setTabText(self.Console.indexOf(self.bayesianift_tab), _translate("SAXSgui", "BayesianIFT", None)) self.menuFile.setTitle(_translate("SAXSgui", "File", None)) self.actionOpen.setText(_translate("SAXSgui", "Open", None)) self.actionOpen.setToolTip(_translate("SAXSgui", "Open SAXS data file", None)) self.actionClose.setText(_translate("SAXSgui", "Close", None)) self.actionExit.setText(_translate("SAXSgui", "Exit Program", None)) self.actionGuinier_Plot.setText(_translate("SAXSgui", "Guinier Plot", None)) self.actionKratky_Plot.setText(_translate("SAXSgui", "Kratky Plot", None)) self.actionSAXSMoW.setText(_translate("SAXSgui", "SAXSMoW", None)) self.actionFoXS_fit.setText(_translate("SAXSgui", "FoXS fit ...", None)) self.actionLoad_Beam_Profile.setText(_translate("SAXSgui", "Load Beam Profile", None)) self.actionSave_as_GNOM_file.setText(_translate("SAXSgui", "Save as GNOM file ...", None)) self.actionSAXSMoW_2.setText(_translate("SAXSgui", "SAXSMoW", None))
def setupUi(self, Form): '''Defines the general properties of the window''' Form.setObjectName(_fromUtf8("Form")) Form.resize(1500, 1000) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) '''Defines the text label for reference beam properties''' self.refbeamlabel = QtGui.QLabel(Form) self.refbeamlabel.setObjectName(_fromUtf8("refbeamlabel")) self.gridLayout.addWidget(self.refbeamlabel, 1, 0, 1, 1) '''Defines the spin box for x0''' self.x0Spin = QtGui.QDoubleSpinBox(Form) self.x0Spin.setRange(0.,754.) self.x0Spin.setProperty("value", 350) self.x0Spin.setObjectName(_fromUtf8("x0Spin")) self.gridLayout.addWidget(self.x0Spin, 2, 0, 1, 1) '''Defines the label for the x0 spin box''' self.x0label = QtGui.QLabel(Form) self.x0label.setObjectName(_fromUtf8("x0label")) self.gridLayout.addWidget(self.x0label, 2, 1, 1, 1) '''Defines the spin box for y0''' self.y0Spin = QtGui.QDoubleSpinBox(Form) self.y0Spin.setRange(0.,480.) self.y0Spin.setProperty("value", 240) self.y0Spin.setObjectName(_fromUtf8("y0Spin")) self.gridLayout.addWidget(self.y0Spin, 3, 0, 1, 1) '''Defines the label for the y0 spin box''' self.y0label = QtGui.QLabel(Form) self.y0label.setObjectName(_fromUtf8("y0label")) self.gridLayout.addWidget(self.y0label, 3, 1, 1, 1) '''Defines the spin box for the horizontal waist''' self.sigmaxSpin = QtGui.QDoubleSpinBox(Form) self.sigmaxSpin.setRange(0.,500.) self.sigmaxSpin.setProperty("value", 30.) self.sigmaxSpin.setObjectName(_fromUtf8("sigmaxSpin")) self.gridLayout.addWidget(self.sigmaxSpin, 4, 0, 1, 1) '''Defines the label for the horizontal waist spin box''' self.sigmaxlabel = QtGui.QLabel(Form) self.sigmaxlabel.setObjectName(_fromUtf8("sigmaxlabel")) self.gridLayout.addWidget(self.sigmaxlabel, 4, 1, 1, 1) '''Defines the spin box for the vertical waist''' self.sigmaySpin = QtGui.QDoubleSpinBox(Form) self.sigmaySpin.setRange(0.,500.) self.sigmaySpin.setProperty("value", 50.) self.sigmaySpin.setObjectName(_fromUtf8("sigmaySpin")) self.gridLayout.addWidget(self.sigmaySpin, 5, 0, 1, 1) '''Defines the label for the vertical waist spin box''' self.sigmaylabel = QtGui.QLabel(Form) self.sigmaylabel.setObjectName(_fromUtf8("sigmaylabel")) self.gridLayout.addWidget(self.sigmaylabel, 5, 1, 1, 1) # self.rotangleSpin = QtGui.QDoubleSpinBox(Form) # self.rotangleSpin.setProperty("value", 200.) # self.rotangleSpin.setObjectName(_fromUtf8("rotangleSpin")) # self.gridLayout.addWidget(self.rotangleSpin, 5, 0, 1, 1) # self.rotanglelabel = QtGui.QLabel(Form) # self.rotanglelabel.setObjectName(_fromUtf8("rotanglelabel")) # self.gridLayout.addWidget(self.rotanglelabel, 5, 1, 1, 1) '''Defines the label for the camera''' self.camlabel = QtGui.QLabel(Form) self.camlabel.setObjectName(_fromUtf8("camlabel")) self.gridLayout.addWidget(self.camlabel, 1, 2, 1, 1) '''Defines the field to choose a camera''' self.choosecam = QtGui.QComboBox() self.choosecam.setObjectName(_fromUtf8("choosecam")) self.gridLayout.addWidget(self.choosecam, 2, 2, 1, 1) # self.choosecam.addItem("Test 1") # self.choosecam.addItem("Test 2") '''Defines the text label for camera settings''' self.camsettingslabel = QtGui.QLabel(Form) self.camsettingslabel.setObjectName(_fromUtf8("camsettingslabel")) self.gridLayout.addWidget(self.camsettingslabel, 4, 2, 1, 2) '''Defines the spin box for the exposure time''' self.exposureSpin = QtGui.QDoubleSpinBox(Form) self.exposureSpin.setRange(0.,100.) self.exposureSpin.setProperty("value", 1.) self.exposureSpin.setDecimals(4) self.exposureSpin.setSingleStep(0.1) self.exposureSpin.setObjectName(_fromUtf8("exposureSpin")) self.gridLayout.addWidget(self.exposureSpin, 5, 2, 1, 1) '''Defines the label for the exposure time spin box''' self.exposurelabel = QtGui.QLabel(Form) self.exposurelabel.setObjectName(_fromUtf8("exposurelabel")) self.gridLayout.addWidget(self.exposurelabel, 5, 3, 1, 1) '''Defines the spin box for the gain value''' self.gainSpin = QtGui.QSpinBox(Form) self.gainSpin.setRange(16,64) self.gainSpin.setProperty("value", 16) self.gainSpin.setObjectName(_fromUtf8("gainSpin")) self.gridLayout.addWidget(self.gainSpin, 6, 2, 1, 1) '''Defines the label for the gain value spin box''' self.gainlabel = QtGui.QLabel(Form) self.gainlabel.setObjectName(_fromUtf8("gainlabel")) self.gridLayout.addWidget(self.gainlabel, 6, 3, 1, 1) '''Defines the 'Connect ROI' push button''' self.connect = QtGui.QPushButton('Connect ROI') self.connect.setObjectName(_fromUtf8("connect")) self.gridLayout.addWidget(self.connect, 1, 4, 1, 1) self.connect.setCheckable(True) self.connect.setToolTip('Connect position of ROI<br>with the position of the peak') '''Defines the 'Hold' push button''' self.hold = QtGui.QPushButton('Hold') self.hold.setObjectName(_fromUtf8("hold")) self.gridLayout.addWidget(self.hold, 2, 4, 1, 1) self.hold.setCheckable(True) self.hold.setToolTip('Pause the live view') # self.hold.setChecked(False) '''Defins the text box for the 'orientation' heading''' self.orientationlabel = QtGui.QLabel(Form) self.orientationlabel.setObjectName(_fromUtf8("orientationlabel")) self.gridLayout.addWidget(self.orientationlabel, 4, 4, 1, 1) # '''Defines the buttons for choosing the orientation''' # self.OrientationGroup = QtGui.QButtonGroup(Form) # self.horRadio = QtGui.QRadioButton(Form) # self.horRadio.setChecked(True) # self.horRadio.setObjectName(_fromUtf8("horRadio")) # self.gridLayout.addWidget(self.horRadio, 4, 4, 1, 1) # self.vertRadio = QtGui.QRadioButton(Form) # # self.vertRadio.setChecked(True) # self.vertRadio.setObjectName(_fromUtf8("vertRadio")) # self.gridLayout.addWidget(self.vertRadio, 5, 4, 1, 1) # # self.stack = QtGui.QStackedWidget(Form) # # self.stack.setObjectName(_fromUtf8("stack")) # self.OrientationGroup.addButton(self.horRadio) # self.OrientationGroup.addButton(self.vertRadio) '''Defines the 'Rotate counterclockwise' push button''' self.rotccw = QtGui.QPushButton('Rotate counterclockwise') self.rotccw.setObjectName(_fromUtf8("rotccw")) self.gridLayout.addWidget(self.rotccw, 5, 4, 1, 1) self.rotccw.setToolTip('Rotate the image 90 degrees counterclockwise') # self.hold.setChecked(False) '''Defines the 'Rotate clockwise' push button''' self.rotcw = QtGui.QPushButton('Rotate clockwise') self.rotcw.setObjectName(_fromUtf8("rotcw")) self.gridLayout.addWidget(self.rotcw, 6, 4, 1, 1) self.rotcw.setToolTip('Rotate the image 90 degrees clockwise') '''Defines the heading for the 'options' column''' self.optionslabel = QtGui.QLabel(Form) self.optionslabel.setObjectName(_fromUtf8("optionslabel")) self.gridLayout.addWidget(self.optionslabel, 1, 5, 1, 1) '''Defines the check box for fitting''' self.fitCheck = QtGui.QCheckBox(Form) self.fitCheck.setObjectName(_fromUtf8("fitCheck")) self.gridLayout.addWidget(self.fitCheck, 2, 5, 1, 1) self.fitCheck.setChecked(True) '''Defines the check box for tracking''' self.trackCheck = QtGui.QCheckBox(Form) self.trackCheck.setObjectName(_fromUtf8("trackCheck")) self.gridLayout.addWidget(self.trackCheck, 3, 5, 1, 1) self.trackCheck.setChecked(True) '''Defines the check box for the reference beam''' self.refCheck = QtGui.QCheckBox(Form) self.refCheck.setObjectName(_fromUtf8("refCheck")) self.gridLayout.addWidget(self.refCheck, 4, 5, 1, 1) self.refCheck.setChecked(True) '''Defines the heading for the 'time evolution plot' column''' self.evplotlabel = QtGui.QLabel(Form) self.evplotlabel.setObjectName(_fromUtf8("evplotlabel")) self.gridLayout.addWidget(self.evplotlabel, 1, 6, 1, 1) '''Defines the buttons for the time evolution plot''' self.TimeEvGroup = QtGui.QButtonGroup(Form) self.ampRadio = QtGui.QRadioButton(Form) self.ampRadio.setChecked(True) self.ampRadio.setObjectName(_fromUtf8("ampRadio")) self.gridLayout.addWidget(self.ampRadio, 2, 6, 1, 1) self.poshorRadio = QtGui.QRadioButton(Form) # self.poshorRadio.setChecked(True) self.poshorRadio.setObjectName(_fromUtf8("poshorRadio")) self.gridLayout.addWidget(self.poshorRadio, 3, 6, 1, 1) self.posvertRadio = QtGui.QRadioButton(Form) self.posvertRadio.setObjectName(_fromUtf8("posvertRadio")) self.gridLayout.addWidget(self.posvertRadio, 4, 6, 1, 1) self.waisthorRadio = QtGui.QRadioButton(Form) self.waisthorRadio.setObjectName(_fromUtf8("waisthorRadio")) self.gridLayout.addWidget(self.waisthorRadio, 5, 6, 1, 1) self.waistvertRadio = QtGui.QRadioButton(Form) self.waistvertRadio.setObjectName(_fromUtf8("waistvertRadio")) self.gridLayout.addWidget(self.waistvertRadio, 6, 6, 1, 1) self.distRadio = QtGui.QRadioButton(Form) self.distRadio.setObjectName(_fromUtf8("distRadio")) self.gridLayout.addWidget(self.distRadio, 7, 6, 1, 1) self.TimeEvGroup.addButton(self.ampRadio) self.TimeEvGroup.addButton(self.poshorRadio) self.TimeEvGroup.addButton(self.posvertRadio) self.TimeEvGroup.addButton(self.waisthorRadio) self.TimeEvGroup.addButton(self.waistvertRadio) self.TimeEvGroup.addButton(self.distRadio) '''Defines the plot widget''' self.plot = GraphicsLayoutWidget(Form) self.plot.setObjectName(_fromUtf8("plot")) self.gridLayout.addWidget(self.plot, 0, 0, 1, 7) '''Puts everything together''' self.retranslateUi(Form) # self.stack.setCurrentIndex(2) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, QSpectrumAnalyzerMainWindow): QSpectrumAnalyzerMainWindow.setObjectName(_fromUtf8("QSpectrumAnalyzerMainWindow")) QSpectrumAnalyzerMainWindow.resize(1100, 731) self.centralwidget = QtGui.QWidget(QSpectrumAnalyzerMainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.plotSplitter = QtGui.QSplitter(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.plotSplitter.sizePolicy().hasHeightForWidth()) self.plotSplitter.setSizePolicy(sizePolicy) self.plotSplitter.setOrientation(QtCore.Qt.Vertical) self.plotSplitter.setObjectName(_fromUtf8("plotSplitter")) self.mainPlotLayout = GraphicsLayoutWidget(self.plotSplitter) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.mainPlotLayout.sizePolicy().hasHeightForWidth()) self.mainPlotLayout.setSizePolicy(sizePolicy) self.mainPlotLayout.setObjectName(_fromUtf8("mainPlotLayout")) self.waterfallPlotLayout = GraphicsLayoutWidget(self.plotSplitter) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.waterfallPlotLayout.sizePolicy().hasHeightForWidth()) self.waterfallPlotLayout.setSizePolicy(sizePolicy) self.waterfallPlotLayout.setObjectName(_fromUtf8("waterfallPlotLayout")) self.horizontalLayout.addWidget(self.plotSplitter) QSpectrumAnalyzerMainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(QSpectrumAnalyzerMainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1100, 30)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menu_File = QtGui.QMenu(self.menubar) self.menu_File.setObjectName(_fromUtf8("menu_File")) self.menu_Help = QtGui.QMenu(self.menubar) self.menu_Help.setObjectName(_fromUtf8("menu_Help")) QSpectrumAnalyzerMainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(QSpectrumAnalyzerMainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) QSpectrumAnalyzerMainWindow.setStatusBar(self.statusbar) self.dockWidget = QtGui.QDockWidget(QSpectrumAnalyzerMainWindow) self.dockWidget.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable) self.dockWidget.setObjectName(_fromUtf8("dockWidget")) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.dockWidgetContents) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.groupBox_2 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.gridLayout = QtGui.QGridLayout(self.groupBox_2) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.startButton = QtGui.QPushButton(self.groupBox_2) self.startButton.setObjectName(_fromUtf8("startButton")) self.gridLayout.addWidget(self.startButton, 0, 0, 1, 1) self.stopButton = QtGui.QPushButton(self.groupBox_2) self.stopButton.setObjectName(_fromUtf8("stopButton")) self.gridLayout.addWidget(self.stopButton, 0, 1, 1, 1) self.singleShotButton = QtGui.QPushButton(self.groupBox_2) self.singleShotButton.setObjectName(_fromUtf8("singleShotButton")) self.gridLayout.addWidget(self.singleShotButton, 1, 0, 1, 2) self.verticalLayout_3.addWidget(self.groupBox_2) self.groupBox = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.verticalLayout = QtGui.QVBoxLayout(self.groupBox) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName(_fromUtf8("label_2")) self.verticalLayout.addWidget(self.label_2) self.startFreqSpinBox = QtGui.QDoubleSpinBox(self.groupBox) self.startFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.startFreqSpinBox.setDecimals(3) self.startFreqSpinBox.setMinimum(24.0) self.startFreqSpinBox.setMaximum(1766.0) self.startFreqSpinBox.setProperty("value", 87.0) self.startFreqSpinBox.setObjectName(_fromUtf8("startFreqSpinBox")) self.verticalLayout.addWidget(self.startFreqSpinBox) self.label_3 = QtGui.QLabel(self.groupBox) self.label_3.setObjectName(_fromUtf8("label_3")) self.verticalLayout.addWidget(self.label_3) self.stopFreqSpinBox = QtGui.QDoubleSpinBox(self.groupBox) self.stopFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.stopFreqSpinBox.setDecimals(3) self.stopFreqSpinBox.setMinimum(24.0) self.stopFreqSpinBox.setMaximum(1766.0) self.stopFreqSpinBox.setProperty("value", 108.0) self.stopFreqSpinBox.setObjectName(_fromUtf8("stopFreqSpinBox")) self.verticalLayout.addWidget(self.stopFreqSpinBox) self.label = QtGui.QLabel(self.groupBox) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.binSizeSpinBox = QtGui.QDoubleSpinBox(self.groupBox) self.binSizeSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.binSizeSpinBox.setDecimals(3) self.binSizeSpinBox.setMaximum(2800.0) self.binSizeSpinBox.setProperty("value", 10.0) self.binSizeSpinBox.setObjectName(_fromUtf8("binSizeSpinBox")) self.verticalLayout.addWidget(self.binSizeSpinBox) self.verticalLayout_3.addWidget(self.groupBox) self.groupBox_3 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_3) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.label_4 = QtGui.QLabel(self.groupBox_3) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout_2.addWidget(self.label_4, 0, 0, 1, 1) self.label_6 = QtGui.QLabel(self.groupBox_3) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout_2.addWidget(self.label_6, 0, 1, 1, 1) self.gainSpinBox = QtGui.QSpinBox(self.groupBox_3) self.gainSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.gainSpinBox.setMinimum(-1) self.gainSpinBox.setMaximum(49) self.gainSpinBox.setProperty("value", -1) self.gainSpinBox.setObjectName(_fromUtf8("gainSpinBox")) self.gridLayout_2.addWidget(self.gainSpinBox, 1, 1, 1, 1) self.label_5 = QtGui.QLabel(self.groupBox_3) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout_2.addWidget(self.label_5, 2, 0, 1, 1) self.label_7 = QtGui.QLabel(self.groupBox_3) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_2.addWidget(self.label_7, 2, 1, 1, 1) self.ppmSpinBox = QtGui.QSpinBox(self.groupBox_3) self.ppmSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.ppmSpinBox.setMinimum(-999) self.ppmSpinBox.setMaximum(999) self.ppmSpinBox.setObjectName(_fromUtf8("ppmSpinBox")) self.gridLayout_2.addWidget(self.ppmSpinBox, 3, 0, 1, 1) self.cropSpinBox = QtGui.QSpinBox(self.groupBox_3) self.cropSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.cropSpinBox.setObjectName(_fromUtf8("cropSpinBox")) self.gridLayout_2.addWidget(self.cropSpinBox, 3, 1, 1, 1) self.intervalSpinBox = QtGui.QDoubleSpinBox(self.groupBox_3) self.intervalSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.intervalSpinBox.setMaximum(999.0) self.intervalSpinBox.setProperty("value", 1.0) self.intervalSpinBox.setObjectName(_fromUtf8("intervalSpinBox")) self.gridLayout_2.addWidget(self.intervalSpinBox, 1, 0, 1, 1) self.verticalLayout_3.addWidget(self.groupBox_3) self.groupBox_4 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_4.setObjectName(_fromUtf8("groupBox_4")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox_4) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.histogramPlotLayout = GraphicsLayoutWidget(self.groupBox_4) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.histogramPlotLayout.sizePolicy().hasHeightForWidth()) self.histogramPlotLayout.setSizePolicy(sizePolicy) self.histogramPlotLayout.setObjectName(_fromUtf8("histogramPlotLayout")) self.verticalLayout_2.addWidget(self.histogramPlotLayout) self.verticalLayout_3.addWidget(self.groupBox_4) self.dockWidget.setWidget(self.dockWidgetContents) QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.dockWidget) self.action_Settings = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_Settings.setObjectName(_fromUtf8("action_Settings")) self.action_Quit = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_Quit.setObjectName(_fromUtf8("action_Quit")) self.action_About = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_About.setObjectName(_fromUtf8("action_About")) self.menu_File.addAction(self.action_Settings) self.menu_File.addSeparator() self.menu_File.addAction(self.action_Quit) self.menu_Help.addAction(self.action_About) self.menubar.addAction(self.menu_File.menuAction()) self.menubar.addAction(self.menu_Help.menuAction()) self.label_2.setBuddy(self.startFreqSpinBox) self.label_3.setBuddy(self.stopFreqSpinBox) self.label.setBuddy(self.binSizeSpinBox) self.label_4.setBuddy(self.intervalSpinBox) self.label_6.setBuddy(self.gainSpinBox) self.label_5.setBuddy(self.ppmSpinBox) self.label_7.setBuddy(self.cropSpinBox) self.retranslateUi(QSpectrumAnalyzerMainWindow) QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerMainWindow) QSpectrumAnalyzerMainWindow.setTabOrder(self.startButton, self.stopButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.stopButton, self.singleShotButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.singleShotButton, self.startFreqSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.startFreqSpinBox, self.stopFreqSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.stopFreqSpinBox, self.binSizeSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.binSizeSpinBox, self.intervalSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.intervalSpinBox, self.gainSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.gainSpinBox, self.ppmSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.ppmSpinBox, self.cropSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.cropSpinBox, self.histogramPlotLayout) QSpectrumAnalyzerMainWindow.setTabOrder(self.histogramPlotLayout, self.mainPlotLayout) QSpectrumAnalyzerMainWindow.setTabOrder(self.mainPlotLayout, self.waterfallPlotLayout)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(877, 839) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.gridLayout_3 = QtGui.QGridLayout(self.tab) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.graphicsView = GraphicsLayoutWidget(self.tab) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.gridLayout_3.addWidget(self.graphicsView, 0, 0, 1, 1) self.tabWidget.addTab(self.tab, _fromUtf8("")) self.tab_2 = QtGui.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.gridLayout_8 = QtGui.QGridLayout(self.tab_2) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.graphicsView_2 = GraphicsLayoutWidget(self.tab_2) self.graphicsView_2.setObjectName(_fromUtf8("graphicsView_2")) self.gridLayout_8.addWidget(self.graphicsView_2, 0, 0, 1, 1) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.tab_3 = QtGui.QWidget() self.tab_3.setObjectName(_fromUtf8("tab_3")) self.gridLayout_9 = QtGui.QGridLayout(self.tab_3) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.graphicsView_3 = GraphicsLayoutWidget(self.tab_3) self.graphicsView_3.setObjectName(_fromUtf8("graphicsView_3")) self.gridLayout_9.addWidget(self.graphicsView_3, 0, 0, 1, 1) self.tabWidget.addTab(self.tab_3, _fromUtf8("")) self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 877, 19)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.dockWidget = QtGui.QDockWidget(MainWindow) self.dockWidget.setObjectName(_fromUtf8("dockWidget")) self.dockWidgetContents = QtGui.QWidget() self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents")) self.gridLayout_4 = QtGui.QGridLayout(self.dockWidgetContents) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem, 3, 0, 1, 1) self.groupBox_2 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.gridLayout_2 = QtGui.QGridLayout(self.groupBox_2) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.gridLayout_6 = QtGui.QGridLayout() self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) self.fileLineEdit1_3 = QtGui.QLineEdit(self.groupBox_2) self.fileLineEdit1_3.setReadOnly(True) self.fileLineEdit1_3.setObjectName(_fromUtf8("fileLineEdit1_3")) self.gridLayout_6.addWidget(self.fileLineEdit1_3, 0, 2, 1, 1) self.fileLabel1_3 = QtGui.QLabel(self.groupBox_2) self.fileLabel1_3.setObjectName(_fromUtf8("fileLabel1_3")) self.gridLayout_6.addWidget(self.fileLabel1_3, 0, 0, 1, 1) self.eeg_channel_combo_box = QtGui.QComboBox(self.groupBox_2) self.eeg_channel_combo_box.setObjectName(_fromUtf8("eeg_channel_combo_box")) self.gridLayout_6.addWidget(self.eeg_channel_combo_box, 1, 2, 1, 1) self.label_3 = QtGui.QLabel(self.groupBox_2) self.label_3.setObjectName(_fromUtf8("label_3")) self.gridLayout_6.addWidget(self.label_3, 1, 0, 1, 1) self.gridLayout_2.addLayout(self.gridLayout_6, 0, 0, 1, 1) self.gridLayout_4.addWidget(self.groupBox_2, 0, 0, 1, 1) self.groupBox_3 = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.gridLayout_5 = QtGui.QGridLayout(self.groupBox_3) self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.gridLayout_7 = QtGui.QGridLayout() self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.label_5 = QtGui.QLabel(self.groupBox_3) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout_7.addWidget(self.label_5, 2, 0, 1, 1) self.label_6 = QtGui.QLabel(self.groupBox_3) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout_7.addWidget(self.label_6, 1, 0, 1, 1) self.fileLineEdit1_4 = QtGui.QLineEdit(self.groupBox_3) self.fileLineEdit1_4.setReadOnly(True) self.fileLineEdit1_4.setObjectName(_fromUtf8("fileLineEdit1_4")) self.gridLayout_7.addWidget(self.fileLineEdit1_4, 0, 2, 1, 1) self.fileLabel1_4 = QtGui.QLabel(self.groupBox_3) self.fileLabel1_4.setObjectName(_fromUtf8("fileLabel1_4")) self.gridLayout_7.addWidget(self.fileLabel1_4, 0, 0, 1, 1) self.epoch_tmin_spinbox = QtGui.QDoubleSpinBox(self.groupBox_3) self.epoch_tmin_spinbox.setMinimum(-1.0) self.epoch_tmin_spinbox.setMaximum(1.0) self.epoch_tmin_spinbox.setSingleStep(0.01) self.epoch_tmin_spinbox.setProperty("value", -0.2) self.epoch_tmin_spinbox.setObjectName(_fromUtf8("epoch_tmin_spinbox")) self.gridLayout_7.addWidget(self.epoch_tmin_spinbox, 2, 2, 1, 1) self.label_7 = QtGui.QLabel(self.groupBox_3) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout_7.addWidget(self.label_7, 3, 0, 1, 1) self.epoch_tmax_spinbox = QtGui.QDoubleSpinBox(self.groupBox_3) self.epoch_tmax_spinbox.setMinimum(-1.0) self.epoch_tmax_spinbox.setMaximum(5.0) self.epoch_tmax_spinbox.setSingleStep(0.01) self.epoch_tmax_spinbox.setProperty("value", 0.5) self.epoch_tmax_spinbox.setObjectName(_fromUtf8("epoch_tmax_spinbox")) self.gridLayout_7.addWidget(self.epoch_tmax_spinbox, 3, 2, 1, 1) self.epoch_channel_combo_box = QtGui.QComboBox(self.groupBox_3) self.epoch_channel_combo_box.setObjectName(_fromUtf8("epoch_channel_combo_box")) self.gridLayout_7.addWidget(self.epoch_channel_combo_box, 1, 2, 1, 1) self.epoch_number_spinbox = QtGui.QSpinBox(self.groupBox_3) self.epoch_number_spinbox.setObjectName(_fromUtf8("epoch_number_spinbox")) self.gridLayout_7.addWidget(self.epoch_number_spinbox, 4, 2, 1, 1) self.label = QtGui.QLabel(self.groupBox_3) self.label.setObjectName(_fromUtf8("label")) self.gridLayout_7.addWidget(self.label, 4, 0, 1, 1) self.gridLayout_5.addLayout(self.gridLayout_7, 0, 0, 1, 1) self.create_epochs_button = QtGui.QPushButton(self.groupBox_3) self.create_epochs_button.setObjectName(_fromUtf8("create_epochs_button")) self.gridLayout_5.addWidget(self.create_epochs_button, 1, 0, 1, 1) self.gridLayout_4.addWidget(self.groupBox_3, 1, 0, 1, 1) self.groupBox = QtGui.QGroupBox(self.dockWidgetContents) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.gridLayout_10 = QtGui.QGridLayout(self.groupBox) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.label_2 = QtGui.QLabel(self.groupBox) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout_10.addWidget(self.label_2, 0, 0, 1, 1) self.lineEdit = QtGui.QLineEdit(self.groupBox) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.gridLayout_10.addWidget(self.lineEdit, 0, 1, 1, 1) self.label_4 = QtGui.QLabel(self.groupBox) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout_10.addWidget(self.label_4, 1, 0, 1, 1) self.evoked_channel_combo_box = QtGui.QComboBox(self.groupBox) self.evoked_channel_combo_box.setObjectName(_fromUtf8("evoked_channel_combo_box")) self.gridLayout_10.addWidget(self.evoked_channel_combo_box, 1, 1, 1, 1) self.create_evoked_button = QtGui.QPushButton(self.groupBox) self.create_evoked_button.setObjectName(_fromUtf8("create_evoked_button")) self.gridLayout_10.addWidget(self.create_evoked_button, 2, 0, 1, 2) self.gridLayout_4.addWidget(self.groupBox, 2, 0, 1, 1) self.dockWidget.setWidget(self.dockWidgetContents) MainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(1), self.dockWidget) self.actionLoad_File = QtGui.QAction(MainWindow) self.actionLoad_File.setObjectName(_fromUtf8("actionLoad_File")) self.actionExit = QtGui.QAction(MainWindow) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.menuFile.addAction(self.actionLoad_File) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(2) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, QSpectrumAnalyzerMainWindow): QSpectrumAnalyzerMainWindow.setObjectName(_fromUtf8("QSpectrumAnalyzerMainWindow")) QSpectrumAnalyzerMainWindow.resize(1200, 810) self.centralwidget = QtGui.QWidget(QSpectrumAnalyzerMainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.plotSplitter = QtGui.QSplitter(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.plotSplitter.sizePolicy().hasHeightForWidth()) self.plotSplitter.setSizePolicy(sizePolicy) self.plotSplitter.setOrientation(QtCore.Qt.Vertical) self.plotSplitter.setObjectName(_fromUtf8("plotSplitter")) self.mainPlotLayout = GraphicsLayoutWidget(self.plotSplitter) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.mainPlotLayout.sizePolicy().hasHeightForWidth()) self.mainPlotLayout.setSizePolicy(sizePolicy) self.mainPlotLayout.setObjectName(_fromUtf8("mainPlotLayout")) self.waterfallPlotLayout = GraphicsLayoutWidget(self.plotSplitter) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.waterfallPlotLayout.sizePolicy().hasHeightForWidth()) self.waterfallPlotLayout.setSizePolicy(sizePolicy) self.waterfallPlotLayout.setObjectName(_fromUtf8("waterfallPlotLayout")) self.horizontalLayout.addWidget(self.plotSplitter) QSpectrumAnalyzerMainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(QSpectrumAnalyzerMainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1200, 30)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menu_File = QtGui.QMenu(self.menubar) self.menu_File.setObjectName(_fromUtf8("menu_File")) self.menu_Help = QtGui.QMenu(self.menubar) self.menu_Help.setObjectName(_fromUtf8("menu_Help")) QSpectrumAnalyzerMainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(QSpectrumAnalyzerMainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) QSpectrumAnalyzerMainWindow.setStatusBar(self.statusbar) self.controlsDockWidget = QtGui.QDockWidget(QSpectrumAnalyzerMainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.controlsDockWidget.sizePolicy().hasHeightForWidth()) self.controlsDockWidget.setSizePolicy(sizePolicy) self.controlsDockWidget.setMinimumSize(QtCore.QSize(190, 10)) self.controlsDockWidget.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable) self.controlsDockWidget.setObjectName(_fromUtf8("controlsDockWidget")) self.controlsDockWidgetContents = QtGui.QWidget() self.controlsDockWidgetContents.setObjectName(_fromUtf8("controlsDockWidgetContents")) self.gridLayout_2 = QtGui.QGridLayout(self.controlsDockWidgetContents) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.startButton = QtGui.QPushButton(self.controlsDockWidgetContents) self.startButton.setObjectName(_fromUtf8("startButton")) self.gridLayout_2.addWidget(self.startButton, 0, 0, 1, 1) self.stopButton = QtGui.QPushButton(self.controlsDockWidgetContents) self.stopButton.setObjectName(_fromUtf8("stopButton")) self.gridLayout_2.addWidget(self.stopButton, 0, 1, 1, 1) self.singleShotButton = QtGui.QPushButton(self.controlsDockWidgetContents) self.singleShotButton.setObjectName(_fromUtf8("singleShotButton")) self.gridLayout_2.addWidget(self.singleShotButton, 1, 0, 1, 2) spacerItem = QtGui.QSpacerItem(20, 561, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem, 2, 0, 1, 1) self.controlsDockWidget.setWidget(self.controlsDockWidgetContents) QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.controlsDockWidget) self.frequencyDockWidget = QtGui.QDockWidget(QSpectrumAnalyzerMainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frequencyDockWidget.sizePolicy().hasHeightForWidth()) self.frequencyDockWidget.setSizePolicy(sizePolicy) self.frequencyDockWidget.setMinimumSize(QtCore.QSize(225, 10)) self.frequencyDockWidget.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable) self.frequencyDockWidget.setObjectName(_fromUtf8("frequencyDockWidget")) self.frequencyDockWidgetContents = QtGui.QWidget() self.frequencyDockWidgetContents.setObjectName(_fromUtf8("frequencyDockWidgetContents")) self.formLayout = QtGui.QFormLayout(self.frequencyDockWidgetContents) self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.ExpandingFieldsGrow) self.formLayout.setObjectName(_fromUtf8("formLayout")) self.label_2 = QtGui.QLabel(self.frequencyDockWidgetContents) self.label_2.setObjectName(_fromUtf8("label_2")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.label_2) self.startFreqSpinBox = QtGui.QDoubleSpinBox(self.frequencyDockWidgetContents) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.startFreqSpinBox.sizePolicy().hasHeightForWidth()) self.startFreqSpinBox.setSizePolicy(sizePolicy) self.startFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.startFreqSpinBox.setDecimals(3) self.startFreqSpinBox.setMinimum(24.0) self.startFreqSpinBox.setMaximum(1766.0) self.startFreqSpinBox.setProperty("value", 87.0) self.startFreqSpinBox.setObjectName(_fromUtf8("startFreqSpinBox")) self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.startFreqSpinBox) self.label_3 = QtGui.QLabel(self.frequencyDockWidgetContents) self.label_3.setObjectName(_fromUtf8("label_3")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.label_3) self.stopFreqSpinBox = QtGui.QDoubleSpinBox(self.frequencyDockWidgetContents) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.stopFreqSpinBox.sizePolicy().hasHeightForWidth()) self.stopFreqSpinBox.setSizePolicy(sizePolicy) self.stopFreqSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.stopFreqSpinBox.setDecimals(3) self.stopFreqSpinBox.setMinimum(24.0) self.stopFreqSpinBox.setMaximum(1766.0) self.stopFreqSpinBox.setProperty("value", 108.0) self.stopFreqSpinBox.setObjectName(_fromUtf8("stopFreqSpinBox")) self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.stopFreqSpinBox) self.label = QtGui.QLabel(self.frequencyDockWidgetContents) self.label.setObjectName(_fromUtf8("label")) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.label) self.binSizeSpinBox = QtGui.QDoubleSpinBox(self.frequencyDockWidgetContents) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.binSizeSpinBox.sizePolicy().hasHeightForWidth()) self.binSizeSpinBox.setSizePolicy(sizePolicy) self.binSizeSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.binSizeSpinBox.setDecimals(3) self.binSizeSpinBox.setMaximum(2800.0) self.binSizeSpinBox.setProperty("value", 10.0) self.binSizeSpinBox.setObjectName(_fromUtf8("binSizeSpinBox")) self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.binSizeSpinBox) spacerItem1 = QtGui.QSpacerItem(20, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.formLayout.setItem(3, QtGui.QFormLayout.SpanningRole, spacerItem1) self.frequencyDockWidget.setWidget(self.frequencyDockWidgetContents) QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.frequencyDockWidget) self.settingsDockWidget = QtGui.QDockWidget(QSpectrumAnalyzerMainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.settingsDockWidget.sizePolicy().hasHeightForWidth()) self.settingsDockWidget.setSizePolicy(sizePolicy) self.settingsDockWidget.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable) self.settingsDockWidget.setObjectName(_fromUtf8("settingsDockWidget")) self.settingsDockWidgetContents = QtGui.QWidget() self.settingsDockWidgetContents.setObjectName(_fromUtf8("settingsDockWidgetContents")) self.gridLayout = QtGui.QGridLayout(self.settingsDockWidgetContents) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.label_4 = QtGui.QLabel(self.settingsDockWidgetContents) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout.addWidget(self.label_4, 0, 0, 1, 1) self.label_6 = QtGui.QLabel(self.settingsDockWidgetContents) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1) self.intervalSpinBox = QtGui.QDoubleSpinBox(self.settingsDockWidgetContents) self.intervalSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.intervalSpinBox.setMaximum(999.0) self.intervalSpinBox.setProperty("value", 1.0) self.intervalSpinBox.setObjectName(_fromUtf8("intervalSpinBox")) self.gridLayout.addWidget(self.intervalSpinBox, 1, 0, 1, 1) self.label_5 = QtGui.QLabel(self.settingsDockWidgetContents) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout.addWidget(self.label_5, 2, 0, 1, 1) self.label_7 = QtGui.QLabel(self.settingsDockWidgetContents) self.label_7.setObjectName(_fromUtf8("label_7")) self.gridLayout.addWidget(self.label_7, 2, 1, 1, 1) spacerItem2 = QtGui.QSpacerItem(20, 1, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem2, 9, 0, 1, 1) self.ppmSpinBox = QtGui.QSpinBox(self.settingsDockWidgetContents) self.ppmSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.ppmSpinBox.setMinimum(-999) self.ppmSpinBox.setMaximum(999) self.ppmSpinBox.setObjectName(_fromUtf8("ppmSpinBox")) self.gridLayout.addWidget(self.ppmSpinBox, 3, 0, 1, 1) self.mainCurveCheckBox = QtGui.QCheckBox(self.settingsDockWidgetContents) self.mainCurveCheckBox.setChecked(True) self.mainCurveCheckBox.setObjectName(_fromUtf8("mainCurveCheckBox")) self.gridLayout.addWidget(self.mainCurveCheckBox, 4, 0, 1, 1) self.peakHoldCheckBox = QtGui.QCheckBox(self.settingsDockWidgetContents) self.peakHoldCheckBox.setObjectName(_fromUtf8("peakHoldCheckBox")) self.gridLayout.addWidget(self.peakHoldCheckBox, 5, 0, 1, 1) self.smoothCheckBox = QtGui.QCheckBox(self.settingsDockWidgetContents) self.smoothCheckBox.setObjectName(_fromUtf8("smoothCheckBox")) self.gridLayout.addWidget(self.smoothCheckBox, 7, 0, 1, 1) self.persistenceCheckBox = QtGui.QCheckBox(self.settingsDockWidgetContents) self.persistenceCheckBox.setObjectName(_fromUtf8("persistenceCheckBox")) self.gridLayout.addWidget(self.persistenceCheckBox, 8, 0, 1, 1) self.gainSpinBox = QtGui.QSpinBox(self.settingsDockWidgetContents) self.gainSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.gainSpinBox.setMinimum(-1) self.gainSpinBox.setMaximum(49) self.gainSpinBox.setProperty("value", -1) self.gainSpinBox.setObjectName(_fromUtf8("gainSpinBox")) self.gridLayout.addWidget(self.gainSpinBox, 1, 1, 1, 2) self.cropSpinBox = QtGui.QSpinBox(self.settingsDockWidgetContents) self.cropSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.cropSpinBox.setObjectName(_fromUtf8("cropSpinBox")) self.gridLayout.addWidget(self.cropSpinBox, 3, 1, 1, 2) self.colorsButton = QtGui.QPushButton(self.settingsDockWidgetContents) self.colorsButton.setObjectName(_fromUtf8("colorsButton")) self.gridLayout.addWidget(self.colorsButton, 4, 1, 1, 2) self.smoothButton = QtGui.QToolButton(self.settingsDockWidgetContents) self.smoothButton.setAutoRaise(False) self.smoothButton.setObjectName(_fromUtf8("smoothButton")) self.gridLayout.addWidget(self.smoothButton, 7, 2, 1, 1) self.persistenceButton = QtGui.QToolButton(self.settingsDockWidgetContents) self.persistenceButton.setAutoRaise(False) self.persistenceButton.setObjectName(_fromUtf8("persistenceButton")) self.gridLayout.addWidget(self.persistenceButton, 8, 2, 1, 1) self.averageCheckBox = QtGui.QCheckBox(self.settingsDockWidgetContents) self.averageCheckBox.setObjectName(_fromUtf8("averageCheckBox")) self.gridLayout.addWidget(self.averageCheckBox, 6, 0, 1, 1) self.settingsDockWidget.setWidget(self.settingsDockWidgetContents) QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.settingsDockWidget) self.levelsDockWidget = QtGui.QDockWidget(QSpectrumAnalyzerMainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.levelsDockWidget.sizePolicy().hasHeightForWidth()) self.levelsDockWidget.setSizePolicy(sizePolicy) self.levelsDockWidget.setFeatures(QtGui.QDockWidget.DockWidgetFloatable|QtGui.QDockWidget.DockWidgetMovable) self.levelsDockWidget.setObjectName(_fromUtf8("levelsDockWidget")) self.levelsDockWidgetContents = QtGui.QWidget() self.levelsDockWidgetContents.setObjectName(_fromUtf8("levelsDockWidgetContents")) self.verticalLayout_6 = QtGui.QVBoxLayout(self.levelsDockWidgetContents) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6")) self.histogramPlotLayout = GraphicsLayoutWidget(self.levelsDockWidgetContents) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Ignored, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.histogramPlotLayout.sizePolicy().hasHeightForWidth()) self.histogramPlotLayout.setSizePolicy(sizePolicy) self.histogramPlotLayout.setObjectName(_fromUtf8("histogramPlotLayout")) self.verticalLayout_6.addWidget(self.histogramPlotLayout) self.levelsDockWidget.setWidget(self.levelsDockWidgetContents) QSpectrumAnalyzerMainWindow.addDockWidget(QtCore.Qt.DockWidgetArea(2), self.levelsDockWidget) self.action_Settings = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_Settings.setObjectName(_fromUtf8("action_Settings")) self.action_Quit = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_Quit.setObjectName(_fromUtf8("action_Quit")) self.action_About = QtGui.QAction(QSpectrumAnalyzerMainWindow) self.action_About.setObjectName(_fromUtf8("action_About")) self.menu_File.addAction(self.action_Settings) self.menu_File.addSeparator() self.menu_File.addAction(self.action_Quit) self.menu_Help.addAction(self.action_About) self.menubar.addAction(self.menu_File.menuAction()) self.menubar.addAction(self.menu_Help.menuAction()) self.label_2.setBuddy(self.startFreqSpinBox) self.label_3.setBuddy(self.stopFreqSpinBox) self.label.setBuddy(self.binSizeSpinBox) self.label_4.setBuddy(self.intervalSpinBox) self.label_6.setBuddy(self.gainSpinBox) self.label_5.setBuddy(self.ppmSpinBox) self.label_7.setBuddy(self.cropSpinBox) self.retranslateUi(QSpectrumAnalyzerMainWindow) QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerMainWindow) QSpectrumAnalyzerMainWindow.setTabOrder(self.startButton, self.stopButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.stopButton, self.singleShotButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.singleShotButton, self.startFreqSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.startFreqSpinBox, self.stopFreqSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.stopFreqSpinBox, self.binSizeSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.binSizeSpinBox, self.intervalSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.intervalSpinBox, self.gainSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.gainSpinBox, self.ppmSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.ppmSpinBox, self.cropSpinBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.cropSpinBox, self.mainCurveCheckBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.mainCurveCheckBox, self.colorsButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.colorsButton, self.peakHoldCheckBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.peakHoldCheckBox, self.averageCheckBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.averageCheckBox, self.smoothCheckBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.smoothCheckBox, self.smoothButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.smoothButton, self.persistenceCheckBox) QSpectrumAnalyzerMainWindow.setTabOrder(self.persistenceCheckBox, self.persistenceButton) QSpectrumAnalyzerMainWindow.setTabOrder(self.persistenceButton, self.histogramPlotLayout) QSpectrumAnalyzerMainWindow.setTabOrder(self.histogramPlotLayout, self.mainPlotLayout) QSpectrumAnalyzerMainWindow.setTabOrder(self.mainPlotLayout, self.waterfallPlotLayout)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1280, 800) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") self.splitter_3 = QtWidgets.QSplitter(self.centralwidget) self.splitter_3.setOrientation(QtCore.Qt.Horizontal) self.splitter_3.setObjectName("splitter_3") self.tabWidget = QtWidgets.QTabWidget(self.splitter_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setObjectName("tabWidget") self.widget = QtWidgets.QWidget() self.widget.setObjectName("widget") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.treeWidget = QtWidgets.QTreeWidget(self.widget) self.treeWidget.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth()) self.treeWidget.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily("Helvetica Neue") self.treeWidget.setFont(font) self.treeWidget.setAutoExpandDelay(-1) self.treeWidget.setColumnCount(8) self.treeWidget.setObjectName("treeWidget") self.treeWidget.headerItem().setText(0, "1") font = QtGui.QFont() font.setFamily("Helvetica Neue") font.setKerning(True) self.treeWidget.headerItem().setFont(0, font) self.treeWidget.headerItem().setText(1, "2") font = QtGui.QFont() font.setFamily("Helvetica Neue") self.treeWidget.headerItem().setFont(1, font) self.treeWidget.headerItem().setText(2, "3") font = QtGui.QFont() font.setFamily("Helvetica Neue") self.treeWidget.headerItem().setFont(2, font) self.treeWidget.headerItem().setText(3, "4") font = QtGui.QFont() font.setFamily("Helvetica Neue") self.treeWidget.headerItem().setFont(3, font) self.treeWidget.headerItem().setText(4, "5") self.treeWidget.headerItem().setText(5, "6") self.treeWidget.headerItem().setText(6, "7") self.treeWidget.headerItem().setText(7, "8") self.treeWidget.header().setDefaultSectionSize(50) self.treeWidget.header().setMinimumSectionSize(5) self.treeWidget.header().setSortIndicatorShown(True) self.verticalLayout_2.addWidget(self.treeWidget) self.tabWidget.addTab(self.widget, "") self.tabWidgetPage2 = QtWidgets.QWidget() self.tabWidgetPage2.setObjectName("tabWidgetPage2") self.verticalLayout = QtWidgets.QVBoxLayout(self.tabWidgetPage2) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.textBrowser_4 = QtWidgets.QTextBrowser(self.tabWidgetPage2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.textBrowser_4.sizePolicy().hasHeightForWidth()) self.textBrowser_4.setSizePolicy(sizePolicy) self.textBrowser_4.setBaseSize(QtCore.QSize(300, 0)) font = QtGui.QFont() font.setPointSize(10) self.textBrowser_4.setFont(font) self.textBrowser_4.setObjectName("textBrowser_4") self.verticalLayout.addWidget(self.textBrowser_4) self.tabWidget.addTab(self.tabWidgetPage2, "") self.splitter_2 = QtWidgets.QSplitter(self.splitter_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.splitter_2.sizePolicy().hasHeightForWidth()) self.splitter_2.setSizePolicy(sizePolicy) self.splitter_2.setOrientation(QtCore.Qt.Vertical) self.splitter_2.setObjectName("splitter_2") self.frame_5 = QtWidgets.QFrame(self.splitter_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth(self.frame_5.sizePolicy().hasHeightForWidth()) self.frame_5.setSizePolicy(sizePolicy) self.frame_5.setMaximumSize(QtCore.QSize(16777215, 180)) self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_5.setObjectName("frame_5") self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame_5) self.horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.frame_4 = QtWidgets.QFrame(self.frame_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(20) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame_4.sizePolicy().hasHeightForWidth()) self.frame_4.setSizePolicy(sizePolicy) self.frame_4.setFrameShape(QtWidgets.QFrame.Panel) self.frame_4.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_4.setObjectName("frame_4") self.formLayout_3 = QtWidgets.QFormLayout(self.frame_4) self.formLayout_3.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.formLayout_3.setContentsMargins(5, 44, 5, 5) self.formLayout_3.setObjectName("formLayout_3") self.label_6 = QtWidgets.QLabel(self.frame_4) self.label_6.setMaximumSize(QtCore.QSize(200, 16777215)) self.label_6.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_6.setObjectName("label_6") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_6) self.tid_spinBox = QtWidgets.QSpinBox(self.frame_4) self.tid_spinBox.setMaximumSize(QtCore.QSize(51, 16777215)) self.tid_spinBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.tid_spinBox.setObjectName("tid_spinBox") self.tid_spinBox.setMaximum(500) self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.tid_spinBox) self.label_11 = QtWidgets.QLabel(self.frame_4) self.label_11.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_11.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_11.setObjectName("label_11") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_11) self.checkbox_hold_trace_position = QtWidgets.QCheckBox(self.frame_4) font = QtGui.QFont() font.setPointSize(8) self.checkbox_hold_trace_position.setFont(font) self.checkbox_hold_trace_position.setLayoutDirection(QtCore.Qt.LeftToRight) self.checkbox_hold_trace_position.setText("") self.checkbox_hold_trace_position.setObjectName("checkbox_hold_trace_position") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.checkbox_hold_trace_position) self.horizontalLayout.addWidget(self.frame_4) self.frame = QtWidgets.QFrame(self.frame_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(20) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setLayoutDirection(QtCore.Qt.LeftToRight) self.frame.setFrameShape(QtWidgets.QFrame.Panel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.formLayout_2 = QtWidgets.QFormLayout(self.frame) self.formLayout_2.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow) self.formLayout_2.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.formLayout_2.setContentsMargins(5, 5, 5, 5) self.formLayout_2.setHorizontalSpacing(5) self.formLayout_2.setObjectName("formLayout_2") self.hp_filter_freq = QtWidgets.QDoubleSpinBox(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.hp_filter_freq.sizePolicy().hasHeightForWidth()) self.hp_filter_freq.setSizePolicy(sizePolicy) self.hp_filter_freq.setWrapping(False) self.hp_filter_freq.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.hp_filter_freq.setMaximum(512.0) self.hp_filter_freq.setProperty("value", 1.0) self.hp_filter_freq.setObjectName("hp_filter_freq") self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.hp_filter_freq) self.label_2 = QtWidgets.QLabel(self.frame) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.label_2.setFont(font) self.label_2.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setObjectName("label_2") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2) self.lp_filter_freq = QtWidgets.QDoubleSpinBox(self.frame) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.lp_filter_freq.sizePolicy().hasHeightForWidth()) self.lp_filter_freq.setSizePolicy(sizePolicy) self.lp_filter_freq.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lp_filter_freq.setMaximum(30000.0) self.lp_filter_freq.setProperty("value", 512.0) self.lp_filter_freq.setObjectName("lp_filter_freq") self.formLayout_2.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.lp_filter_freq) self.checkbox_filter_toggle = QtWidgets.QCheckBox(self.frame) self.checkbox_filter_toggle.setLayoutDirection(QtCore.Qt.LeftToRight) self.checkbox_filter_toggle.setAutoFillBackground(True) self.checkbox_filter_toggle.setText("") self.checkbox_filter_toggle.setTristate(False) self.checkbox_filter_toggle.setObjectName("checkbox_filter_toggle") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.checkbox_filter_toggle) self.checkbox_hp_filter = QtWidgets.QCheckBox(self.frame) self.checkbox_hp_filter.setObjectName("checkbox_hp_filter") self.formLayout_2.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.checkbox_hp_filter) self.checkbox_lp_filter = QtWidgets.QCheckBox(self.frame) self.checkbox_lp_filter.setObjectName("checkbox_lp_filter") self.formLayout_2.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.checkbox_lp_filter) self.horizontalLayout.addWidget(self.frame) self.frame_2 = QtWidgets.QFrame(self.frame_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(20) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame_2.sizePolicy().hasHeightForWidth()) self.frame_2.setSizePolicy(sizePolicy) self.frame_2.setFrameShape(QtWidgets.QFrame.Panel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.formLayout = QtWidgets.QFormLayout(self.frame_2) self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow) self.formLayout.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.formLayout.setContentsMargins(5, 5, 5, 5) self.formLayout.setHorizontalSpacing(5) self.formLayout.setObjectName("formLayout") self.label_7 = QtWidgets.QLabel(self.frame_2) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignCenter) self.label_7.setObjectName("label_7") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_7) self.label_5 = QtWidgets.QLabel(self.frame_2) self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_5.setObjectName("label_5") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_5) self.xrange_spinBox = QtWidgets.QDoubleSpinBox(self.frame_2) self.xrange_spinBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.xrange_spinBox.setMaximum(3600.0) self.xrange_spinBox.setObjectName("xrange_spinBox") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.xrange_spinBox) self.label = QtWidgets.QLabel(self.frame_2) self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label.setObjectName("label") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label) self.scroll_speed_box = QtWidgets.QSpinBox(self.frame_2) self.scroll_speed_box.setMinimum(1) self.scroll_speed_box.setObjectName("scroll_speed_box") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.scroll_speed_box) self.label_10 = QtWidgets.QLabel(self.frame_2) self.label_10.setLayoutDirection(QtCore.Qt.LeftToRight) self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.label_10.setObjectName("label_10") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_10) self.checkBox_scrolling = QtWidgets.QCheckBox(self.frame_2) self.checkBox_scrolling.setLayoutDirection(QtCore.Qt.LeftToRight) self.checkBox_scrolling.setText("") self.checkBox_scrolling.setObjectName("checkBox_scrolling") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.checkBox_scrolling) self.blink_box = QtWidgets.QCheckBox(self.frame_2) self.blink_box.setLayoutDirection(QtCore.Qt.LeftToRight) self.blink_box.setText("") self.blink_box.setObjectName("blink_box") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.blink_box) self.horizontalLayout.addWidget(self.frame_2) self.frame_3 = QtWidgets.QFrame(self.frame_5) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QtWidgets.QFrame.Panel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.formLayout_4 = QtWidgets.QFormLayout(self.frame_3) self.formLayout_4.setFieldGrowthPolicy(QtWidgets.QFormLayout.ExpandingFieldsGrow) self.formLayout_4.setFormAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop) self.formLayout_4.setContentsMargins(5, 5, 5, 5) self.formLayout_4.setHorizontalSpacing(5) self.formLayout_4.setObjectName("formLayout_4") self.label_4 = QtWidgets.QLabel(self.frame_3) self.label_4.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) self.label_4.setObjectName("label_4") self.formLayout_4.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_4) self.predictions_file_display = QtWidgets.QLineEdit(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.predictions_file_display.sizePolicy().hasHeightForWidth()) self.predictions_file_display.setSizePolicy(sizePolicy) self.predictions_file_display.setObjectName("predictions_file_display") self.formLayout_4.setWidget(1, QtWidgets.QFormLayout.SpanningRole, self.predictions_file_display) self.label_3 = QtWidgets.QLabel(self.frame_3) self.label_3.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) self.label_3.setObjectName("label_3") self.formLayout_4.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_3) self.h5_folder_display = QtWidgets.QLineEdit(self.frame_3) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.h5_folder_display.sizePolicy().hasHeightForWidth()) self.h5_folder_display.setSizePolicy(sizePolicy) self.h5_folder_display.setDragEnabled(True) self.h5_folder_display.setReadOnly(True) self.h5_folder_display.setCursorMoveStyle(QtCore.Qt.VisualMoveStyle) self.h5_folder_display.setObjectName("h5_folder_display") self.formLayout_4.setWidget(3, QtWidgets.QFormLayout.SpanningRole, self.h5_folder_display) self.horizontalLayout.addWidget(self.frame_3) self.splitter = QtWidgets.QSplitter(self.splitter_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(100) sizePolicy.setVerticalStretch(100) sizePolicy.setHeightForWidth(self.splitter.sizePolicy().hasHeightForWidth()) self.splitter.setSizePolicy(sizePolicy) self.splitter.setOrientation(QtCore.Qt.Vertical) self.splitter.setObjectName("splitter") self.overview_plot = GraphicsLayoutWidget(self.splitter) self.overview_plot.setBaseSize(QtCore.QSize(800, 300)) self.overview_plot.setObjectName("overview_plot") self.GraphicsLayoutWidget = GraphicsLayoutWidget(self.splitter) self.GraphicsLayoutWidget.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(10) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.GraphicsLayoutWidget.sizePolicy().hasHeightForWidth()) self.GraphicsLayoutWidget.setSizePolicy(sizePolicy) self.GraphicsLayoutWidget.setBaseSize(QtCore.QSize(800, 300)) self.GraphicsLayoutWidget.setObjectName("GraphicsLayoutWidget") self.gridLayout.addWidget(self.splitter_3, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menuBar = QtWidgets.QMenuBar(MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 1280, 31)) self.menuBar.setObjectName("menuBar") self.menuFile = QtWidgets.QMenu(self.menuBar) self.menuFile.setObjectName("menuFile") self.menuAnalyse = QtWidgets.QMenu(self.menuBar) self.menuAnalyse.setObjectName("menuAnalyse") MainWindow.setMenuBar(self.menuBar) self.actionSave_annotations = QtWidgets.QAction(MainWindow) self.actionSave_annotations.setObjectName("actionSave_annotations") self.actionLoad_Library = QtWidgets.QAction(MainWindow) self.actionLoad_Library.setObjectName("actionLoad_Library") self.actionLoad_Predictions = QtWidgets.QAction(MainWindow) self.actionLoad_Predictions.setObjectName("actionLoad_Predictions") self.actionLoad_h5_folder = QtWidgets.QAction(MainWindow) self.actionLoad_h5_folder.setObjectName("actionLoad_h5_folder") self.actionConvert_dir_to_h5 = QtWidgets.QAction(MainWindow) self.actionConvert_dir_to_h5.setObjectName("actionConvert_dir_to_h5") self.actionConvert_ndf_to_h5 = QtWidgets.QAction(MainWindow) self.actionConvert_ndf_to_h5.setObjectName("actionConvert_ndf_to_h5") self.actionLibrary_logistics = QtWidgets.QAction(MainWindow) self.actionLibrary_logistics.setObjectName("actionLibrary_logistics") self.actionAdd_to_library = QtWidgets.QAction(MainWindow) self.actionAdd_to_library.setObjectName("actionAdd_to_library") self.actionAdd_labels_to_library = QtWidgets.QAction(MainWindow) self.actionAdd_labels_to_library.setObjectName("actionAdd_labels_to_library") self.actionAdd_features_to_library = QtWidgets.QAction(MainWindow) self.actionAdd_features_to_library.setObjectName("actionAdd_features_to_library") self.actionClassifier_components = QtWidgets.QAction(MainWindow) self.actionClassifier_components.setObjectName("actionClassifier_components") self.actionRun_classifer_on_h5_dir = QtWidgets.QAction(MainWindow) self.actionRun_classifer_on_h5_dir.setObjectName("actionRun_classifer_on_h5_dir") self.actionRun_classifer_on_ndf_dir = QtWidgets.QAction(MainWindow) self.actionRun_classifer_on_ndf_dir.setObjectName("actionRun_classifer_on_ndf_dir") self.actionSet_default_folder = QtWidgets.QAction(MainWindow) self.actionSet_default_folder.setObjectName("actionSet_default_folder") self.actionAdd_features_to_h5_folder = QtWidgets.QAction(MainWindow) self.actionAdd_features_to_h5_folder.setObjectName("actionAdd_features_to_h5_folder") self.actionFolder_for_substates = QtWidgets.QAction(MainWindow) self.actionFolder_for_substates.setObjectName("actionFolder_for_substates") self.actionSubstates_Window = QtWidgets.QAction(MainWindow) self.actionSubstates_Window.setObjectName("actionSubstates_Window") self.actionOpen_in_Jupyter_notebook = QtWidgets.QAction(MainWindow) self.actionOpen_in_Jupyter_notebook.setObjectName("actionOpen_in_Jupyter_notebook") self.menuFile.addAction(self.actionLoad_Library) self.menuFile.addAction(self.actionLoad_Predictions) self.menuFile.addAction(self.actionLoad_h5_folder) self.menuFile.addSeparator() self.menuFile.addAction(self.actionSave_annotations) self.menuFile.addAction(self.actionSet_default_folder) self.menuFile.addSeparator() self.menuFile.addAction(self.actionSubstates_Window) self.menuAnalyse.addAction(self.actionConvert_ndf_to_h5) self.menuAnalyse.addSeparator() self.menuAnalyse.addAction(self.actionAdd_features_to_h5_folder) self.menuAnalyse.addSeparator() self.menuAnalyse.addAction(self.actionLibrary_logistics) self.menuAnalyse.addSeparator() self.menuAnalyse.addAction(self.actionClassifier_components) self.menuAnalyse.addSeparator() self.menuAnalyse.addSeparator() self.menuAnalyse.addAction(self.actionOpen_in_Jupyter_notebook) self.menuBar.addAction(self.menuFile.menuAction()) self.menuBar.addAction(self.menuAnalyse.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, xrs_mask_widget): xrs_mask_widget.setObjectName(_fromUtf8("xrs_mask_widget")) xrs_mask_widget.resize(712, 530) xrs_mask_widget.setStyleSheet(_fromUtf8("")) self.horizontalLayout_2 = QtGui.QHBoxLayout(xrs_mask_widget) self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setMargin(8) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.splitter = QtGui.QSplitter(xrs_mask_widget) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName(_fromUtf8("splitter")) self.layoutWidget = QtGui.QWidget(self.splitter) self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget) self.verticalLayout.setMargin(0) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.img_pg_layout = GraphicsLayoutWidget(self.layoutWidget) self.img_pg_layout.setObjectName(_fromUtf8("img_pg_layout")) self.verticalLayout.addWidget(self.img_pg_layout) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem = QtGui.QSpacerItem(118, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.pos_lbl = QtGui.QLabel(self.layoutWidget) self.pos_lbl.setObjectName(_fromUtf8("pos_lbl")) self.horizontalLayout.addWidget(self.pos_lbl) self.verticalLayout.addLayout(self.horizontalLayout) self.widget = QtGui.QWidget(self.splitter) self.widget.setMaximumSize(QtCore.QSize(200, 16777215)) self.widget.setObjectName(_fromUtf8("widget")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.widget) self.verticalLayout_2.setSpacing(8) self.verticalLayout_2.setMargin(0) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.horizontalLayout_3 = QtGui.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.mask_rb = QtGui.QRadioButton(self.widget) self.mask_rb.setChecked(True) self.mask_rb.setObjectName(_fromUtf8("mask_rb")) self.horizontalLayout_3.addWidget(self.mask_rb) self.unmask_rb = QtGui.QRadioButton(self.widget) self.unmask_rb.setChecked(False) self.unmask_rb.setObjectName(_fromUtf8("unmask_rb")) self.horizontalLayout_3.addWidget(self.unmask_rb) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.line_2 = QtGui.QFrame(self.widget) self.line_2.setFrameShadow(QtGui.QFrame.Raised) self.line_2.setFrameShape(QtGui.QFrame.HLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setObjectName(_fromUtf8("line_2")) self.verticalLayout_2.addWidget(self.line_2) self.gridLayout = QtGui.QGridLayout() self.gridLayout.setSpacing(8) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.circle_btn = QtGui.QPushButton(self.widget) self.circle_btn.setCheckable(True) self.circle_btn.setChecked(False) self.circle_btn.setFlat(True) self.circle_btn.setObjectName(_fromUtf8("circle_btn")) self.gridLayout.addWidget(self.circle_btn, 0, 0, 1, 1) self.rectangle_btn = QtGui.QPushButton(self.widget) self.rectangle_btn.setCheckable(True) self.rectangle_btn.setFlat(True) self.rectangle_btn.setObjectName(_fromUtf8("rectangle_btn")) self.gridLayout.addWidget(self.rectangle_btn, 0, 1, 1, 1) self.point_btn = QtGui.QPushButton(self.widget) self.point_btn.setCheckable(True) self.point_btn.setFlat(True) self.point_btn.setObjectName(_fromUtf8("point_btn")) self.gridLayout.addWidget(self.point_btn, 1, 0, 1, 1) self.point_size_sb = QtGui.QSpinBox(self.widget) self.point_size_sb.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.point_size_sb.setMaximum(4000) self.point_size_sb.setProperty("value", 20) self.point_size_sb.setObjectName(_fromUtf8("point_size_sb")) self.gridLayout.addWidget(self.point_size_sb, 1, 1, 1, 1) self.polygon_btn = QtGui.QPushButton(self.widget) self.polygon_btn.setCheckable(True) self.polygon_btn.setFlat(True) self.polygon_btn.setObjectName(_fromUtf8("polygon_btn")) self.gridLayout.addWidget(self.polygon_btn, 2, 0, 1, 2) self.verticalLayout_2.addLayout(self.gridLayout) self.line = QtGui.QFrame(self.widget) self.line.setFrameShadow(QtGui.QFrame.Raised) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.verticalLayout_2.addWidget(self.line) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setSpacing(8) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.below_thresh_txt = QtGui.QLineEdit(self.widget) self.below_thresh_txt.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.below_thresh_txt.setObjectName(_fromUtf8("below_thresh_txt")) self.gridLayout_2.addWidget(self.below_thresh_txt, 1, 1, 1, 1) self.below_thresh_btn = QtGui.QPushButton(self.widget) self.below_thresh_btn.setFlat(True) self.below_thresh_btn.setObjectName(_fromUtf8("below_thresh_btn")) self.gridLayout_2.addWidget(self.below_thresh_btn, 1, 0, 1, 1) self.above_thresh_txt = QtGui.QLineEdit(self.widget) self.above_thresh_txt.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.above_thresh_txt.setObjectName(_fromUtf8("above_thresh_txt")) self.gridLayout_2.addWidget(self.above_thresh_txt, 0, 1, 1, 1) self.above_thresh_btn = QtGui.QPushButton(self.widget) self.above_thresh_btn.setFlat(True) self.above_thresh_btn.setObjectName(_fromUtf8("above_thresh_btn")) self.gridLayout_2.addWidget(self.above_thresh_btn, 0, 0, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout_2) self.line_5 = QtGui.QFrame(self.widget) self.line_5.setFrameShape(QtGui.QFrame.HLine) self.line_5.setFrameShadow(QtGui.QFrame.Sunken) self.line_5.setObjectName(_fromUtf8("line_5")) self.verticalLayout_2.addWidget(self.line_5) self.gridLayout_4 = QtGui.QGridLayout() self.gridLayout_4.setSpacing(8) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.undo_btn = QtGui.QPushButton(self.widget) self.undo_btn.setFlat(True) self.undo_btn.setObjectName(_fromUtf8("undo_btn")) self.gridLayout_4.addWidget(self.undo_btn, 2, 0, 1, 1) self.clear_mask_btn = QtGui.QPushButton(self.widget) self.clear_mask_btn.setFlat(True) self.clear_mask_btn.setObjectName(_fromUtf8("clear_mask_btn")) self.gridLayout_4.addWidget(self.clear_mask_btn, 1, 1, 1, 1) self.invert_mask_btn = QtGui.QPushButton(self.widget) self.invert_mask_btn.setFlat(True) self.invert_mask_btn.setObjectName(_fromUtf8("invert_mask_btn")) self.gridLayout_4.addWidget(self.invert_mask_btn, 1, 0, 1, 1) self.redo_btn = QtGui.QPushButton(self.widget) self.redo_btn.setFlat(True) self.redo_btn.setObjectName(_fromUtf8("redo_btn")) self.gridLayout_4.addWidget(self.redo_btn, 2, 1, 1, 1) self.grow_btn = QtGui.QPushButton(self.widget) self.grow_btn.setFlat(True) self.grow_btn.setObjectName(_fromUtf8("grow_btn")) self.gridLayout_4.addWidget(self.grow_btn, 0, 0, 1, 1) self.shrink_btn = QtGui.QPushButton(self.widget) self.shrink_btn.setFlat(True) self.shrink_btn.setObjectName(_fromUtf8("shrink_btn")) self.gridLayout_4.addWidget(self.shrink_btn, 0, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout_4) self.line_3 = QtGui.QFrame(self.widget) self.line_3.setFrameShape(QtGui.QFrame.HLine) self.line_3.setFrameShadow(QtGui.QFrame.Sunken) self.line_3.setObjectName(_fromUtf8("line_3")) self.verticalLayout_2.addWidget(self.line_3) self.cosmic_btn = QtGui.QPushButton(self.widget) self.cosmic_btn.setFlat(True) self.cosmic_btn.setObjectName(_fromUtf8("cosmic_btn")) self.verticalLayout_2.addWidget(self.cosmic_btn) self.line_4 = QtGui.QFrame(self.widget) self.line_4.setFrameShape(QtGui.QFrame.HLine) self.line_4.setFrameShadow(QtGui.QFrame.Sunken) self.line_4.setObjectName(_fromUtf8("line_4")) self.verticalLayout_2.addWidget(self.line_4) self.widget1 = QtGui.QWidget(self.widget) self.widget1.setObjectName(_fromUtf8("widget1")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.widget1) self.horizontalLayout_4.setMargin(0) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.fill_rb = QtGui.QRadioButton(self.widget1) self.fill_rb.setChecked(True) self.fill_rb.setObjectName(_fromUtf8("fill_rb")) self.horizontalLayout_4.addWidget(self.fill_rb) self.transparent_rb = QtGui.QRadioButton(self.widget1) self.transparent_rb.setObjectName(_fromUtf8("transparent_rb")) self.horizontalLayout_4.addWidget(self.transparent_rb) self.verticalLayout_2.addWidget(self.widget1) spacerItem1 = QtGui.QSpacerItem(228, 224, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem1) self.gridLayout_3 = QtGui.QGridLayout() self.gridLayout_3.setVerticalSpacing(8) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.save_mask_btn = QtGui.QPushButton(self.widget) self.save_mask_btn.setFlat(True) self.save_mask_btn.setObjectName(_fromUtf8("save_mask_btn")) self.gridLayout_3.addWidget(self.save_mask_btn, 0, 0, 1, 2) self.load_mask_btn = QtGui.QPushButton(self.widget) self.load_mask_btn.setFlat(True) self.load_mask_btn.setObjectName(_fromUtf8("load_mask_btn")) self.gridLayout_3.addWidget(self.load_mask_btn, 1, 0, 1, 1) self.add_mask_btn = QtGui.QPushButton(self.widget) self.add_mask_btn.setFlat(True) self.add_mask_btn.setObjectName(_fromUtf8("add_mask_btn")) self.gridLayout_3.addWidget(self.add_mask_btn, 1, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout_3) self.horizontalLayout_2.addWidget(self.splitter) self.retranslateUi(xrs_mask_widget) QtCore.QMetaObject.connectSlotsByName(xrs_mask_widget)
def setupUi(self, SignalWidget): SignalWidget.setObjectName("SignalWidget") SignalWidget.resize(650, 511) self.gridLayout = QtWidgets.QGridLayout(SignalWidget) self.gridLayout.setObjectName("gridLayout") self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.plotWidget = GraphicsLayoutWidget(SignalWidget) self.plotWidget.setObjectName("plotWidget") self.horizontalLayout_2.addWidget(self.plotWidget) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.hMinusButton = QtWidgets.QPushButton(SignalWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.hMinusButton.sizePolicy().hasHeightForWidth()) self.hMinusButton.setSizePolicy(sizePolicy) self.hMinusButton.setMinimumSize(QtCore.QSize(30, 30)) self.hMinusButton.setMaximumSize(QtCore.QSize(30, 30)) self.hMinusButton.setFlat(False) self.hMinusButton.setObjectName("hMinusButton") self.horizontalLayout.addWidget(self.hMinusButton) self.hPlusButton = QtWidgets.QPushButton(SignalWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.hPlusButton.sizePolicy().hasHeightForWidth()) self.hPlusButton.setSizePolicy(sizePolicy) self.hPlusButton.setMinimumSize(QtCore.QSize(30, 30)) self.hPlusButton.setMaximumSize(QtCore.QSize(30, 30)) self.hPlusButton.setObjectName("hPlusButton") self.horizontalLayout.addWidget(self.hPlusButton) self.verticalLayout_2.addLayout(self.horizontalLayout) self.gridLayout.addLayout(self.verticalLayout_2, 0, 0, 1, 1) self.groupBox = QtWidgets.QGroupBox(SignalWidget) self.groupBox.setMinimumSize(QtCore.QSize(250, 0)) self.groupBox.setObjectName("groupBox") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout_3.setObjectName("verticalLayout_3") self.probeButton = QtWidgets.QRadioButton(self.groupBox) self.probeButton.setChecked(True) self.probeButton.setObjectName("probeButton") self.buttonGroup = QtWidgets.QButtonGroup(SignalWidget) self.buttonGroup.setObjectName("buttonGroup") self.buttonGroup.addButton(self.probeButton) self.verticalLayout_3.addWidget(self.probeButton) self.signalButton = QtWidgets.QRadioButton(self.groupBox) self.signalButton.setObjectName("signalButton") self.buttonGroup.addButton(self.signalButton) self.verticalLayout_3.addWidget(self.signalButton) spacerItem = QtWidgets.QSpacerItem(20, 400, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem) self.gridLayout.addWidget(self.groupBox, 0, 1, 1, 1) self.retranslateUi(SignalWidget) QtCore.QMetaObject.connectSlotsByName(SignalWidget)
def setupUi(self, Form): '''Defines the general properties of the window''' Form.setObjectName(_fromUtf8("Form")) Form.resize(1500, 1000) # self.myQMenuBar = QtGui.QMenuBar(Form) # exitMenu = self.myQMenuBar.addMenu('File') # exitAction = QtGui.QAction('Exit', Form) # exitAction.triggered.connect(QtGui.qApp.quit) # exitMenu.addAction(exitAction) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) # self.statusBar() # extractAction = QtGui.QAction("&GET TO THE CHOPPAH!!!", self) # extractAction.setShortcut("Ctrl+Q") # extractAction.setStatusTip('Leave The App') # extractAction.triggered.connect(QtGui.qApp.quit) # '''Set up the menu bar''' # self.mainMenu = QtGui.QMenuBar(Form) # self.mainMenu.setNativeMenuBar(False) # fileMenu = self.mainMenu.addMenu('&File') # fileMenu.addAction(extractAction) # self.myQMenuBar = QtGui.QMenuBar(Form) # exitMenu = self.myQMenuBar.addMenu('File') # exitAction = QtGui.QAction('Exit', Form) # exitAction.triggered.connect(QtGui.qApp.quit) # exitMenu.addAction(exitAction) # Form.setMenuBar(self.myQMenuBar) # self.gridLayout.addWidget(self.myQMenuBar, 0, 0, 1, 0) '''Defines the text label for reference beam properties''' self.refbeamlabel = QtGui.QLabel(Form) self.refbeamlabel.setObjectName(_fromUtf8("refbeamlabel")) self.gridLayout.addWidget(self.refbeamlabel, 2, 0, 1, 1) '''Defines the spin box for x0''' self.x0Spin = QtGui.QDoubleSpinBox(Form) self.x0Spin.setRange(0.,754.) self.x0Spin.setProperty("value", 350) self.x0Spin.setObjectName(_fromUtf8("x0Spin")) self.gridLayout.addWidget(self.x0Spin, 3, 0, 1, 1) '''Defines the label for the x0 spin box''' self.x0label = QtGui.QLabel(Form) self.x0label.setObjectName(_fromUtf8("x0label")) self.gridLayout.addWidget(self.x0label, 3, 1, 1, 1) '''Defines the spin box for y0''' self.y0Spin = QtGui.QDoubleSpinBox(Form) self.y0Spin.setRange(0.,480.) self.y0Spin.setProperty("value", 240) self.y0Spin.setObjectName(_fromUtf8("y0Spin")) self.gridLayout.addWidget(self.y0Spin, 4, 0, 1, 1) '''Defines the label for the y0 spin box''' self.y0label = QtGui.QLabel(Form) self.y0label.setObjectName(_fromUtf8("y0label")) self.gridLayout.addWidget(self.y0label, 4, 1, 1, 1) '''Defines the spin box for the horizontal waist''' self.sigmaxSpin = QtGui.QDoubleSpinBox(Form) self.sigmaxSpin.setRange(0.,500.) self.sigmaxSpin.setProperty("value", 30.) self.sigmaxSpin.setObjectName(_fromUtf8("sigmaxSpin")) self.gridLayout.addWidget(self.sigmaxSpin, 5, 0, 1, 1) '''Defines the label for the horizontal waist spin box''' self.sigmaxlabel = QtGui.QLabel(Form) self.sigmaxlabel.setObjectName(_fromUtf8("sigmaxlabel")) self.gridLayout.addWidget(self.sigmaxlabel, 5, 1, 1, 1) '''Defines the spin box for the vertical waist''' self.sigmaySpin = QtGui.QDoubleSpinBox(Form) self.sigmaySpin.setRange(0.,500.) self.sigmaySpin.setProperty("value", 50.) self.sigmaySpin.setObjectName(_fromUtf8("sigmaySpin")) self.gridLayout.addWidget(self.sigmaySpin, 6, 0, 1, 1) '''Defines the label for the vertical waist spin box''' self.sigmaylabel = QtGui.QLabel(Form) self.sigmaylabel.setObjectName(_fromUtf8("sigmaylabel")) self.gridLayout.addWidget(self.sigmaylabel, 6, 1, 1, 1) # self.rotangleSpin = QtGui.QDoubleSpinBox(Form) # self.rotangleSpin.setProperty("value", 200.) # self.rotangleSpin.setObjectName(_fromUtf8("rotangleSpin")) # self.gridLayout.addWidget(self.rotangleSpin, 5, 0, 1, 1) # self.rotanglelabel = QtGui.QLabel(Form) # self.rotanglelabel.setObjectName(_fromUtf8("rotanglelabel")) # self.gridLayout.addWidget(self.rotanglelabel, 5, 1, 1, 1) # '''Defines the label for the camera''' # self.camlabel = QtGui.QLabel(Form) # self.camlabel.setObjectName(_fromUtf8("camlabel")) # self.gridLayout.addWidget(self.camlabel, 2, 2, 1, 1) # '''Defines the field to choose a camera''' # self.choosecam = QtGui.QComboBox() # self.choosecam.setObjectName(_fromUtf8("choosecam")) # self.gridLayout.addWidget(self.choosecam, 3, 2, 1, 1) # self.choosecam.addItem("Test 1") # self.choosecam.addItem("Test 2") '''Defines the text label for camera settings''' self.camsettingslabel = QtGui.QLabel(Form) self.camsettingslabel.setObjectName(_fromUtf8("camsettingslabel")) self.gridLayout.addWidget(self.camsettingslabel, 5, 2, 1, 2) '''Defines the spin box for the exposure time''' self.exposureSpin = QtGui.QDoubleSpinBox(Form) # self.exposureSpin.setRange(0.,100.) # self.exposureSpin.setProperty("value", 1.) self.exposureSpin.setDecimals(3) # self.exposureSpin.setSingleStep(0.1) self.exposureSpin.setObjectName(_fromUtf8("exposureSpin")) self.gridLayout.addWidget(self.exposureSpin, 6, 2, 1, 1) '''Defines the label for the exposure time spin box''' self.exposurelabel = QtGui.QLabel(Form) self.exposurelabel.setObjectName(_fromUtf8("exposurelabel")) self.gridLayout.addWidget(self.exposurelabel, 6, 3, 1, 1) '''Defines the spin box for the gain value''' self.gainSpin = QtGui.QDoubleSpinBox(Form) # self.gainSpin.setRange(16.,64.) # self.gainSpin.setProperty("value", 16.) self.gainSpin.setDecimals(3) # self.gainSpin.setSingleStep(0.1) self.gainSpin.setObjectName(_fromUtf8("gainSpin")) self.gridLayout.addWidget(self.gainSpin, 7, 2, 1, 1) '''Defines the label for the gain value spin box''' self.gainlabel = QtGui.QLabel(Form) self.gainlabel.setObjectName(_fromUtf8("gainlabel")) self.gridLayout.addWidget(self.gainlabel, 7, 3, 1, 1) '''Defines the 'Save actual beam properties' push button''' self.saveprops = QtGui.QPushButton('Save Current Beam Properties') self.saveprops.setObjectName(_fromUtf8("saveprops")) self.gridLayout.addWidget(self.saveprops, 3, 3, 2, 1) self.saveprops.setToolTip('Save the current beam properties into the corresponding .csv-file') '''Defines the heading for the 'fit options' column''' self.fitoptionslabel = QtGui.QLabel(Form) self.fitoptionslabel.setObjectName(_fromUtf8("fitoptionslabel")) self.gridLayout.addWidget(self.fitoptionslabel, 2, 4, 1, 1) self.fitoptgroup = QtGui.QButtonGroup(Form) '''Defines the 'Sum over ROI' push button''' self.fitsum = QtGui.QPushButton('Sum Over ROI') self.fitsum.setObjectName(_fromUtf8("fitsum")) self.gridLayout.addWidget(self.fitsum, 3, 4, 1, 1) self.fitsum.setCheckable(True) self.fitsum.setToolTip('For fitting a gaussian the vertically/horizontally summed up data of the ROI is used') self.fitsum.setChecked(True) '''Defines the 'Select Data at Peak' push button''' self.fitline = QtGui.QPushButton('Select Data at Peak') self.fitline.setObjectName(_fromUtf8("fitline")) self.gridLayout.addWidget(self.fitline, 4, 4, 1, 1) self.fitline.setCheckable(True) self.fitline.setToolTip('For fitting a gaussian the vertical/horizontal line of data at the peak is selec') self.fitoptgroup.addButton(self.fitsum) self.fitoptgroup.addButton(self.fitline) '''Defines the buttons for the method for select data at peak fit''' self.plotselectedmethodgroup = QtGui.QButtonGroup(Form) '''Defines the max before radio button''' self.maxbeforeRadio = QtGui.QRadioButton(Form) # if self.fitline.isChecked(): # self.maxbeforeRadio.setChecked(True) # self.maxbeforeRadio.setChecked(True) self.maxbeforeRadio.setObjectName(_fromUtf8("maxbeforeRadio")) self.gridLayout.addWidget(self.maxbeforeRadio, 5, 4, 1, 1) '''Defines the abs max radio button''' self.absmaxRadio = QtGui.QRadioButton(Form) self.absmaxRadio.setChecked(True) self.absmaxRadio.setObjectName(_fromUtf8("absmaxRadio")) self.gridLayout.addWidget(self.absmaxRadio, 6, 4, 1, 1) # self.absmaxRadio.setCheckable(False) '''Defines the self max radio button''' self.selfmaxRadio = QtGui.QRadioButton(Form) self.selfmaxRadio.setObjectName(_fromUtf8("selfmaxRadio")) self.gridLayout.addWidget(self.selfmaxRadio, 7, 4, 1, 1) '''Adds buttons to group''' self.plotselectedmethodgroup.addButton(self.maxbeforeRadio) self.plotselectedmethodgroup.addButton(self.absmaxRadio) self.plotselectedmethodgroup.addButton(self.selfmaxRadio) '''Defines the 'Autoscale ROI' push button''' self.autoscale = QtGui.QPushButton('Autoscale ROI') self.autoscale.setObjectName(_fromUtf8("autoscale")) self.gridLayout.addWidget(self.autoscale, 2, 5, 1, 1) self.autoscale.setCheckable(False) self.autoscale.setToolTip('Automatically scale the ROI to three times the beam waist') '''Defines the 'Connect ROI' push button''' self.connect = QtGui.QPushButton('Connect ROI') self.connect.setObjectName(_fromUtf8("connect")) self.gridLayout.addWidget(self.connect, 3, 5, 1, 1) self.connect.setCheckable(True) self.connect.setToolTip('Connect position of ROI<br>with the position of the peak') '''Defines the 'Hold' push button''' self.hold = QtGui.QPushButton('Hold') self.hold.setObjectName(_fromUtf8("hold")) self.gridLayout.addWidget(self.hold, 4, 5, 1, 1) self.hold.setCheckable(True) self.hold.setToolTip('Pause the live view') # self.hold.setChecked(False) '''Analysis combo''' self.anaCombo = QtGui.QComboBox() self.anaCombo.setObjectName(_fromUtf8('analysis type')) self.gridLayout.addWidget(self.anaCombo, 3, 4, 1, 1) self.anaCombo.setToolTip('choose a analysis type') # '''Defins the text box for the 'orientation' heading''' # self.orientationlabel = QtGui.QLabel(Form) # self.orientationlabel.setObjectName(_fromUtf8("orientationlabel")) # self.gridLayout.addWidget(self.orientationlabel, 5, 4, 1, 1) # '''Defines the buttons for choosing the orientation''' # self.OrientationGroup = QtGui.QButtonGroup(Form) # self.horRadio = QtGui.QRadioButton(Form) # self.horRadio.setChecked(True) # self.horRadio.setObjectName(_fromUtf8("horRadio")) # self.gridLayout.addWidget(self.horRadio, 4, 4, 1, 1) # self.vertRadio = QtGui.QRadioButton(Form) # # self.vertRadio.setChecked(True) # self.vertRadio.setObjectName(_fromUtf8("vertRadio")) # self.gridLayout.addWidget(self.vertRadio, 5, 4, 1, 1) # # self.stack = QtGui.QStackedWidget(Form) # # self.stack.setObjectName(_fromUtf8("stack")) # self.OrientationGroup.addButton(self.horRadio) # self.OrientationGroup.addButton(self.vertRadio) # '''Defines the 'Rotate counterclockwise' push button''' # self.rotccw = QtGui.QPushButton('Rotate counterclockwise') # self.rotccw.setObjectName(_fromUtf8("rotccw")) # self.gridLayout.addWidget(self.rotccw, 6, 4, 1, 1) # self.rotccw.setToolTip('Rotate the image 90 degrees counterclockwise') # self.hold.setChecked(False) # '''Defines the 'Rotate clockwise' push button''' # self.rotcw = QtGui.QPushButton('Rotate clockwise') # self.rotcw.setObjectName(_fromUtf8("rotcw")) # self.gridLayout.addWidget(self.rotcw, 7, 4, 1, 1) # self.rotcw.setToolTip('Rotate the image 90 degrees clockwise') '''Defines the heading for the 'options' column''' self.optionslabel = QtGui.QLabel(Form) self.optionslabel.setObjectName(_fromUtf8("optionslabel")) self.gridLayout.addWidget(self.optionslabel, 5, 5, 1, 1) '''Defines the check box for fitting''' self.fitCheck = QtGui.QCheckBox(Form) self.fitCheck.setObjectName(_fromUtf8("fitCheck")) self.gridLayout.addWidget(self.fitCheck, 6, 5, 1, 1) self.fitCheck.setChecked(True) '''Defines the check box for tracking''' self.trackCheck = QtGui.QCheckBox(Form) self.trackCheck.setObjectName(_fromUtf8("trackCheck")) self.gridLayout.addWidget(self.trackCheck, 7, 5, 1, 1) self.trackCheck.setChecked(True) '''Defines the check box for the reference beam''' self.refCheck = QtGui.QCheckBox(Form) self.refCheck.setObjectName(_fromUtf8("refCheck")) self.gridLayout.addWidget(self.refCheck, 8, 5, 1, 1) self.refCheck.setChecked(True) '''Defines the heading for the 'time evolution plot' column''' self.evplotlabel = QtGui.QLabel(Form) self.evplotlabel.setObjectName(_fromUtf8("evplotlabel")) self.gridLayout.addWidget(self.evplotlabel, 2, 6, 1, 1) '''Defines the buttons for the time evolution plot''' self.TimeEvGroup = QtGui.QButtonGroup(Form) self.ampRadio = QtGui.QRadioButton(Form) self.ampRadio.setChecked(True) self.ampRadio.setObjectName(_fromUtf8("ampRadio")) self.gridLayout.addWidget(self.ampRadio, 3, 6, 1, 1) self.poshorRadio = QtGui.QRadioButton(Form) # self.poshorRadio.setChecked(True) self.poshorRadio.setObjectName(_fromUtf8("poshorRadio")) self.gridLayout.addWidget(self.poshorRadio, 4, 6, 1, 1) self.posvertRadio = QtGui.QRadioButton(Form) self.posvertRadio.setObjectName(_fromUtf8("posvertRadio")) self.gridLayout.addWidget(self.posvertRadio, 5, 6, 1, 1) self.waisthorRadio = QtGui.QRadioButton(Form) self.waisthorRadio.setObjectName(_fromUtf8("waisthorRadio")) self.gridLayout.addWidget(self.waisthorRadio, 6, 6, 1, 1) self.waistvertRadio = QtGui.QRadioButton(Form) self.waistvertRadio.setObjectName(_fromUtf8("waistvertRadio")) self.gridLayout.addWidget(self.waistvertRadio, 7, 6, 1, 1) self.distRadio = QtGui.QRadioButton(Form) self.distRadio.setObjectName(_fromUtf8("distRadio")) self.gridLayout.addWidget(self.distRadio, 8, 6, 1, 1) self.TimeEvGroup.addButton(self.ampRadio) self.TimeEvGroup.addButton(self.poshorRadio) self.TimeEvGroup.addButton(self.posvertRadio) self.TimeEvGroup.addButton(self.waisthorRadio) self.TimeEvGroup.addButton(self.waistvertRadio) self.TimeEvGroup.addButton(self.distRadio) '''Defines the plot widget''' self.plot = GraphicsLayoutWidget(Form) self.plot.setObjectName(_fromUtf8("plot")) self.gridLayout.addWidget(self.plot, 1, 0, 1, 7) '''Puts everything together''' self.retranslateUi(Form) # self.stack.setCurrentIndex(2) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, AutoWindow): AutoWindow.setObjectName(_fromUtf8("AutoWindow")) AutoWindow.resize(1346, 920) AutoWindow.setMinimumSize(QtCore.QSize(0, 0)) AutoWindow.setStyleSheet(_fromUtf8("\n" "/*\n" " Android Material Dark\n" " COLOR_DARK = #212121 Grey 900\n" " COLOR_MEDIUM = #424242 Grey 800\n" " COLOR_MEDLIGHT = #757575 Grey 600\n" " COLOR_LIGHT = #DDDDDD White\n" " COLOR_ACCENT = #3F51B5 Indigo 500\n" "*/\n" "\n" "* {\n" " background:qlineargradient(spread:pad, x1:0.517, y1:0.25, x2:1, y2:1, stop:0.211207 rgba(0, 0, 0, 255), stop:0.456897 rgba(39, 103, 106, 255), stop:1 rgba(255, 255, 255, 255));\n" " color: #DDDDDD;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QWidget::item:selected {\n" " background: #3F51B5;\n" "}\n" "\n" "QCheckBox, QRadioButton {\n" " border: none;\n" "}\n" "\n" "QRadioButton::indicator, QCheckBox::indicator {\n" " width: 13px;\n" " height: 13px;\n" "}\n" "\n" "QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked {\n" " border: 1px solid #757575;\n" " background: none;\n" "}\n" "\n" "QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover {\n" " border: 1px solid #DDDDDD;\n" "}\n" "\n" "QRadioButton::indicator::checked, QCheckBox::indicator::checked {\n" " border: 1px solid #757575;\n" " background: #757575;\n" "}\n" "\n" "QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover {\n" " border: 1px solid #DDDDDD;\n" " background: #DDDDDD;\n" "}\n" "\n" "QGroupBox {\n" " margin-top: 6px;\n" "}\n" "\n" "QGroupBox::title {\n" " top: -7px;\n" " left: 7px;\n" "}\n" "\n" "QScrollBar {\n" " border: 1px solid #757575;\n" " background: #212121;\n" "}\n" "\n" "QScrollBar:horizontal {\n" " height: 15px;\n" " margin: 0px 0px 0px 32px;\n" "}\n" "\n" "QScrollBar:vertical {\n" " width: 15px;\n" " margin: 32px 0px 0px 0px;\n" "}\n" "\n" "QScrollBar::handle {\n" " background: #424242;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QScrollBar::handle:horizontal {\n" " border-width: 0px 1px 0px 1px;\n" "}\n" "\n" "QScrollBar::handle:vertical {\n" " border-width: 1px 0px 1px 0px;\n" "}\n" "\n" "QScrollBar::handle:horizontal {\n" " min-width: 20px;\n" "}\n" "\n" "QScrollBar::handle:vertical {\n" " min-height: 20px;\n" "}\n" "\n" "QScrollBar::add-line, QScrollBar::sub-line {\n" " background:#424242;\n" " border: 1px solid #757575;\n" " subcontrol-origin: margin;\n" "}\n" "\n" "QScrollBar::add-line {\n" " position: absolute;\n" "}\n" "\n" "QScrollBar::add-line:horizontal {\n" " width: 15px;\n" " subcontrol-position: left;\n" " left: 15px;\n" "}\n" "\n" "QScrollBar::add-line:vertical {\n" " height: 15px;\n" " subcontrol-position: top;\n" " top: 15px;\n" "}\n" "\n" "QScrollBar::sub-line:horizontal {\n" " width: 15px;\n" " subcontrol-position: top left;\n" "}\n" "\n" "QScrollBar::sub-line:vertical {\n" " height: 15px;\n" " subcontrol-position: top;\n" "}\n" "\n" "QScrollBar:left-arrow, QScrollBar::right-arrow, QScrollBar::up-arrow, QScrollBar::down-arrow {\n" " border: 1px solid #757575;\n" " width: 3px;\n" " height: 3px;\n" "}\n" "\n" "QScrollBar::add-page, QScrollBar::sub-page {\n" " background: none;\n" "}\n" "\n" "QAbstractButton:hover {\n" " background: #424242;\n" "}\n" "\n" "QAbstractButton:pressed {\n" " background: #757575;\n" "}\n" "\n" "QAbstractItemView {\n" " show-decoration-selected: 1;\n" " selection-background-color: #3F51B5;\n" " selection-color: #DDDDDD;\n" " alternate-background-color: #424242;\n" "}\n" "\n" "QHeaderView {\n" " border: 1px solid #757575;\n" "}\n" "\n" "QHeaderView::section {\n" " background: #212121;\n" " border: 1px solid #757575;\n" " padding: 4px;\n" "}\n" "\n" "QHeaderView::section:selected, QHeaderView::section::checked {\n" " background: #424242;\n" "}\n" "\n" "QTableView {\n" " gridline-color: #757575;\n" "}\n" "\n" "QTabBar {\n" " margin-left: 2px;\n" "}\n" "\n" "QTabBar::tab {\n" " border-radius: 0px;\n" " padding: 4px;\n" " margin: 4px;\n" "}\n" "\n" "QTabBar::tab:selected {\n" " background: #424242;\n" "}\n" "\n" "QComboBox::down-arrow {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QComboBox::drop-down {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QComboBox::down-arrow {\n" " width: 3px;\n" " height: 3px;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QAbstractSpinBox {\n" " padding-right: 15px;\n" "}\n" "\n" "QAbstractSpinBox::up-button, QAbstractSpinBox::down-button {\n" " border: 1px solid #757575;\n" " background: #424242;\n" " subcontrol-origin: border;\n" "}\n" "\n" "QAbstractSpinBox::up-arrow, QAbstractSpinBox::down-arrow {\n" " width: 3px;\n" " height: 3px;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QSlider {\n" " border: none;\n" "}\n" "\n" "QSlider::groove:horizontal {\n" " height: 5px;\n" " margin: 4px 0px 4px 0px;\n" "}\n" "\n" "QSlider::groove:vertical {\n" " width: 5px;\n" " margin: 0px 4px 0px 4px;\n" "}\n" "\n" "QSlider::handle {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QSlider::handle:horizontal {\n" " width: 15px;\n" " margin: -4px 0px -4px 0px;\n" "}\n" "\n" "QSlider::handle:vertical {\n" " height: 15px;\n" " margin: 0px -4px 0px -4px;\n" "}\n" "\n" "QSlider::add-page:vertical, QSlider::sub-page:horizontal {\n" " background: #3F51B5;\n" "}\n" "\n" "QSlider::sub-page:vertical, QSlider::add-page:horizontal {\n" " background: #424242;\n" "}\n" "\n" "QLabel {\n" " border: none;\n" "}\n" "\n" "QProgressBar {\n" " text-align: center;\n" "}\n" "\n" "QProgressBar::chunk {\n" " width: 1px;\n" " background-color: #3F51B5;\n" "}\n" "\n" "QMenu::separator {\n" " background: #424242;\n" "}\n" "\n" "QStatusBar {\n" " border: 1px;\n" " color: #3F51B5;\n" "}")) AutoWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(AutoWindow) self.centralwidget.setAutoFillBackground(False) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.gridLayout_2 = QtGui.QGridLayout() self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.autoplot = GraphicsLayoutWidget(self.centralwidget) self.autoplot.setObjectName(_fromUtf8("autoplot")) self.gridLayout_2.addWidget(self.autoplot, 0, 0, 1, 1) self.gridLayout.addLayout(self.gridLayout_2, 0, 2, 1, 1) AutoWindow.setCentralWidget(self.centralwidget) self.actionAll_pannel = QtGui.QAction(AutoWindow) self.actionAll_pannel.setCheckable(False) self.actionAll_pannel.setEnabled(True) self.actionAll_pannel.setObjectName(_fromUtf8("actionAll_pannel")) self.actionHistogram = QtGui.QAction(AutoWindow) self.actionHistogram.setObjectName(_fromUtf8("actionHistogram")) self.actionTracker = QtGui.QAction(AutoWindow) self.actionTracker.setObjectName(_fromUtf8("actionTracker")) self.actionChannels = QtGui.QAction(AutoWindow) font = QtGui.QFont() font.setFamily(_fromUtf8("URW Bookman L")) font.setPointSize(12) font.setBold(True) font.setWeight(75) self.actionChannels.setFont(font) self.actionChannels.setObjectName(_fromUtf8("actionChannels")) self.actionAll = QtGui.QAction(AutoWindow) self.actionAll.setObjectName(_fromUtf8("actionAll")) self.retranslateUi(AutoWindow) QtCore.QMetaObject.connectSlotsByName(AutoWindow)
class MainWidget(QWidget): def __init__(self): QWidget.__init__(self) # define periodic table widget for element selection self.periodicTableWidget = widgets.PeriodicTableDialog() # initial molecule Zmatrix (can be empty) # self.inp = [] self.inp = [['H'], ['O', 1, 0.9], ['O', 2, 1.4, 1, 105.], ['H', 3, 0.9, 2, 105., 1, 120.]] self.atomList = [] self.highList = [] self.labelList = [] self.fast = False # define & initialize ZMatModel that will contain Zmatrix data self.ZMatModel = QStandardItemModel(len(self.inp), 7, self) self.ZMatTable = QTableView(self) self.ZMatTable.setModel(self.ZMatModel) self.ZMatTable.setFixedWidth(325) #self.ZMatTable.installEventFilter(self) #self.ZMatModel.installEventFilter(self) self.ZMatModel.setHorizontalHeaderLabels(['atom','','bond','','angle','','dihedral']) for j, width in enumerate([40, 22, 65, 22, 65, 22, 65]): self.ZMatTable.setColumnWidth(j, width) # populate the ZMatModel self.populateZMatModel() #define Menu bar menus and their actions self.menuBar = QMenuBar(self) fileMenu = self.menuBar.addMenu('&File') editMenu = self.menuBar.addMenu('&Edit') viewMenu = self.menuBar.addMenu('&View') measureMenu = self.menuBar.addMenu('&Measure') helpMenu = self.menuBar.addMenu('&Help') readZmatAction = QAction('&Read &ZMat', self) readZmatAction.setShortcut('Ctrl+O') readZmatAction.setStatusTip('Read Zmat from file') readZmatAction.triggered.connect(self.readZmat) fileMenu.addAction(readZmatAction) readXYZAction = QAction('&Read &XYZ', self) readXYZAction.setShortcut('Ctrl+Shift+O') readXYZAction.setStatusTip('Read XYZ from file') readXYZAction.triggered.connect(self.readXYZ) fileMenu.addAction(readXYZAction) readGaussianAction = QAction('&Read &Gaussian log', self) readGaussianAction.setShortcut('Ctrl+G') readGaussianAction.setStatusTip('Read Gaussian log file') readGaussianAction.triggered.connect(self.readGaussian) fileMenu.addAction(readGaussianAction) writeZmatAction = QAction('&Write &ZMat', self) writeZmatAction.setShortcut('Ctrl+S') writeZmatAction.setStatusTip('Write Zmat to file') writeZmatAction.triggered.connect(self.writeZmat) fileMenu.addAction(writeZmatAction) writeXYZAction = QAction('&Write &XYZ', self) writeXYZAction.setShortcut('Ctrl+Shift+S') writeXYZAction.setStatusTip('Write XYZ from file') writeXYZAction.triggered.connect(self.writeXYZ) fileMenu.addAction(writeXYZAction) exitAction = QAction('&Exit', self) exitAction.setShortcut('Ctrl+Q') exitAction.setStatusTip('Exit application') exitAction.triggered.connect(qApp.quit) fileMenu.addAction(exitAction) addRowAction = QAction('&Add &row', self) addRowAction.setShortcut('Ctrl+R') addRowAction.setStatusTip('Add row to ZMatrix') addRowAction.triggered.connect(self.addRow) editMenu.addAction(addRowAction) deleteRowAction = QAction('&Delete &row', self) deleteRowAction.setShortcut('Ctrl+Shift+R') deleteRowAction.setStatusTip('Delete row from ZMatrix') deleteRowAction.triggered.connect(self.deleteRow) editMenu.addAction(deleteRowAction) addAtomAction = QAction('&Add &atom', self) addAtomAction.setShortcut('Ctrl+A') addAtomAction.setStatusTip('Add atom to ZMatrix') addAtomAction.triggered.connect(self.buildB) editMenu.addAction(addAtomAction) drawModeMenu = QMenu('Draw mode', self) viewMenu.addMenu(drawModeMenu) fastDrawAction = QAction('&Fast draw', self) fastDrawAction.triggered.connect(self.fastDraw) normalDrawAction = QAction('&Normal draw', self) normalDrawAction.triggered.connect(self.normalDraw) drawModeMenu.addAction(normalDrawAction) drawModeMenu.addAction(fastDrawAction) clearHighlightsAction = QAction('&Clear selection', self) clearHighlightsAction.setShortcut('Ctrl+C') clearHighlightsAction.setStatusTip('Clear highlighted atoms') clearHighlightsAction.triggered.connect(self.clearHighlights) viewMenu.addAction(clearHighlightsAction) clearLabelsAction = QAction('&Clear labels', self) clearLabelsAction.setShortcut('Ctrl+Alt+C') clearLabelsAction.setStatusTip('Clear labels') clearLabelsAction.triggered.connect(self.clearLabels) viewMenu.addAction(clearLabelsAction) clearUpdateViewAction = QAction('&Clear selection and labels', self) clearUpdateViewAction.setShortcut('Ctrl+Shift+C') clearUpdateViewAction.setStatusTip('Clear highlighted atoms and labels') clearUpdateViewAction.triggered.connect(self.clearUpdateView) viewMenu.addAction(clearUpdateViewAction) self.showGaussAction = QAction('Show &Gaussian geometry optimization', self) self.showGaussAction.setShortcut('Ctrl+G') self.showGaussAction.setStatusTip('Show Gaussian geometry optimization plots for energy, force and displacement.') self.showGaussAction.setEnabled(False) self.showGaussAction.triggered.connect(self.showGauss) viewMenu.addAction(self.showGaussAction) self.showFreqAction = QAction('Show &IR frequency plot', self) self.showFreqAction.setShortcut('Ctrl+I') self.showFreqAction.setStatusTip('Show Gaussian calculated IR frequency plot.') self.showFreqAction.setEnabled(False) self.showFreqAction.triggered.connect(self.showFreq) viewMenu.addAction(self.showFreqAction) measureDistanceAction = QAction('&Measure &distance', self) measureDistanceAction.setShortcut('Ctrl+D') measureDistanceAction.setStatusTip('Measure distance between two atoms') measureDistanceAction.triggered.connect(self.measureDistanceB) measureMenu.addAction(measureDistanceAction) measureAngleAction = QAction('&Measure &angle', self) measureAngleAction.setShortcut('Ctrl+Shift+D') measureAngleAction.setStatusTip('Measure angle between three atoms') measureAngleAction.triggered.connect(self.measureAngleB) measureMenu.addAction(measureAngleAction) aboutAction = QAction('&About', self) aboutAction.setStatusTip('About this program...') aboutAction.triggered.connect(self.about) helpMenu.addAction(aboutAction) aboutQtAction = QAction('&About Qt', self) aboutQtAction.setStatusTip('About Qt...') aboutQtAction.triggered.connect(self.aboutQt) helpMenu.addAction(aboutQtAction) # define GL widget that displays the 3D molecule model self.window = widgets.MyGLView() self.window.installEventFilter(self) self.window.setMinimumSize(500, 500) #self.window.setBackgroundColor((50, 0, 10)) self.updateView() self.gaussianPlot = GraphicsLayoutWidget() self.gaussianPlot.resize(750, 250) self.gaussianPlot.setWindowTitle('Gaussian geometry optimization') #self.gaussianPlot.setAspectLocked(True) #self.gaussianPlot.addLayout(rowspan=3, colspan=1) self.FreqModel = QStandardItemModel(1, 3, self) self.freqTable = QTableView(self) self.freqTable.setModel(self.FreqModel) self.freqTable.setMinimumWidth(240) self.freqTable.installEventFilter(self) self.FreqModel.installEventFilter(self) self.FreqModel.setHorizontalHeaderLabels(['Frequency','IR Intensity','Raman Intensity']) for j, width in enumerate([80, 80, 80]): self.freqTable.setColumnWidth(j, width) self.freqWidget = QWidget() self.freqWidget.setWindowTitle('IR frequency plot & table') self.freqWidget.resize(800, 400) self.freqWidget.layout = QHBoxLayout(self.freqWidget) self.freqWidget.layout.setSpacing(1) self.freqWidget.layout.setContentsMargins(1, 1, 1, 1) self.freqPlot = GraphicsLayoutWidget() self.freqWidget.layout.addWidget(self.freqPlot) self.freqWidget.layout.addWidget(self.freqTable) self.freqTable.clicked.connect(self.freqCellClicked) # define other application parts self.statusBar = QStatusBar(self) self.fileDialog = QFileDialog(self) # define application layout self.layout = QVBoxLayout(self) self.layout.setSpacing(1) self.layout.setContentsMargins(1, 1, 1, 1) self.layout1 = QHBoxLayout() self.layout1.setSpacing(1) self.layout1.addWidget(self.ZMatTable) self.layout1.addWidget(self.window) self.layout.addWidget(self.menuBar) self.layout.addLayout(self.layout1) self.layout.addWidget(self.statusBar) self.adjustSize() self.setWindowTitle('Moldy') iconPath = 'icon.png' icon = QIcon(iconPath) icon.addFile(iconPath, QSize(16, 16)) icon.addFile(iconPath, QSize(24, 24)) icon.addFile(iconPath, QSize(32, 32)) icon.addFile(iconPath, QSize(48, 48)) icon.addFile(iconPath, QSize(256, 256)) self.setWindowIcon(icon) # start monitoring changes in the ZMatModel self.ZMatModel.dataChanged.connect(self.clearUpdateView) # run and show the application def run(self): self.show() self.ZMatTable.clicked.connect(self.ZMatCellClicked) qt_app.instance().aboutToQuit.connect(self.deleteGLwidget) qt_app.exec_() # fill the ZMatModel with initial data from 'self.inp' def populateZMatModel(self): self.ZMatModel.removeRows(0, self.ZMatModel.rowCount()) for i, row in enumerate(self.inp): for j, cell in enumerate(row): item = QStandardItem(str(cell)) self.ZMatModel.setItem(i, j, item) # some cells should not be editable, they are disabled for i in range(min(len(self.inp), 3)): for j in range(2*i+1, 7): self.ZMatModel.setItem(i, j, QStandardItem()) self.ZMatModel.item(i, j).setBackground(QColor(150,150,150)) self.ZMatModel.item(i, j).setFlags(Qt.ItemIsEnabled) def populateFreqModel(self): self.FreqModel.removeRows(0, self.FreqModel.rowCount()) for i, row in enumerate(zip(self.vibfreqs, self.vibirs, self.vibramans)): for j, cell in enumerate(row): item = QStandardItem(str(cell)) self.FreqModel.setItem(i, j, item) # add a row to the bottom of the ZMatModel def addRow(self): # temporarily stop updating the GL window self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) row = self.ZMatModel.rowCount() self.ZMatModel.insertRow(row) # some cells should not be editable if row < 3: for j in range(2*row+1, 7): self.ZMatModel.setItem(row, j, QStandardItem()) self.ZMatModel.item(row, j).setBackground(QColor(150,150,150)) self.ZMatModel.item(row, j).setFlags(Qt.ItemIsEnabled) # restart GL window updating self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.statusBar.clearMessage() self.statusBar.showMessage('Added 1 row.', 3000) # delete the last row of the ZMatModel def deleteRow(self): xyz = [list(vi) for vi in list(v)] atoms = [str(elements[e]) for e in elems] oldLen = self.ZMatModel.rowCount() idxs = sorted(set(idx.row() for idx in self.ZMatTable.selectedIndexes()), reverse=True) newLen = oldLen - len(idxs) if newLen == oldLen: self.ZMatModel.removeRow(self.ZMatModel.rowCount()-1) else: self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) for idx in idxs: self.ZMatModel.removeRow(idx) if idx < 3: for i in range(idx, min(3, newLen)): for j in range(2*i+1, 7): self.ZMatModel.setItem(i, j, QStandardItem()) self.ZMatModel.item(i, j).setBackground(QColor(150,150,150)) self.ZMatModel.item(i, j).setFlags(Qt.ItemIsEnabled) if len(xyz) > idx: xyz.pop(idx) atoms.pop(idx) self.inp = xyz2zmat(xyz, atoms) self.populateZMatModel() for i in reversed(self.highList): self.window.removeItem(i[1]) self.highList = [] self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.updateView() self.statusBar.clearMessage() if idxs: self.statusBar.showMessage('Deleted row(s): '+str([i+1 for i in idxs]), 3000) else: self.statusBar.showMessage('Deleted last row.', 3000) # show the periodic table widget def periodicTable(self): self.statusBar.clearMessage() self.statusBar.showMessage('Select element from periodic table.') self.periodicTableWidget.exec_() selection = self.periodicTableWidget.selection() return selection # import molecule with zmatrix coordinates def readZmat(self): self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) filename = self.fileDialog.getOpenFileName(self, 'Open file', expanduser('~'), '*.zmat;;*.*') self.inp = [] self.populateZMatModel() if filename: with open(filename, 'r') as f: next(f) next(f) for row in f: self.inp.append(row.split()) f.close() self.populateZMatModel() self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.updateView() self.statusBar.clearMessage() self.statusBar.showMessage('Read molecule from '+filename+'.', 5000) self.showGaussAction.setEnabled(False) self.showFreqAction.setEnabled(False) # import molecule with xyz coordinates def readXYZ(self): self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) filename = self.fileDialog.getOpenFileName(self, 'Open file', expanduser('~'), '*.xyz;;*.*') xyz = [] elems = [] self.inp = [] self.populateZMatModel() if filename: with open(filename, 'r') as f: next(f) next(f) for row in f: rs = row.split() if len(rs) == 4: elems.append(rs[0]) xyz.append([float(f) for f in rs[1:]]) f.close() self.inp = xyz2zmat(xyz, elems) self.populateZMatModel() #print(elems) self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.updateView() self.statusBar.clearMessage() self.statusBar.showMessage('Read molecule from '+filename+'.', 5000) self.showGaussAction.setEnabled(False) self.showFreqAction.setEnabled(False) # import Gaussian log file def readGaussian(self): global vsShifted self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) filename = self.fileDialog.getOpenFileName(self, 'Open file', expanduser('~'), '*.log;;*.*') if filename: self.gaussianPlot.clear() self.inp = [] self.populateZMatModel() file = ccopen(filename) data = file.parse().getattributes() self.natom = data['natom'] self.atomnos = data['atomnos'].tolist() self.atomsymbols = [ str(elements[e]) for e in self.atomnos ] self.atomcoords = data['atomcoords'].tolist() self.scfenergies = data['scfenergies'].tolist() self.geovalues = data['geovalues'].T.tolist() self.geotargets = data['geotargets'].tolist() if 'vibfreqs' in data.keys(): self.vibfreqs = data['vibfreqs'] #print(self.vibfreqs) self.vibirs = data['vibirs'] #print(self.vibirs) #print(data.keys()) if 'vibramans' in data.keys(): self.vibramans = data['vibramans'] else: self.vibramans = [''] * len(self.vibirs) self.vibdisps = data['vibdisps'] #print(self.vibdisps) self.inp = xyz2zmat(self.atomcoords[0], self.atomsymbols) self.populateZMatModel() titles = ['SCF Energies', 'RMS & Max Forces', 'RMS & Max Displacements'] for i in range(3): self.gaussianPlot.addPlot(row=1, col=i+1) plot = self.gaussianPlot.getItem(1, i+1) plot.setTitle(title=titles[i]) if i == 0: c = ['c'] x = [0] y = [self.scfenergies] else: c = ['r', 'y'] x = [0, 0] y = [self.geovalues[2*i-2], self.geovalues[2*i-1]] targety = [self.geotargets[2*i-2], self.geotargets[2*i-1]] plot.clear() plot.maxData = plot.plot(y[0], symbol='o', symbolPen=c[0], symbolBrush=c[0], pen=c[0], symbolSize=5, pxMode=True, antialias=True, autoDownsample=False) plot.highlight=plot.plot(x, [ yy[0] for yy in y ], symbol='o', symbolPen='w', symbolBrush=None, pen=None, symbolSize=15, pxMode=True, antialias=True, autoDownsample=False) plot.maxData.sigPointsClicked.connect(self.gausclicked) if i > 0: for j in range(2): plot.addLine(y=np.log10(targety[j]), pen=mkPen((255, 255*j, 0, int(255/2)), width=1)) plot.RMSData=plot.plot(y[1], symbol='o', symbolPen=c[1], symbolBrush=c[1], pen=c[1], symbolSize=5, pxMode=True, antialias=True, autoDownsample=False) plot.RMSData.sigPointsClicked.connect(self.gausclicked) plot.setLogMode(y=True) self.showGauss() self.updateView() self.statusBar.clearMessage() self.statusBar.showMessage('Read molecule from '+filename+'.', 5000) self.ZMatModel.dataChanged.connect(self.clearUpdateView) if self.natom: self.showGaussAction.setEnabled(True) if 'vibfreqs' in data.keys(): self.showFreqAction.setEnabled(True) # populate the FreqModel self.populateFreqModel() self.freqPlot.clear() irPlot = self.freqPlot.addPlot(row=1, col=1) irPlot.clear() minFreq = np.min(self.vibfreqs) maxFreq = np.max(self.vibfreqs) maxInt = np.max(self.vibirs) x = np.sort(np.concatenate([np.linspace(minFreq-100, maxFreq+100, num=1000), self.vibfreqs])) y = x*0 for f,i in zip(self.vibfreqs, self.vibirs): y += lorentzv(x, f, 2*np.pi, i) #xy = np.array([np.concatenate([x, np.array(self.vibfreqs)]), np.concatenate([y, np.array(self.vibirs)])]).T #xysort = xy[xy[:,0].argsort()] irPlot.maxData = irPlot.plot(x, y, antialias=True) markers = ErrorBarItem(x=self.vibfreqs, y=self.vibirs, top=maxInt/30, bottom=None, pen='r') irPlot.addItem(markers) self.showFreq() #self.vibdisps = np.append(self.vibdisps, [np.mean(self.vibdisps, axis=0)], axis=0) maxt = 100 vsShifted = np.array([ [ vs + self.vibdisps[i]*np.sin(t*2*np.pi/maxt)/3 for t in range(maxt) ] for i in range(len(self.vibfreqs)) ]) else: self.showFreqAction.setEnabled(False) self.freqWidget.hide() def showGauss(self): self.gaussianPlot.show() def showFreq(self): self.freqWidget.show() # export Zmatrix to csv def writeZmat(self): zm = model2list(self.ZMatModel) filename = self.fileDialog.getSaveFileName(self, 'Save file', expanduser('~')+'/'+getFormula(list(list(zip(*zm))[0]))+'.zmat', '*.zmat;;*.*') try: filename except NameError: pass else: if filename: writeOutput(zm, filename) self.statusBar.clearMessage() self.statusBar.showMessage('Wrote molecule to '+filename+'.', 5000) # export XYZ coordinates to csv def writeXYZ(self): xyz = [] zm = model2list(self.ZMatModel) for i in range(len(v)): xyz.append(np.round(v[i], 7).tolist()) xyz[i][:0] = zm[i][0] if len(v) > 0: formula = getFormula(list(list(zip(*xyz))[0])) else: formula = 'moldy_output' filename = self.fileDialog.getSaveFileName(self, 'Save file', expanduser('~')+'/'+formula+'.xyz', '*.xyz;;*.*') try: filename except NameError: pass else: if filename: writeOutput(xyz, filename) self.statusBar.clearMessage() self.statusBar.showMessage('Wrote molecule to '+filename+'.', 5000) # redraw the 3D molecule in GL widget def updateView(self): global r global c global v global vs global elems global nelems data = model2list(self.ZMatModel) try: # create a list with element coordinates v = zmat2xyz(data) except (AssertionError, IndexError, ZMError): pass else: # clear the screen before redraw for item in reversed(self.window.items): self.window.removeItem(item) # create a second coordinate list 'vs' that is centered in the GL view self.atomList = [] if len(v) > 0: shift = np.mean(v, axis=0) vs = np.add(v, -shift) elems = [ 1 + next((i for i, sublist in enumerate(colors) if row[0] in sublist), -1) for row in data ] nelems = len(elems) # define molecule radii and colors r = [] c = [] for i in elems: r.append(elements[i].covalent_radius) c.append(colors[i-1][-1]) # draw atoms for i in range(nelems): addAtom(self.window, i, r, vs, c, fast=self.fast) self.atomList.append([i, self.window.items[-1]]) #print(self.atomList) # draw bonds where appropriate combs = list(itertools.combinations(range(nelems), 2)) bonds = [] for i in combs: bonds.append(addBond(self.window, i[0], i[1], r, vs, c, fast=self.fast)) if self.fast: bondedAtoms = set(filter((None).__ne__, flatten(bonds))) for i in set(range(nelems)) - bondedAtoms: addUnbonded(self.window, i, vs, c) self.atomList[i][1]=self.window.items[-1] #print(self.atomList) for i in self.highList: self.window.addItem(i[1]) for i in self.labelList: self.window.addItem(i) if len(v) > 1: maxDim = float('-inf') for dim in v.T: span = max(dim)-min(dim) if span > maxDim: maxDim = span else: maxDim = 2 self.window.setCameraPosition(distance=maxDim*1.5+1) global index index = 0 def updateFreq(self): global vsShifted, index, r, c index += 1 index = index % len(vsShifted[0]) #print(index) #print(vsShifted[index]) for item in reversed(self.window.items): self.window.removeItem(item) for i in range(nelems): addAtom(self.window, i, r, vsShifted[self.freqIndex, index], c, fast=self.fast) self.atomList.append([i, self.window.items[-1]]) combs = itertools.combinations(range(nelems), 2) bonds = [] for i in combs: bonds.append(addBond(self.window, i[0], i[1], r, vsShifted[self.freqIndex, index], c, fast=self.fast)) if self.fast: bondedAtoms = set(filter((None).__ne__, flatten(bonds))) for i in set(range(nelems)) - bondedAtoms: addUnbonded(self.window, i, vsShifted[self.freqIndex, index], c) self.atomList[i][1]=self.window.items[-1] # detect mouse clicks in GL window and process them def eventFilter(self, obj, event): if obj == self.window: if event.type() == event.MouseButtonPress: itms = obj.itemsAt((event.pos().x()-2, event.pos().y()-2, 4, 4)) if len(itms): self.highlight(obj, [itms[0]]) elif len(self.atomList) == 0: self.build() # also do the default click action return super(MainWidget, self).eventFilter(obj, event) def ZMatCellClicked(self): idxs = sorted(set(idx.row() for idx in self.ZMatTable.selectedIndexes()), reverse=True) itms = [] if self.highList: highIdx = list(np.array(self.highList).T[0]) for idx in idxs: if self.highList and idx in highIdx: itms.append(self.highList[highIdx.index(idx)][1]) elif len(self.atomList) > idx: itms.append(self.atomList[idx][1]) self.highlight(self.window, itms) def freqCellClicked(self): global vsShifted self.timer = QTimer() self.timer.setInterval(30) self.timer.timeout.connect(self.updateFreq) idxs = [ idx.row() for idx in self.freqTable.selectedIndexes() ] if len(idxs) == 1: self.freqIndex = idxs[0] self.timer.stop() self.timer.timeout.connect(self.updateFreq) try: self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) except TypeError: pass self.timer.start() if len(idxs) != 1: self.timer.stop() self.freqTable.clearSelection() self.timer.timeout.disconnect(self.updateFreq) self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.clearUpdateView() def gausclicked(self, item, point): itemdata = item.scatter.data points = [ row[7] for row in itemdata ] idx = points.index(point[0]) for i in range(3): if i == 0: x = [idx] y = [self.scfenergies[idx]] else: x = [idx, idx] y = [self.geovalues[2*i-2][idx], self.geovalues[2*i-1][idx]] plot = self.gaussianPlot.getItem(1, i+1) plot.removeItem(plot.highlight) plot.highlight=plot.plot(x, y, symbol='o', symbolPen='w', symbolBrush=None, pen=None, symbolSize=15, pxMode=True, antialias=True, autoDownsample=False) self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) self.inp = [] self.populateZMatModel() self.inp = xyz2zmat(self.atomcoords[min(idx, len(self.atomcoords)-1)], self.atomsymbols) self.populateZMatModel() self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.updateView() def highlight(self, obj, itms): for itm in itms: idx = next((i for i, sublist in enumerate(self.atomList) if itm in sublist), -1) #print(idx) if idx != -1: addAtom(obj, idx, r, vs, c, opt='highlight', fast=self.fast) self.highList.append([idx, obj.items[-1]]) self.ZMatTable.selectRow(idx) idx = next((i for i, sublist in enumerate(self.highList) if itm in sublist), -1) if idx != -1: obj.removeItem(self.highList[idx][1]) self.highList.pop(idx) self.ZMatTable.clearSelection() self.statusBar.clearMessage() if len(self.highList) > 0: idxs = np.asarray(self.highList).T[0] selected = [] for i in idxs: selected.append(str(i+1)+str(elements[elems[i]])) self.statusBar.showMessage('Selected atoms: '+str(selected), 5000) def buildB(self): try: nelems except NameError: self.build() else: if len(self.highList) <= min(nelems, 3): diff = min(nelems, 3) - len(self.highList) if diff != 0: self.statusBar.clearMessage() self.statusBar.showMessage('Please select '+str(diff)+' more atom(s).') else: self.build() else: self.statusBar.clearMessage() self.statusBar.showMessage('Too many atoms selected.') def build(self): selection = self.periodicTable() row = self.ZMatModel.rowCount() self.addRow() self.ZMatModel.dataChanged.disconnect(self.clearUpdateView) newSymbol = selection[1] newData = [newSymbol] if len(self.highList) >= 1: newBond = round(2.1*gmean([ elements[e].covalent_radius for e in [selection[0], elems[self.highList[0][0]]] ]), 4) newData.append(self.highList[0][0]+1) newData.append(newBond) if len(self.highList) >= 2: newAngle = 109.4712 newData.append(self.highList[1][0]+1) newData.append(newAngle) if len(self.highList) == 3: newDihedral = 120. newData.append(self.highList[2][0]+1) newData.append(newDihedral) for j, cell in enumerate(newData): item = QStandardItem(str(cell)) self.ZMatModel.setItem(row, j, item) self.highList = [] self.ZMatModel.dataChanged.connect(self.clearUpdateView) self.updateView() def measureDistanceB(self): sel = len(self.highList) if sel <= 2: if sel < 2: self.statusBar.clearMessage() self.statusBar.showMessage('Please select '+str(2-sel)+' more atom(s).') else: self.measureDistance() else: self.statusBar.clearMessage() self.statusBar.showMessage('Too many atoms selected.') def measureDistance(self): pts = [] for pt in self.highList: pts.append(vs[pt[0]]) pts = np.array(pts) self.clearHighlights() line = gl.GLLinePlotItem(pos=pts, color=(0., 1., 0., 1.), width=3) self.window.addItem(line) self.labelList.append(line) q = pts[1]-pts[0] dist = round(np.sqrt(np.dot(q, q)), 4) self.window.labelPos.append(np.mean(pts[0:2], axis=0)) self.window.labelText.append(str(dist)) self.statusBar.clearMessage() self.statusBar.showMessage('Measured distance: '+str(dist)+' A.', 3000) def measureAngleB(self): sel = len(self.highList) if sel <= 3: if sel < 3: self.statusBar.clearMessage() self.statusBar.showMessage('Please select '+str(3-sel)+' more atom(s).') else: self.measureAngle() else: self.statusBar.clearMessage() self.statusBar.showMessage('Too many atoms selected.') def measureAngle(self): pts = [] for pt in self.highList: pts.append(vs[pt[0]]) pts = np.array(pts) q = pts[1]-pts[0] r = pts[2]-pts[0] q_u = q / np.sqrt(np.dot(q, q)) r_u = r / np.sqrt(np.dot(r, r)) angle = round(degrees(acos(np.dot(q_u, r_u))), 1) srange = np.array([slerp(q, r, t) for t in np.arange(0.0, 13/12, 1/12)]) self.clearHighlights() for i in range(12): mesh = gl.MeshData(np.array([[0,0,0],srange[i],srange[i+1]])) tri = gl.GLMeshItem(meshdata=mesh, smooth=False, computeNormals=False, color=(0.3, 1., 0.3, 0.5), glOptions=('translucent')) tri.translate(pts[0][0], pts[0][1], pts[0][2]) self.window.addItem(tri) self.labelList.append(tri) self.window.labelPos.append(slerp(q, r, 0.5)+pts[0]) self.window.labelText.append(str(angle)) self.statusBar.clearMessage() self.statusBar.showMessage('Measured angle: '+str(angle)+'°', 3000) def clearLabels(self): self.window.labelPos = [] self.window.labelText = [] self.labelList = [] self.updateView() def clearHighlights(self): for item in reversed(self.highList): self.window.removeItem(item[1]) self.highList = [] self.updateView() def clearUpdateView(self): self.window.labelPos = [] self.window.labelText = [] self.labelList = [] for item in reversed(self.highList): self.window.removeItem(item[1]) self.highList = [] self.updateView() #print(self.highList) def fastDraw(self): if not self.fast: self.fast = True self.updateView() def normalDraw(self): if self.fast: self.fast = False self.updateView() def about(self): QMessageBox.about(self, 'About moldy', 'moldy beta 15. 9. 2015') def aboutQt(self): QMessageBox.aboutQt(self, 'About Qt') def deleteGLwidget(self): self.window.setParent(None) del self.window
def setupUi(self, Qt_CV_MainWindow): Qt_CV_MainWindow.setObjectName("Qt_CV_MainWindow") Qt_CV_MainWindow.resize(1158, 834) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(Qt_CV_MainWindow.sizePolicy().hasHeightForWidth()) Qt_CV_MainWindow.setSizePolicy(sizePolicy) Qt_CV_MainWindow.setMouseTracking(True) Qt_CV_MainWindow.setAcceptDrops(False) self.centralwidget = QtGui.QWidget(Qt_CV_MainWindow) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtGui.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(480, 50, 671, 41)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.file_edit = QtGui.QLineEdit(self.layoutWidget) self.file_edit.setObjectName("file_edit") self.horizontalLayout.addWidget(self.file_edit) self.file_button = QtGui.QPushButton(self.layoutWidget) self.file_button.setObjectName("file_button") self.horizontalLayout.addWidget(self.file_button) self.pic_view = GraphicsLayoutWidget(self.centralwidget) self.pic_view.setGeometry(QtCore.QRect(599, 210, 551, 561)) self.pic_view.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate) self.pic_view.setObjectName("pic_view") self.exec_button = QtGui.QPushButton(self.centralwidget) self.exec_button.setGeometry(QtCore.QRect(840, 10, 81, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.exec_button.sizePolicy().hasHeightForWidth()) self.exec_button.setSizePolicy(sizePolicy) self.exec_button.setObjectName("exec_button") self.file_scrollbar = QtGui.QScrollBar(self.centralwidget) self.file_scrollbar.setGeometry(QtCore.QRect(480, 190, 431, 20)) self.file_scrollbar.setProperty("value", 50) self.file_scrollbar.setOrientation(QtCore.Qt.Horizontal) self.file_scrollbar.setObjectName("file_scrollbar") self.layoutWidget1 = QtGui.QWidget(self.centralwidget) self.layoutWidget1.setGeometry(QtCore.QRect(20, 354, 120, 71)) self.layoutWidget1.setObjectName("layoutWidget1") self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget1) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.label = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(10) self.label.setFont(font) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.label_2 = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(10) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.verticalLayout.addWidget(self.label_2) self.hist_view = PlotWidget(self.centralwidget) self.hist_view.setGeometry(QtCore.QRect(477, 210, 121, 561)) self.hist_view.setObjectName("hist_view") self.line = QtGui.QFrame(self.centralwidget) self.line.setGeometry(QtCore.QRect(0, 300, 471, 16)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName("line") self.color_combo = QtGui.QComboBox(self.centralwidget) self.color_combo.setGeometry(QtCore.QRect(170, 200, 271, 22)) self.color_combo.setObjectName("color_combo") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.eject_edge_or_not = QtGui.QCheckBox(self.centralwidget) self.eject_edge_or_not.setGeometry(QtCore.QRect(20, 620, 171, 19)) self.eject_edge_or_not.setObjectName("eject_edge_or_not") self.label_5 = QtGui.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(20, 200, 81, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.label_6 = QtGui.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(20, 170, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.smooth_combo = QtGui.QComboBox(self.centralwidget) self.smooth_combo.setGeometry(QtCore.QRect(170, 170, 271, 22)) self.smooth_combo.setObjectName("smooth_combo") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.line_2 = QtGui.QFrame(self.centralwidget) self.line_2.setGeometry(QtCore.QRect(0, 440, 471, 16)) self.line_2.setFrameShape(QtGui.QFrame.HLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setObjectName("line_2") self.label_7 = QtGui.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(10, 440, 321, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_7.setFont(font) self.label_7.setTextFormat(QtCore.Qt.RichText) self.label_7.setObjectName("label_7") self.label_8 = QtGui.QLabel(self.centralwidget) self.label_8.setGeometry(QtCore.QRect(10, 320, 131, 31)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_8.setFont(font) self.label_8.setTextFormat(QtCore.Qt.RichText) self.label_8.setObjectName("label_8") self.label_9 = QtGui.QLabel(self.centralwidget) self.label_9.setGeometry(QtCore.QRect(10, 120, 221, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_9.setFont(font) self.label_9.setTextFormat(QtCore.Qt.RichText) self.label_9.setObjectName("label_9") self.line_3 = QtGui.QFrame(self.centralwidget) self.line_3.setGeometry(QtCore.QRect(0, 110, 471, 16)) self.line_3.setFrameShape(QtGui.QFrame.HLine) self.line_3.setFrameShadow(QtGui.QFrame.Sunken) self.line_3.setObjectName("line_3") self.label_10 = QtGui.QLabel(self.centralwidget) self.label_10.setGeometry(QtCore.QRect(10, 0, 221, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_10.setFont(font) self.label_10.setTextFormat(QtCore.Qt.RichText) self.label_10.setObjectName("label_10") self.line_4 = QtGui.QFrame(self.centralwidget) self.line_4.setGeometry(QtCore.QRect(0, 560, 471, 16)) self.line_4.setFrameShape(QtGui.QFrame.HLine) self.line_4.setFrameShadow(QtGui.QFrame.Sunken) self.line_4.setObjectName("line_4") self.label_12 = QtGui.QLabel(self.centralwidget) self.label_12.setGeometry(QtCore.QRect(10, 570, 171, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_12.setFont(font) self.label_12.setTextFormat(QtCore.Qt.RichText) self.label_12.setObjectName("label_12") self.layoutWidget2 = QtGui.QWidget(self.centralwidget) self.layoutWidget2.setGeometry(QtCore.QRect(20, 483, 143, 71)) self.layoutWidget2.setObjectName("layoutWidget2") self.verticalLayout_6 = QtGui.QVBoxLayout(self.layoutWidget2) self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) self.verticalLayout_6.setObjectName("verticalLayout_6") self.label_3 = QtGui.QLabel(self.layoutWidget2) font = QtGui.QFont() font.setPointSize(10) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.verticalLayout_6.addWidget(self.label_3) self.label_4 = QtGui.QLabel(self.layoutWidget2) font = QtGui.QFont() font.setPointSize(10) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.verticalLayout_6.addWidget(self.label_4) self.threshold1_edit = QtGui.QLineEdit(self.centralwidget) self.threshold1_edit.setGeometry(QtCore.QRect(190, 354, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold1_edit.sizePolicy().hasHeightForWidth()) self.threshold1_edit.setSizePolicy(sizePolicy) self.threshold1_edit.setMaxLength(255) self.threshold1_edit.setAlignment(QtCore.Qt.AlignCenter) self.threshold1_edit.setObjectName("threshold1_edit") self.threshold2_edit = QtGui.QLineEdit(self.centralwidget) self.threshold2_edit.setGeometry(QtCore.QRect(190, 394, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold2_edit.sizePolicy().hasHeightForWidth()) self.threshold2_edit.setSizePolicy(sizePolicy) self.threshold2_edit.setMaxLength(254) self.threshold2_edit.setAlignment(QtCore.Qt.AlignCenter) self.threshold2_edit.setObjectName("threshold2_edit") self.threshold1_slider = QtGui.QSlider(self.centralwidget) self.threshold1_slider.setGeometry(QtCore.QRect(260, 359, 179, 19)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold1_slider.sizePolicy().hasHeightForWidth()) self.threshold1_slider.setSizePolicy(sizePolicy) self.threshold1_slider.setMaximum(255) self.threshold1_slider.setProperty("value", 160) self.threshold1_slider.setOrientation(QtCore.Qt.Horizontal) self.threshold1_slider.setObjectName("threshold1_slider") self.threshold2_slider = QtGui.QSlider(self.centralwidget) self.threshold2_slider.setGeometry(QtCore.QRect(260, 400, 179, 19)) self.threshold2_slider.setMaximum(254) self.threshold2_slider.setProperty("value", 80) self.threshold2_slider.setOrientation(QtCore.Qt.Horizontal) self.threshold2_slider.setObjectName("threshold2_slider") self.min_area_edit = QtGui.QLineEdit(self.centralwidget) self.min_area_edit.setGeometry(QtCore.QRect(190, 523, 59, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.min_area_edit.sizePolicy().hasHeightForWidth()) self.min_area_edit.setSizePolicy(sizePolicy) self.min_area_edit.setMaxLength(1000) self.min_area_edit.setAlignment(QtCore.Qt.AlignCenter) self.min_area_edit.setObjectName("min_area_edit") self.max_area_edit = QtGui.QLineEdit(self.centralwidget) self.max_area_edit.setGeometry(QtCore.QRect(190, 483, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.max_area_edit.sizePolicy().hasHeightForWidth()) self.max_area_edit.setSizePolicy(sizePolicy) self.max_area_edit.setAlignment(QtCore.Qt.AlignCenter) self.max_area_edit.setObjectName("max_area_edit") self.max_area_slider = QtGui.QSlider(self.centralwidget) self.max_area_slider.setGeometry(QtCore.QRect(260, 488, 179, 19)) self.max_area_slider.setMaximum(90000) self.max_area_slider.setProperty("value", 5000) self.max_area_slider.setOrientation(QtCore.Qt.Horizontal) self.max_area_slider.setObjectName("max_area_slider") self.min_area_slider = QtGui.QSlider(self.centralwidget) self.min_area_slider.setGeometry(QtCore.QRect(260, 530, 179, 19)) self.min_area_slider.setMaximum(90000) self.min_area_slider.setProperty("value", 120) self.min_area_slider.setOrientation(QtCore.Qt.Horizontal) self.min_area_slider.setObjectName("min_area_slider") self.form_view_or_image = QtGui.QCheckBox(self.centralwidget) self.form_view_or_image.setGeometry(QtCore.QRect(20, 660, 181, 19)) self.form_view_or_image.setObjectName("form_view_or_image") self.size_edit = QtGui.QLineEdit(self.centralwidget) self.size_edit.setGeometry(QtCore.QRect(500, 11, 131, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.size_edit.sizePolicy().hasHeightForWidth()) self.size_edit.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.size_edit.setFont(font) self.size_edit.setMaxLength(1000) self.size_edit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.size_edit.setObjectName("size_edit") self.label_13 = QtGui.QLabel(self.centralwidget) self.label_13.setGeometry(QtCore.QRect(640, 0, 71, 31)) font = QtGui.QFont() font.setPointSize(10) self.label_13.setFont(font) self.label_13.setObjectName("label_13") self.sub_view = GraphicsLayoutWidget(self.centralwidget) self.sub_view.setGeometry(QtCore.QRect(246, 570, 231, 201)) self.sub_view.setObjectName("sub_view") self.EBA_button = QtGui.QPushButton(self.centralwidget) self.EBA_button.setGeometry(QtCore.QRect(930, 10, 81, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.EBA_button.sizePolicy().hasHeightForWidth()) self.EBA_button.setSizePolicy(sizePolicy) self.EBA_button.setObjectName("EBA_button") self.label_14 = QtGui.QLabel(self.centralwidget) self.label_14.setGeometry(QtCore.QRect(20, 730, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_14.setFont(font) self.label_14.setObjectName("label_14") self.extention_combo = QtGui.QComboBox(self.centralwidget) self.extention_combo.setGeometry(QtCore.QRect(100, 730, 61, 22)) self.extention_combo.setObjectName("extention_combo") self.extention_combo.addItem("") self.extention_combo.addItem("") self.extention_combo.addItem("") self.label_15 = QtGui.QLabel(self.centralwidget) self.label_15.setGeometry(QtCore.QRect(20, 230, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_15.setFont(font) self.label_15.setObjectName("label_15") self.smooth_combo_3 = QtGui.QComboBox(self.centralwidget) self.smooth_combo_3.setGeometry(QtCore.QRect(170, 230, 271, 22)) self.smooth_combo_3.setObjectName("smooth_combo_3") self.smooth_combo_3.addItem("") self.smooth_combo_3.addItem("") self.label_16 = QtGui.QLabel(self.centralwidget) self.label_16.setGeometry(QtCore.QRect(20, 260, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_16.setFont(font) self.label_16.setObjectName("label_16") self.layoutWidget_2 = QtGui.QWidget(self.centralwidget) self.layoutWidget_2.setGeometry(QtCore.QRect(170, 250, 271, 41)) self.layoutWidget_2.setObjectName("layoutWidget_2") self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.file_edit_2 = QtGui.QLineEdit(self.layoutWidget_2) self.file_edit_2.setObjectName("file_edit_2") self.horizontalLayout_2.addWidget(self.file_edit_2) self.file_button_2 = QtGui.QPushButton(self.layoutWidget_2) self.file_button_2.setObjectName("file_button_2") self.horizontalLayout_2.addWidget(self.file_button_2) self.label_17 = QtGui.QLabel(self.centralwidget) self.label_17.setGeometry(QtCore.QRect(640, 30, 141, 20)) self.label_17.setObjectName("label_17") self.tableWidget = QtGui.QTableWidget(self.centralwidget) self.tableWidget.setGeometry(QtCore.QRect(480, 100, 671, 81)) self.tableWidget.setTextElideMode(QtCore.Qt.ElideMiddle) self.tableWidget.setRowCount(2) self.tableWidget.setColumnCount(15) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(15) self.tableWidget.setRowCount(2) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 8, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 9, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 10, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 8, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 9, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 10, item) self.tableWidget.horizontalHeader().setDefaultSectionSize(100) self.tableWidget.horizontalHeader().setMinimumSectionSize(21) self.tableWidget.verticalHeader().setDefaultSectionSize(29) self.tableWidget.verticalHeader().setMinimumSectionSize(13) self.label_18 = QtGui.QLabel(self.centralwidget) self.label_18.setGeometry(QtCore.QRect(20, 44, 101, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_18.setFont(font) self.label_18.setObjectName("label_18") self.save_mode_combo = QtGui.QComboBox(self.centralwidget) self.save_mode_combo.setGeometry(QtCore.QRect(170, 40, 271, 22)) self.save_mode_combo.setObjectName("save_mode_combo") self.save_mode_combo.addItem("") self.save_mode_combo.addItem("") self.form_view_or_image_2 = QtGui.QCheckBox(self.centralwidget) self.form_view_or_image_2.setGeometry(QtCore.QRect(20, 700, 141, 19)) self.form_view_or_image_2.setObjectName("form_view_or_image_2") self.label_19 = QtGui.QLabel(self.centralwidget) self.label_19.setGeometry(QtCore.QRect(20, 70, 101, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_19.setFont(font) self.label_19.setObjectName("label_19") self.save_picture_combo = QtGui.QComboBox(self.centralwidget) self.save_picture_combo.setGeometry(QtCore.QRect(170, 70, 271, 22)) self.save_picture_combo.setObjectName("save_picture_combo") self.save_picture_combo.addItem("") self.save_picture_combo.addItem("") self.save_picture_combo.addItem("") Qt_CV_MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(Qt_CV_MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1158, 24)) self.menubar.setObjectName("menubar") self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuTool = QtGui.QMenu(self.menubar) self.menuTool.setObjectName("menuTool") Qt_CV_MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(Qt_CV_MainWindow) self.statusbar.setObjectName("statusbar") Qt_CV_MainWindow.setStatusBar(self.statusbar) self.actionQuit = QtGui.QAction(Qt_CV_MainWindow) self.actionQuit.setObjectName("actionQuit") self.actionSeparate_picture = QtGui.QAction(Qt_CV_MainWindow) self.actionSeparate_picture.setObjectName("actionSeparate_picture") self.menuFile.addAction(self.actionQuit) self.menuTool.addAction(self.actionSeparate_picture) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuTool.menuAction()) self.retranslateUi(Qt_CV_MainWindow) QtCore.QObject.connect(self.actionQuit, QtCore.SIGNAL("triggered()"), Qt_CV_MainWindow.close) QtCore.QMetaObject.connectSlotsByName(Qt_CV_MainWindow)
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(704, 558) MainWindow.setMinimumSize(QtCore.QSize(0, 0)) MainWindow.setStyleSheet(_fromUtf8("\n" "/*\n" " Android Material Dark\n" " COLOR_DARK = #212121 Grey 900\n" " COLOR_MEDIUM = #424242 Grey 800\n" " COLOR_MEDLIGHT = #757575 Grey 600\n" " COLOR_LIGHT = #DDDDDD White\n" " COLOR_ACCENT = #3F51B5 Indigo 500\n" "*/\n" "\n" "* {\n" " background: #212121;\n" " color: #DDDDDD;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QWidget::item:selected {\n" " background: #3F51B5;\n" "}\n" "\n" "QCheckBox, QRadioButton {\n" " border: none;\n" "}\n" "\n" "QRadioButton::indicator, QCheckBox::indicator {\n" " width: 13px;\n" " height: 13px;\n" "}\n" "\n" "QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked {\n" " border: 1px solid #757575;\n" " background: none;\n" "}\n" "\n" "QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover {\n" " border: 1px solid #DDDDDD;\n" "}\n" "\n" "QRadioButton::indicator::checked, QCheckBox::indicator::checked {\n" " border: 1px solid #757575;\n" " background: #757575;\n" "}\n" "\n" "QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover {\n" " border: 1px solid #DDDDDD;\n" " background: #DDDDDD;\n" "}\n" "\n" "QGroupBox {\n" " margin-top: 6px;\n" "}\n" "\n" "QGroupBox::title {\n" " top: -7px;\n" " left: 7px;\n" "}\n" "\n" "QScrollBar {\n" " border: 1px solid #757575;\n" " background: #212121;\n" "}\n" "\n" "QScrollBar:horizontal {\n" " height: 15px;\n" " margin: 0px 0px 0px 32px;\n" "}\n" "\n" "QScrollBar:vertical {\n" " width: 15px;\n" " margin: 32px 0px 0px 0px;\n" "}\n" "\n" "QScrollBar::handle {\n" " background: #424242;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QScrollBar::handle:horizontal {\n" " border-width: 0px 1px 0px 1px;\n" "}\n" "\n" "QScrollBar::handle:vertical {\n" " border-width: 1px 0px 1px 0px;\n" "}\n" "\n" "QScrollBar::handle:horizontal {\n" " min-width: 20px;\n" "}\n" "\n" "QScrollBar::handle:vertical {\n" " min-height: 20px;\n" "}\n" "\n" "QScrollBar::add-line, QScrollBar::sub-line {\n" " background:#424242;\n" " border: 1px solid #757575;\n" " subcontrol-origin: margin;\n" "}\n" "\n" "QScrollBar::add-line {\n" " position: absolute;\n" "}\n" "\n" "QScrollBar::add-line:horizontal {\n" " width: 15px;\n" " subcontrol-position: left;\n" " left: 15px;\n" "}\n" "\n" "QScrollBar::add-line:vertical {\n" " height: 15px;\n" " subcontrol-position: top;\n" " top: 15px;\n" "}\n" "\n" "QScrollBar::sub-line:horizontal {\n" " width: 15px;\n" " subcontrol-position: top left;\n" "}\n" "\n" "QScrollBar::sub-line:vertical {\n" " height: 15px;\n" " subcontrol-position: top;\n" "}\n" "\n" "QScrollBar:left-arrow, QScrollBar::right-arrow, QScrollBar::up-arrow, QScrollBar::down-arrow {\n" " border: 1px solid #757575;\n" " width: 3px;\n" " height: 3px;\n" "}\n" "\n" "QScrollBar::add-page, QScrollBar::sub-page {\n" " background: none;\n" "}\n" "\n" "QAbstractButton:hover {\n" " background: #424242;\n" "}\n" "\n" "QAbstractButton:pressed {\n" " background: #757575;\n" "}\n" "\n" "QAbstractItemView {\n" " show-decoration-selected: 1;\n" " selection-background-color: #3F51B5;\n" " selection-color: #DDDDDD;\n" " alternate-background-color: #424242;\n" "}\n" "\n" "QHeaderView {\n" " border: 1px solid #757575;\n" "}\n" "\n" "QHeaderView::section {\n" " background: #212121;\n" " border: 1px solid #757575;\n" " padding: 4px;\n" "}\n" "\n" "QHeaderView::section:selected, QHeaderView::section::checked {\n" " background: #424242;\n" "}\n" "\n" "QTableView {\n" " gridline-color: #757575;\n" "}\n" "\n" "QTabBar {\n" " margin-left: 2px;\n" "}\n" "\n" "QTabBar::tab {\n" " border-radius: 0px;\n" " padding: 4px;\n" " margin: 4px;\n" "}\n" "\n" "QTabBar::tab:selected {\n" " background: #424242;\n" "}\n" "\n" "QComboBox::down-arrow {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QComboBox::drop-down {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QComboBox::down-arrow {\n" " width: 3px;\n" " height: 3px;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QAbstractSpinBox {\n" " padding-right: 15px;\n" "}\n" "\n" "QAbstractSpinBox::up-button, QAbstractSpinBox::down-button {\n" " border: 1px solid #757575;\n" " background: #424242;\n" " subcontrol-origin: border;\n" "}\n" "\n" "QAbstractSpinBox::up-arrow, QAbstractSpinBox::down-arrow {\n" " width: 3px;\n" " height: 3px;\n" " border: 1px solid #757575;\n" "}\n" "\n" "QSlider {\n" " border: none;\n" "}\n" "\n" "QSlider::groove:horizontal {\n" " height: 5px;\n" " margin: 4px 0px 4px 0px;\n" "}\n" "\n" "QSlider::groove:vertical {\n" " width: 5px;\n" " margin: 0px 4px 0px 4px;\n" "}\n" "\n" "QSlider::handle {\n" " border: 1px solid #757575;\n" " background: #424242;\n" "}\n" "\n" "QSlider::handle:horizontal {\n" " width: 15px;\n" " margin: -4px 0px -4px 0px;\n" "}\n" "\n" "QSlider::handle:vertical {\n" " height: 15px;\n" " margin: 0px -4px 0px -4px;\n" "}\n" "\n" "QSlider::add-page:vertical, QSlider::sub-page:horizontal {\n" " background: #3F51B5;\n" "}\n" "\n" "QSlider::sub-page:vertical, QSlider::add-page:horizontal {\n" " background: #424242;\n" "}\n" "\n" "QLabel {\n" " border: none;\n" "}\n" "\n" "QProgressBar {\n" " text-align: center;\n" "}\n" "\n" "QProgressBar::chunk {\n" " width: 1px;\n" " background-color: #3F51B5;\n" "}\n" "\n" "QMenu::separator {\n" " background: #424242;\n" "}\n" "\n" "QStatusBar {\n" " border: 1px;\n" " color: #3F51B5;\n" "}")) MainWindow.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.Layout_controls2 = QtGui.QGridLayout() self.Layout_controls2.setObjectName(_fromUtf8("Layout_controls2")) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.Layout_controls2.addItem(spacerItem, 0, 1, 1, 1) self.chBox_export = QtGui.QCheckBox(self.centralwidget) self.chBox_export.setObjectName(_fromUtf8("chBox_export")) self.Layout_controls2.addWidget(self.chBox_export, 0, 0, 1, 1) self.gridLayout.addLayout(self.Layout_controls2, 9, 1, 1, 1) self.Layout_controls = QtGui.QGridLayout() self.Layout_controls.setObjectName(_fromUtf8("Layout_controls")) self.cBox_Speed = QtGui.QComboBox(self.centralwidget) self.cBox_Speed.setObjectName(_fromUtf8("cBox_Speed")) self.Layout_controls.addWidget(self.cBox_Speed, 0, 1, 1, 1) self.cBox_Port = QtGui.QComboBox(self.centralwidget) self.cBox_Port.setObjectName(_fromUtf8("cBox_Port")) self.Layout_controls.addWidget(self.cBox_Port, 0, 0, 1, 1) self.pButton_Start = QtGui.QPushButton(self.centralwidget) self.pButton_Start.setMinimumSize(QtCore.QSize(0, 0)) self.pButton_Start.setObjectName(_fromUtf8("pButton_Start")) self.Layout_controls.addWidget(self.pButton_Start, 1, 0, 1, 1) self.pButton_Stop = QtGui.QPushButton(self.centralwidget) self.pButton_Stop.setObjectName(_fromUtf8("pButton_Stop")) self.Layout_controls.addWidget(self.pButton_Stop, 1, 1, 1, 1) self.gridLayout.addLayout(self.Layout_controls, 7, 0, 1, 2) self.Layout_graphs = QtGui.QGridLayout() self.Layout_graphs.setObjectName(_fromUtf8("Layout_graphs")) self.plt = GraphicsLayoutWidget(self.centralwidget) self.plt.setAutoFillBackground(False) self.plt.setStyleSheet(_fromUtf8("border: 0px;")) self.plt.setFrameShape(QtGui.QFrame.StyledPanel) self.plt.setFrameShadow(QtGui.QFrame.Plain) self.plt.setLineWidth(0) self.plt.setObjectName(_fromUtf8("plt")) self.Layout_graphs.addWidget(self.plt, 0, 0, 1, 1) self.gridLayout.addLayout(self.Layout_graphs, 2, 1, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setSizeGripEnabled(False) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, SliceWidget): SliceWidget.setObjectName("SliceWidget") SliceWidget.resize(554, 642) self.gridLayout = QtWidgets.QGridLayout(SliceWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setSpacing(0) self.gridLayout.setObjectName("gridLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.graphicsView = GraphicsLayoutWidget(SliceWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth(self.graphicsView.sizePolicy().hasHeightForWidth()) self.graphicsView.setSizePolicy(sizePolicy) self.graphicsView.setObjectName("graphicsView") self.verticalLayout.addWidget(self.graphicsView) self.controlsWidget = QtWidgets.QWidget(SliceWidget) self.controlsWidget.setMaximumSize(QtCore.QSize(16777215, 25)) self.controlsWidget.setObjectName("controlsWidget") self.layout_index_slider = QtWidgets.QHBoxLayout(self.controlsWidget) self.layout_index_slider.setContentsMargins(20, 2, 15, 2) self.layout_index_slider.setObjectName("layout_index_slider") self.labelImageSeriesNumber = QtWidgets.QLabel(self.controlsWidget) self.labelImageSeriesNumber.setText("") self.labelImageSeriesNumber.setObjectName("labelImageSeriesNumber") self.layout_index_slider.addWidget(self.labelImageSeriesNumber) self.seriesSlider = QtWidgets.QSlider(self.controlsWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.seriesSlider.sizePolicy().hasHeightForWidth()) self.seriesSlider.setSizePolicy(sizePolicy) self.seriesSlider.setMinimumSize(QtCore.QSize(200, 0)) self.seriesSlider.setOrientation(QtCore.Qt.Horizontal) self.seriesSlider.setInvertedAppearance(False) self.seriesSlider.setInvertedControls(False) self.seriesSlider.setTickPosition(QtWidgets.QSlider.TicksAbove) self.seriesSlider.setTickInterval(1) self.seriesSlider.setObjectName("seriesSlider") self.layout_index_slider.addWidget(self.seriesSlider) self.labelSliceNumber = QtWidgets.QLabel(self.controlsWidget) self.labelSliceNumber.setText("") self.labelSliceNumber.setObjectName("labelSliceNumber") self.layout_index_slider.addWidget(self.labelSliceNumber) self.sliderSlice = QtWidgets.QSlider(self.controlsWidget) self.sliderSlice.setMaximumSize(QtCore.QSize(16777215, 10)) self.sliderSlice.setOrientation(QtCore.Qt.Horizontal) self.sliderSlice.setTickInterval(0) self.sliderSlice.setObjectName("sliderSlice") self.layout_index_slider.addWidget(self.sliderSlice) self.pushButtonScrollLeft = QtWidgets.QPushButton(self.controlsWidget) self.pushButtonScrollLeft.setStyleSheet("border:none") self.pushButtonScrollLeft.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/scroll_arrow_left.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButtonScrollLeft.setIcon(icon) self.pushButtonScrollLeft.setIconSize(QtCore.QSize(15, 15)) self.pushButtonScrollLeft.setObjectName("pushButtonScrollLeft") self.layout_index_slider.addWidget(self.pushButtonScrollLeft) self.pushButtonScrollRight = QtWidgets.QPushButton(self.controlsWidget) self.pushButtonScrollRight.setStyleSheet("border:none") self.pushButtonScrollRight.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/scroll_arrow_right.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon1.addPixmap(QtGui.QPixmap(":/icons/scroll_arrow_right_active.png"), QtGui.QIcon.Active, QtGui.QIcon.On) self.pushButtonScrollRight.setIcon(icon1) self.pushButtonScrollRight.setIconSize(QtCore.QSize(15, 15)) self.pushButtonScrollRight.setObjectName("pushButtonScrollRight") self.layout_index_slider.addWidget(self.pushButtonScrollRight) self.pushButtonManageVolumes = QtWidgets.QPushButton(self.controlsWidget) self.pushButtonManageVolumes.setStyleSheet("border:none") self.pushButtonManageVolumes.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButtonManageVolumes.setIcon(icon2) self.pushButtonManageVolumes.setIconSize(QtCore.QSize(15, 15)) self.pushButtonManageVolumes.setFlat(False) self.pushButtonManageVolumes.setObjectName("pushButtonManageVolumes") self.layout_index_slider.addWidget(self.pushButtonManageVolumes) self.verticalLayout.addWidget(self.controlsWidget) self.horizontalLayout.addLayout(self.verticalLayout) self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1) self.retranslateUi(SliceWidget) QtCore.QMetaObject.connectSlotsByName(SliceWidget)
class ScopeWindow(QtGui.QMainWindow): def __init__(self, parent=None, maxepisodes=10): super(ScopeWindow, self).__init__(parent) self.episodes = None self.index = [] # set a limit on how many episodes to memorize self.maxepisodes = maxepisodes # Record state of the scope window self.isclosed = True # This keeps track of the indices of which episodes are loaded self._loaded_array = [] # Default options self.options = {'colorfy':False,\ 'layout':[['Voltage', 'A', 0, 0], ['Current', 'A', 1, 0]]} # layout = [Stream, Channel, row, col] # Keep track of which colors have been used self._usedColors = [] # Set up the GUI window self.setupUi(self) self.setDisplayTheme() def setupUi(self, MainWindow): """This function is converted from the .ui file from the designer""" MainWindow.setObjectName(_fromUtf8("Scope Window")) MainWindow.resize(1200, 600) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) # Graphics layout self.horizontalLayout = QtGui.QHBoxLayout(self.centralwidget) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.graphicsLayout = QtGui.QHBoxLayout() self.graphicsLayout.setObjectName(_fromUtf8("graphicsLayout")) self.graphicsView = GraphicsLayoutWidget(self.centralwidget) self.graphicsView.setObjectName(_fromUtf8("graphicsView")) self.graphicsLayout.addWidget(self.graphicsView) self.horizontalLayout.addLayout(self.graphicsLayout) # Side panel layout: initialize as a list view self.sideDockPanel = QtGui.QDockWidget("Settings", self) self.sideDockPanel.setAllowedAreas(QtCore.Qt.LeftDockWidgetArea | QtCore.Qt.RightDockWidgetArea) self.sideDockPanel.setObjectName(_fromUtf8("sideDockPanel")) self.sideDockPanel.hide() # self.sidePanelLayout = QtGui.QHBoxLayout() # self.sidePanelLayout.setObjectName(_fromUtf8("sidePanelLayout")) self.listView = QtGui.QListView(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.listView.sizePolicy().hasHeightForWidth()) self.listView.setSizePolicy(sizePolicy) self.listView.setObjectName(_fromUtf8("listView")) self.sideDockPanel.setWidget(self.listView) self.addDockWidget(QtCore.Qt.RightDockWidgetArea, self.sideDockPanel) # self.sidePanelLayout.addWidget(self.listView) # self.horizontalLayout.addLayout(self.sidePanelLayout) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1225, 26)) self.menubar.setObjectName(_fromUtf8("menubar")) self.setMenuBarItems() MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) # ---------------- Additional main window behaviors ----------------------- def setMenuBarItems(self): # File Menu fileMenu = self.menubar.addMenu('&File') # File: Export exportMenu = fileMenu.addMenu('&Export') exportWithScaleBarAction = QtGui.QAction(QtGui.QIcon('export.png'), 'Export with scalebar', self) exportWithScaleBarAction.setShortcut('Ctrl+Alt+E') exportWithScaleBarAction.setStatusTip('Export with scalebar') exportWithScaleBarAction.triggered.connect(self.printme) exportMenu.addAction(exportWithScaleBarAction) # View Menu viewMenu = self.menubar.addMenu('&View') # View: show settings viewMenu.addAction(self.sideDockPanel.toggleViewAction()) # View: Colorfy colorfyAction = QtGui.QAction('Color code traces', self, checkable=True, checked=False) colorfyAction.setShortcut('Ctrl+Alt+C') colorfyAction.setStatusTip('Toggle between color coded traces and black traces') colorfyAction.triggered.connect(lambda: self.toggleTraceColors(colorfyAction.isChecked())) viewMenu.addAction(colorfyAction) def printme(self): print('doing stuff') def closeEvent(self, event): """Override default behavior when closing the main window""" self.isclosed = True def retranslateUi(self, MainWindow): """Set window title and other miscellaneous""" MainWindow.setWindowTitle(_translate(__version__, __version__, None)) # ------------- Episode plotting utilities -------------------------------- def updateEpisodes(self, episodes=None, index=[]): """First compare episodes with self.episodes and index with self.index Only update the difference in the two sets""" if not isinstance(episodes, dict) or not isinstance(self.episodes, dict): bool_old_episode = False else: bool_old_episode = self.episodes['Name'] == episodes['Name'] index_insert = list(set(index) - set(self.index)) index_remove = list(set(self.index) - set(index)) if bool_old_episode and not index_insert and not index_remove: # same episode, same index return elif not bool_old_episode: # new item / cell index_insert = index index_remove = [] self.episodes = episodes self.episodes['Data'] = [[]] * len(self.episodes['Dirs']) self._loaded_array = [] # update index self.index += index_insert for a in index_remove: self.index.remove(a) # Insert new episodes for i in index_insert: self.episodes['Data'][i] = NeuroData(dataFile=self.episodes['Dirs'][i], old=True, infoOnly=False, getTime=True) self._loaded_array.append(i) # call self.drawPlot self.drawEpisode(self.episodes['Data'][i], info=(self.episodes['Name'], self.episodes['Epi'][i])) # Remove episodes for j in index_remove: self.removeEpisode(info=(self.episodes['Name'], self.episodes['Epi'][j])) def drawEpisode(self, zData, info=None, pen=None): """Draw plot from 1 zData""" # Set up pen color if self.options['colorfy']: availableColors = list(colors) for c in self._usedColors: availableColors.remove(c) pen = availableColors[0] self._usedColors.append(pen) elif pen is None: pen = self.options['theme']['pen'] # Loop through all the subplots for n, l in enumerate(self.options['layout']): # get viewbox p = self.graphicsView.getItem(row=l[2], col=l[3]) if p is None: p = self.graphicsView.addPlot(row=l[2], col=l[3]) # Make sure later viewboxes are linked in time domain if n>0: p.setXLink(self.graphicsView.getItem(row=0, col=0)) # put an identifier on the trace if isinstance(info, tuple): pname = info[0]+'.'+info[1]+'.'+l[0]+'.'+l[1] else: pname = None p.plot(x=zData.Time, y=getattr(zData, l[0])[l[1]], pen=pen, name=pname) def removeEpisode(self, info=None): if not info: return for l in self.options['layout']: # get viewbox p1 = self.graphicsView.getItem(row=l[2], col=l[3]) pname = info[0]+'.'+info[1]+'.'+l[0]+'.'+l[1] remove_index = [] for k, a in enumerate(p1.listDataItems()): if a.name() == pname: # matching p1.removeItem(a) remove_index.append(k) # recover the colors if remove_index and self.options['colorfy']: for r in remove_index: del self._usedColors[r] # ----------------------- Layout utilities -------------------------------- def setLayout(self): return # ----------------------- Option utilities ---------------------------------- def toggleTraceColors(self, checked): """Change traces from black to color coded""" # if already painted in color, paint in default pen again if not checked: self.options['colorfy'] = False self._usedColors = [] # reset used colors else: self.options['colorfy'] = True for l in self.options['layout']: # get viewbox p = self.graphicsView.getItem(row=l[2], col=l[3]) for k, a in enumerate(p.listDataItems()): if not checked: pen = self.options['theme']['pen'] else: pen = colors[k%len(colors)] if pen not in self._usedColors: self._usedColors.append(pen) pen = pg.mkPen(pen) a.setPen(pen) def setDisplayTheme(self, theme='whiteboard'): self.options['theme'] = {'blackboard':{'background':'k', 'pen':'w'}, \ 'whiteboard':{'background':'w', 'pen':'k'}\ }.get(theme) self.graphicsView.setBackground(self.options['theme']['background'])
class Ui_Qt_CV_MainWindow(object): def setupUi(self, Qt_CV_MainWindow): Qt_CV_MainWindow.setObjectName("Qt_CV_MainWindow") Qt_CV_MainWindow.resize(1158, 834) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(Qt_CV_MainWindow.sizePolicy().hasHeightForWidth()) Qt_CV_MainWindow.setSizePolicy(sizePolicy) Qt_CV_MainWindow.setMouseTracking(True) Qt_CV_MainWindow.setAcceptDrops(False) self.centralwidget = QtGui.QWidget(Qt_CV_MainWindow) self.centralwidget.setObjectName("centralwidget") self.layoutWidget = QtGui.QWidget(self.centralwidget) self.layoutWidget.setGeometry(QtCore.QRect(480, 50, 671, 41)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout = QtGui.QHBoxLayout(self.layoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.file_edit = QtGui.QLineEdit(self.layoutWidget) self.file_edit.setObjectName("file_edit") self.horizontalLayout.addWidget(self.file_edit) self.file_button = QtGui.QPushButton(self.layoutWidget) self.file_button.setObjectName("file_button") self.horizontalLayout.addWidget(self.file_button) self.pic_view = GraphicsLayoutWidget(self.centralwidget) self.pic_view.setGeometry(QtCore.QRect(599, 210, 551, 561)) self.pic_view.setViewportUpdateMode(QtGui.QGraphicsView.FullViewportUpdate) self.pic_view.setObjectName("pic_view") self.exec_button = QtGui.QPushButton(self.centralwidget) self.exec_button.setGeometry(QtCore.QRect(840, 10, 81, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.exec_button.sizePolicy().hasHeightForWidth()) self.exec_button.setSizePolicy(sizePolicy) self.exec_button.setObjectName("exec_button") self.file_scrollbar = QtGui.QScrollBar(self.centralwidget) self.file_scrollbar.setGeometry(QtCore.QRect(480, 190, 431, 20)) self.file_scrollbar.setProperty("value", 50) self.file_scrollbar.setOrientation(QtCore.Qt.Horizontal) self.file_scrollbar.setObjectName("file_scrollbar") self.layoutWidget1 = QtGui.QWidget(self.centralwidget) self.layoutWidget1.setGeometry(QtCore.QRect(20, 354, 120, 71)) self.layoutWidget1.setObjectName("layoutWidget1") self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget1) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.label = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(10) self.label.setFont(font) self.label.setObjectName("label") self.verticalLayout.addWidget(self.label) self.label_2 = QtGui.QLabel(self.layoutWidget1) font = QtGui.QFont() font.setPointSize(10) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.verticalLayout.addWidget(self.label_2) self.hist_view = PlotWidget(self.centralwidget) self.hist_view.setGeometry(QtCore.QRect(477, 210, 121, 561)) self.hist_view.setObjectName("hist_view") self.line = QtGui.QFrame(self.centralwidget) self.line.setGeometry(QtCore.QRect(0, 300, 471, 16)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName("line") self.color_combo = QtGui.QComboBox(self.centralwidget) self.color_combo.setGeometry(QtCore.QRect(170, 200, 271, 22)) self.color_combo.setObjectName("color_combo") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.color_combo.addItem("") self.eject_edge_or_not = QtGui.QCheckBox(self.centralwidget) self.eject_edge_or_not.setGeometry(QtCore.QRect(20, 620, 171, 19)) self.eject_edge_or_not.setObjectName("eject_edge_or_not") self.label_5 = QtGui.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(20, 200, 81, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_5.setFont(font) self.label_5.setObjectName("label_5") self.label_6 = QtGui.QLabel(self.centralwidget) self.label_6.setGeometry(QtCore.QRect(20, 170, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_6.setFont(font) self.label_6.setObjectName("label_6") self.smooth_combo = QtGui.QComboBox(self.centralwidget) self.smooth_combo.setGeometry(QtCore.QRect(170, 170, 271, 22)) self.smooth_combo.setObjectName("smooth_combo") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.smooth_combo.addItem("") self.line_2 = QtGui.QFrame(self.centralwidget) self.line_2.setGeometry(QtCore.QRect(0, 440, 471, 16)) self.line_2.setFrameShape(QtGui.QFrame.HLine) self.line_2.setFrameShadow(QtGui.QFrame.Sunken) self.line_2.setObjectName("line_2") self.label_7 = QtGui.QLabel(self.centralwidget) self.label_7.setGeometry(QtCore.QRect(10, 440, 321, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_7.setFont(font) self.label_7.setTextFormat(QtCore.Qt.RichText) self.label_7.setObjectName("label_7") self.label_8 = QtGui.QLabel(self.centralwidget) self.label_8.setGeometry(QtCore.QRect(10, 320, 131, 31)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_8.setFont(font) self.label_8.setTextFormat(QtCore.Qt.RichText) self.label_8.setObjectName("label_8") self.label_9 = QtGui.QLabel(self.centralwidget) self.label_9.setGeometry(QtCore.QRect(10, 120, 221, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_9.setFont(font) self.label_9.setTextFormat(QtCore.Qt.RichText) self.label_9.setObjectName("label_9") self.line_3 = QtGui.QFrame(self.centralwidget) self.line_3.setGeometry(QtCore.QRect(0, 110, 471, 16)) self.line_3.setFrameShape(QtGui.QFrame.HLine) self.line_3.setFrameShadow(QtGui.QFrame.Sunken) self.line_3.setObjectName("line_3") self.label_10 = QtGui.QLabel(self.centralwidget) self.label_10.setGeometry(QtCore.QRect(10, 0, 221, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_10.setFont(font) self.label_10.setTextFormat(QtCore.Qt.RichText) self.label_10.setObjectName("label_10") self.line_4 = QtGui.QFrame(self.centralwidget) self.line_4.setGeometry(QtCore.QRect(0, 560, 471, 16)) self.line_4.setFrameShape(QtGui.QFrame.HLine) self.line_4.setFrameShadow(QtGui.QFrame.Sunken) self.line_4.setObjectName("line_4") self.label_12 = QtGui.QLabel(self.centralwidget) self.label_12.setGeometry(QtCore.QRect(10, 570, 171, 46)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setWeight(75) font.setUnderline(True) font.setBold(True) self.label_12.setFont(font) self.label_12.setTextFormat(QtCore.Qt.RichText) self.label_12.setObjectName("label_12") self.layoutWidget2 = QtGui.QWidget(self.centralwidget) self.layoutWidget2.setGeometry(QtCore.QRect(20, 483, 143, 71)) self.layoutWidget2.setObjectName("layoutWidget2") self.verticalLayout_6 = QtGui.QVBoxLayout(self.layoutWidget2) self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) self.verticalLayout_6.setObjectName("verticalLayout_6") self.label_3 = QtGui.QLabel(self.layoutWidget2) font = QtGui.QFont() font.setPointSize(10) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.verticalLayout_6.addWidget(self.label_3) self.label_4 = QtGui.QLabel(self.layoutWidget2) font = QtGui.QFont() font.setPointSize(10) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.verticalLayout_6.addWidget(self.label_4) self.threshold1_edit = QtGui.QLineEdit(self.centralwidget) self.threshold1_edit.setGeometry(QtCore.QRect(190, 354, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold1_edit.sizePolicy().hasHeightForWidth()) self.threshold1_edit.setSizePolicy(sizePolicy) self.threshold1_edit.setMaxLength(255) self.threshold1_edit.setAlignment(QtCore.Qt.AlignCenter) self.threshold1_edit.setObjectName("threshold1_edit") self.threshold2_edit = QtGui.QLineEdit(self.centralwidget) self.threshold2_edit.setGeometry(QtCore.QRect(190, 394, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold2_edit.sizePolicy().hasHeightForWidth()) self.threshold2_edit.setSizePolicy(sizePolicy) self.threshold2_edit.setMaxLength(254) self.threshold2_edit.setAlignment(QtCore.Qt.AlignCenter) self.threshold2_edit.setObjectName("threshold2_edit") self.threshold1_slider = QtGui.QSlider(self.centralwidget) self.threshold1_slider.setGeometry(QtCore.QRect(260, 359, 179, 19)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.threshold1_slider.sizePolicy().hasHeightForWidth()) self.threshold1_slider.setSizePolicy(sizePolicy) self.threshold1_slider.setMaximum(255) self.threshold1_slider.setProperty("value", 160) self.threshold1_slider.setOrientation(QtCore.Qt.Horizontal) self.threshold1_slider.setObjectName("threshold1_slider") self.threshold2_slider = QtGui.QSlider(self.centralwidget) self.threshold2_slider.setGeometry(QtCore.QRect(260, 400, 179, 19)) self.threshold2_slider.setMaximum(254) self.threshold2_slider.setProperty("value", 80) self.threshold2_slider.setOrientation(QtCore.Qt.Horizontal) self.threshold2_slider.setObjectName("threshold2_slider") self.min_area_edit = QtGui.QLineEdit(self.centralwidget) self.min_area_edit.setGeometry(QtCore.QRect(190, 523, 59, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.min_area_edit.sizePolicy().hasHeightForWidth()) self.min_area_edit.setSizePolicy(sizePolicy) self.min_area_edit.setMaxLength(1000) self.min_area_edit.setAlignment(QtCore.Qt.AlignCenter) self.min_area_edit.setObjectName("min_area_edit") self.max_area_edit = QtGui.QLineEdit(self.centralwidget) self.max_area_edit.setGeometry(QtCore.QRect(190, 483, 61, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.max_area_edit.sizePolicy().hasHeightForWidth()) self.max_area_edit.setSizePolicy(sizePolicy) self.max_area_edit.setAlignment(QtCore.Qt.AlignCenter) self.max_area_edit.setObjectName("max_area_edit") self.max_area_slider = QtGui.QSlider(self.centralwidget) self.max_area_slider.setGeometry(QtCore.QRect(260, 488, 179, 19)) self.max_area_slider.setMaximum(90000) self.max_area_slider.setProperty("value", 5000) self.max_area_slider.setOrientation(QtCore.Qt.Horizontal) self.max_area_slider.setObjectName("max_area_slider") self.min_area_slider = QtGui.QSlider(self.centralwidget) self.min_area_slider.setGeometry(QtCore.QRect(260, 530, 179, 19)) self.min_area_slider.setMaximum(90000) self.min_area_slider.setProperty("value", 120) self.min_area_slider.setOrientation(QtCore.Qt.Horizontal) self.min_area_slider.setObjectName("min_area_slider") self.form_view_or_image = QtGui.QCheckBox(self.centralwidget) self.form_view_or_image.setGeometry(QtCore.QRect(20, 660, 181, 19)) self.form_view_or_image.setObjectName("form_view_or_image") self.size_edit = QtGui.QLineEdit(self.centralwidget) self.size_edit.setGeometry(QtCore.QRect(500, 11, 131, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.size_edit.sizePolicy().hasHeightForWidth()) self.size_edit.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) self.size_edit.setFont(font) self.size_edit.setMaxLength(1000) self.size_edit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.size_edit.setObjectName("size_edit") self.label_13 = QtGui.QLabel(self.centralwidget) self.label_13.setGeometry(QtCore.QRect(640, 0, 71, 31)) font = QtGui.QFont() font.setPointSize(10) self.label_13.setFont(font) self.label_13.setObjectName("label_13") self.sub_view = GraphicsLayoutWidget(self.centralwidget) self.sub_view.setGeometry(QtCore.QRect(246, 570, 231, 201)) self.sub_view.setObjectName("sub_view") self.EBA_button = QtGui.QPushButton(self.centralwidget) self.EBA_button.setGeometry(QtCore.QRect(930, 10, 81, 31)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.EBA_button.sizePolicy().hasHeightForWidth()) self.EBA_button.setSizePolicy(sizePolicy) self.EBA_button.setObjectName("EBA_button") self.label_14 = QtGui.QLabel(self.centralwidget) self.label_14.setGeometry(QtCore.QRect(20, 730, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_14.setFont(font) self.label_14.setObjectName("label_14") self.extention_combo = QtGui.QComboBox(self.centralwidget) self.extention_combo.setGeometry(QtCore.QRect(100, 730, 61, 22)) self.extention_combo.setObjectName("extention_combo") self.extention_combo.addItem("") self.extention_combo.addItem("") self.extention_combo.addItem("") self.label_15 = QtGui.QLabel(self.centralwidget) self.label_15.setGeometry(QtCore.QRect(20, 230, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_15.setFont(font) self.label_15.setObjectName("label_15") self.smooth_combo_3 = QtGui.QComboBox(self.centralwidget) self.smooth_combo_3.setGeometry(QtCore.QRect(170, 230, 271, 22)) self.smooth_combo_3.setObjectName("smooth_combo_3") self.smooth_combo_3.addItem("") self.smooth_combo_3.addItem("") self.label_16 = QtGui.QLabel(self.centralwidget) self.label_16.setGeometry(QtCore.QRect(20, 260, 81, 21)) font = QtGui.QFont() font.setPointSize(10) self.label_16.setFont(font) self.label_16.setObjectName("label_16") self.layoutWidget_2 = QtGui.QWidget(self.centralwidget) self.layoutWidget_2.setGeometry(QtCore.QRect(170, 250, 271, 41)) self.layoutWidget_2.setObjectName("layoutWidget_2") self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.file_edit_2 = QtGui.QLineEdit(self.layoutWidget_2) self.file_edit_2.setObjectName("file_edit_2") self.horizontalLayout_2.addWidget(self.file_edit_2) self.file_button_2 = QtGui.QPushButton(self.layoutWidget_2) self.file_button_2.setObjectName("file_button_2") self.horizontalLayout_2.addWidget(self.file_button_2) self.label_17 = QtGui.QLabel(self.centralwidget) self.label_17.setGeometry(QtCore.QRect(640, 30, 141, 20)) self.label_17.setObjectName("label_17") self.tableWidget = QtGui.QTableWidget(self.centralwidget) self.tableWidget.setGeometry(QtCore.QRect(480, 100, 671, 81)) self.tableWidget.setTextElideMode(QtCore.Qt.ElideMiddle) self.tableWidget.setRowCount(2) self.tableWidget.setColumnCount(15) self.tableWidget.setObjectName("tableWidget") self.tableWidget.setColumnCount(15) self.tableWidget.setRowCount(2) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(0, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(1, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(2, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(3, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(4, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(5, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(6, item) item = QtGui.QTableWidgetItem() self.tableWidget.setHorizontalHeaderItem(7, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 8, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 9, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(0, 10, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 8, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 9, item) item = QtGui.QTableWidgetItem() self.tableWidget.setItem(1, 10, item) self.tableWidget.horizontalHeader().setDefaultSectionSize(100) self.tableWidget.horizontalHeader().setMinimumSectionSize(21) self.tableWidget.verticalHeader().setDefaultSectionSize(29) self.tableWidget.verticalHeader().setMinimumSectionSize(13) self.label_18 = QtGui.QLabel(self.centralwidget) self.label_18.setGeometry(QtCore.QRect(20, 44, 101, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_18.setFont(font) self.label_18.setObjectName("label_18") self.save_mode_combo = QtGui.QComboBox(self.centralwidget) self.save_mode_combo.setGeometry(QtCore.QRect(170, 40, 271, 22)) self.save_mode_combo.setObjectName("save_mode_combo") self.save_mode_combo.addItem("") self.save_mode_combo.addItem("") self.form_view_or_image_2 = QtGui.QCheckBox(self.centralwidget) self.form_view_or_image_2.setGeometry(QtCore.QRect(20, 700, 141, 19)) self.form_view_or_image_2.setObjectName("form_view_or_image_2") self.label_19 = QtGui.QLabel(self.centralwidget) self.label_19.setGeometry(QtCore.QRect(20, 70, 101, 16)) font = QtGui.QFont() font.setPointSize(10) self.label_19.setFont(font) self.label_19.setObjectName("label_19") self.save_picture_combo = QtGui.QComboBox(self.centralwidget) self.save_picture_combo.setGeometry(QtCore.QRect(170, 70, 271, 22)) self.save_picture_combo.setObjectName("save_picture_combo") self.save_picture_combo.addItem("") self.save_picture_combo.addItem("") self.save_picture_combo.addItem("") Qt_CV_MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(Qt_CV_MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1158, 24)) self.menubar.setObjectName("menubar") self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName("menuFile") self.menuTool = QtGui.QMenu(self.menubar) self.menuTool.setObjectName("menuTool") Qt_CV_MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(Qt_CV_MainWindow) self.statusbar.setObjectName("statusbar") Qt_CV_MainWindow.setStatusBar(self.statusbar) self.actionQuit = QtGui.QAction(Qt_CV_MainWindow) self.actionQuit.setObjectName("actionQuit") self.actionSeparate_picture = QtGui.QAction(Qt_CV_MainWindow) self.actionSeparate_picture.setObjectName("actionSeparate_picture") self.menuFile.addAction(self.actionQuit) self.menuTool.addAction(self.actionSeparate_picture) self.menubar.addAction(self.menuFile.menuAction()) self.menubar.addAction(self.menuTool.menuAction()) self.retranslateUi(Qt_CV_MainWindow) QtCore.QObject.connect(self.actionQuit, QtCore.SIGNAL("triggered()"), Qt_CV_MainWindow.close) QtCore.QMetaObject.connectSlotsByName(Qt_CV_MainWindow) def retranslateUi(self, Qt_CV_MainWindow): Qt_CV_MainWindow.setWindowTitle(QtGui.QApplication.translate("Qt_CV_MainWindow", "Qt_OpenCV", None, QtGui.QApplication.UnicodeUTF8)) self.file_button.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8)) self.exec_button.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Execute", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "High Threshold", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Low Threshold", None, QtGui.QApplication.UnicodeUTF8)) self.color_combo.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "None (Gray Scale)", None, QtGui.QApplication.UnicodeUTF8)) self.color_combo.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "Red (Extract Red Color)", None, QtGui.QApplication.UnicodeUTF8)) self.color_combo.setItemText(2, QtGui.QApplication.translate("Qt_CV_MainWindow", "Green(Extract Green Color)", None, QtGui.QApplication.UnicodeUTF8)) self.color_combo.setItemText(3, QtGui.QApplication.translate("Qt_CV_MainWindow", "Blue (Extract Blue Color)", None, QtGui.QApplication.UnicodeUTF8)) self.color_combo.setItemText(4, QtGui.QApplication.translate("Qt_CV_MainWindow", "Yellow (Extract Yellow Color)", None, QtGui.QApplication.UnicodeUTF8)) self.eject_edge_or_not.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Eject Edge Contours", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Color filter", None, QtGui.QApplication.UnicodeUTF8)) self.label_6.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Smoothing", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "None", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "Bilateral", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo.setItemText(2, QtGui.QApplication.translate("Qt_CV_MainWindow", "GaussianBlur", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo.setItemText(3, QtGui.QApplication.translate("Qt_CV_MainWindow", "medianBlur ", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo.setItemText(4, QtGui.QApplication.translate("Qt_CV_MainWindow", "Blur", None, QtGui.QApplication.UnicodeUTF8)) self.label_7.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Range of Contour Areas", None, QtGui.QApplication.UnicodeUTF8)) self.label_8.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Threshold", None, QtGui.QApplication.UnicodeUTF8)) self.label_9.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Filter & Smoothig", None, QtGui.QApplication.UnicodeUTF8)) self.label_10.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Execute Mode", None, QtGui.QApplication.UnicodeUTF8)) self.label_12.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Other Settings", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Max Area Size [pix]", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Min Area Size [pix]", None, QtGui.QApplication.UnicodeUTF8)) self.threshold1_edit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "160", None, QtGui.QApplication.UnicodeUTF8)) self.threshold2_edit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "80", None, QtGui.QApplication.UnicodeUTF8)) self.min_area_edit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "120", None, QtGui.QApplication.UnicodeUTF8)) self.max_area_edit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "5000", None, QtGui.QApplication.UnicodeUTF8)) self.form_view_or_image.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Adjust View from Image", None, QtGui.QApplication.UnicodeUTF8)) self.size_edit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "9", None, QtGui.QApplication.UnicodeUTF8)) self.label_13.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "μm ", None, QtGui.QApplication.UnicodeUTF8)) self.EBA_button.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "EBA", None, QtGui.QApplication.UnicodeUTF8)) self.label_14.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Extention", None, QtGui.QApplication.UnicodeUTF8)) self.extention_combo.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "*.jpg", None, QtGui.QApplication.UnicodeUTF8)) self.extention_combo.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "*.bmp", None, QtGui.QApplication.UnicodeUTF8)) self.extention_combo.setItemText(2, QtGui.QApplication.translate("Qt_CV_MainWindow", "*.tiff", None, QtGui.QApplication.UnicodeUTF8)) self.label_15.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Edge", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo_3.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "None", None, QtGui.QApplication.UnicodeUTF8)) self.smooth_combo_3.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "Canny", None, QtGui.QApplication.UnicodeUTF8)) self.label_16.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Shading", None, QtGui.QApplication.UnicodeUTF8)) self.file_button_2.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8)) self.label_17.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "[One side of a pixcel]", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(0).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "File Name", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(1).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Sum", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(2).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Average", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(3).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Var", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(4).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Std", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(5).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Counts", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(6).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "ppm", None, QtGui.QApplication.UnicodeUTF8)) self.tableWidget.horizontalHeaderItem(7).setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "μ㎡/㎡", None, QtGui.QApplication.UnicodeUTF8)) __sortingEnabled = self.tableWidget.isSortingEnabled() self.tableWidget.setSortingEnabled(False) self.tableWidget.setSortingEnabled(__sortingEnabled) self.label_18.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Save as CSV", None, QtGui.QApplication.UnicodeUTF8)) self.save_mode_combo.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "CSV:Distribution(Histogram)", None, QtGui.QApplication.UnicodeUTF8)) self.save_mode_combo.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "CSV:Count & Size", None, QtGui.QApplication.UnicodeUTF8)) self.form_view_or_image_2.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Watershed", None, QtGui.QApplication.UnicodeUTF8)) self.label_19.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Save Pictures", None, QtGui.QApplication.UnicodeUTF8)) self.save_picture_combo.setItemText(0, QtGui.QApplication.translate("Qt_CV_MainWindow", "None", None, QtGui.QApplication.UnicodeUTF8)) self.save_picture_combo.setItemText(1, QtGui.QApplication.translate("Qt_CV_MainWindow", "Contours Only", None, QtGui.QApplication.UnicodeUTF8)) self.save_picture_combo.setItemText(2, QtGui.QApplication.translate("Qt_CV_MainWindow", "Contours and raw picture", None, QtGui.QApplication.UnicodeUTF8)) self.menuFile.setTitle(QtGui.QApplication.translate("Qt_CV_MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8)) self.menuTool.setTitle(QtGui.QApplication.translate("Qt_CV_MainWindow", "Tool", None, QtGui.QApplication.UnicodeUTF8)) self.actionQuit.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "Quit", None, QtGui.QApplication.UnicodeUTF8)) self.actionSeparate_picture.setText(QtGui.QApplication.translate("Qt_CV_MainWindow", "separate picture", None, QtGui.QApplication.UnicodeUTF8))
def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.setEnabled(True) MainWindow.resize(1201, 818) MainWindow.setMinimumSize(QtCore.QSize(1024, 700)) self.centralwidget = QtGui.QWidget(MainWindow) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Maximum, QtGui.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.centralwidget.sizePolicy().hasHeightForWidth()) self.centralwidget.setSizePolicy(sizePolicy) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.horizontalLayout = QtGui.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.select_file_button = QtGui.QPushButton(self.centralwidget) font = QtGui.QFont() font.setPointSize(9) self.select_file_button.setFont(font) self.select_file_button.setObjectName(_fromUtf8("select_file_button")) self.horizontalLayout.addWidget(self.select_file_button) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.verticalLayout.addLayout(self.horizontalLayout) self.central_tab = QtGui.QTabWidget(self.centralwidget) self.central_tab.setObjectName(_fromUtf8("central_tab")) self.waveform_tab = QtGui.QWidget() self.waveform_tab.setObjectName(_fromUtf8("waveform_tab")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.waveform_tab) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.verticalLayout_3 = QtGui.QVBoxLayout() self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.group_by_network_check_box = QtGui.QCheckBox(self.waveform_tab) self.group_by_network_check_box.setChecked(True) self.group_by_network_check_box.setObjectName(_fromUtf8("group_by_network_check_box")) self.verticalLayout_3.addWidget(self.group_by_network_check_box) self.station_view = StationTreeWidget(self.waveform_tab) self.station_view.setAnimated(False) self.station_view.setHeaderHidden(True) self.station_view.setObjectName(_fromUtf8("station_view")) self.station_view.headerItem().setText(0, _fromUtf8("1")) self.verticalLayout_3.addWidget(self.station_view) self.web_view = QtWebKit.QWebView(self.waveform_tab) self.web_view.setUrl(QtCore.QUrl(_fromUtf8("about:blank"))) self.web_view.setObjectName(_fromUtf8("web_view")) self.verticalLayout_3.addWidget(self.web_view) self.verticalLayout_3.setStretch(0, 1) self.verticalLayout_3.setStretch(1, 10) self.verticalLayout_3.setStretch(2, 4) self.horizontalLayout_3.addLayout(self.verticalLayout_3) self.verticalLayout_2 = QtGui.QVBoxLayout() self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.horizontalLayout_2 = QtGui.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.reset_view_push_button = QtGui.QPushButton(self.waveform_tab) self.reset_view_push_button.setEnabled(False) self.reset_view_push_button.setObjectName(_fromUtf8("reset_view_push_button")) self.horizontalLayout_2.addWidget(self.reset_view_push_button) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem1) self.detrend_and_demean_check_box = QtGui.QCheckBox(self.waveform_tab) self.detrend_and_demean_check_box.setObjectName(_fromUtf8("detrend_and_demean_check_box")) self.horizontalLayout_2.addWidget(self.detrend_and_demean_check_box) self.normalize_check_box = QtGui.QCheckBox(self.waveform_tab) self.normalize_check_box.setObjectName(_fromUtf8("normalize_check_box")) self.horizontalLayout_2.addWidget(self.normalize_check_box) spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem2) self.references_push_button = QtGui.QPushButton(self.waveform_tab) self.references_push_button.setObjectName(_fromUtf8("references_push_button")) self.horizontalLayout_2.addWidget(self.references_push_button) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.graph = GraphicsLayoutWidget(self.waveform_tab) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.graph.sizePolicy().hasHeightForWidth()) self.graph.setSizePolicy(sizePolicy) self.graph.setMouseTracking(False) self.graph.setToolTip(_fromUtf8("")) self.graph.setObjectName(_fromUtf8("graph")) self.verticalLayout_2.addWidget(self.graph) self.horizontalLayout_3.addLayout(self.verticalLayout_2) self.horizontalLayout_3.setStretch(0, 3) self.horizontalLayout_3.setStretch(1, 10) self.central_tab.addTab(self.waveform_tab, _fromUtf8("Waveforms")) self.auxiliary_data_tab = QtGui.QWidget() self.auxiliary_data_tab.setObjectName(_fromUtf8("auxiliary_data_tab")) self.horizontalLayout_11 = QtGui.QHBoxLayout(self.auxiliary_data_tab) self.horizontalLayout_11.setObjectName(_fromUtf8("horizontalLayout_11")) self.auxiliary_data_tree_view = QtGui.QTreeWidget(self.auxiliary_data_tab) self.auxiliary_data_tree_view.setObjectName(_fromUtf8("auxiliary_data_tree_view")) self.auxiliary_data_tree_view.headerItem().setText(0, _fromUtf8("1")) self.auxiliary_data_tree_view.header().setVisible(False) self.horizontalLayout_11.addWidget(self.auxiliary_data_tree_view) self.verticalLayout_4 = QtGui.QVBoxLayout() self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.auxiliary_data_stacked_widget = QtGui.QStackedWidget(self.auxiliary_data_tab) self.auxiliary_data_stacked_widget.setObjectName(_fromUtf8("auxiliary_data_stacked_widget")) self.auxiliary_data_graph_page = QtGui.QWidget() self.auxiliary_data_graph_page.setObjectName(_fromUtf8("auxiliary_data_graph_page")) self.horizontalLayout_8 = QtGui.QHBoxLayout(self.auxiliary_data_graph_page) self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8")) self.auxiliary_data_graph = GraphicsLayoutWidget(self.auxiliary_data_graph_page) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.auxiliary_data_graph.sizePolicy().hasHeightForWidth()) self.auxiliary_data_graph.setSizePolicy(sizePolicy) self.auxiliary_data_graph.setMouseTracking(False) self.auxiliary_data_graph.setToolTip(_fromUtf8("")) self.auxiliary_data_graph.setObjectName(_fromUtf8("auxiliary_data_graph")) self.horizontalLayout_8.addWidget(self.auxiliary_data_graph) self.auxiliary_data_stacked_widget.addWidget(self.auxiliary_data_graph_page) self.auxiliary_data_file_page = QtGui.QWidget() self.auxiliary_data_file_page.setObjectName(_fromUtf8("auxiliary_data_file_page")) self.horizontalLayout_9 = QtGui.QHBoxLayout(self.auxiliary_data_file_page) self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9")) self.auxiliary_file_browser = QtGui.QTextBrowser(self.auxiliary_data_file_page) font = QtGui.QFont() font.setFamily(_fromUtf8("Andale Mono")) font.setPointSize(12) self.auxiliary_file_browser.setFont(font) self.auxiliary_file_browser.setObjectName(_fromUtf8("auxiliary_file_browser")) self.horizontalLayout_9.addWidget(self.auxiliary_file_browser) self.auxiliary_data_stacked_widget.addWidget(self.auxiliary_data_file_page) self.verticalLayout_4.addWidget(self.auxiliary_data_stacked_widget) self.horizontalLayout_10 = QtGui.QHBoxLayout() self.horizontalLayout_10.setObjectName(_fromUtf8("horizontalLayout_10")) self.show_auxiliary_provenance_button = QtGui.QPushButton(self.auxiliary_data_tab) self.show_auxiliary_provenance_button.setEnabled(False) self.show_auxiliary_provenance_button.setAutoDefault(False) self.show_auxiliary_provenance_button.setDefault(False) self.show_auxiliary_provenance_button.setFlat(False) self.show_auxiliary_provenance_button.setObjectName(_fromUtf8("show_auxiliary_provenance_button")) self.horizontalLayout_10.addWidget(self.show_auxiliary_provenance_button) spacerItem3 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_10.addItem(spacerItem3) self.verticalLayout_4.addLayout(self.horizontalLayout_10) self.horizontalLayout_7 = QtGui.QHBoxLayout() self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7")) self.groupBox = QtGui.QGroupBox(self.auxiliary_data_tab) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.horizontalLayout_5 = QtGui.QHBoxLayout(self.groupBox) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.auxiliary_data_info_table_view = QtGui.QTableWidget(self.groupBox) self.auxiliary_data_info_table_view.setObjectName(_fromUtf8("auxiliary_data_info_table_view")) self.auxiliary_data_info_table_view.setColumnCount(0) self.auxiliary_data_info_table_view.setRowCount(0) self.auxiliary_data_info_table_view.horizontalHeader().setSortIndicatorShown(False) self.horizontalLayout_5.addWidget(self.auxiliary_data_info_table_view) self.horizontalLayout_7.addWidget(self.groupBox) self.groupBox_2 = QtGui.QGroupBox(self.auxiliary_data_tab) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.horizontalLayout_6 = QtGui.QHBoxLayout(self.groupBox_2) self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6")) self.auxiliary_data_detail_table_view = QtGui.QTableWidget(self.groupBox_2) self.auxiliary_data_detail_table_view.setObjectName(_fromUtf8("auxiliary_data_detail_table_view")) self.auxiliary_data_detail_table_view.setColumnCount(0) self.auxiliary_data_detail_table_view.setRowCount(0) self.horizontalLayout_6.addWidget(self.auxiliary_data_detail_table_view) self.horizontalLayout_7.addWidget(self.groupBox_2) self.verticalLayout_4.addLayout(self.horizontalLayout_7) self.horizontalLayout_11.addLayout(self.verticalLayout_4) self.horizontalLayout_11.setStretch(0, 3) self.horizontalLayout_11.setStretch(1, 10) self.central_tab.addTab(self.auxiliary_data_tab, _fromUtf8("")) self.provenance_tab = QtGui.QWidget() self.provenance_tab.setObjectName(_fromUtf8("provenance_tab")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.provenance_tab) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.provenance_list_view = QtGui.QListView(self.provenance_tab) self.provenance_list_view.setObjectName(_fromUtf8("provenance_list_view")) self.horizontalLayout_4.addWidget(self.provenance_list_view) self.provenance_graphics_view = SvgGraphicsView(self.provenance_tab) self.provenance_graphics_view.setObjectName(_fromUtf8("provenance_graphics_view")) self.horizontalLayout_4.addWidget(self.provenance_graphics_view) self.horizontalLayout_4.setStretch(0, 3) self.horizontalLayout_4.setStretch(1, 10) self.central_tab.addTab(self.provenance_tab, _fromUtf8("")) self.event_tab = QtGui.QWidget() self.event_tab.setObjectName(_fromUtf8("event_tab")) self.horizontalLayout_12 = QtGui.QHBoxLayout(self.event_tab) self.horizontalLayout_12.setObjectName(_fromUtf8("horizontalLayout_12")) self.event_tree_widget = QtGui.QTreeWidget(self.event_tab) self.event_tree_widget.setObjectName(_fromUtf8("event_tree_widget")) self.event_tree_widget.headerItem().setText(0, _fromUtf8("1")) self.event_tree_widget.header().setVisible(False) self.horizontalLayout_12.addWidget(self.event_tree_widget) self.verticalLayout_5 = QtGui.QVBoxLayout() self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.events_web_view = QtWebKit.QWebView(self.event_tab) self.events_web_view.setUrl(QtCore.QUrl(_fromUtf8("about:blank"))) self.events_web_view.setObjectName(_fromUtf8("events_web_view")) self.verticalLayout_5.addWidget(self.events_web_view) self.events_text_browser = QtGui.QTextBrowser(self.event_tab) font = QtGui.QFont() font.setFamily(_fromUtf8("Andale Mono")) font.setPointSize(12) self.events_text_browser.setFont(font) self.events_text_browser.setObjectName(_fromUtf8("events_text_browser")) self.verticalLayout_5.addWidget(self.events_text_browser) self.verticalLayout_5.setStretch(0, 1) self.verticalLayout_5.setStretch(1, 1) self.horizontalLayout_12.addLayout(self.verticalLayout_5) self.horizontalLayout_12.setStretch(0, 4) self.horizontalLayout_12.setStretch(1, 6) self.central_tab.addTab(self.event_tab, _fromUtf8("")) self.verticalLayout.addWidget(self.central_tab) MainWindow.setCentralWidget(self.centralwidget) self.status_bar = QtGui.QStatusBar(MainWindow) self.status_bar.setObjectName(_fromUtf8("status_bar")) MainWindow.setStatusBar(self.status_bar) self.retranslateUi(MainWindow) self.central_tab.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, SAXSgui): SAXSgui.setObjectName(_fromUtf8("SAXSgui")) SAXSgui.resize(925, 630) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(SAXSgui.sizePolicy().hasHeightForWidth()) SAXSgui.setSizePolicy(sizePolicy) SAXSgui.setMinimumSize(QtCore.QSize(925, 630)) SAXSgui.setFocusPolicy(QtCore.Qt.StrongFocus) SAXSgui.setWindowOpacity(1.0) SAXSgui.setAutoFillBackground(False) SAXSgui.setTabShape(QtGui.QTabWidget.Rounded) self.centralwidget = QtGui.QWidget(SAXSgui) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.Console = QtGui.QTabWidget(self.centralwidget) self.Console.setGeometry(QtCore.QRect(50, 30, 821, 541)) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.Console.sizePolicy().hasHeightForWidth()) self.Console.setSizePolicy(sizePolicy) self.Console.setObjectName(_fromUtf8("Console")) self.fourierspace_tab = QtGui.QWidget() self.fourierspace_tab.setObjectName(_fromUtf8("fourierspace_tab")) self.fourierView = GraphicsLayoutWidget(self.fourierspace_tab) self.fourierView.setGeometry(QtCore.QRect(10, 0, 511, 491)) self.fourierView.setObjectName(_fromUtf8("fourierView")) self.checkLogY = QtGui.QCheckBox(self.fourierspace_tab) self.checkLogY.setGeometry(QtCore.QRect(540, 10, 131, 20)) self.checkLogY.setObjectName(_fromUtf8("checkLogY")) self.checkLogX = QtGui.QCheckBox(self.fourierspace_tab) self.checkLogX.setGeometry(QtCore.QRect(540, 40, 131, 20)) self.checkLogX.setObjectName(_fromUtf8("checkLogX")) self.beamview = GraphicsLayoutWidget(self.fourierspace_tab) self.beamview.setGeometry(QtCore.QRect(540, 300, 261, 191)) self.beamview.setObjectName(_fromUtf8("beamview")) self.label_8 = QtGui.QLabel(self.fourierspace_tab) self.label_8.setGeometry(QtCore.QRect(550, 280, 121, 16)) self.label_8.setObjectName(_fromUtf8("label_8")) self.nskip_spinbox = QtGui.QSpinBox(self.fourierspace_tab) self.nskip_spinbox.setGeometry(QtCore.QRect(550, 80, 57, 24)) self.nskip_spinbox.setMaximum(1000) self.nskip_spinbox.setObjectName(_fromUtf8("nskip_spinbox")) self.label_19 = QtGui.QLabel(self.fourierspace_tab) self.label_19.setGeometry(QtCore.QRect(620, 80, 161, 16)) self.label_19.setObjectName(_fromUtf8("label_19")) self.nskip2_spinbox = QtGui.QSpinBox(self.fourierspace_tab) self.nskip2_spinbox.setGeometry(QtCore.QRect(550, 110, 57, 24)) self.nskip2_spinbox.setMinimum(0) self.nskip2_spinbox.setMaximum(1000) self.nskip2_spinbox.setProperty("value", 0) self.nskip2_spinbox.setObjectName(_fromUtf8("nskip2_spinbox")) self.label_20 = QtGui.QLabel(self.fourierspace_tab) self.label_20.setGeometry(QtCore.QRect(620, 110, 161, 16)) self.label_20.setObjectName(_fromUtf8("label_20")) self.label_22 = QtGui.QLabel(self.fourierspace_tab) self.label_22.setGeometry(QtCore.QRect(550, 160, 62, 16)) self.label_22.setObjectName(_fromUtf8("label_22")) self.label_23 = QtGui.QLabel(self.fourierspace_tab) self.label_23.setGeometry(QtCore.QRect(550, 180, 62, 16)) self.label_23.setObjectName(_fromUtf8("label_23")) self.qmin_label = QtGui.QLabel(self.fourierspace_tab) self.qmin_label.setGeometry(QtCore.QRect(605, 160, 206, 16)) self.qmin_label.setObjectName(_fromUtf8("qmin_label")) self.qmax_label = QtGui.QLabel(self.fourierspace_tab) self.qmax_label.setGeometry(QtCore.QRect(605, 180, 206, 16)) self.qmax_label.setObjectName(_fromUtf8("qmax_label")) self.Console.addTab(self.fourierspace_tab, _fromUtf8("")) self.guinierkratky_tab = QtGui.QWidget() self.guinierkratky_tab.setObjectName(_fromUtf8("guinierkratky_tab")) self.primaryanalysis_view = GraphicsLayoutWidget(self.guinierkratky_tab) self.primaryanalysis_view.setGeometry(QtCore.QRect(20, 10, 781, 401)) self.primaryanalysis_view.setObjectName(_fromUtf8("primaryanalysis_view")) self.groupBox_4 = QtGui.QGroupBox(self.guinierkratky_tab) self.groupBox_4.setEnabled(True) self.groupBox_4.setGeometry(QtCore.QRect(20, 410, 341, 91)) self.groupBox_4.setObjectName(_fromUtf8("groupBox_4")) self.qRgmin = QtGui.QDoubleSpinBox(self.groupBox_4) self.qRgmin.setGeometry(QtCore.QRect(10, 30, 62, 24)) self.qRgmin.setMaximum(1.0) self.qRgmin.setSingleStep(0.05) self.qRgmin.setProperty("value", 1.0) self.qRgmin.setObjectName(_fromUtf8("qRgmin")) self.label_16 = QtGui.QLabel(self.groupBox_4) self.label_16.setGeometry(QtCore.QRect(80, 30, 62, 16)) self.label_16.setObjectName(_fromUtf8("label_16")) self.label_17 = QtGui.QLabel(self.groupBox_4) self.label_17.setGeometry(QtCore.QRect(80, 60, 62, 16)) self.label_17.setObjectName(_fromUtf8("label_17")) self.qRgmax = QtGui.QDoubleSpinBox(self.groupBox_4) self.qRgmax.setGeometry(QtCore.QRect(10, 60, 62, 24)) self.qRgmax.setMaximum(3.0) self.qRgmax.setSingleStep(0.05) self.qRgmax.setProperty("value", 1.3) self.qRgmax.setObjectName(_fromUtf8("qRgmax")) self.guinierminpts = QtGui.QLineEdit(self.groupBox_4) self.guinierminpts.setGeometry(QtCore.QRect(180, 30, 61, 21)) self.guinierminpts.setObjectName(_fromUtf8("guinierminpts")) self.label_18 = QtGui.QLabel(self.groupBox_4) self.label_18.setGeometry(QtCore.QRect(250, 30, 71, 16)) self.label_18.setObjectName(_fromUtf8("label_18")) self.autoguinier_button = QtGui.QPushButton(self.groupBox_4) self.autoguinier_button.setGeometry(QtCore.QRect(210, 55, 91, 26)) self.autoguinier_button.setStyleSheet(_fromUtf8("background-color: #F1BF29; font-size: 12px; color: green;")) self.autoguinier_button.setObjectName(_fromUtf8("autoguinier_button")) self.runprimaryanalysis = QtGui.QPushButton(self.guinierkratky_tab) self.runprimaryanalysis.setGeometry(QtCore.QRect(580, 435, 111, 26)) self.runprimaryanalysis.setStyleSheet(_fromUtf8("background-color: #F1BF29; font-size: 12px; color: blue;")) self.runprimaryanalysis.setObjectName(_fromUtf8("runprimaryanalysis")) self.lb_guinier_spinbox = QtGui.QSpinBox(self.guinierkratky_tab) self.lb_guinier_spinbox.setGeometry(QtCore.QRect(410, 435, 57, 24)) self.lb_guinier_spinbox.setObjectName(_fromUtf8("lb_guinier_spinbox")) self.ub_guinier_spinbox = QtGui.QSpinBox(self.guinierkratky_tab) self.ub_guinier_spinbox.setGeometry(QtCore.QRect(495, 435, 57, 24)) self.ub_guinier_spinbox.setMaximum(200) self.ub_guinier_spinbox.setObjectName(_fromUtf8("ub_guinier_spinbox")) self.label_6 = QtGui.QLabel(self.guinierkratky_tab) self.label_6.setGeometry(QtCore.QRect(475, 440, 16, 16)) self.label_6.setObjectName(_fromUtf8("label_6")) self.label_7 = QtGui.QLabel(self.guinierkratky_tab) self.label_7.setGeometry(QtCore.QRect(380, 440, 26, 16)) self.label_7.setObjectName(_fromUtf8("label_7")) self.label_21 = QtGui.QLabel(self.guinierkratky_tab) self.label_21.setGeometry(QtCore.QRect(375, 470, 91, 16)) self.label_21.setObjectName(_fromUtf8("label_21")) self.qRg_label = QtGui.QLabel(self.guinierkratky_tab) self.qRg_label.setGeometry(QtCore.QRect(465, 470, 126, 16)) self.qRg_label.setObjectName(_fromUtf8("qRg_label")) self.label_4 = QtGui.QLabel(self.guinierkratky_tab) self.label_4.setGeometry(QtCore.QRect(375, 490, 36, 16)) self.label_4.setObjectName(_fromUtf8("label_4")) self.label_5 = QtGui.QLabel(self.guinierkratky_tab) self.label_5.setGeometry(QtCore.QRect(470, 490, 36, 16)) self.label_5.setObjectName(_fromUtf8("label_5")) self.guinierRg_label = QtGui.QLabel(self.guinierkratky_tab) self.guinierRg_label.setGeometry(QtCore.QRect(405, 490, 62, 16)) self.guinierRg_label.setObjectName(_fromUtf8("guinierRg_label")) self.I0_label = QtGui.QLabel(self.guinierkratky_tab) self.I0_label.setGeometry(QtCore.QRect(500, 490, 151, 16)) self.I0_label.setObjectName(_fromUtf8("I0_label")) self.Console.addTab(self.guinierkratky_tab, _fromUtf8("")) self.realspace_tab = QtGui.QWidget() self.realspace_tab.setObjectName(_fromUtf8("realspace_tab")) self.realspaceView = GraphicsLayoutWidget(self.realspace_tab) self.realspaceView.setGeometry(QtCore.QRect(10, 0, 531, 491)) self.realspaceView.setObjectName(_fromUtf8("realspaceView")) self.groupBox_3 = QtGui.QGroupBox(self.realspace_tab) self.groupBox_3.setGeometry(QtCore.QRect(550, 0, 261, 141)) self.groupBox_3.setObjectName(_fromUtf8("groupBox_3")) self.Nr_input = QtGui.QLineEdit(self.groupBox_3) self.Nr_input.setGeometry(QtCore.QRect(10, 100, 71, 21)) self.Nr_input.setObjectName(_fromUtf8("Nr_input")) self.label_2 = QtGui.QLabel(self.groupBox_3) self.label_2.setGeometry(QtCore.QRect(90, 70, 166, 16)) self.label_2.setObjectName(_fromUtf8("label_2")) self.label = QtGui.QLabel(self.groupBox_3) self.label.setGeometry(QtCore.QRect(90, 40, 41, 16)) self.label.setObjectName(_fromUtf8("label")) self.label_3 = QtGui.QLabel(self.groupBox_3) self.label_3.setGeometry(QtCore.QRect(90, 100, 121, 16)) self.label_3.setObjectName(_fromUtf8("label_3")) self.logalpha_input = QtGui.QLineEdit(self.groupBox_3) self.logalpha_input.setGeometry(QtCore.QRect(10, 70, 71, 21)) self.logalpha_input.setObjectName(_fromUtf8("logalpha_input")) self.dmax_input = QtGui.QLineEdit(self.groupBox_3) self.dmax_input.setGeometry(QtCore.QRect(10, 40, 71, 21)) self.dmax_input.setObjectName(_fromUtf8("dmax_input")) self.groupBox = QtGui.QGroupBox(self.realspace_tab) self.groupBox.setGeometry(QtCore.QRect(550, 210, 151, 101)) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.varianceweighted = QtGui.QCheckBox(self.groupBox) self.varianceweighted.setGeometry(QtCore.QRect(10, 30, 131, 20)) self.varianceweighted.setObjectName(_fromUtf8("varianceweighted")) self.smeared = QtGui.QCheckBox(self.groupBox) self.smeared.setGeometry(QtCore.QRect(10, 55, 87, 20)) self.smeared.setObjectName(_fromUtf8("smeared")) self.solvepr_button = QtGui.QPushButton(self.realspace_tab) self.solvepr_button.setGeometry(QtCore.QRect(630, 440, 114, 32)) self.solvepr_button.setStyleSheet(_fromUtf8("background-color: #0085ff; color: #ffffff;")) self.solvepr_button.setObjectName(_fromUtf8("solvepr_button")) self.iftresultout = QtGui.QLineEdit(self.realspace_tab) self.iftresultout.setGeometry(QtCore.QRect(550, 400, 261, 21)) self.iftresultout.setObjectName(_fromUtf8("iftresultout")) self.saveiftresult = QtGui.QCheckBox(self.realspace_tab) self.saveiftresult.setGeometry(QtCore.QRect(550, 370, 241, 20)) self.saveiftresult.setObjectName(_fromUtf8("saveiftresult")) self.Console.addTab(self.realspace_tab, _fromUtf8("")) self.bayesianift_tab = QtGui.QWidget() self.bayesianift_tab.setObjectName(_fromUtf8("bayesianift_tab")) self.biftgridView = matplotlibWidget(self.bayesianift_tab) self.biftgridView.setGeometry(QtCore.QRect(10, 0, 401, 411)) self.biftgridView.setObjectName(_fromUtf8("biftgridView")) self.groupBox_2 = QtGui.QGroupBox(self.bayesianift_tab) self.groupBox_2.setGeometry(QtCore.QRect(420, 0, 381, 161)) self.groupBox_2.setObjectName(_fromUtf8("groupBox_2")) self.Nalpha = QtGui.QLineEdit(self.groupBox_2) self.Nalpha.setGeometry(QtCore.QRect(10, 30, 51, 21)) self.Nalpha.setObjectName(_fromUtf8("Nalpha")) self.Ndmax = QtGui.QLineEdit(self.groupBox_2) self.Ndmax.setGeometry(QtCore.QRect(10, 60, 51, 21)) self.Ndmax.setObjectName(_fromUtf8("Ndmax")) self.label_9 = QtGui.QLabel(self.groupBox_2) self.label_9.setGeometry(QtCore.QRect(70, 30, 91, 16)) self.label_9.setObjectName(_fromUtf8("label_9")) self.label_10 = QtGui.QLabel(self.groupBox_2) self.label_10.setGeometry(QtCore.QRect(70, 60, 101, 16)) self.label_10.setObjectName(_fromUtf8("label_10")) self.minlogalpha = QtGui.QDoubleSpinBox(self.groupBox_2) self.minlogalpha.setGeometry(QtCore.QRect(20, 120, 62, 24)) self.minlogalpha.setMinimum(-100.0) self.minlogalpha.setMaximum(100.0) self.minlogalpha.setProperty("value", 4.0) self.minlogalpha.setObjectName(_fromUtf8("minlogalpha")) self.label_11 = QtGui.QLabel(self.groupBox_2) self.label_11.setGeometry(QtCore.QRect(20, 100, 111, 16)) self.label_11.setObjectName(_fromUtf8("label_11")) self.maxlogalpha = QtGui.QDoubleSpinBox(self.groupBox_2) self.maxlogalpha.setGeometry(QtCore.QRect(110, 120, 62, 24)) self.maxlogalpha.setMinimum(-100.0) self.maxlogalpha.setMaximum(100.0) self.maxlogalpha.setProperty("value", 10.0) self.maxlogalpha.setObjectName(_fromUtf8("maxlogalpha")) self.label_13 = QtGui.QLabel(self.groupBox_2) self.label_13.setGeometry(QtCore.QRect(220, 100, 111, 16)) self.label_13.setObjectName(_fromUtf8("label_13")) self.mindmax = QtGui.QDoubleSpinBox(self.groupBox_2) self.mindmax.setGeometry(QtCore.QRect(220, 120, 62, 24)) self.mindmax.setDecimals(3) self.mindmax.setMaximum(9999.0) self.mindmax.setObjectName(_fromUtf8("mindmax")) self.maxdmax = QtGui.QDoubleSpinBox(self.groupBox_2) self.maxdmax.setGeometry(QtCore.QRect(310, 120, 62, 24)) self.maxdmax.setDecimals(3) self.maxdmax.setMaximum(9999.0) self.maxdmax.setObjectName(_fromUtf8("maxdmax")) self.calcbiftgrid = QtGui.QPushButton(self.bayesianift_tab) self.calcbiftgrid.setGeometry(QtCore.QRect(520, 180, 191, 51)) font = QtGui.QFont() font.setFamily(_fromUtf8("Helvetica")) font.setPointSize(18) font.setBold(True) font.setWeight(75) self.calcbiftgrid.setFont(font) self.calcbiftgrid.setStyleSheet(_fromUtf8("background-color: #6495ed; color: #ffffff;")) self.calcbiftgrid.setObjectName(_fromUtf8("calcbiftgrid")) self.label_12 = QtGui.QLabel(self.bayesianift_tab) self.label_12.setGeometry(QtCore.QRect(510, 120, 10, 16)) self.label_12.setObjectName(_fromUtf8("label_12")) self.label_14 = QtGui.QLabel(self.bayesianift_tab) self.label_14.setGeometry(QtCore.QRect(710, 120, 10, 16)) self.label_14.setObjectName(_fromUtf8("label_14")) self.refinebift = QtGui.QPushButton(self.bayesianift_tab) self.refinebift.setGeometry(QtCore.QRect(515, 325, 211, 51)) font = QtGui.QFont() font.setFamily(_fromUtf8("Helvetica")) font.setPointSize(14) font.setBold(True) font.setWeight(75) self.refinebift.setFont(font) self.refinebift.setStyleSheet(_fromUtf8("background-color:#87cc83; color: #ffffff;")) self.refinebift.setObjectName(_fromUtf8("refinebift")) self.line = QtGui.QFrame(self.bayesianift_tab) self.line.setGeometry(QtCore.QRect(420, 270, 391, 16)) self.line.setFrameShape(QtGui.QFrame.HLine) self.line.setFrameShadow(QtGui.QFrame.Sunken) self.line.setObjectName(_fromUtf8("line")) self.Console.addTab(self.bayesianift_tab, _fromUtf8("")) SAXSgui.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(SAXSgui) self.menubar.setGeometry(QtCore.QRect(0, 0, 925, 22)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFile = QtGui.QMenu(self.menubar) self.menuFile.setObjectName(_fromUtf8("menuFile")) SAXSgui.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(SAXSgui) self.statusbar.setObjectName(_fromUtf8("statusbar")) SAXSgui.setStatusBar(self.statusbar) self.actionOpen = QtGui.QAction(SAXSgui) self.actionOpen.setObjectName(_fromUtf8("actionOpen")) self.actionClose = QtGui.QAction(SAXSgui) self.actionClose.setObjectName(_fromUtf8("actionClose")) self.actionExit = QtGui.QAction(SAXSgui) self.actionExit.setShortcutContext(QtCore.Qt.WindowShortcut) self.actionExit.setObjectName(_fromUtf8("actionExit")) self.actionGuinier_Plot = QtGui.QAction(SAXSgui) self.actionGuinier_Plot.setObjectName(_fromUtf8("actionGuinier_Plot")) self.actionKratky_Plot = QtGui.QAction(SAXSgui) self.actionKratky_Plot.setObjectName(_fromUtf8("actionKratky_Plot")) self.actionSAXSMoW = QtGui.QAction(SAXSgui) self.actionSAXSMoW.setObjectName(_fromUtf8("actionSAXSMoW")) self.actionFoXS_fit = QtGui.QAction(SAXSgui) self.actionFoXS_fit.setObjectName(_fromUtf8("actionFoXS_fit")) self.actionLoad_Beam_Profile = QtGui.QAction(SAXSgui) self.actionLoad_Beam_Profile.setObjectName(_fromUtf8("actionLoad_Beam_Profile")) self.actionSave_as_GNOM_file = QtGui.QAction(SAXSgui) self.actionSave_as_GNOM_file.setObjectName(_fromUtf8("actionSave_as_GNOM_file")) self.actionSAXSMoW_2 = QtGui.QAction(SAXSgui) self.actionSAXSMoW_2.setObjectName(_fromUtf8("actionSAXSMoW_2")) self.menuFile.addAction(self.actionOpen) self.menuFile.addAction(self.actionSave_as_GNOM_file) self.menuFile.addAction(self.actionLoad_Beam_Profile) self.menuFile.addAction(self.actionClose) self.menuFile.addAction(self.actionExit) self.menubar.addAction(self.menuFile.menuAction()) self.retranslateUi(SAXSgui) self.Console.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(SAXSgui)
def setupUi(self, RecordingViewerWidget): RecordingViewerWidget.setObjectName("RecordingViewerWidget") RecordingViewerWidget.resize(489, 402) self.gridLayout_2 = QtWidgets.QGridLayout(RecordingViewerWidget) self.gridLayout_2.setObjectName("gridLayout_2") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.titleLabel = QtWidgets.QLabel(RecordingViewerWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.titleLabel.sizePolicy().hasHeightForWidth()) self.titleLabel.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setPointSize(12) font.setBold(True) font.setWeight(75) self.titleLabel.setFont(font) self.titleLabel.setText("") self.titleLabel.setAlignment(QtCore.Qt.AlignCenter) self.titleLabel.setObjectName("titleLabel") self.verticalLayout.addWidget(self.titleLabel) self.plotWidget = GraphicsLayoutWidget(RecordingViewerWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth(self.plotWidget.sizePolicy().hasHeightForWidth()) self.plotWidget.setSizePolicy(sizePolicy) self.plotWidget.setObjectName("plotWidget") self.verticalLayout.addWidget(self.plotWidget) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.previousButton = QtWidgets.QPushButton(RecordingViewerWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.previousButton.sizePolicy().hasHeightForWidth()) self.previousButton.setSizePolicy(sizePolicy) icon = QtGui.QIcon.fromTheme("go-previous") self.previousButton.setIcon(icon) self.previousButton.setObjectName("previousButton") self.horizontalLayout.addWidget(self.previousButton) self.nextButton = QtWidgets.QPushButton(RecordingViewerWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.nextButton.sizePolicy().hasHeightForWidth()) self.nextButton.setSizePolicy(sizePolicy) icon = QtGui.QIcon.fromTheme("go-next") self.nextButton.setIcon(icon) self.nextButton.setObjectName("nextButton") self.horizontalLayout.addWidget(self.nextButton) self.verticalLayout.addLayout(self.horizontalLayout) self.gridLayout_2.addLayout(self.verticalLayout, 0, 0, 1, 1) self.groupBox = QtWidgets.QGroupBox(RecordingViewerWidget) self.groupBox.setMinimumSize(QtCore.QSize(250, 0)) self.groupBox.setObjectName("groupBox") self.gridLayout = QtWidgets.QGridLayout(self.groupBox) self.gridLayout.setObjectName("gridLayout") self.sessionBrowser = SessionBrowser(self.groupBox) self.sessionBrowser.setObjectName("sessionBrowser") self.gridLayout.addWidget(self.sessionBrowser, 0, 0, 1, 1) self.gridLayout_2.addWidget(self.groupBox, 0, 1, 1, 1) self.retranslateUi(RecordingViewerWidget) QtCore.QMetaObject.connectSlotsByName(RecordingViewerWidget)
def __init__(self): QWidget.__init__(self) # define periodic table widget for element selection self.periodicTableWidget = widgets.PeriodicTableDialog() # initial molecule Zmatrix (can be empty) # self.inp = [] self.inp = [['H'], ['O', 1, 0.9], ['O', 2, 1.4, 1, 105.], ['H', 3, 0.9, 2, 105., 1, 120.]] self.atomList = [] self.highList = [] self.labelList = [] self.fast = False # define & initialize ZMatModel that will contain Zmatrix data self.ZMatModel = QStandardItemModel(len(self.inp), 7, self) self.ZMatTable = QTableView(self) self.ZMatTable.setModel(self.ZMatModel) self.ZMatTable.setFixedWidth(325) #self.ZMatTable.installEventFilter(self) #self.ZMatModel.installEventFilter(self) self.ZMatModel.setHorizontalHeaderLabels(['atom','','bond','','angle','','dihedral']) for j, width in enumerate([40, 22, 65, 22, 65, 22, 65]): self.ZMatTable.setColumnWidth(j, width) # populate the ZMatModel self.populateZMatModel() #define Menu bar menus and their actions self.menuBar = QMenuBar(self) fileMenu = self.menuBar.addMenu('&File') editMenu = self.menuBar.addMenu('&Edit') viewMenu = self.menuBar.addMenu('&View') measureMenu = self.menuBar.addMenu('&Measure') helpMenu = self.menuBar.addMenu('&Help') readZmatAction = QAction('&Read &ZMat', self) readZmatAction.setShortcut('Ctrl+O') readZmatAction.setStatusTip('Read Zmat from file') readZmatAction.triggered.connect(self.readZmat) fileMenu.addAction(readZmatAction) readXYZAction = QAction('&Read &XYZ', self) readXYZAction.setShortcut('Ctrl+Shift+O') readXYZAction.setStatusTip('Read XYZ from file') readXYZAction.triggered.connect(self.readXYZ) fileMenu.addAction(readXYZAction) readGaussianAction = QAction('&Read &Gaussian log', self) readGaussianAction.setShortcut('Ctrl+G') readGaussianAction.setStatusTip('Read Gaussian log file') readGaussianAction.triggered.connect(self.readGaussian) fileMenu.addAction(readGaussianAction) writeZmatAction = QAction('&Write &ZMat', self) writeZmatAction.setShortcut('Ctrl+S') writeZmatAction.setStatusTip('Write Zmat to file') writeZmatAction.triggered.connect(self.writeZmat) fileMenu.addAction(writeZmatAction) writeXYZAction = QAction('&Write &XYZ', self) writeXYZAction.setShortcut('Ctrl+Shift+S') writeXYZAction.setStatusTip('Write XYZ from file') writeXYZAction.triggered.connect(self.writeXYZ) fileMenu.addAction(writeXYZAction) exitAction = QAction('&Exit', self) exitAction.setShortcut('Ctrl+Q') exitAction.setStatusTip('Exit application') exitAction.triggered.connect(qApp.quit) fileMenu.addAction(exitAction) addRowAction = QAction('&Add &row', self) addRowAction.setShortcut('Ctrl+R') addRowAction.setStatusTip('Add row to ZMatrix') addRowAction.triggered.connect(self.addRow) editMenu.addAction(addRowAction) deleteRowAction = QAction('&Delete &row', self) deleteRowAction.setShortcut('Ctrl+Shift+R') deleteRowAction.setStatusTip('Delete row from ZMatrix') deleteRowAction.triggered.connect(self.deleteRow) editMenu.addAction(deleteRowAction) addAtomAction = QAction('&Add &atom', self) addAtomAction.setShortcut('Ctrl+A') addAtomAction.setStatusTip('Add atom to ZMatrix') addAtomAction.triggered.connect(self.buildB) editMenu.addAction(addAtomAction) drawModeMenu = QMenu('Draw mode', self) viewMenu.addMenu(drawModeMenu) fastDrawAction = QAction('&Fast draw', self) fastDrawAction.triggered.connect(self.fastDraw) normalDrawAction = QAction('&Normal draw', self) normalDrawAction.triggered.connect(self.normalDraw) drawModeMenu.addAction(normalDrawAction) drawModeMenu.addAction(fastDrawAction) clearHighlightsAction = QAction('&Clear selection', self) clearHighlightsAction.setShortcut('Ctrl+C') clearHighlightsAction.setStatusTip('Clear highlighted atoms') clearHighlightsAction.triggered.connect(self.clearHighlights) viewMenu.addAction(clearHighlightsAction) clearLabelsAction = QAction('&Clear labels', self) clearLabelsAction.setShortcut('Ctrl+Alt+C') clearLabelsAction.setStatusTip('Clear labels') clearLabelsAction.triggered.connect(self.clearLabels) viewMenu.addAction(clearLabelsAction) clearUpdateViewAction = QAction('&Clear selection and labels', self) clearUpdateViewAction.setShortcut('Ctrl+Shift+C') clearUpdateViewAction.setStatusTip('Clear highlighted atoms and labels') clearUpdateViewAction.triggered.connect(self.clearUpdateView) viewMenu.addAction(clearUpdateViewAction) self.showGaussAction = QAction('Show &Gaussian geometry optimization', self) self.showGaussAction.setShortcut('Ctrl+G') self.showGaussAction.setStatusTip('Show Gaussian geometry optimization plots for energy, force and displacement.') self.showGaussAction.setEnabled(False) self.showGaussAction.triggered.connect(self.showGauss) viewMenu.addAction(self.showGaussAction) self.showFreqAction = QAction('Show &IR frequency plot', self) self.showFreqAction.setShortcut('Ctrl+I') self.showFreqAction.setStatusTip('Show Gaussian calculated IR frequency plot.') self.showFreqAction.setEnabled(False) self.showFreqAction.triggered.connect(self.showFreq) viewMenu.addAction(self.showFreqAction) measureDistanceAction = QAction('&Measure &distance', self) measureDistanceAction.setShortcut('Ctrl+D') measureDistanceAction.setStatusTip('Measure distance between two atoms') measureDistanceAction.triggered.connect(self.measureDistanceB) measureMenu.addAction(measureDistanceAction) measureAngleAction = QAction('&Measure &angle', self) measureAngleAction.setShortcut('Ctrl+Shift+D') measureAngleAction.setStatusTip('Measure angle between three atoms') measureAngleAction.triggered.connect(self.measureAngleB) measureMenu.addAction(measureAngleAction) aboutAction = QAction('&About', self) aboutAction.setStatusTip('About this program...') aboutAction.triggered.connect(self.about) helpMenu.addAction(aboutAction) aboutQtAction = QAction('&About Qt', self) aboutQtAction.setStatusTip('About Qt...') aboutQtAction.triggered.connect(self.aboutQt) helpMenu.addAction(aboutQtAction) # define GL widget that displays the 3D molecule model self.window = widgets.MyGLView() self.window.installEventFilter(self) self.window.setMinimumSize(500, 500) #self.window.setBackgroundColor((50, 0, 10)) self.updateView() self.gaussianPlot = GraphicsLayoutWidget() self.gaussianPlot.resize(750, 250) self.gaussianPlot.setWindowTitle('Gaussian geometry optimization') #self.gaussianPlot.setAspectLocked(True) #self.gaussianPlot.addLayout(rowspan=3, colspan=1) self.FreqModel = QStandardItemModel(1, 3, self) self.freqTable = QTableView(self) self.freqTable.setModel(self.FreqModel) self.freqTable.setMinimumWidth(240) self.freqTable.installEventFilter(self) self.FreqModel.installEventFilter(self) self.FreqModel.setHorizontalHeaderLabels(['Frequency','IR Intensity','Raman Intensity']) for j, width in enumerate([80, 80, 80]): self.freqTable.setColumnWidth(j, width) self.freqWidget = QWidget() self.freqWidget.setWindowTitle('IR frequency plot & table') self.freqWidget.resize(800, 400) self.freqWidget.layout = QHBoxLayout(self.freqWidget) self.freqWidget.layout.setSpacing(1) self.freqWidget.layout.setContentsMargins(1, 1, 1, 1) self.freqPlot = GraphicsLayoutWidget() self.freqWidget.layout.addWidget(self.freqPlot) self.freqWidget.layout.addWidget(self.freqTable) self.freqTable.clicked.connect(self.freqCellClicked) # define other application parts self.statusBar = QStatusBar(self) self.fileDialog = QFileDialog(self) # define application layout self.layout = QVBoxLayout(self) self.layout.setSpacing(1) self.layout.setContentsMargins(1, 1, 1, 1) self.layout1 = QHBoxLayout() self.layout1.setSpacing(1) self.layout1.addWidget(self.ZMatTable) self.layout1.addWidget(self.window) self.layout.addWidget(self.menuBar) self.layout.addLayout(self.layout1) self.layout.addWidget(self.statusBar) self.adjustSize() self.setWindowTitle('Moldy') iconPath = 'icon.png' icon = QIcon(iconPath) icon.addFile(iconPath, QSize(16, 16)) icon.addFile(iconPath, QSize(24, 24)) icon.addFile(iconPath, QSize(32, 32)) icon.addFile(iconPath, QSize(48, 48)) icon.addFile(iconPath, QSize(256, 256)) self.setWindowIcon(icon) # start monitoring changes in the ZMatModel self.ZMatModel.dataChanged.connect(self.clearUpdateView)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1118, 728) MainWindow.setMinimumSize(QtCore.QSize(256, 256)) MainWindow.setMaximumSize(QtCore.QSize(1118, 16777215)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.histogram_groupBox_2 = QtWidgets.QGroupBox(self.centralwidget) self.histogram_groupBox_2.setGeometry(QtCore.QRect(440, 520, 671, 171)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.histogram_groupBox_2.sizePolicy().hasHeightForWidth()) self.histogram_groupBox_2.setSizePolicy(sizePolicy) self.histogram_groupBox_2.setMinimumSize(QtCore.QSize(100, 100)) self.histogram_groupBox_2.setMaximumSize(QtCore.QSize(700, 283)) self.histogram_groupBox_2.setObjectName("histogram_groupBox_2") self.logOutput = QtWidgets.QTextEdit(self.histogram_groupBox_2) self.logOutput.setGeometry(QtCore.QRect(10, 30, 651, 131)) font = QtGui.QFont() font.setFamily("Courier") self.logOutput.setFont(font) self.logOutput.setObjectName("logOutput") self.imageData_groupBox = QtWidgets.QGroupBox(self.centralwidget) self.imageData_groupBox.setGeometry(QtCore.QRect(10, 0, 1100, 312)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.imageData_groupBox.sizePolicy().hasHeightForWidth()) self.imageData_groupBox.setSizePolicy(sizePolicy) self.imageData_groupBox.setMinimumSize(QtCore.QSize(1100, 100)) self.imageData_groupBox.setMaximumSize(QtCore.QSize(1100, 312)) self.imageData_groupBox.setObjectName("imageData_groupBox") self.label = QtWidgets.QLabel(self.imageData_groupBox) self.label.setGeometry(QtCore.QRect(10, 520, 521, 16)) self.label.setWordWrap(True) self.label.setObjectName("label") self.layoutWidget = QtWidgets.QWidget(self.imageData_groupBox) self.layoutWidget.setGeometry(QtCore.QRect(10, 20, 1091, 291)) self.layoutWidget.setObjectName("layoutWidget") self.largeimage_horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget) self.largeimage_horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetMinAndMaxSize) self.largeimage_horizontalLayout.setContentsMargins(0, 0, 0, 0) self.largeimage_horizontalLayout.setObjectName("largeimage_horizontalLayout") self.main_graphicsView = GraphicsLayoutWidget(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.main_graphicsView.sizePolicy().hasHeightForWidth()) self.main_graphicsView.setSizePolicy(sizePolicy) self.main_graphicsView.setMinimumSize(QtCore.QSize(778, 256)) self.main_graphicsView.setMaximumSize(QtCore.QSize(778, 256)) self.main_graphicsView.setSizeIncrement(QtCore.QSize(1, 1)) self.main_graphicsView.setFrameShape(QtWidgets.QFrame.NoFrame) self.main_graphicsView.setAlignment(QtCore.Qt.AlignCenter) self.main_graphicsView.setObjectName("main_graphicsView") self.largeimage_horizontalLayout.addWidget(self.main_graphicsView) self.graphicsView_colorbar = GraphicsView(self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.graphicsView_colorbar.sizePolicy().hasHeightForWidth()) self.graphicsView_colorbar.setSizePolicy(sizePolicy) self.graphicsView_colorbar.setMinimumSize(QtCore.QSize(30, 128)) self.graphicsView_colorbar.setMaximumSize(QtCore.QSize(25, 256)) self.graphicsView_colorbar.setSizeIncrement(QtCore.QSize(1, 1)) self.graphicsView_colorbar.setObjectName("graphicsView_colorbar") self.largeimage_horizontalLayout.addWidget(self.graphicsView_colorbar) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.verticalLayout_3.setContentsMargins(-1, 5, -1, 5) self.verticalLayout_3.setSpacing(0) self.verticalLayout_3.setObjectName("verticalLayout_3") self.dispmax_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.layoutWidget) self.dispmax_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.dispmax_doubleSpinBox.setDecimals(3) self.dispmax_doubleSpinBox.setObjectName("dispmax_doubleSpinBox") self.verticalLayout_3.addWidget(self.dispmax_doubleSpinBox) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem) self.resetDispLimits_Button = QtWidgets.QPushButton(self.layoutWidget) self.resetDispLimits_Button.setObjectName("resetDispLimits_Button") self.verticalLayout_3.addWidget(self.resetDispLimits_Button) self.resetDispSmart_Button = QtWidgets.QPushButton(self.layoutWidget) self.resetDispSmart_Button.setObjectName("resetDispSmart_Button") self.verticalLayout_3.addWidget(self.resetDispSmart_Button) self.saveDisp_Button = QtWidgets.QPushButton(self.layoutWidget) self.saveDisp_Button.setObjectName("saveDisp_Button") self.verticalLayout_3.addWidget(self.saveDisp_Button) self.setMask_Button = QtWidgets.QPushButton(self.layoutWidget) self.setMask_Button.setObjectName("setMask_Button") self.verticalLayout_3.addWidget(self.setMask_Button) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem1) self.dispmin_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.layoutWidget) self.dispmin_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.dispmin_doubleSpinBox.setDecimals(3) self.dispmin_doubleSpinBox.setObjectName("dispmin_doubleSpinBox") self.verticalLayout_3.addWidget(self.dispmin_doubleSpinBox) self.largeimage_horizontalLayout.addLayout(self.verticalLayout_3) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.colormap_verticalLayout = QtWidgets.QVBoxLayout() self.colormap_verticalLayout.setObjectName("colormap_verticalLayout") self.label_2 = QtWidgets.QLabel(self.layoutWidget) self.label_2.setMaximumSize(QtCore.QSize(16777215, 14)) self.label_2.setObjectName("label_2") self.colormap_verticalLayout.addWidget(self.label_2) self.gray_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.gray_radioButton.setFont(font) self.gray_radioButton.setObjectName("gray_radioButton") self.colormap_buttonGroup = QtWidgets.QButtonGroup(MainWindow) self.colormap_buttonGroup.setObjectName("colormap_buttonGroup") self.colormap_buttonGroup.addButton(self.gray_radioButton) self.colormap_verticalLayout.addWidget(self.gray_radioButton) self.thermal_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.thermal_radioButton.setFont(font) self.thermal_radioButton.setObjectName("thermal_radioButton") self.colormap_buttonGroup.addButton(self.thermal_radioButton) self.colormap_verticalLayout.addWidget(self.thermal_radioButton) self.GYR_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.GYR_radioButton.setFont(font) self.GYR_radioButton.setObjectName("GYR_radioButton") self.colormap_buttonGroup.addButton(self.GYR_radioButton) self.colormap_verticalLayout.addWidget(self.GYR_radioButton) self.rainbow_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.rainbow_radioButton.setFont(font) self.rainbow_radioButton.setObjectName("rainbow_radioButton") self.colormap_buttonGroup.addButton(self.rainbow_radioButton) self.colormap_verticalLayout.addWidget(self.rainbow_radioButton) self.viridis_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.viridis_radioButton.setFont(font) self.viridis_radioButton.setObjectName("viridis_radioButton") self.colormap_buttonGroup.addButton(self.viridis_radioButton) self.colormap_verticalLayout.addWidget(self.viridis_radioButton) self.jet_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.jet_radioButton.setFont(font) self.jet_radioButton.setObjectName("jet_radioButton") self.colormap_buttonGroup.addButton(self.jet_radioButton) self.colormap_verticalLayout.addWidget(self.jet_radioButton) self.aspects_verticalLayout = QtWidgets.QVBoxLayout() self.aspects_verticalLayout.setSpacing(0) self.aspects_verticalLayout.setObjectName("aspects_verticalLayout") self.summary_Label = QtWidgets.QLabel(self.layoutWidget) self.summary_Label.setMaximumSize(QtCore.QSize(16777215, 14)) self.summary_Label.setObjectName("summary_Label") self.aspects_verticalLayout.addWidget(self.summary_Label) self.raw_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.raw_radioButton.setFont(font) self.raw_radioButton.setChecked(True) self.raw_radioButton.setObjectName("raw_radioButton") self.stats_buttonGroup = QtWidgets.QButtonGroup(MainWindow) self.stats_buttonGroup.setObjectName("stats_buttonGroup") self.stats_buttonGroup.addButton(self.raw_radioButton) self.aspects_verticalLayout.addWidget(self.raw_radioButton) self.mean_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.mean_radioButton.setFont(font) self.mean_radioButton.setChecked(False) self.mean_radioButton.setObjectName("mean_radioButton") self.stats_buttonGroup.addButton(self.mean_radioButton) self.aspects_verticalLayout.addWidget(self.mean_radioButton) self.median_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.median_radioButton.setFont(font) self.median_radioButton.setObjectName("median_radioButton") self.stats_buttonGroup.addButton(self.median_radioButton) self.aspects_verticalLayout.addWidget(self.median_radioButton) self.robustmean_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.robustmean_radioButton.setFont(font) self.robustmean_radioButton.setObjectName("robustmean_radioButton") self.stats_buttonGroup.addButton(self.robustmean_radioButton) self.aspects_verticalLayout.addWidget(self.robustmean_radioButton) self.std_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.std_radioButton.setFont(font) self.std_radioButton.setObjectName("std_radioButton") self.stats_buttonGroup.addButton(self.std_radioButton) self.aspects_verticalLayout.addWidget(self.std_radioButton) self.MAD_radioButton = QtWidgets.QRadioButton(self.layoutWidget) font = QtGui.QFont() font.setPointSize(10) self.MAD_radioButton.setFont(font) self.MAD_radioButton.setObjectName("MAD_radioButton") self.stats_buttonGroup.addButton(self.MAD_radioButton) self.aspects_verticalLayout.addWidget(self.MAD_radioButton) self.colormap_verticalLayout.addLayout(self.aspects_verticalLayout) self.verticalLayout_2.addLayout(self.colormap_verticalLayout) self.largeimage_horizontalLayout.addLayout(self.verticalLayout_2) self.overlays_groupBox = QtWidgets.QGroupBox(self.centralwidget) self.overlays_groupBox.setGeometry(QtCore.QRect(10, 315, 421, 376)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlays_groupBox.sizePolicy().hasHeightForWidth()) self.overlays_groupBox.setSizePolicy(sizePolicy) self.overlays_groupBox.setMinimumSize(QtCore.QSize(230, 0)) self.overlays_groupBox.setMaximumSize(QtCore.QSize(16777215, 683)) self.overlays_groupBox.setObjectName("overlays_groupBox") self.overlay_radioButton_05 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_05.setGeometry(QtCore.QRect(10, 260, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_05.setFont(font) self.overlay_radioButton_05.setObjectName("overlay_radioButton_05") self.overlay_graphicsView_01 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_01.setGeometry(QtCore.QRect(10, 30, 198, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_01.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_01.setSizePolicy(sizePolicy) self.overlay_graphicsView_01.setMinimumSize(QtCore.QSize(198, 64)) self.overlay_graphicsView_01.setMaximumSize(QtCore.QSize(198, 64)) self.overlay_graphicsView_01.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_01.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_01.setObjectName("overlay_graphicsView_01") self.overlay_radioButton_01 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_01.setGeometry(QtCore.QRect(10, 90, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_01.setFont(font) self.overlay_radioButton_01.setObjectName("overlay_radioButton_01") self.overlay_radioButton_02 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_02.setGeometry(QtCore.QRect(220, 90, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_02.setFont(font) self.overlay_radioButton_02.setObjectName("overlay_radioButton_02") self.overlay_radioButton_03 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_03.setGeometry(QtCore.QRect(220, 175, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_03.setFont(font) self.overlay_radioButton_03.setObjectName("overlay_radioButton_03") self.overlay_radioButton_04 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_04.setGeometry(QtCore.QRect(10, 175, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_04.setFont(font) self.overlay_radioButton_04.setObjectName("overlay_radioButton_04") self.corrout_radioButton = QtWidgets.QRadioButton(self.overlays_groupBox) self.corrout_radioButton.setGeometry(QtCore.QRect(10, 490, 151, 20)) self.corrout_radioButton.setChecked(True) self.corrout_radioButton.setObjectName("corrout_radioButton") self.overlay_radioButton_06 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_06.setGeometry(QtCore.QRect(220, 260, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_06.setFont(font) self.overlay_radioButton_06.setObjectName("overlay_radioButton_06") self.overlay_radioButton_07 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_07.setGeometry(QtCore.QRect(10, 345, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_07.setFont(font) self.overlay_radioButton_07.setObjectName("overlay_radioButton_07") self.overlay_radioButton_08 = QtWidgets.QRadioButton(self.overlays_groupBox) self.overlay_radioButton_08.setGeometry(QtCore.QRect(220, 345, 151, 20)) font = QtGui.QFont() font.setPointSize(10) self.overlay_radioButton_08.setFont(font) self.overlay_radioButton_08.setObjectName("overlay_radioButton_08") self.overlay_graphicsView_04 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_04.setGeometry(QtCore.QRect(10, 115, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_04.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_04.setSizePolicy(sizePolicy) self.overlay_graphicsView_04.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_04.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_04.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_04.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_04.setObjectName("overlay_graphicsView_04") self.overlay_graphicsView_06 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_06.setGeometry(QtCore.QRect(220, 200, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_06.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_06.setSizePolicy(sizePolicy) self.overlay_graphicsView_06.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_06.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_06.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_06.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_06.setObjectName("overlay_graphicsView_06") self.overlay_graphicsView_03 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_03.setGeometry(QtCore.QRect(220, 115, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_03.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_03.setSizePolicy(sizePolicy) self.overlay_graphicsView_03.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_03.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_03.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_03.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_03.setObjectName("overlay_graphicsView_03") self.overlay_graphicsView_08 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_08.setGeometry(QtCore.QRect(220, 285, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_08.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_08.setSizePolicy(sizePolicy) self.overlay_graphicsView_08.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_08.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_08.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_08.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_08.setObjectName("overlay_graphicsView_08") self.overlay_graphicsView_05 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_05.setGeometry(QtCore.QRect(10, 200, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_05.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_05.setSizePolicy(sizePolicy) self.overlay_graphicsView_05.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_05.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_05.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_05.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_05.setObjectName("overlay_graphicsView_05") self.overlay_graphicsView_02 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_02.setGeometry(QtCore.QRect(220, 30, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_02.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_02.setSizePolicy(sizePolicy) self.overlay_graphicsView_02.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_02.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_02.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_02.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_02.setObjectName("overlay_graphicsView_02") self.overlay_graphicsView_07 = GraphicsLayoutWidget(self.overlays_groupBox) self.overlay_graphicsView_07.setGeometry(QtCore.QRect(10, 285, 192, 64)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.overlay_graphicsView_07.sizePolicy().hasHeightForWidth()) self.overlay_graphicsView_07.setSizePolicy(sizePolicy) self.overlay_graphicsView_07.setMinimumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_07.setMaximumSize(QtCore.QSize(192, 64)) self.overlay_graphicsView_07.setFrameShape(QtWidgets.QFrame.NoFrame) self.overlay_graphicsView_07.setAlignment(QtCore.Qt.AlignCenter) self.overlay_graphicsView_07.setObjectName("overlay_graphicsView_07") self.overlay_graphicsView_01.raise_() self.overlay_radioButton_01.raise_() self.overlay_radioButton_02.raise_() self.overlay_radioButton_03.raise_() self.overlay_radioButton_04.raise_() self.corrout_radioButton.raise_() self.overlay_radioButton_05.raise_() self.overlay_radioButton_06.raise_() self.overlay_radioButton_07.raise_() self.overlay_radioButton_08.raise_() self.overlay_graphicsView_04.raise_() self.overlay_graphicsView_06.raise_() self.overlay_graphicsView_03.raise_() self.overlay_graphicsView_08.raise_() self.overlay_graphicsView_05.raise_() self.overlay_graphicsView_02.raise_() self.overlay_graphicsView_07.raise_() self.histogram_groupBox = QtWidgets.QGroupBox(self.centralwidget) self.histogram_groupBox.setGeometry(QtCore.QRect(440, 315, 381, 201)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.histogram_groupBox.sizePolicy().hasHeightForWidth()) self.histogram_groupBox.setSizePolicy(sizePolicy) self.histogram_groupBox.setMinimumSize(QtCore.QSize(100, 100)) self.histogram_groupBox.setMaximumSize(QtCore.QSize(500, 1000)) self.histogram_groupBox.setObjectName("histogram_groupBox") self.histogram_graphicsView = GraphicsLayoutWidget(self.histogram_groupBox) self.histogram_graphicsView.setGeometry(QtCore.QRect(10, 30, 361, 161)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.histogram_graphicsView.sizePolicy().hasHeightForWidth()) self.histogram_graphicsView.setSizePolicy(sizePolicy) self.histogram_graphicsView.setMinimumSize(QtCore.QSize(0, 100)) self.histogram_graphicsView.setMaximumSize(QtCore.QSize(1000, 1000)) self.histogram_graphicsView.setObjectName("histogram_graphicsView") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setGeometry(QtCore.QRect(830, 315, 281, 201)) self.groupBox.setObjectName("groupBox") self.label_4 = QtWidgets.QLabel(self.groupBox) self.label_4.setGeometry(QtCore.QRect(10, 35, 16, 16)) self.label_4.setObjectName("label_4") self.pixnumX_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.pixnumX_doubleSpinBox.setGeometry(QtCore.QRect(30, 30, 67, 24)) self.pixnumX_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.pixnumX_doubleSpinBox.setDecimals(0) self.pixnumX_doubleSpinBox.setObjectName("pixnumX_doubleSpinBox") self.label_7 = QtWidgets.QLabel(self.groupBox) self.label_7.setGeometry(QtCore.QRect(30, 20, 56, 13)) font = QtGui.QFont() font.setPointSize(11) self.label_7.setFont(font) self.label_7.setObjectName("label_7") self.coordX_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.coordX_doubleSpinBox.setGeometry(QtCore.QRect(100, 30, 67, 24)) self.coordX_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.coordX_doubleSpinBox.setDecimals(3) self.coordX_doubleSpinBox.setObjectName("coordX_doubleSpinBox") self.label_9 = QtWidgets.QLabel(self.groupBox) self.label_9.setGeometry(QtCore.QRect(100, 20, 56, 13)) font = QtGui.QFont() font.setPointSize(11) self.label_9.setFont(font) self.label_9.setObjectName("label_9") self.pixnumY_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.pixnumY_doubleSpinBox.setGeometry(QtCore.QRect(30, 55, 67, 24)) self.pixnumY_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.pixnumY_doubleSpinBox.setDecimals(0) self.pixnumY_doubleSpinBox.setObjectName("pixnumY_doubleSpinBox") self.coordY_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.coordY_doubleSpinBox.setGeometry(QtCore.QRect(100, 55, 67, 24)) self.coordY_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.coordY_doubleSpinBox.setDecimals(3) self.coordY_doubleSpinBox.setObjectName("coordY_doubleSpinBox") self.pixnumZ_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.pixnumZ_doubleSpinBox.setGeometry(QtCore.QRect(30, 80, 67, 24)) self.pixnumZ_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.pixnumZ_doubleSpinBox.setDecimals(0) self.pixnumZ_doubleSpinBox.setObjectName("pixnumZ_doubleSpinBox") self.coordZ_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.coordZ_doubleSpinBox.setGeometry(QtCore.QRect(100, 80, 67, 24)) self.coordZ_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.coordZ_doubleSpinBox.setDecimals(3) self.coordZ_doubleSpinBox.setObjectName("coordZ_doubleSpinBox") self.label_6 = QtWidgets.QLabel(self.groupBox) self.label_6.setGeometry(QtCore.QRect(10, 60, 16, 16)) self.label_6.setObjectName("label_6") self.label_8 = QtWidgets.QLabel(self.groupBox) self.label_8.setGeometry(QtCore.QRect(10, 85, 16, 16)) self.label_8.setObjectName("label_8") self.coordT_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.coordT_doubleSpinBox.setGeometry(QtCore.QRect(100, 130, 67, 24)) self.coordT_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.coordT_doubleSpinBox.setDecimals(3) self.coordT_doubleSpinBox.setObjectName("coordT_doubleSpinBox") self.pixnumT_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.groupBox) self.pixnumT_doubleSpinBox.setGeometry(QtCore.QRect(30, 130, 67, 24)) self.pixnumT_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.pixnumT_doubleSpinBox.setDecimals(0) self.pixnumT_doubleSpinBox.setObjectName("pixnumT_doubleSpinBox") self.label_3 = QtWidgets.QLabel(self.groupBox) self.label_3.setGeometry(QtCore.QRect(10, 135, 16, 16)) self.label_3.setObjectName("label_3") self.TimeSlider = QtWidgets.QSlider(self.groupBox) self.TimeSlider.setGeometry(QtCore.QRect(10, 165, 261, 22)) self.TimeSlider.setOrientation(QtCore.Qt.Horizontal) self.TimeSlider.setObjectName("TimeSlider") self.label_10 = QtWidgets.QLabel(self.groupBox) self.label_10.setGeometry(QtCore.QRect(30, 120, 56, 13)) font = QtGui.QFont() font.setPointSize(11) self.label_10.setFont(font) self.label_10.setObjectName("label_10") self.label_11 = QtWidgets.QLabel(self.groupBox) self.label_11.setGeometry(QtCore.QRect(100, 120, 56, 13)) font = QtGui.QFont() font.setPointSize(11) self.label_11.setFont(font) self.label_11.setObjectName("label_11") self.runMovieButton = QtWidgets.QPushButton(self.groupBox) self.runMovieButton.setGeometry(QtCore.QRect(170, 127, 110, 32)) self.runMovieButton.setObjectName("runMovieButton") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1118, 22)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.actionQuit = QtWidgets.QAction(MainWindow) self.actionQuit.setObjectName("actionQuit") self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)