Пример #1
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName(_fromUtf8("MainWindow"))
        MainWindow.resize(911, 686)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/buttons/images/icon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        MainWindow.setAutoFillBackground(True)
        MainWindow.setStyleSheet(_fromUtf8("QLabel {font-family: Arial; font-size: 10pt;}\n"
"QStatusBar(background-color:#fff;)"))
        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setAutoFillBackground(False)
        self.centralwidget.setStyleSheet(_fromUtf8("QWidget {background: #fff;}\n"
"\n"
"*[class~=\"QPushButton\"] {border:0px; padding: 5px; padding-left:10px; padding-right: 10px;}\n"
"*[class~=\"QPushButton\"]:hover {background-color: #eee; color: #000;}\n"
"*[class~=\"QPushButton\"]:pressed {background-color:#ecc}\n"
"\n"
"*[class~=\"QSpinBox\"] {border: 2px solid #ccc;}\n"
"*[class~=\"QSpinBox\"]:hover {border: 2px solid #ecc;}\n"
"\n"
"*[class~=\"QSpinBox\"]::up-button {subcontrol-origin: border;\n"
"    subcontrol-position: top right; \n"
"    width: 20px; \n"
"    border-image: url(:/buttons/images/spinup.png) 0.5;\n"
"    border-width: 1px;}\n"
"*[class~=\"QSpinBox\"]::up-button:pressed {background-color: #ecc;}\n"
"*[class~=\"QSpinBox\"]::up-button:hover {background-color: #eee;}\n"
"\n"
"*[class~=\"QSpinBox\"]::down-button {subcontrol-origin: border;\n"
"    subcontrol-position: bottom right; \n"
"    width: 20px; \n"
"    border-image: url(:/buttons/images/spindown.png) 0.5;\n"
"    border-width: 1px;}\n"
"*[class~=\"QSpinBox\"]::down-button:pressed {background-color: #ecc;}\n"
"*[class~=\"QSpinBox\"]::down-button:hover {background-color: #eee;}\n"
"\n"
"*[class~=\"QGraphicsView\"]::down-button:hover {border: 0px solid #000;}\n"
"\n"
"*[class~=\"QLabel\"]#lbl_center {font-weight:bold; color: #a00;}\n"
"*[class~=\"QLabel\"]#lbl_fwhmx {font-weight:bold; color: #a00;}\n"
"*[class~=\"QLabel\"]#lbl_fwhmy {font-weight:bold; color: #a00;}"))
        self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
        self.gridLayout = QtGui.QGridLayout(self.centralwidget)
        self.gridLayout.setMargin(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.wupper = QtGui.QWidget(self.centralwidget)
        self.wupper.setMaximumSize(QtCore.QSize(16777215, 50))
        self.wupper.setObjectName(_fromUtf8("wupper"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.wupper)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label = QtGui.QLabel(self.wupper)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.btn_readerStartStop = QtGui.QPushButton(self.wupper)
        self.btn_readerStartStop.setCheckable(True)
        self.btn_readerStartStop.setChecked(False)
        self.btn_readerStartStop.setObjectName(_fromUtf8("btn_readerStartStop"))
        self.horizontalLayout.addWidget(self.btn_readerStartStop)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.label_2 = QtGui.QLabel(self.wupper)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout.addWidget(self.label_2)
        self.lbl_center = QtGui.QLabel(self.wupper)
        self.lbl_center.setMinimumSize(QtCore.QSize(150, 0))
        self.lbl_center.setText(_fromUtf8(""))
        self.lbl_center.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl_center.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.lbl_center.setObjectName(_fromUtf8("lbl_center"))
        self.horizontalLayout.addWidget(self.lbl_center)
        self.label_4 = QtGui.QLabel(self.wupper)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.horizontalLayout.addWidget(self.label_4)
        self.lbl_fwhmx = QtGui.QLabel(self.wupper)
        self.lbl_fwhmx.setMinimumSize(QtCore.QSize(75, 0))
        self.lbl_fwhmx.setText(_fromUtf8(""))
        self.lbl_fwhmx.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl_fwhmx.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.lbl_fwhmx.setObjectName(_fromUtf8("lbl_fwhmx"))
        self.horizontalLayout.addWidget(self.lbl_fwhmx)
        self.label_6 = QtGui.QLabel(self.wupper)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.horizontalLayout.addWidget(self.label_6)
        self.lbl_fwhmy = QtGui.QLabel(self.wupper)
        self.lbl_fwhmy.setMinimumSize(QtCore.QSize(75, 0))
        self.lbl_fwhmy.setText(_fromUtf8(""))
        self.lbl_fwhmy.setAlignment(QtCore.Qt.AlignCenter)
        self.lbl_fwhmy.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.lbl_fwhmy.setObjectName(_fromUtf8("lbl_fwhmy"))
        self.horizontalLayout.addWidget(self.lbl_fwhmy)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.gridLayout.addWidget(self.wupper, 0, 0, 1, 1)
        self.gv_main = ImageView(self.centralwidget)
        self.gv_main.setStyleSheet(_fromUtf8(""))
        #self.gv_main.setFrameShape(QtGui.QFrame.NoFrame)
        self.gv_main.setObjectName(_fromUtf8("gv_main"))
        self.gridLayout.addWidget(self.gv_main, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtGui.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 911, 21))
        self.menubar.setObjectName(_fromUtf8("menubar"))
        self.menuView = QtGui.QMenu(self.menubar)
        self.menuView.setObjectName(_fromUtf8("menuView"))
        self.menuReport = QtGui.QMenu(self.menubar)
        self.menuReport.setObjectName(_fromUtf8("menuReport"))
        self.menuProfile = QtGui.QMenu(self.menubar)
        self.menuProfile.setObjectName(_fromUtf8("menuProfile"))
        self.menuROI = QtGui.QMenu(self.menubar)
        self.menuROI.setObjectName(_fromUtf8("menuROI"))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtGui.QStatusBar(MainWindow)
        self.statusbar.setStyleSheet(_fromUtf8("QStatusBar {background-color: #fff;}"))
        self.statusbar.setObjectName(_fromUtf8("statusbar"))
        MainWindow.setStatusBar(self.statusbar)
        self.actReaderStartStop = QtGui.QAction(MainWindow)
        self.actReaderStartStop.setCheckable(True)
        self.actReaderStartStop.setObjectName(_fromUtf8("actReaderStartStop"))
        self.actReaderStop = QtGui.QAction(MainWindow)
        self.actReaderStop.setObjectName(_fromUtf8("actReaderStop"))
        self.actShowViewROI = QtGui.QAction(MainWindow)
        self.actShowViewROI.setCheckable(True)
        self.actShowViewROI.setObjectName(_fromUtf8("actShowViewROI"))
        self.actShowFitROI = QtGui.QAction(MainWindow)
        self.actShowFitROI.setCheckable(True)
        self.actShowFitROI.setObjectName(_fromUtf8("actShowFitROI"))
        self.actSaveImage = QtGui.QAction(MainWindow)
        self.actSaveImage.setObjectName(_fromUtf8("actSaveImage"))
        self.actLoadState = QtGui.QAction(MainWindow)
        self.actLoadState.setObjectName(_fromUtf8("actLoadState"))
        self.actSaveState = QtGui.QAction(MainWindow)
        self.actSaveState.setObjectName(_fromUtf8("actSaveState"))
        self.menuView.addAction(self.actShowViewROI)
        self.menuReport.addAction(self.actSaveImage)
        self.menuProfile.addAction(self.actLoadState)
        self.menuProfile.addAction(self.actSaveState)
        self.menubar.addAction(self.menuView.menuAction())
        self.menubar.addAction(self.menuReport.menuAction())
        self.menubar.addAction(self.menuProfile.menuAction())
        self.menubar.addAction(self.menuROI.menuAction())

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
        self.label.setText(_translate("MainWindow", "Reader:", None))
        self.btn_readerStartStop.setText(_translate("MainWindow", "Start/Stop", None))
        self.label_2.setText(_translate("MainWindow", "Center:", None))
        self.label_4.setText(_translate("MainWindow", "FWHMx:", None))
        self.label_6.setText(_translate("MainWindow", "FWHMy:", None))
        self.menuView.setTitle(_translate("MainWindow", "View", None))
        self.menuReport.setTitle(_translate("MainWindow", "Report", None))
        self.menuProfile.setTitle(_translate("MainWindow", "Profile", None))
        self.menuROI.setTitle(_translate("MainWindow", "ROI", None))
        self.actReaderStartStop.setText(_translate("MainWindow", "Start", None))
        self.actReaderStop.setText(_translate("MainWindow", "Stop", None))
        self.actShowViewROI.setText(_translate("MainWindow", "Show View ROI", None))
        self.actShowFitROI.setText(_translate("MainWindow", "Show Fit ROI", None))
        self.actSaveImage.setText(_translate("MainWindow", "Save Image", None))
        self.actLoadState.setText(_translate("MainWindow", "Load State", None))
        self.actSaveState.setText(_translate("MainWindow", "Save State", None))
Пример #2
0
class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1114, 991)
        MainWindow.setStyleSheet("background-color: rgb(245,245,245);")
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.imageFileNavigatorView = QtWidgets.QComboBox(self.centralwidget)
        self.imageFileNavigatorView.setGeometry(QtCore.QRect(410, 660, 181, 22))
        self.imageFileNavigatorView.setStyleSheet("background-color: rgb(255,255,255);")
        self.imageFileNavigatorView.setObjectName("imageFileNavigatorView")
        self.toggleSegmentationMaskButton = QtWidgets.QPushButton(self.centralwidget)
        self.toggleSegmentationMaskButton.setGeometry(QtCore.QRect(10, 690, 111, 23))
        self.toggleSegmentationMaskButton.setStyleSheet("color: rgb(0, 0, 0);\n"
"background-color: rgb(120, 201, 172);")
        self.toggleSegmentationMaskButton.setObjectName("toggleSegmentationMaskButton")
        self.segmentationMaskFileDisplay = QtWidgets.QLineEdit(self.centralwidget)
        self.segmentationMaskFileDisplay.setGeometry(QtCore.QRect(10, 660, 113, 20))
        self.segmentationMaskFileDisplay.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.segmentationMaskFileDisplay.setObjectName("segmentationMaskFileDisplay")
        self.loadAnalysisFileButton = QtWidgets.QPushButton(self.centralwidget)
        self.loadAnalysisFileButton.setGeometry(QtCore.QRect(410, 690, 111, 23))
        self.loadAnalysisFileButton.setStyleSheet("background-color: rgb(252, 205, 64);")
        self.loadAnalysisFileButton.setObjectName("loadAnalysisFileButton")
        self.analysisFileDisplay = QtWidgets.QLineEdit(self.centralwidget)
        self.analysisFileDisplay.setGeometry(QtCore.QRect(410, 720, 131, 20))
        self.analysisFileDisplay.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.analysisFileDisplay.setObjectName("analysisFileDisplay")
        self.filterButton = QtWidgets.QPushButton(self.centralwidget)
        self.filterButton.setGeometry(QtCore.QRect(820, 800, 281, 31))
        self.filterButton.setStyleSheet("background-color: rgb(172, 199, 241);")
        self.filterButton.setObjectName("filterButton")
        self.segmentationClassList = QtWidgets.QTableView(self.centralwidget)
        self.segmentationClassList.setGeometry(QtCore.QRect(140, 660, 256, 271))
        self.segmentationClassList.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.segmentationClassList.setObjectName("segmentationClassList")
        self.graphicsView = ImageView(self.centralwidget)
        self.graphicsView.setGeometry(QtCore.QRect(10, 10, 1091, 641))
        self.graphicsView.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.graphicsView.setObjectName("graphicsView")
        self.filterListView = QtWidgets.QListView(self.centralwidget)
        self.filterListView.setGeometry(QtCore.QRect(820, 660, 281, 131))
        self.filterListView.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.filterListView.setObjectName("filterListView")
        self.ROIListView = QtWidgets.QListWidget(self.centralwidget)
        self.ROIListView.setGeometry(QtCore.QRect(600, 660, 201, 131))
        self.ROIListView.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.ROIListView.setObjectName("ROIListView")
        self.AddRegionOfInterestButton = QtWidgets.QPushButton(self.centralwidget)
        self.AddRegionOfInterestButton.setGeometry(QtCore.QRect(600, 800, 101, 21))
        self.AddRegionOfInterestButton.setStyleSheet("background-color: rgb(120, 201, 172);")
        self.AddRegionOfInterestButton.setObjectName("AddRegionOfInterestButton")
        self.RemoveRegionOfInterestButton = QtWidgets.QPushButton(self.centralwidget)
        self.RemoveRegionOfInterestButton.setGeometry(QtCore.QRect(710, 800, 91, 23))
        self.RemoveRegionOfInterestButton.setStyleSheet("background-color: rgb(230, 165, 187);")
        self.RemoveRegionOfInterestButton.setObjectName("RemoveRegionOfInterestButton")
        self.clusterButton = QtWidgets.QPushButton(self.centralwidget)
        self.clusterButton.setGeometry(QtCore.QRect(410, 760, 75, 23))
        self.clusterButton.setStyleSheet("background-color: rgb(172, 199, 241);")
        self.clusterButton.setObjectName("clusterButton")
        self.ClusterMinDist = QtWidgets.QLineEdit(self.centralwidget)
        self.ClusterMinDist.setGeometry(QtCore.QRect(410, 810, 113, 20))
        self.ClusterMinDist.setObjectName("ClusterMinDist")
        self.ClusterMinNeighbors = QtWidgets.QLineEdit(self.centralwidget)
        self.ClusterMinNeighbors.setGeometry(QtCore.QRect(410, 850, 113, 20))
        self.ClusterMinNeighbors.setObjectName("ClusterMinNeighbors")
        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(410, 790, 141, 16))
        self.label.setObjectName("label")
        self.label_2 = QtWidgets.QLabel(self.centralwidget)
        self.label_2.setGeometry(QtCore.QRect(410, 830, 171, 16))
        self.label_2.setObjectName("label_2")
        self.ToggleClusterButton = QtWidgets.QPushButton(self.centralwidget)
        self.ToggleClusterButton.setGeometry(QtCore.QRect(490, 760, 101, 23))
        self.ToggleClusterButton.setStyleSheet("background-color: rgb(172, 199, 241);")
        self.ToggleClusterButton.setObjectName("ToggleClusterButton")
        self.SavePathTextDisplay = QtWidgets.QLineEdit(self.centralwidget)
        self.SavePathTextDisplay.setGeometry(QtCore.QRect(940, 840, 161, 20))
        self.SavePathTextDisplay.setStyleSheet("background-color: rgb(255, 255, 255);")
        self.SavePathTextDisplay.setObjectName("SavePathTextDisplay")
        self.SaveFilteredResultsButton = QtWidgets.QPushButton(self.centralwidget)
        self.SaveFilteredResultsButton.setGeometry(QtCore.QRect(820, 870, 111, 21))
        self.SaveFilteredResultsButton.setStyleSheet("background-color: rgb(120, 201, 172);")
        self.SaveFilteredResultsButton.setObjectName("SaveFilteredResultsButton")
        self.SaveAsFilterResultsButton = QtWidgets.QPushButton(self.centralwidget)
        self.SaveAsFilterResultsButton.setGeometry(QtCore.QRect(820, 840, 111, 23))
        self.SaveAsFilterResultsButton.setStyleSheet("background-color: rgb(252, 205, 64);")
        self.SaveAsFilterResultsButton.setObjectName("SaveAsFilterResultsButton")
        self.saveMaskButton = QtWidgets.QPushButton(self.centralwidget)
        self.saveMaskButton.setGeometry(QtCore.QRect(10, 720, 111, 23))
        self.saveMaskButton.setStyleSheet("background-color: rgb(252, 205, 64);")
        self.saveMaskButton.setObjectName("saveMaskButton")
        self.saveFilterMetadataCheckbox = QtWidgets.QCheckBox(self.centralwidget)
        self.saveFilterMetadataCheckbox.setGeometry(QtCore.QRect(820, 900, 151, 21))
        self.saveFilterMetadataCheckbox.setObjectName("saveFilterMetadataCheckbox")
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1114, 20))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuEdit = QtWidgets.QMenu(self.menubar)
        self.menuEdit.setObjectName("menuEdit")
        self.menuView = QtWidgets.QMenu(self.menubar)
        self.menuView.setObjectName("menuView")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.toolBar = QtWidgets.QToolBar(MainWindow)
        self.toolBar.setObjectName("toolBar")
        MainWindow.addToolBar(QtCore.Qt.TopToolBarArea, self.toolBar)
        self.actionLoad_Project = QtWidgets.QAction(MainWindow)
        self.actionLoad_Project.setObjectName("actionLoad_Project")
        self.actionSave_Project = QtWidgets.QAction(MainWindow)
        self.actionSave_Project.setObjectName("actionSave_Project")
        self.actionSave_as = QtWidgets.QAction(MainWindow)
        self.actionSave_as.setObjectName("actionSave_as")
        self.actionImage_Manager = QtWidgets.QAction(MainWindow)
        self.actionImage_Manager.setObjectName("actionImage_Manager")
        self.actionNew_Project = QtWidgets.QAction(MainWindow)
        self.actionNew_Project.setObjectName("actionNew_Project")
        self.actionNight_mode = QtWidgets.QAction(MainWindow)
        self.actionNight_mode.setObjectName("actionNight_mode")
        self.menuFile.addAction(self.actionNew_Project)
        self.menuFile.addAction(self.actionLoad_Project)
        self.menuFile.addAction(self.actionSave_Project)
        self.menuFile.addAction(self.actionSave_as)
        self.menuFile.addAction(self.actionImage_Manager)
        self.menuView.addAction(self.actionNight_mode)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuEdit.menuAction())
        self.menubar.addAction(self.menuView.menuAction())
        self.toolBar.addSeparator()

        self.retranslateUi(MainWindow)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
        self.toggleSegmentationMaskButton.setToolTip(_translate("MainWindow", "<html><head/><body><p>Click to toggle the segmentation mask overlay (if exists)</p></body></html>"))
        self.toggleSegmentationMaskButton.setText(_translate("MainWindow", "Object Mask"))
        self.segmentationMaskFileDisplay.setText(_translate("MainWindow", "<No mask>"))
        self.loadAnalysisFileButton.setText(_translate("MainWindow", "Load analysis file"))
        self.analysisFileDisplay.setText(_translate("MainWindow", "<No analysis file>"))
        self.filterButton.setText(_translate("MainWindow", "Configure filters"))
        self.AddRegionOfInterestButton.setText(_translate("MainWindow", "Add ROI"))
        self.RemoveRegionOfInterestButton.setText(_translate("MainWindow", "Delete ROI"))
        self.clusterButton.setText(_translate("MainWindow", "Cluster"))
        self.label.setText(_translate("MainWindow", "Min dist between neighbors"))
        self.label_2.setText(_translate("MainWindow", "Min number of objects per cluster"))
        self.ToggleClusterButton.setText(_translate("MainWindow", "Toggle Cluster"))
        self.SaveFilteredResultsButton.setText(_translate("MainWindow", "Save"))
        self.SaveAsFilterResultsButton.setText(_translate("MainWindow", "Save as..."))
        self.saveMaskButton.setText(_translate("MainWindow", "Save Mask"))
        self.saveFilterMetadataCheckbox.setText(_translate("MainWindow", "Save filter metadata"))
        self.menuFile.setTitle(_translate("MainWindow", "File"))
        self.menuEdit.setTitle(_translate("MainWindow", "Edit"))
        self.menuView.setTitle(_translate("MainWindow", "View"))
        self.toolBar.setWindowTitle(_translate("MainWindow", "toolBar"))
        self.actionLoad_Project.setText(_translate("MainWindow", "Load Project"))
        self.actionSave_Project.setText(_translate("MainWindow", "Save Project"))
        self.actionSave_as.setText(_translate("MainWindow", "Save as..."))
        self.actionImage_Manager.setText(_translate("MainWindow", "Image Manager"))
        self.actionNew_Project.setText(_translate("MainWindow", "New Project"))
        self.actionNight_mode.setText(_translate("MainWindow", "Toggle night mode"))