Python Saved Program: majestic-rain

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1271, 421)
        MainWindow.setMinimumSize(QtCore.QSize(720, 0))
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.scrollArea = QtWidgets.QScrollArea(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.scrollArea.sizePolicy().hasHeightForWidth())
        self.scrollArea.setSizePolicy(sizePolicy)
        self.scrollArea.setMinimumSize(QtCore.QSize(256, 0))
        self.scrollArea.setWidgetResizable(True)
        self.scrollArea.setObjectName("scrollArea")
        self.scrollAreaWidgetContents = QtWidgets.QWidget()
        self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 254, 360))
        self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.seeing_prop_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.seeing_prop_btn.setObjectName("seeing_prop_btn")
        self.gridLayout.addWidget(self.seeing_prop_btn, 9, 0, 1, 2)
        self.eye_cam_combo_box = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.eye_cam_combo_box.setObjectName("eye_cam_combo_box")
        self.gridLayout.addWidget(self.eye_cam_combo_box, 12, 0, 1, 1)
        self.seeing_cam_combo_box = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.seeing_cam_combo_box.setObjectName("seeing_cam_combo_box")
        self.gridLayout.addWidget(self.seeing_cam_combo_box, 8, 0, 1, 1)
        self.seeing_res_label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.seeing_res_label.sizePolicy().hasHeightForWidth())
        self.seeing_res_label.setSizePolicy(sizePolicy)
        self.seeing_res_label.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft)
        self.seeing_res_label.setObjectName("seeing_res_label")
        self.gridLayout.addWidget(self.seeing_res_label, 7, 1, 1, 1)
        self.seeing_cam_label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.seeing_cam_label.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft)
        self.seeing_cam_label.setObjectName("seeing_cam_label")
        self.gridLayout.addWidget(self.seeing_cam_label, 7, 0, 1, 1)
        self.eye_cam_label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.eye_cam_label.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft)
        self.eye_cam_label.setObjectName("eye_cam_label")
        self.gridLayout.addWidget(self.eye_cam_label, 11, 0, 1, 1)
        self.eye_res_combo_box = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.eye_res_combo_box.setObjectName("eye_res_combo_box")
        self.gridLayout.addWidget(self.eye_res_combo_box, 12, 1, 1, 1)
        self.seeing_res_combo_box = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.seeing_res_combo_box.setObjectName("seeing_res_combo_box")
        self.gridLayout.addWidget(self.seeing_res_combo_box, 8, 1, 1, 1)
        self.eye_res_label = QtWidgets.QLabel(self.scrollAreaWidgetContents)
        self.eye_res_label.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft)
        self.eye_res_label.setWordWrap(False)
        self.eye_res_label.setObjectName("eye_res_label")
        self.gridLayout.addWidget(self.eye_res_label, 11, 1, 1, 1)
        self.eye_prop_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.eye_prop_btn.setObjectName("eye_prop_btn")
        self.gridLayout.addWidget(self.eye_prop_btn, 13, 0, 1, 2)
        self.stop_cap_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.stop_cap_btn.sizePolicy().hasHeightForWidth())
        self.stop_cap_btn.setSizePolicy(sizePolicy)
        self.stop_cap_btn.setObjectName("stop_cap_btn")
        self.gridLayout.addWidget(self.stop_cap_btn, 1, 0, 1, 2)
        self.start_cap_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.start_cap_btn.setObjectName("start_cap_btn")
        self.gridLayout.addWidget(self.start_cap_btn, 0, 0, 1, 2)
        self.toggle_gui_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.toggle_gui_btn.setObjectName("toggle_gui_btn")
        self.gridLayout.addWidget(self.toggle_gui_btn, 15, 0, 1, 2)
        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem, 14, 0, 1, 2)
        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem1, 10, 0, 1, 2)
        self.calibrate_btn = QtWidgets.QPushButton(self.scrollAreaWidgetContents)
        self.calibrate_btn.setObjectName("calibrate_btn")
        self.gridLayout.addWidget(self.calibrate_btn, 2, 0, 1, 1)
        self.calibration_combo_box = QtWidgets.QComboBox(self.scrollAreaWidgetContents)
        self.calibration_combo_box.setObjectName("calibration_combo_box")
        self.gridLayout.addWidget(self.calibration_combo_box, 2, 1, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout.addItem(spacerItem2, 6, 0, 1, 2)
        self.verticalLayout.addLayout(self.gridLayout)
        self.scrollArea.setWidget(self.scrollAreaWidgetContents)
        self.gridLayout_3.addWidget(self.scrollArea, 0, 3, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.cam_view = QtWidgets.QLabel(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cam_view.sizePolicy().hasHeightForWidth())
        self.cam_view.setSizePolicy(sizePolicy)
        self.cam_view.setMinimumSize(QtCore.QSize(480, 360))
        self.cam_view.setAlignment(QtCore.Qt.AlignCenter)
        self.cam_view.setObjectName("cam_view")
        self.horizontalLayout.addWidget(self.cam_view)
        spacerItem3 = QtWidgets.QSpacerItem(2, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem3)
        self.cam_view_2 = QtWidgets.QLabel(self.centralwidget)
        self.cam_view_2.setMinimumSize(QtCore.QSize(480, 360))
        self.cam_view_2.setAlignment(QtCore.Qt.AlignCenter)
        self.cam_view_2.setObjectName("cam_view_2")
        self.horizontalLayout.addWidget(self.cam_view_2)
        self.gridLayout_3.addLayout(self.horizontalLayout, 0, 1, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1271, 21))
        self.menubar.setObjectName("menubar")
        self.menuFile = QtWidgets.QMenu(self.menubar)
        self.menuFile.setObjectName("menuFile")
        self.menuAbout = QtWidgets.QMenu(self.menubar)
        self.menuAbout.setObjectName("menuAbout")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)
        self.action_coming_soon = QtWidgets.QAction(MainWindow)
        self.action_coming_soon.setObjectName("action_coming_soon")
        self.action_coming_soon_2 = QtWidgets.QAction(MainWindow)
        self.action_coming_soon_2.setObjectName("action_coming_soon_2")
        self.menuFile.addAction(self.action_coming_soon)
        self.menuAbout.addAction(self.action_coming_soon_2)
        self.menubar.addAction(self.menuFile.menuAction())
        self.menubar.addAction(self.menuAbout.menuAction())

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

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "Python Eye Capture"))
        self.seeing_prop_btn.setText(_translate("MainWindow", "Advanced Property Editor"))
        self.seeing_res_label.setText(_translate("MainWindow", "Resolution:"))
        self.seeing_cam_label.setText(_translate("MainWindow", "Seeing Camera:"))
        self.eye_cam_label.setText(_translate("MainWindow", "Eye Camera:"))
        self.eye_res_label.setText(_translate("MainWindow", "Resolution:"))
        self.eye_prop_btn.setText(_translate("MainWindow", "Advanced Property Editor"))
        self.stop_cap_btn.setText(_translate("MainWindow", "Stop Capture (F6)"))
        self.start_cap_btn.setText(_translate("MainWindow", "Start Capture (F5)"))
        self.toggle_gui_btn.setText(_translate("MainWindow", "Toggle GUI (F7)"))
        self.calibrate_btn.setText(_translate("MainWindow", "Calibrate Eye Camera"))
        self.cam_view.setText(_translate("MainWindow", "(camera view)"))
        self.cam_view_2.setText(_translate("MainWindow", "(camera view 2)"))
        self.menuFile.setTitle(_translate("MainWindow", "File"))
        self.menuAbout.setTitle(_translate("MainWindow", "About"))
        self.action_coming_soon.setText(_translate("MainWindow", "(coming soon!)"))
        self.action_coming_soon_2.setText(_translate("MainWindow", "(coming soon!)"))
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs