class Ui_Error(object): def setupUi(self, Error): if not Error.objectName(): Error.setObjectName(u"Error") Error.resize(250, 150) Error.setMinimumSize(QSize(250, 150)) Error.setMaximumSize(QSize(250, 150)) self.horizontalLayout = QHBoxLayout(Error) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.frame = QFrame(Error) self.frame.setObjectName(u"frame") self.frame.setStyleSheet(u"background:rgb(51,51,51);") self.frame.setFrameShape(QFrame.NoFrame) self.frame.setFrameShadow(QFrame.Plain) self.verticalLayout = QVBoxLayout(self.frame) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(2, 2, 2, 2) self.frame_top = QFrame(self.frame) self.frame_top.setObjectName(u"frame_top") self.frame_top.setMinimumSize(QSize(0, 55)) self.frame_top.setMaximumSize(QSize(16777215, 55)) self.frame_top.setStyleSheet(u"background:rgb(91,90,90);") self.frame_top.setFrameShape(QFrame.NoFrame) self.frame_top.setFrameShadow(QFrame.Plain) self.horizontalLayout_2 = QHBoxLayout(self.frame_top) self.horizontalLayout_2.setSpacing(5) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setContentsMargins(15, 5, 0, 0) self.lab_icon = QLabel(self.frame_top) self.lab_icon.setObjectName(u"lab_icon") self.lab_icon.setMinimumSize(QSize(35, 35)) self.lab_icon.setMaximumSize(QSize(35, 35)) self.horizontalLayout_2.addWidget(self.lab_icon) self.lab_heading = QLabel(self.frame_top) self.lab_heading.setObjectName(u"lab_heading") font = QFont() font.setFamily(u"Segoe UI") font.setPointSize(12) self.lab_heading.setFont(font) self.lab_heading.setStyleSheet(u"color:rgb(255,255,255);") self.lab_heading.setWordWrap(True) self.horizontalLayout_2.addWidget(self.lab_heading) self.verticalLayout.addWidget(self.frame_top) self.frame_bottom = QFrame(self.frame) self.frame_bottom.setObjectName(u"frame_bottom") self.frame_bottom.setStyleSheet(u"background:rgb(91,90,90);") self.frame_bottom.setFrameShape(QFrame.NoFrame) self.frame_bottom.setFrameShadow(QFrame.Plain) self.gridLayout = QGridLayout(self.frame_bottom) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setContentsMargins(-1, -1, -1, 0) self.bn_ok = QPushButton(self.frame_bottom) self.bn_ok.setObjectName(u"bn_ok") self.bn_ok.setMinimumSize(QSize(69, 25)) self.bn_ok.setMaximumSize(QSize(69, 25)) self.bn_ok.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(51,51,51);\n" " border-radius: 5px; \n" " color:rgb(255,255,255);\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(51,51,51);\n" "}\n" "") self.gridLayout.addWidget(self.bn_ok, 0, 0, 1, 1) self.verticalLayout.addWidget(self.frame_bottom) self.horizontalLayout.addWidget(self.frame) self.retranslateUi(Error) QMetaObject.connectSlotsByName(Error) # setupUi def retranslateUi(self, Error): Error.setWindowTitle( QCoreApplication.translate("Error", u"Dialog", None)) self.lab_icon.setText("") self.lab_heading.setText("") self.bn_ok.setText("")
class DataBrowserMain(QWidget): sliceUpdated = Signal(int, int, int, int) def __init__(self, parent): super(DataBrowserMain, self).__init__(parent) # data import self.brkraw_obj = self.parent().brkraw_obj self.selectedScan = None self.selectedScanTR = None self.set_viewer_frame() self.set_controller_frame() self.set_gridlayouts() self.set_font() # self.set_palette() # TODO self.set_size() self.set_objectnames() self.set_texts() self.ratio_container = [] self.init_connection() self.inactivate_widgets() # Inactivate during startup def init_connection(self): self.parent().dataSelected.connect( self.selectScanEvent) # run selectScanEvent when data selected self.event_timer = QTimer() self.event_timer.timeout.connect(self.sliceUpdateEvent) # self.sliceUpdated.connect(self.updateImage) self.xaxis_slider.valueChanged.connect(self.xaxis_spinbox.setValue) self.xaxis_spinbox.valueChanged.connect(self.xaxis_slider.setValue) self.yaxis_slider.valueChanged.connect(self.yaxis_spinbox.setValue) self.yaxis_spinbox.valueChanged.connect(self.yaxis_slider.setValue) self.zaxis_slider.valueChanged.connect(self.zaxis_spinbox.setValue) self.zaxis_spinbox.valueChanged.connect(self.zaxis_slider.setValue) self.frame_slider.valueChanged.connect(self.frame_spinbox.setValue) self.frame_spinbox.valueChanged.connect(self.frame_slider.setValue) self.axial_view.pointed.connect(self.axialview_pointing_event) self.sagittal_view.pointed.connect(self.sagittalview_pointing_event) self.coronal_view.pointed.connect(self.coronalview_pointing_event) self.connect_sliders_to_update() def sagittalview_pointing_event(self, pos_x, pos_y, meta): max_x = self.yaxis_slider.maximum() max_y = self.zaxis_slider.maximum() # print(pos_x, pos_y, max_x, max_y) self.yaxis_slider.setValue(int(max_x * pos_x)) self.zaxis_slider.setValue(max_y - int(max_y * pos_y)) # print(int(max_x * pos_x), int(max_y * pos_y)) def axialview_pointing_event(self, pos_x, pos_y, meta): max_x = self.yaxis_slider.maximum() max_y = self.xaxis_slider.maximum() # print(pos_x, pos_y, max_x, max_y) self.yaxis_slider.setValue(int(max_x * pos_x)) self.xaxis_slider.setValue(int(max_y * pos_y)) # print(int(max_x * pos_x), int(max_y * pos_y)) def coronalview_pointing_event(self, pos_x, pos_y, meta): max_x = self.xaxis_slider.maximum() max_y = self.zaxis_slider.maximum() # print(pos_x, pos_y, max_x, max_y) self.xaxis_slider.setValue(int(max_x * pos_x)) self.zaxis_slider.setValue(max_y - int(max_y * pos_y)) # print(int(max_x * pos_x), int(max_y * pos_y)) def sliderChangeEvent(self): self.event_timer.start(10) def sliceUpdateEvent(self): # This will executed only when timer timeout x = self.xaxis_slider.value() y = self.yaxis_slider.value() z = self.zaxis_slider.value() t = self.frame_slider.value() self.sliceUpdated.emit(x, y, z, t) self.event_timer.stop() @staticmethod def slice_data(dataobj, slice_orient, slice_num): if slice_orient == 'axial': sliced_data = dataobj[:, :, slice_num] elif slice_orient == 'sagittal': sliced_data = dataobj[:, slice_num, ::-1] elif slice_orient == 'coronal': sliced_data = dataobj[slice_num, :, ::-1] else: popup_error_dialog(UnexpectedError.message) return None return sliced_data def updateImage(self, x, y, z, frame): if len(self.selectedScan.shape) == 4: dataobj = self.selectedScan[:, :, :, frame] else: dataobj = self.selectedScan[...] data_xy = self.slice_data(dataobj, 'axial', z) data_yz = self.slice_data(dataobj, 'sagittal', x) data_xz = self.slice_data(dataobj, 'coronal', y) ratio_xy, ratio_yz, ratio_xz = self.ratio_container # ratio_xy, ratio_yz, ratio_xz = 1, 1, 1 qm_xy = convert_arr2qpixmap(data_xy, ratio_xy) qm_yz = convert_arr2qpixmap(data_yz, ratio_yz) qm_xz = convert_arr2qpixmap(data_xz, ratio_xz) self.axial_view.setPixmap(qm_xy) self.sagittal_view.setPixmap(qm_yz) self.coronal_view.setPixmap(qm_xz) def selectScanEvent(self, delivery_package: list): """ this event is occurring when a scan selected on scanlist """ self.axial_view.setEnabled(True) self.sagittal_view.setEnabled(True) self.coronal_view.setEnabled(True) self.selectedScan, affine, resol, self.selectedScanTR, is_localizer = delivery_package self.selectedScanTR /= 1000 from slfmri.imgman import reorient_to_ras, determine_slice_plane slice_plane_ref = dict(sagittal=0, coronal=1, axial=2) if is_localizer: img_container = dict() for i, aff in enumerate(affine): size = config.get('ImageViewer', 'size') data = self.selectedScan[..., i] slice_plane = determine_slice_plane(2, aff, resol) ras_data, ras_resol = reorient_to_ras(data[:, :, np.newaxis], aff, resol) slice_axis = slice_plane_ref[slice_plane] ras_data = ras_data.mean(slice_axis) ras_resol = np.delete(ras_resol, slice_axis) qpixmap = convert_arr2qpixmap(ras_data, ras_resol, size) img_container[slice_plane] = qpixmap self.update_axisview(img_container) else: # other than localizer self.init_data(self.selectedScan) matrix_size = np.asarray(self.selectedScan.shape) resol = np.asarray(resol) fov = matrix_size[:3] * resol self.ratio_container = [ fov[0] / fov[1], fov[1] / fov[2], fov[0] / fov[2] ] # reset value init_x, init_y, init_z = (np.asarray(self.selectedScan.shape[:3]) / 2.0).astype(int) init_f = 0 self.disconnect_sliders_to_update() self.xaxis_slider.setValue(init_x) self.yaxis_slider.setValue(init_y) self.zaxis_slider.setValue(init_z) self.frame_slider.setValue(init_f) self.connect_sliders_to_update() self.updateImage(init_x, init_y, init_z, init_f) def connect_sliders_to_update(self): # connect to check slice update self.xaxis_slider.valueChanged.connect(self.sliderChangeEvent) self.yaxis_slider.valueChanged.connect(self.sliderChangeEvent) self.zaxis_slider.valueChanged.connect(self.sliderChangeEvent) self.frame_slider.valueChanged.connect(self.sliderChangeEvent) def disconnect_sliders_to_update(self): # disconnect to check slice update self.xaxis_slider.valueChanged.disconnect(self.sliderChangeEvent) self.yaxis_slider.valueChanged.disconnect(self.sliderChangeEvent) self.zaxis_slider.valueChanged.disconnect(self.sliderChangeEvent) self.frame_slider.valueChanged.disconnect(self.sliderChangeEvent) def init_data(self, dataobj): self.slicecontrol_pane.setEnabled(True) dim = len(dataobj.shape) if dim == 3: size_x, size_y, size_z = dataobj.shape size_frame = None elif dim == 4: size_x, size_y, size_z, size_frame = dataobj.shape else: popup_error_dialog(UnexpectedError.message) return None # init sliders and spinboxes self.xaxis_slider.setRange(0, size_x - 1) self.yaxis_slider.setRange(0, size_y - 1) self.zaxis_slider.setRange(0, size_z - 1) self.xaxis_spinbox.setRange(0, size_x - 1) self.yaxis_spinbox.setRange(0, size_y - 1) self.zaxis_spinbox.setRange(0, size_z - 1) if dim == 3: self.frame_label.setDisabled(True) self.frame_slider.setDisabled(True) self.frame_spinbox.setDisabled(True) else: self.frame_label.setEnabled(True) self.frame_slider.setEnabled(True) self.frame_spinbox.setEnabled(True) self.frame_slider.setRange(0, size_frame - 1) self.frame_spinbox.setRange(0, size_frame - 1) def update_axisview(self, img_container: dict): for view_plane, pixmap in img_container.items(): if view_plane == 'axial': self.axial_view.setPixmap(pixmap) elif view_plane == 'sagittal': self.sagittal_view.setPixmap(pixmap) else: self.coronal_view.setPixmap(pixmap) def inactivate_widgets(self): self.slicecontrol_pane.setDisabled(True) self.graph_frame.setDisabled(True) def set_navigationmode(self): # mouse click will navigate slice. pass def set_drawingmode(self): # roi drawing function pass def mask_data_handler(self): # mask later handler pass def slider_event_related(self): # slider for slicing. pass def set_viewer_frame(self): self.imageframe = QFrame(self) self.axial_view = SliceViewer(self.imageframe) self.axial_view.setDisabled(True) self.sagittal_view = SliceViewer(self.imageframe) self.sagittal_view.setDisabled(True) self.coronal_view = SliceViewer(self.imageframe) self.coronal_view.setDisabled(True) # TODO: Will reactivate these on later version # self.axial_title = QLabel(self.imageframe) # self.coronal_title = QLabel(self.imageframe) # self.sagittal_title = QLabel(self.imageframe) # # self.axialL_label = QLabel(self.imageframe) # self.axialA_label = QLabel(self.imageframe) # self.axialR_label = QLabel(self.imageframe) # self.axialP_label = QLabel(self.imageframe) # # self.sagittalS_label = QLabel(self.imageframe) # self.sagittalA_label = QLabel(self.imageframe) # self.sagittalI_label = QLabel(self.imageframe) # self.sagittalP_label = QLabel(self.imageframe) # # self.coronalL_label = QLabel(self.imageframe) # self.coronalS_label = QLabel(self.imageframe) # self.coronalR_label = QLabel(self.imageframe) # self.coronalI_label = QLabel(self.imageframe) # # self.axial_title.setTextFormat(Qt.MarkdownText) # self.axialL_label.setTextFormat(Qt.MarkdownText) # self.axialA_label.setTextFormat(Qt.MarkdownText) # self.axialR_label.setTextFormat(Qt.MarkdownText) # self.axialP_label.setTextFormat(Qt.MarkdownText) # # self.sagittal_title.setTextFormat(Qt.MarkdownText) # self.sagittalS_label.setTextFormat(Qt.MarkdownText) # self.sagittalA_label.setTextFormat(Qt.MarkdownText) # self.sagittalI_label.setTextFormat(Qt.MarkdownText) # self.sagittalP_label.setTextFormat(Qt.MarkdownText) # # self.coronal_title.setTextFormat(Qt.MarkdownText) # self.coronalL_label.setTextFormat(Qt.MarkdownText) # self.coronalS_label.setTextFormat(Qt.MarkdownText) # self.coronalR_label.setTextFormat(Qt.MarkdownText) # self.coronalI_label.setTextFormat(Qt.MarkdownText) # # self.axial_title.setAlignment(Qt.AlignCenter) # self.axialL_label.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) # self.axialA_label.setAlignment(Qt.AlignBottom | Qt.AlignHCenter) # self.axialR_label.setAlignment(Qt.AlignLeading | Qt.AlignLeft | Qt.AlignVCenter) # self.axialP_label.setAlignment(Qt.AlignHCenter | Qt.AlignTop) # # self.sagittal_title.setAlignment(Qt.AlignCenter) # self.sagittalS_label.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) # self.sagittalA_label.setAlignment(Qt.AlignBottom | Qt.AlignHCenter) # self.sagittalI_label.setAlignment(Qt.AlignLeading | Qt.AlignLeft | Qt.AlignVCenter) # self.sagittalP_label.setAlignment(Qt.AlignHCenter | Qt.AlignTop) # # self.coronal_title.setAlignment(Qt.AlignCenter) # self.coronalL_label.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) # self.coronalS_label.setAlignment(Qt.AlignBottom | Qt.AlignHCenter) # self.coronalR_label.setAlignment(Qt.AlignLeading | Qt.AlignLeft | Qt.AlignVCenter) # self.coronalI_label.setAlignment(Qt.AlignHCenter | Qt.AlignTop) def set_controller_frame(self): self.controller_frame = QFrame(self) self.slicecontrol_pane = QGroupBox(self.controller_frame) self.frame_spinbox = QSpinBox(self.slicecontrol_pane) self.xaxis_label = QLabel(self.slicecontrol_pane) self.yaxis_label = QLabel(self.slicecontrol_pane) self.zaxis_label = QLabel(self.slicecontrol_pane) self.frame_label = QLabel(self.slicecontrol_pane) self.xaxis_slider = QSlider(self.slicecontrol_pane) self.yaxis_slider = QSlider(self.slicecontrol_pane) self.zaxis_slider = QSlider(self.slicecontrol_pane) self.frame_slider = QSlider(self.slicecontrol_pane) self.xaxis_spinbox = QSpinBox(self.slicecontrol_pane) self.yaxis_spinbox = QSpinBox(self.slicecontrol_pane) self.zaxis_spinbox = QSpinBox(self.slicecontrol_pane) self.graph_frame = QFrame(self) self.graph_view = pg.PlotWidget(self.graph_frame) self.graph_view.setBackground('w') # TODO: Will reactivate these on later version # self.graph_view = QGraphicsView(self.graph_frame) # self.graphcontrol_pane = QGroupBox(self.graph_frame) # self.addmask_button = QPushButton(self.graphcontrol_pane) # self.removemask_button = QPushButton(self.graphcontrol_pane) # self.mask_listview = QListView(self.graphcontrol_pane) # self.savepng_button = QPushButton(self.graphcontrol_pane) # self.savecsv_button = QPushButton(self.graphcontrol_pane) self.axial_view.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) self.sagittal_view.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) self.coronal_view.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) self.xaxis_slider.setOrientation(Qt.Horizontal) self.yaxis_slider.setOrientation(Qt.Horizontal) self.zaxis_slider.setOrientation(Qt.Horizontal) self.frame_slider.setOrientation(Qt.Horizontal) self.slicecontrol_pane.setAlignment(Qt.AlignCenter) self.xaxis_label.setAlignment(Qt.AlignCenter) self.yaxis_label.setAlignment(Qt.AlignCenter) self.zaxis_label.setAlignment(Qt.AlignCenter) self.frame_label.setAlignment(Qt.AlignCenter) # TODO: Will reactivate these on later version # self.graphcontrol_pane.setAlignment(Qt.AlignCenter) def set_size(self): size = int(config.get('ImageViewer', 'size')) self.imageframe.setLineWidth(0) self.axial_view.setMinimumSize(QSize(size, size)) self.axial_view.setMaximumSize(QSize(size, size)) self.axial_view.setLineWidth(0) self.sagittal_view.setMinimumSize(QSize(size, size)) self.sagittal_view.setMaximumSize(QSize(size, size)) self.sagittal_view.setLineWidth(0) self.coronal_view.setMinimumSize(QSize(size, size)) self.coronal_view.setMaximumSize(QSize(size, size)) self.coronal_view.setLineWidth(0) # TODO: Will reactivate these on later version # self.axialL_label.setMinimumSize(QSize(20, 0)) # self.axialA_label.setMinimumSize(QSize(0, 20)) # self.axialR_label.setMinimumSize(QSize(20, 0)) # self.axialP_label.setMinimumSize(QSize(0, 20)) # self.sagittalS_label.setMinimumSize(QSize(20, 0)) # self.sagittalA_label.setMinimumSize(QSize(0, 20)) # self.sagittalI_label.setMinimumSize(QSize(20, 0)) # self.sagittalP_label.setMinimumSize(QSize(0, 20)) # self.coronalL_label.setMinimumSize(QSize(20, 0)) # self.coronalS_label.setMinimumSize(QSize(0, 20)) # self.coronalR_label.setMinimumSize(QSize(20, 0)) # self.coronalI_label.setMinimumSize(QSize(0, 20)) self.controller_frame.setMinimumSize(QSize(300, 300)) self.controller_frame.setMaximumSize(QSize(400, 300)) self.graph_frame.setMinimumSize(QSize(0, 300)) self.graph_frame.setMaximumSize(QSize(4000, 4000)) self.graph_view.setMaximumSize(QSize(4000, 600)) # TODO: Will reactivate these on later version # self.graphcontrol_pane.setMinimumSize(QSize(300, 0)) # self.graphcontrol_pane.setMaximumSize(QSize(300, 4000)) # self.addmask_button.setMinimumSize(QSize(30, 0)) # self.addmask_button.setMaximumSize(QSize(30, 4000)) # self.removemask_button.setMinimumSize(QSize(30, 0)) # self.removemask_button.setMaximumSize(QSize(30, 4000)) def set_font(self): self.arial_8 = QFont() self.arial_8.setFamily(u"Arial") self.arial_8.setPointSize(8) self.setFont(self.arial_8) # TODO: Will reactivate these on later version # self.axial_title.setFont(self.arial_8) # self.coronal_title.setFont(self.arial_8) # self.sagittal_title.setFont(self.arial_8) # self.axialL_label.setFont(self.arial_8) # self.axialA_label.setFont(self.arial_8) # self.axialR_label.setFont(self.arial_8) # self.axialP_label.setFont(self.arial_8) # self.sagittalS_label.setFont(self.arial_8) # self.sagittalA_label.setFont(self.arial_8) # self.sagittalI_label.setFont(self.arial_8) # self.sagittalP_label.setFont(self.arial_8) # self.coronalL_label.setFont(self.arial_8) # self.coronalS_label.setFont(self.arial_8) # self.coronalR_label.setFont(self.arial_8) # self.coronalI_label.setFont(self.arial_8) self.slicecontrol_pane.setFont(self.arial_8) # TODO: Will reactivate these on later version # self.xaxis_label.setFont(self.arial_8) # self.yaxis_label.setFont(self.arial_8) # self.zaxis_label.setFont(self.arial_8) # self.frame_label.setFont(self.arial_8) # self.graphcontrol_pane.setFont(self.arial_8) # self.addmask_button.setFont(self.arial_8) # self.removemask_button.setFont(self.arial_8) # self.savepng_button.setFont(self.arial_8) # self.savecsv_button.setFont(self.arial_8) def set_palette(self): # Brush gray_text = QBrush(QColor(171, 171, 171, 255)) gray_text.setStyle(Qt.SolidPattern) black_background = QBrush(QColor(0, 0, 0, 255)) black_background.setStyle(Qt.SolidPattern) self.orientation_label_palette = QPalette() self.orientation_label_palette.setBrush(QPalette.Active, QPalette.WindowText, gray_text) self.orientation_label_palette.setBrush(QPalette.Inactive, QPalette.WindowText, gray_text) self.orientation_label_palette.setBrush(QPalette.Disabled, QPalette.WindowText, gray_text) self.ortho_viewer_palette = QPalette() self.ortho_viewer_palette.setBrush(QPalette.Active, QPalette.Base, black_background) self.ortho_viewer_palette.setBrush(QPalette.Inactive, QPalette.Base, black_background) self.ortho_viewer_palette.setBrush(QPalette.Disabled, QPalette.Base, black_background) self.axialA_label.setPalette(self.orientation_label_palette) self.axialL_label.setPalette(self.orientation_label_palette) self.axialR_label.setPalette(self.orientation_label_palette) self.axialP_label.setPalette(self.orientation_label_palette) self.axial_view.setPalette(self.ortho_viewer_palette) self.sagittalS_label.setPalette(self.orientation_label_palette) self.sagittalA_label.setPalette(self.orientation_label_palette) self.sagittalI_label.setPalette(self.orientation_label_palette) self.sagittalP_label.setPalette(self.orientation_label_palette) self.sagittal_view.setPalette(self.ortho_viewer_palette) self.coronalL_label.setPalette(self.orientation_label_palette) self.coronalS_label.setPalette(self.orientation_label_palette) self.coronalR_label.setPalette(self.orientation_label_palette) self.coronalI_label.setPalette(self.orientation_label_palette) self.coronal_view.setPalette(self.ortho_viewer_palette) def set_gridlayouts(self): self.axial_gridLayout = QGridLayout() self.coronal_gridLayout = QGridLayout() self.sagittal_gridLayout = QGridLayout() self.imagecont_gridLayout = QGridLayout(self.slicecontrol_pane) self.imageframe_gridLayout = QGridLayout(self.imageframe) # self.graphcontrol_gridLayout = QGridLayout(self.graphcontrol_pane) self.verticalLayout = QVBoxLayout(self.controller_frame) self.horizontalLayout = QHBoxLayout(self.graph_frame) self.main_gridLayout = QGridLayout(self) # TODO: Will reactivate these on later version # self.imageframe_gridLayout.addWidget(self.axial_title, 0, 1, 1, 1) # self.imageframe_gridLayout.addWidget(self.coronal_title, 0, 2, 1, 1) # self.imageframe_gridLayout.addWidget(self.sagittal_title, 0, 0, 1, 1) # self.axial_gridLayout.addWidget(self.axialL_label, 1, 0, 1, 1) # self.axial_gridLayout.addWidget(self.axialA_label, 0, 1, 1, 1) # self.axial_gridLayout.addWidget(self.axialR_label, 1, 2, 1, 1) # self.axial_gridLayout.addWidget(self.axialP_label, 2, 1, 1, 1) self.axial_gridLayout.addWidget(self.axial_view, 1, 1, 1, 1) # self.sagittal_gridLayout.addWidget(self.sagittalS_label, 1, 0, 1, 1) # self.sagittal_gridLayout.addWidget(self.sagittalA_label, 0, 1, 1, 1) # self.sagittal_gridLayout.addWidget(self.sagittalI_label, 1, 2, 1, 1) # self.sagittal_gridLayout.addWidget(self.sagittalP_label, 2, 1, 1, 1) self.sagittal_gridLayout.addWidget(self.sagittal_view, 1, 1, 1, 1) # self.coronal_gridLayout.addWidget(self.coronalL_label, 1, 0, 1, 1) # self.coronal_gridLayout.addWidget(self.coronalS_label, 0, 1, 1, 1) # self.coronal_gridLayout.addWidget(self.coronalR_label, 1, 2, 1, 1) # self.coronal_gridLayout.addWidget(self.coronalI_label, 2, 1, 1, 1) self.coronal_gridLayout.addWidget(self.coronal_view, 1, 1, 1, 1) self.imagecont_gridLayout.addWidget(self.xaxis_label, 0, 0, 1, 1) self.imagecont_gridLayout.addWidget(self.xaxis_slider, 0, 1, 1, 1) self.imagecont_gridLayout.addWidget(self.xaxis_spinbox, 0, 2, 1, 1) self.imagecont_gridLayout.addWidget(self.yaxis_label, 1, 0, 1, 1) self.imagecont_gridLayout.addWidget(self.yaxis_slider, 1, 1, 1, 1) self.imagecont_gridLayout.addWidget(self.yaxis_spinbox, 1, 2, 1, 1) self.imagecont_gridLayout.addWidget(self.zaxis_label, 2, 0, 1, 1) self.imagecont_gridLayout.addWidget(self.zaxis_slider, 2, 1, 1, 1) self.imagecont_gridLayout.addWidget(self.zaxis_spinbox, 2, 2, 1, 1) self.imagecont_gridLayout.addWidget(self.frame_label, 3, 0, 1, 1) self.imagecont_gridLayout.addWidget(self.frame_slider, 3, 1, 1, 1) self.imagecont_gridLayout.addWidget(self.frame_spinbox, 3, 2, 1, 1) self.imageframe_gridLayout.addLayout(self.axial_gridLayout, 1, 1, 1, 1) self.imageframe_gridLayout.addLayout(self.coronal_gridLayout, 1, 2, 1, 1) self.imageframe_gridLayout.addLayout(self.sagittal_gridLayout, 1, 0, 1, 1) # self.graphcontrol_gridLayout.addWidget(self.addmask_button, 3, 0, 1, 1) # self.graphcontrol_gridLayout.addWidget(self.removemask_button, 3, 1, 1, 1) # self.graphcontrol_gridLayout.addWidget(self.mask_listview, 0, 0, 1, 5) # self.graphcontrol_gridLayout.addWidget(self.savepng_button, 3, 4, 1, 1) # self.graphcontrol_gridLayout.addWidget(self.savecsv_button, 3, 3, 1, 1) self.verticalLayout.addWidget(self.slicecontrol_pane) self.horizontalLayout.addWidget(self.graph_view) # self.horizontalLayout.addWidget(self.graphcontrol_pane) self.main_gridLayout.addWidget(self.imageframe, 0, 0, 1, 2) self.main_gridLayout.addWidget(self.controller_frame, 1, 0, 1, 1) self.main_gridLayout.addWidget(self.graph_frame, 1, 1, 1, 1) def set_objectnames(self): self.setObjectName(u"data_browser") self.imageframe.setObjectName(u"image_frame") self.axial_gridLayout.setObjectName(u"axial_gridLayout") self.coronal_gridLayout.setObjectName(u"coronal_gridLayout") self.sagittal_gridLayout.setObjectName(u"sagittal_gridLayout") # TODO: Will reactivate these on later version # self.axial_title.setObjectName(u"axial_label") # self.coronal_title.setObjectName(u"coronal_label") # self.sagittal_title.setObjectName(u"sagittal_label") self.axial_view.setObjectName(u"axial_view") self.sagittal_view.setObjectName(u"sagittal_view") self.coronal_view.setObjectName(u"coronal_view") # self.axialL_label.setObjectName(u"axialL_label") # self.axialR_label.setObjectName(u"axialR_label") # self.axialA_label.setObjectName(u"axialA_label") # self.axialP_label.setObjectName(u"axialP_label") # self.sagittalS_label.setObjectName(u"sagittalS_label") # self.sagittalA_label.setObjectName(u"sagittalA_label") # self.sagittalI_label.setObjectName(u"sagittalI_label") # self.sagittalP_label.setObjectName(u"sagittalP_label") # self.coronalL_label.setObjectName(u"coronalL_label") # self.coronalS_label.setObjectName(u"coronalS_label") # self.coronalR_label.setObjectName(u"coronalR_label") # self.coronalI_label.setObjectName(u"coronalI_label") self.controller_frame.setObjectName(u"controller_frame") self.slicecontrol_pane.setObjectName(u"slicecontrol_pane") self.xaxis_label.setObjectName(u"xaxis_label") self.xaxis_slider.setObjectName(u"xaxis_slider") self.xaxis_spinbox.setObjectName(u"xaxis_spinbox") self.yaxis_label.setObjectName(u"yaxis_label") self.yaxis_slider.setObjectName(u"yaxis_slider") self.yaxis_spinbox.setObjectName(u"yaxis_spinbox") self.zaxis_label.setObjectName(u"zaxis_label") self.zaxis_slider.setObjectName(u"zaxis_slider") self.zaxis_spinbox.setObjectName(u"zaxis_spinbox") self.frame_label.setObjectName(u"frame_label") self.frame_slider.setObjectName(u"frame_slider") self.frame_spinbox.setObjectName(u"frame_spinbox") self.graph_frame.setObjectName(u"graph_frame") self.graph_view.setObjectName(u"graph_view") # TODO: Will reactivate these on later version # self.graphcontrol_pane.setObjectName(u"graphcontrol_pane") # self.addmask_button.setObjectName(u"addmask_button") # self.removemask_button.setObjectName(u"removemask_button") # self.mask_listview.setObjectName(u"mask_listview") # self.savepng_button.setObjectName(u"savepng_button") # self.savecsv_button.setObjectName(u"savecsv_button") self.imagecont_gridLayout.setObjectName(u"imagecont_gridLayout") self.imageframe_gridLayout.setObjectName(u"imageframe_gridLayout") # self.graphcontrol_gridLayout.setObjectName(u"graphcontrol_gridLayout") self.verticalLayout.setObjectName(u"verticalLayout") self.horizontalLayout.setObjectName(u"horizontalLayout") self.main_gridLayout.setObjectName(u"main_gridLayout") QMetaObject.connectSlotsByName(self) def set_texts(self): self.setWindowTitle(u"Data Browser") # TODO: Will reactivate these on later version # self.axial_title.setText(u"**Axial**") # self.coronal_title.setText(u"**Coronal**") # self.sagittal_title.setText(u"**Sagittal**") # self.sagittalS_label.setText(u"**S**") # self.sagittalA_label.setText(u"**A**") # self.sagittalI_label.setText(u"**I**") # self.sagittalP_label.setText(u"**P**") # self.axialL_label.setText(u"**L**") # self.axialA_label.setText(u"**A**") # self.axialR_label.setText(u"**R**") # self.axialP_label.setText( u"**P**") # self.coronalL_label.setText(u"**L**") # self.coronalS_label.setText(u"**S**") # self.coronalR_label.setText(u"**R**") # self.coronalI_label.setText(u"**I**") self.slicecontrol_pane.setTitle(u"Slice Control Pane") self.xaxis_label.setText(u"x") self.yaxis_label.setText(u"y") self.zaxis_label.setText(u"z") self.frame_label.setText(u"Frame") # TODO: Will reactivate these on later version # self.graphcontrol_pane.setTitle(u"Graph Control Pane") # self.addmask_button.setText(u"+") # self.removemask_button.setText(u"-") # self.savepng_button.setText(u"toPNG") # self.savecsv_button.setText(u"toCSV") def plot_timecourse(self, x, y): self.graph_frame.setEnabled(True) self.graph_view.clear() pen = pg.mkPen(color=(255, 0, 0)) if x is None: x = [0] y = [y] self.graph_view.plot(x, y, pen=pen, symbol='o') else: self.graph_view.plot(x, y, pen=pen) def get_coord(self): x = self.xaxis_slider.value() y = self.yaxis_slider.value() z = self.zaxis_slider.value() return (x, y, z)
class UiMainWindow(object): '''Интерфейс основного окна программы. Created by: Qt User Interface Compiler. Задано: панель инструментов с кнопками "Новый расчёт" (очистка всех полей), выбор режима расчёта, запуск расчёта; четыре поля ввода (длина заготовки, длина безусловного отхода, ширина реза, длина первичной обрезки торца заготовки) таблица ввода длин элементов и их количеств; кнопки "добавить строку в конец таблицы" и "удалить последнюю строку в таблице"; поле вывода результата расчёта. ''' def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(700, 495) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.main_frame = QFrame(self.centralwidget) self.main_frame.setObjectName(u"main_frame") self.main_frame.setFrameShape(QFrame.StyledPanel) self.main_frame.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.main_frame) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) # "панель инструментов" self.top_frame = QFrame(self.main_frame) self.top_frame.setObjectName(u"top_frame") self.top_frame.setMinimumSize(QSize(0, 60)) self.top_frame.setMaximumSize(QSize(16777215, 60)) self.top_frame.setFrameShape(QFrame.StyledPanel) self.top_frame.setFrameShadow(QFrame.Raised) self.horizontalLayout = QHBoxLayout(self.top_frame) self.horizontalLayout.setSpacing(5) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(5, 5, 5, 5) # кнопка "новый расчёт" self.new_calc_btn = QPushButton(self.top_frame) self.new_calc_btn.setObjectName(u"new_calc_btn") self.new_calc_btn.setMinimumSize(QSize(110, 50)) self.new_calc_btn.setMaximumSize(QSize(110, 50)) icon = QIcon() icon.addFile(NEW_CALC_ICON, QSize(), QIcon.Normal, QIcon.Off) self.new_calc_btn.setIcon(icon) self.new_calc_btn.setIconSize(QSize(45, 45)) self.horizontalLayout.addWidget(self.new_calc_btn) # кнопка "выбор режима расчёта" self.select_mode_btn = QPushButton(self.top_frame) self.select_mode_btn.setObjectName(u"select_mode_btn") self.select_mode_btn.setMinimumSize(QSize(110, 50)) self.select_mode_btn.setMaximumSize(QSize(110, 50)) icon1 = QIcon() icon1.addFile(SET_MODE_ICON, QSize(), QIcon.Normal, QIcon.Off) self.select_mode_btn.setIcon(icon1) self.select_mode_btn.setIconSize(QSize(45, 45)) self.horizontalLayout.addWidget(self.select_mode_btn) # кнопка "запуск расчёта" self.start_calc_btn = QPushButton(self.top_frame) self.start_calc_btn.setObjectName(u"start_calc_btn") self.start_calc_btn.setMinimumSize(QSize(110, 50)) self.start_calc_btn.setMaximumSize(QSize(110, 50)) icon2 = QIcon() icon2.addFile(START_CALC_ICON, QSize(), QIcon.Normal, QIcon.Off) self.start_calc_btn.setIcon(icon2) self.start_calc_btn.setIconSize(QSize(45, 45)) self.horizontalLayout.addWidget(self.start_calc_btn) self.horizontalSpacer = QSpacerItem(338, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout.addItem(self.horizontalSpacer) self.verticalLayout_2.addWidget(self.top_frame) self.bottom_frame = QFrame(self.main_frame) self.bottom_frame.setObjectName(u"bottom_frame") self.bottom_frame.setFrameShape(QFrame.StyledPanel) self.bottom_frame.setFrameShadow(QFrame.Raised) self.horizontalLayout_2 = QHBoxLayout(self.bottom_frame) self.horizontalLayout_2.setSpacing(5) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setContentsMargins(5, 5, 5, 5) self.input_frame = QFrame(self.bottom_frame) self.input_frame.setObjectName(u"input_frame") self.input_frame.setMinimumSize(QSize(340, 0)) self.input_frame.setMaximumSize(QSize(340, 16777215)) self.input_frame.setFrameShape(QFrame.StyledPanel) self.input_frame.setFrameShadow(QFrame.Raised) self.verticalLayout_3 = QVBoxLayout(self.input_frame) self.verticalLayout_3.setSpacing(5) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) # поле ввода длины заготовки self.length_layout = QHBoxLayout() self.length_layout.setSpacing(5) self.length_layout.setObjectName(u"length_layout") self.length_label = QLabel(self.input_frame) self.length_label.setObjectName(u"length_label") self.length_label.setMinimumSize(QSize(165, 25)) self.length_label.setMaximumSize(QSize(165, 25)) self.length_layout.addWidget(self.length_label) self.length_entry = QLineEdit(self.input_frame) self.length_entry.setObjectName(u"length_entry") self.length_entry.setMinimumSize(QSize(165, 25)) self.length_entry.setMaximumSize(QSize(165, 25)) self.length_layout.addWidget(self.length_entry) self.verticalLayout_3.addLayout(self.length_layout) # поле ввода длины безусловного отхода self.waste_layout = QHBoxLayout() self.waste_layout.setSpacing(5) self.waste_layout.setObjectName(u"waste_layout") self.waste_label = QLabel(self.input_frame) self.waste_label.setObjectName(u"waste_label") self.waste_label.setMinimumSize(QSize(165, 25)) self.waste_label.setMaximumSize(QSize(165, 25)) self.waste_layout.addWidget(self.waste_label) self.waste_entry = QLineEdit(self.input_frame) self.waste_entry.setObjectName(u"waste_entry") self.waste_entry.setMinimumSize(QSize(165, 25)) self.waste_entry.setMaximumSize(QSize(165, 25)) self.waste_layout.addWidget(self.waste_entry) self.verticalLayout_3.addLayout(self.waste_layout) # поле ввода ширины реза self.cut_layout = QHBoxLayout() self.cut_layout.setSpacing(5) self.cut_layout.setObjectName(u"cut_layout") self.cut_label = QLabel(self.input_frame) self.cut_label.setObjectName(u"cut_label") self.cut_label.setMinimumSize(QSize(165, 25)) self.cut_label.setMaximumSize(QSize(165, 25)) self.cut_layout.addWidget(self.cut_label) self.cut_entry = QLineEdit(self.input_frame) self.cut_entry.setObjectName(u"cut_entry") self.cut_entry.setMinimumSize(QSize(165, 25)) self.cut_entry.setMaximumSize(QSize(165, 25)) self.cut_layout.addWidget(self.cut_entry) self.verticalLayout_3.addLayout(self.cut_layout) # поле ввода длины подрезки торца заготовки self.trim_layout = QHBoxLayout() self.trim_layout.setSpacing(5) self.trim_layout.setObjectName(u"trim_layout") self.trim_label = QLabel(self.input_frame) self.trim_label.setObjectName(u"trim_label") self.trim_label.setMinimumSize(QSize(165, 25)) self.trim_label.setMaximumSize(QSize(165, 25)) self.trim_layout.addWidget(self.trim_label) self.trim_entry = QLineEdit(self.input_frame) self.trim_entry.setObjectName(u"trim_entry") self.trim_entry.setMinimumSize(QSize(165, 25)) self.trim_entry.setMaximumSize(QSize(165, 25)) self.trim_layout.addWidget(self.trim_entry) self.verticalLayout_3.addLayout(self.trim_layout) # таблица ввода длин и количеств элементов self.input_table = QTableWidget(self.input_frame) if (self.input_table.columnCount() < 2): self.input_table.setColumnCount(2) if (self.input_table.rowCount() < 7): self.input_table.setRowCount(7) self.input_table.setObjectName(u"input_table") self.input_table.setRowCount(7) self.input_table.setColumnCount(2) self.input_table.horizontalHeader().setMinimumSectionSize(33) self.input_table.horizontalHeader().setDefaultSectionSize(130) self.input_table.horizontalHeader().setProperty( "showSortIndicator", True, ) self.input_table.horizontalHeader().setStretchLastSection(True) self.input_table.verticalHeader().setMinimumSectionSize(30) self.input_table.verticalHeader().setDefaultSectionSize(30) self.verticalLayout_3.addWidget(self.input_table) self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") # кнопка "добавить строку в конец таблицы" self.add_str_button = QPushButton(self.input_frame) self.add_str_button.setObjectName(u"add_str_button") self.add_str_button.setMinimumSize(QSize(150, 35)) self.add_str_button.setMaximumSize(QSize(150, 35)) icon3 = QIcon() icon3.addFile( ADD_STR_ICON, QSize(), QIcon.Normal, QIcon.Off, ) self.add_str_button.setIcon(icon3) self.add_str_button.setIconSize(QSize(25, 25)) self.horizontalLayout_3.addWidget(self.add_str_button) # кнопка "удалить последнюю строку в таблице" self.remove_str_button = QPushButton(self.input_frame) self.remove_str_button.setObjectName(u"remove_str_button") self.remove_str_button.setMinimumSize(QSize(150, 35)) self.remove_str_button.setMaximumSize(QSize(150, 35)) icon4 = QIcon() icon4.addFile( DESTR_STR_ICON, QSize(), QIcon.Normal, QIcon.Off, ) self.remove_str_button.setIcon(icon4) self.remove_str_button.setIconSize(QSize(25, 25)) self.horizontalLayout_3.addWidget(self.remove_str_button) self.verticalLayout_3.addLayout(self.horizontalLayout_3) self.horizontalLayout_2.addWidget(self.input_frame) self.output_frame = QFrame(self.bottom_frame) self.output_frame.setObjectName(u"output_frame") self.output_frame.setFrameShape(QFrame.StyledPanel) self.output_frame.setFrameShadow(QFrame.Raised) self.verticalLayout_4 = QVBoxLayout(self.output_frame) self.verticalLayout_4.setObjectName(u"verticalLayout_4") # поле вывода результатов расчёта self.textBrowser = QTextBrowser(self.output_frame) self.textBrowser.setObjectName(u"textBrowser") self.verticalLayout_4.addWidget(self.textBrowser) self.horizontalLayout_4 = QHBoxLayout() self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") # строка состояния self.label_2 = QLabel(self.output_frame) self.label_2.setObjectName(u"label_2") self.label_2.setMinimumSize(QSize(25, 25)) self.label_2.setMaximumSize(QSize(16777215, 25)) self.horizontalLayout_4.addWidget(self.label_2) self.horizontalSpacer_2 = QSpacerItem( 40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum, ) self.horizontalLayout_4.addItem(self.horizontalSpacer_2) # поле вывода версии программы self.label = QLabel(self.output_frame) self.label.setObjectName(u"label") self.label.setMinimumSize(QSize(0, 25)) self.label.setMaximumSize(QSize(16777215, 25)) self.horizontalLayout_4.addWidget(self.label) self.verticalLayout_4.addLayout(self.horizontalLayout_4) self.horizontalLayout_2.addWidget(self.output_frame) self.verticalLayout_2.addWidget(self.bottom_frame) self.verticalLayout.addWidget(self.main_frame) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QCoreApplication.translate("MainWindow", u"simple linear nesting", None)) # if QT_CONFIG(tooltip) self.new_calc_btn.setToolTip( QCoreApplication.translate("MainWindow", u"Clear all fields, Ctrl+N", None)) # endif // QT_CONFIG(tooltip) self.new_calc_btn.setText( QCoreApplication.translate("MainWindow", u"new", None)) # if QT_CONFIG(shortcut) self.new_calc_btn.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl+N", None)) # endif // QT_CONFIG(shortcut) # if QT_CONFIG(tooltip) self.select_mode_btn.setToolTip( QCoreApplication.translate("MainWindow", u"Select calculation mode, Ctrl+M", None)) # endif // QT_CONFIG(tooltip) self.select_mode_btn.setText( QCoreApplication.translate("MainWindow", u"mode", None)) # if QT_CONFIG(shortcut) self.select_mode_btn.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl+M", None)) # endif // QT_CONFIG(shortcut) # if QT_CONFIG(tooltip) self.start_calc_btn.setToolTip( QCoreApplication.translate("MainWindow", u"Start calculation, Ctrl+R", None)) # endif // QT_CONFIG(tooltip) self.start_calc_btn.setText( QCoreApplication.translate("MainWindow", u"start", None)) # if QT_CONFIG(shortcut) self.start_calc_btn.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl+R", None)) # endif // QT_CONFIG(shortcut) self.length_label.setText( QCoreApplication.translate("MainWindow", u"workpiece length", None)) # if QT_CONFIG(tooltip) self.length_entry.setToolTip( QCoreApplication.translate("MainWindow", u"Enter the length of the workpiece", None)) # endif // QT_CONFIG(tooltip) self.waste_label.setText( QCoreApplication.translate("MainWindow", u"irreducible waste", None)) # if QT_CONFIG(tooltip) self.waste_entry.setToolTip( QCoreApplication.translate("MainWindow", u"Enter the length of the waste", None)) # endif // QT_CONFIG(tooltip) self.cut_label.setText( QCoreApplication.translate("MainWindow", u"cutting width", None)) # if QT_CONFIG(tooltip) self.cut_entry.setToolTip( QCoreApplication.translate("MainWindow", u"Enter the width of the cutting", None)) # endif // QT_CONFIG(tooltip) self.trim_label.setText( QCoreApplication.translate("MainWindow", u"trim the end", None)) # if QT_CONFIG(tooltip) self.trim_entry.setToolTip( QCoreApplication.translate( "MainWindow", u"Enter the length of the trimming end", None)) # endif // QT_CONFIG(tooltip) # if QT_CONFIG(tooltip) self.add_str_button.setToolTip( QCoreApplication.translate( "MainWindow", u"Add another row to the table, Ctrl++", None)) # endif // QT_CONFIG(tooltip) self.add_str_button.setText("") # if QT_CONFIG(shortcut) self.add_str_button.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl++", None)) # endif // QT_CONFIG(shortcut) # if QT_CONFIG(tooltip) self.remove_str_button.setToolTip( QCoreApplication.translate( "MainWindow", u"Delete the last row in the table, Ctrl+-", None)) # endif // QT_CONFIG(tooltip) self.remove_str_button.setText("") # if QT_CONFIG(shortcut) self.remove_str_button.setShortcut( QCoreApplication.translate("MainWindow", u"Ctrl+-", None)) # endif // QT_CONFIG(shortcut) self.label_2.setText("") self.label.setText( QCoreApplication.translate("MainWindow", u"v.0.0.0", None))
class Ui_Dialog(object): def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(450, 235) Dialog.setMinimumSize(QSize(450, 235)) Dialog.setMaximumSize(QSize(450, 235)) Dialog.setStyleSheet(u"QDialog {\n" " background:rgb(51,51,51);\n" "}") self.verticalLayout = QVBoxLayout(Dialog) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.frame_2 = QFrame(Dialog) self.frame_2.setObjectName(u"frame_2") self.frame_2.setStyleSheet(u"background:rgb(51,51,51);") self.frame_2.setFrameShape(QFrame.NoFrame) self.frame_2.setFrameShadow(QFrame.Plain) self.verticalLayout_2 = QVBoxLayout(self.frame_2) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(2, 2, 2, 2) self.frame_top = QFrame(self.frame_2) self.frame_top.setObjectName(u"frame_top") self.frame_top.setMinimumSize(QSize(0, 55)) self.frame_top.setMaximumSize(QSize(16777215, 55)) self.frame_top.setStyleSheet(u"background:rgb(91,90,90);") self.frame_top.setFrameShape(QFrame.NoFrame) self.frame_top.setFrameShadow(QFrame.Plain) self.horizontalLayout = QHBoxLayout(self.frame_top) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.lab_heading = QLabel(self.frame_top) self.lab_heading.setObjectName(u"lab_heading") font = QFont() font.setFamily(u"Segoe UI") font.setPointSize(14) self.lab_heading.setFont(font) self.lab_heading.setStyleSheet(u"color:rgb(255,255,255);") self.lab_heading.setAlignment(Qt.AlignCenter) self.horizontalLayout.addWidget(self.lab_heading) self.bn_min = QPushButton(self.frame_top) self.bn_min.setObjectName(u"bn_min") self.bn_min.setMinimumSize(QSize(55, 55)) self.bn_min.setMaximumSize(QSize(55, 55)) self.bn_min.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgb(51,51,51);\n" "}") icon = QIcon() icon.addFile(u"icons/1x/hideAsset 53.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_min.setIcon(icon) self.bn_min.setIconSize(QSize(22, 12)) self.bn_min.setAutoDefault(False) self.bn_min.setFlat(True) self.horizontalLayout.addWidget(self.bn_min) self.bn_close = QPushButton(self.frame_top) self.bn_close.setObjectName(u"bn_close") self.bn_close.setMinimumSize(QSize(55, 55)) self.bn_close.setMaximumSize(QSize(55, 55)) self.bn_close.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgb(51,51,51);\n" "}") icon1 = QIcon() icon1.addFile(u"icons/1x/closeAsset 43.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_close.setIcon(icon1) self.bn_close.setIconSize(QSize(22, 22)) self.bn_close.setAutoDefault(False) self.bn_close.setFlat(True) self.horizontalLayout.addWidget(self.bn_close) self.verticalLayout_2.addWidget(self.frame_top) self.frame_bottom = QFrame(self.frame_2) self.frame_bottom.setObjectName(u"frame_bottom") self.frame_bottom.setStyleSheet(u"background:rgb(91,90,90);") self.frame_bottom.setFrameShape(QFrame.StyledPanel) self.frame_bottom.setFrameShadow(QFrame.Raised) self.gridLayout = QGridLayout(self.frame_bottom) self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setHorizontalSpacing(5) self.gridLayout.setVerticalSpacing(0) self.gridLayout.setContentsMargins(15, -1, 35, 0) self.bn_east = QPushButton(self.frame_bottom) self.bn_east.setObjectName(u"bn_east") self.bn_east.setMinimumSize(QSize(69, 25)) self.bn_east.setMaximumSize(QSize(69, 25)) font1 = QFont() font1.setFamily(u"Segoe UI") font1.setPointSize(12) self.bn_east.setFont(font1) self.bn_east.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(51,51,51);\n" " border-radius: 5px; \n" " color:rgb(255,255,255);\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(51,51,51);\n" "}") self.bn_east.setAutoDefault(False) self.gridLayout.addWidget(self.bn_east, 1, 3, 1, 1) self.lab_icon = QLabel(self.frame_bottom) self.lab_icon.setObjectName(u"lab_icon") self.lab_icon.setMinimumSize(QSize(40, 40)) self.lab_icon.setMaximumSize(QSize(40, 40)) self.gridLayout.addWidget(self.lab_icon, 0, 0, 1, 1) self.bn_west = QPushButton(self.frame_bottom) self.bn_west.setObjectName(u"bn_west") self.bn_west.setMinimumSize(QSize(69, 25)) self.bn_west.setMaximumSize(QSize(69, 25)) self.bn_west.setFont(font1) self.bn_west.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(51,51,51);\n" " border-radius: 5px; \n" " color:rgb(255,255,255);\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(51,51,51);\n" "}") self.bn_west.setAutoDefault(False) self.gridLayout.addWidget(self.bn_west, 1, 2, 1, 1) self.lab_message = QLabel(self.frame_bottom) self.lab_message.setObjectName(u"lab_message") self.lab_message.setFont(font1) self.lab_message.setStyleSheet(u"color:rgb(255,255,255);") self.lab_message.setWordWrap(True) self.gridLayout.addWidget(self.lab_message, 0, 1, 1, 3) self.verticalLayout_2.addWidget(self.frame_bottom) self.verticalLayout.addWidget(self.frame_2) self.retranslateUi(Dialog) QMetaObject.connectSlotsByName(Dialog) # setupUi def retranslateUi(self, Dialog): Dialog.setWindowTitle( QCoreApplication.translate("Dialog", u"Dialog", None)) self.lab_heading.setText("") self.bn_min.setText("") self.bn_close.setText("") self.bn_east.setText("") self.lab_icon.setText("") self.bn_west.setText("") self.lab_message.setText("")
class UiQuestion(object): '''Интерфейс диалогового окна программы. Created by: Qt User Interface Compiler. Задано: кнопка "подтвердить"; кнопка "отклонить". ''' def setupUi(self, Dialog): if not Dialog.objectName(): Dialog.setObjectName(u"Dialog") Dialog.resize(300, 200) Dialog.setMinimumSize(QSize(300, 200)) Dialog.setMaximumSize(QSize(300, 200)) self.verticalLayout = QVBoxLayout(Dialog) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.dialog_main_frame = QFrame(Dialog) self.dialog_main_frame.setObjectName(u"dialog_main_frame") self.dialog_main_frame.setFrameShape(QFrame.StyledPanel) self.dialog_main_frame.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.dialog_main_frame) self.verticalLayout_2.setSpacing(5) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(5, 5, 5, 5) self.text_frame = QFrame(self.dialog_main_frame) self.text_frame.setObjectName(u"text_frame") self.text_frame.setFrameShape(QFrame.StyledPanel) self.text_frame.setFrameShadow(QFrame.Raised) self.verticalLayout_3 = QVBoxLayout(self.text_frame) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.question_label = QLabel(self.text_frame) self.question_label.setObjectName(u"question_label") self.question_label.setAlignment(Qt.AlignCenter) self.verticalLayout_3.addWidget(self.question_label) self.verticalLayout_2.addWidget(self.text_frame) self.buttons_frame = QFrame(self.dialog_main_frame) self.buttons_frame.setObjectName(u"buttons_frame") self.buttons_frame.setMinimumSize(QSize(0, 50)) self.buttons_frame.setMaximumSize(QSize(16777215, 50)) self.buttons_frame.setFrameShape(QFrame.StyledPanel) self.buttons_frame.setFrameShadow(QFrame.Raised) self.horizontalLayout = QHBoxLayout(self.buttons_frame) self.horizontalLayout.setSpacing(5) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(5, 5, 5, 5) self.question_nok_btn = QPushButton(self.buttons_frame) self.question_nok_btn.setObjectName(u"question_nok_btn") self.question_nok_btn.setMinimumSize(QSize(0, 35)) self.question_nok_btn.setMaximumSize(QSize(16777215, 35)) icon = QIcon() icon.addFile(DISAGREE_ICON, QSize(), QIcon.Normal, QIcon.Off) self.question_nok_btn.setIcon(icon) self.question_nok_btn.setIconSize(QSize(25, 25)) self.horizontalLayout.addWidget(self.question_nok_btn) self.question_ok_btn = QPushButton(self.buttons_frame) self.question_ok_btn.setObjectName(u"question_ok_btn") self.question_ok_btn.setMinimumSize(QSize(0, 35)) self.question_ok_btn.setMaximumSize(QSize(16777215, 35)) icon1 = QIcon() icon1.addFile(AGREE_ICON, QSize(), QIcon.Normal, QIcon.Off) self.question_ok_btn.setIcon(icon1) self.question_ok_btn.setIconSize(QSize(25, 25)) self.horizontalLayout.addWidget(self.question_ok_btn) self.verticalLayout_2.addWidget(self.buttons_frame) self.verticalLayout.addWidget(self.dialog_main_frame) self.retranslateUi(Dialog) QMetaObject.connectSlotsByName(Dialog) # setupUi def retranslateUi(self, Dialog): Dialog.setWindowTitle( QCoreApplication.translate("Dialog", u"new calculation", None)) self.question_label.setText( QCoreApplication.translate("Dialog", u"Clear all fields?", None)) # if QT_CONFIG(tooltip) self.question_nok_btn.setToolTip( QCoreApplication.translate("Dialog", u"cancel", None)) # endif // QT_CONFIG(tooltip) self.question_nok_btn.setText("") # if QT_CONFIG(tooltip) self.question_ok_btn.setToolTip( QCoreApplication.translate("Dialog", u"continue", None)) # endif // QT_CONFIG(tooltip) self.question_ok_btn.setText("")
class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(800, 550) MainWindow.setMinimumSize(QSize(800, 550)) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setStyleSheet(u"background:rgb(91,90,90);") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.frame_top = QFrame(self.centralwidget) self.frame_top.setObjectName(u"frame_top") self.frame_top.setMaximumSize(QSize(16777215, 55)) self.frame_top.setFrameShape(QFrame.NoFrame) self.frame_top.setFrameShadow(QFrame.Plain) self.horizontalLayout = QHBoxLayout(self.frame_top) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.frame_toodle = QFrame(self.frame_top) self.frame_toodle.setObjectName(u"frame_toodle") self.frame_toodle.setMinimumSize(QSize(80, 55)) self.frame_toodle.setMaximumSize(QSize(80, 55)) self.frame_toodle.setStyleSheet(u"background:rgb(0,143,150);") self.frame_toodle.setFrameShape(QFrame.NoFrame) self.frame_toodle.setFrameShadow(QFrame.Plain) self.horizontalLayout_3 = QHBoxLayout(self.frame_toodle) self.horizontalLayout_3.setSpacing(0) self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.toodle = QPushButton(self.frame_toodle) self.toodle.setObjectName(u"toodle") self.toodle.setMinimumSize(QSize(80, 55)) self.toodle.setMaximumSize(QSize(80, 55)) self.toodle.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgba(0,0,0,0);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,178,178);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgba(0,0,0,0);\n" "}") icon = QIcon() icon.addFile(u"icons/1x/logo.png", QSize(), QIcon.Normal, QIcon.Off) self.toodle.setIcon(icon) self.toodle.setIconSize(QSize(22, 12)) self.toodle.setFlat(True) self.horizontalLayout_3.addWidget(self.toodle) self.horizontalLayout.addWidget(self.frame_toodle) self.frame_top_east = QFrame(self.frame_top) self.frame_top_east.setObjectName(u"frame_top_east") self.frame_top_east.setMaximumSize(QSize(16777215, 55)) self.frame_top_east.setStyleSheet(u"background:rgb(51,51,51);") self.frame_top_east.setFrameShape(QFrame.NoFrame) self.frame_top_east.setFrameShadow(QFrame.Plain) self.horizontalLayout_4 = QHBoxLayout(self.frame_top_east) self.horizontalLayout_4.setSpacing(0) self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0) self.frame_appname = QFrame(self.frame_top_east) self.frame_appname.setObjectName(u"frame_appname") self.frame_appname.setFrameShape(QFrame.NoFrame) self.frame_appname.setFrameShadow(QFrame.Plain) self.horizontalLayout_10 = QHBoxLayout(self.frame_appname) self.horizontalLayout_10.setSpacing(7) self.horizontalLayout_10.setObjectName(u"horizontalLayout_10") self.horizontalLayout_10.setContentsMargins(0, 0, 0, 0) self.lab_appname = QLabel(self.frame_appname) self.lab_appname.setObjectName(u"lab_appname") font = QFont() font.setFamily(u"Segoe UI Light") font.setPointSize(24) self.lab_appname.setFont(font) self.lab_appname.setStyleSheet(u"color:rgb(255,255,255);") self.horizontalLayout_10.addWidget(self.lab_appname) self.horizontalLayout_4.addWidget(self.frame_appname) self.frame_min = QFrame(self.frame_top_east) self.frame_min.setObjectName(u"frame_min") self.frame_min.setMinimumSize(QSize(55, 55)) self.frame_min.setMaximumSize(QSize(55, 55)) self.frame_min.setFrameShape(QFrame.NoFrame) self.frame_min.setFrameShadow(QFrame.Plain) self.horizontalLayout_7 = QHBoxLayout(self.frame_min) self.horizontalLayout_7.setSpacing(0) self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") self.horizontalLayout_7.setContentsMargins(0, 0, 0, 0) self.bn_min = QPushButton(self.frame_min) self.bn_min.setObjectName(u"bn_min") self.bn_min.setMaximumSize(QSize(55, 55)) self.bn_min.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgba(0,0,0,0);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgba(0,0,0,0);\n" "}") icon1 = QIcon() icon1.addFile(u"icons/1x/hideAsset 53.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_min.setIcon(icon1) self.bn_min.setIconSize(QSize(22, 22)) self.bn_min.setFlat(True) self.horizontalLayout_7.addWidget(self.bn_min) self.horizontalLayout_4.addWidget(self.frame_min) self.frame_max = QFrame(self.frame_top_east) self.frame_max.setObjectName(u"frame_max") self.frame_max.setMinimumSize(QSize(55, 55)) self.frame_max.setMaximumSize(QSize(55, 55)) self.frame_max.setFrameShape(QFrame.NoFrame) self.frame_max.setFrameShadow(QFrame.Plain) self.horizontalLayout_6 = QHBoxLayout(self.frame_max) self.horizontalLayout_6.setSpacing(0) self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") self.horizontalLayout_6.setContentsMargins(0, 0, 0, 0) self.bn_max = QPushButton(self.frame_max) self.bn_max.setObjectName(u"bn_max") self.bn_max.setMaximumSize(QSize(55, 55)) self.bn_max.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgba(0,0,0,0);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgba(0,0,0,0);\n" "}") icon2 = QIcon() icon2.addFile(u"icons/1x/max.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_max.setIcon(icon2) self.bn_max.setIconSize(QSize(22, 22)) self.bn_max.setFlat(True) self.horizontalLayout_6.addWidget(self.bn_max) self.horizontalLayout_4.addWidget(self.frame_max) self.frame_close = QFrame(self.frame_top_east) self.frame_close.setObjectName(u"frame_close") self.frame_close.setMinimumSize(QSize(55, 55)) self.frame_close.setMaximumSize(QSize(55, 55)) self.frame_close.setFrameShape(QFrame.NoFrame) self.frame_close.setFrameShadow(QFrame.Plain) self.horizontalLayout_5 = QHBoxLayout(self.frame_close) self.horizontalLayout_5.setSpacing(0) self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.horizontalLayout_5.setContentsMargins(0, 0, 0, 0) self.bn_close = QPushButton(self.frame_close) self.bn_close.setObjectName(u"bn_close") self.bn_close.setMaximumSize(QSize(55, 55)) self.bn_close.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgba(0,0,0,0);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgba(0,0,0,0);\n" "}") icon3 = QIcon() icon3.addFile(u"icons/1x/closeAsset 43.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_close.setIcon(icon3) self.bn_close.setIconSize(QSize(22, 22)) self.bn_close.setFlat(True) self.horizontalLayout_5.addWidget(self.bn_close) self.horizontalLayout_4.addWidget(self.frame_close) self.horizontalLayout.addWidget(self.frame_top_east) self.verticalLayout.addWidget(self.frame_top) self.frame_bottom = QFrame(self.centralwidget) self.frame_bottom.setObjectName(u"frame_bottom") self.frame_bottom.setFrameShape(QFrame.NoFrame) self.frame_bottom.setFrameShadow(QFrame.Plain) self.horizontalLayout_2 = QHBoxLayout(self.frame_bottom) self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.frame_bottom_west = QFrame(self.frame_bottom) self.frame_bottom_west.setObjectName(u"frame_bottom_west") self.frame_bottom_west.setMinimumSize(QSize(80, 0)) self.frame_bottom_west.setMaximumSize(QSize(80, 16777215)) self.frame_bottom_west.setStyleSheet(u"background:rgb(51,51,51);") self.frame_bottom_west.setFrameShape(QFrame.NoFrame) self.frame_bottom_west.setFrameShadow(QFrame.Plain) self.verticalLayout_3 = QVBoxLayout(self.frame_bottom_west) self.verticalLayout_3.setSpacing(0) self.verticalLayout_3.setObjectName(u"verticalLayout_3") self.verticalLayout_3.setContentsMargins(0, 0, 0, 0) self.frame_home = QFrame(self.frame_bottom_west) self.frame_home.setObjectName(u"frame_home") self.frame_home.setMinimumSize(QSize(80, 55)) self.frame_home.setMaximumSize(QSize(160, 55)) self.frame_home.setFrameShape(QFrame.NoFrame) self.frame_home.setFrameShadow(QFrame.Plain) self.horizontalLayout_15 = QHBoxLayout(self.frame_home) self.horizontalLayout_15.setSpacing(0) self.horizontalLayout_15.setObjectName(u"horizontalLayout_15") self.horizontalLayout_15.setContentsMargins(0, 0, 0, 0) self.bn_home = QPushButton(self.frame_home) self.bn_home.setObjectName(u"bn_home") self.bn_home.setMinimumSize(QSize(80, 55)) self.bn_home.setMaximumSize(QSize(160, 55)) self.bn_home.setStyleSheet(u"QPushButton {\n" " border: none;\n" " background-color: rgba(0,0,0,0);\n" "}\n" "QPushButton:hover {\n" " background-color: rgb(91,90,90);\n" "}\n" "QPushButton:pressed { \n" " background-color: rgba(0,0,0,0);\n" "}") icon4 = QIcon() icon4.addFile(u"icons/1x/homeAsset 46.png", QSize(), QIcon.Normal, QIcon.Off) self.bn_home.setIcon(icon4) self.bn_home.setIconSize(QSize(22, 22)) self.bn_home.setFlat(True) self.horizontalLayout_15.addWidget(self.bn_home) self.verticalLayout_3.addWidget(self.frame_home) self.frame_8 = QFrame(self.frame_bottom_west) self.frame_8.setObjectName(u"frame_8") self.frame_8.setFrameShape(QFrame.NoFrame) self.frame_8.setFrameShadow(QFrame.Plain) self.verticalLayout_4 = QVBoxLayout(self.frame_8) self.verticalLayout_4.setSpacing(0) self.verticalLayout_4.setObjectName(u"verticalLayout_4") self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) self.verticalLayout_3.addWidget(self.frame_8) self.horizontalLayout_2.addWidget(self.frame_bottom_west) self.frame_bottom_east = QFrame(self.frame_bottom) self.frame_bottom_east.setObjectName(u"frame_bottom_east") self.frame_bottom_east.setFrameShape(QFrame.NoFrame) self.frame_bottom_east.setFrameShadow(QFrame.Plain) self.verticalLayout_2 = QVBoxLayout(self.frame_bottom_east) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.frame = QFrame(self.frame_bottom_east) self.frame.setObjectName(u"frame") self.frame.setFrameShape(QFrame.NoFrame) self.frame.setFrameShadow(QFrame.Plain) self.horizontalLayout_14 = QHBoxLayout(self.frame) self.horizontalLayout_14.setSpacing(0) self.horizontalLayout_14.setObjectName(u"horizontalLayout_14") self.horizontalLayout_14.setContentsMargins(0, 0, 0, 0) self.stackedWidget = QStackedWidget(self.frame) self.stackedWidget.setObjectName(u"stackedWidget") self.stackedWidget.setMinimumSize(QSize(0, 55)) self.stackedWidget.setStyleSheet(u"") self.page_home = QWidget() self.page_home.setObjectName(u"page_home") self.page_home.setStyleSheet(u"background:rgb(91,90,90);") self.horizontalLayout_19 = QHBoxLayout(self.page_home) self.horizontalLayout_19.setSpacing(0) self.horizontalLayout_19.setObjectName(u"horizontalLayout_19") self.horizontalLayout_19.setContentsMargins(0, 5, 0, 5) self.frame_home_main = QFrame(self.page_home) self.frame_home_main.setObjectName(u"frame_home_main") self.frame_home_main.setFrameShape(QFrame.NoFrame) self.frame_home_main.setFrameShadow(QFrame.Plain) self.verticalLayout_5 = QVBoxLayout(self.frame_home_main) self.verticalLayout_5.setSpacing(5) self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setContentsMargins(5, 5, 5, 5) font1 = QFont() font1.setFamily(u"Segoe UI Semilight") font1.setPointSize(10) self.lab_home_main_disc = QLabel(self.frame_home_main) self.lab_home_main_disc.setObjectName(u"lab_home_main_disc") font2 = QFont() font2.setFamily(u"Segoe UI") font2.setPointSize(10) self.lab_home_main_disc.setFont(font2) self.lab_home_main_disc.setStyleSheet(u"color:rgb(255,255,255);") self.lab_home_main_disc.setAlignment(Qt.AlignLeading | Qt.AlignLeft | Qt.AlignTop) self.lab_home_main_disc.setWordWrap(True) self.lab_home_main_disc.setMargin(5) self.verticalLayout_5.addWidget(self.lab_home_main_disc) self.horizontalLayout_19.addWidget(self.frame_home_main) self.vert_divide = QFrame(self.page_home) self.vert_divide.setObjectName(u"vert_divide") self.vert_divide.setFrameShape(QFrame.VLine) self.vert_divide.setFrameShadow(QFrame.Sunken) self.horizontalLayout_19.addWidget(self.vert_divide) self.frame_home_stat = QFrame(self.page_home) self.frame_home_stat.setObjectName(u"frame_home_stat") self.frame_home_stat.setMinimumSize(QSize(220, 0)) self.frame_home_stat.setMaximumSize(QSize(220, 16777215)) self.frame_home_stat.setFrameShape(QFrame.NoFrame) self.frame_home_stat.setFrameShadow(QFrame.Plain) self.verticalLayout_6 = QVBoxLayout(self.frame_home_stat) self.verticalLayout_6.setSpacing(5) self.verticalLayout_6.setObjectName(u"verticalLayout_6") self.verticalLayout_6.setContentsMargins(5, 5, 5, 5) self.bn_home_image = QPushButton(self.frame_home_stat) self.bn_home_image.setObjectName(u"bn_home_image") self.bn_home_image.setEnabled(True) self.bn_home_image.setMinimumSize(QSize(205, 25)) self.bn_home_image.setMaximumSize(QSize(205, 25)) self.bn_home_image.setFont(font1) self.bn_home_image.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(51,51,51);\n" " border-radius: 5px; \n" " color:rgb(255,255,255);\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(51,51,51);\n" "}\n" "\n" "QPushButton:disabled { \n" " border-radius: 5px; \n" " border: 2px solid rgb(112,112,112);\n" " background-color: rgb(112,112,112);\n" "}") self.verticalLayout_6.addWidget(self.bn_home_image) self.bn_home_rec = QPushButton(self.frame_home_stat) self.bn_home_rec.setObjectName(u"bn_home_rec") self.bn_home_rec.setEnabled(True) self.bn_home_rec.setMinimumSize(QSize(205, 25)) self.bn_home_rec.setMaximumSize(QSize(205, 25)) self.bn_home_rec.setFont(font1) self.bn_home_rec.setStyleSheet(u"QPushButton {\n" " border: 2px solid rgb(51,51,51);\n" " border-radius: 5px; \n" " color:rgb(255,255,255);\n" " background-color: rgb(51,51,51);\n" "}\n" "QPushButton:hover {\n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(0,143,150);\n" "}\n" "QPushButton:pressed { \n" " border: 2px solid rgb(0,143,150);\n" " background-color: rgb(51,51,51);\n" "}\n" "\n" "QPushButton:disabled { \n" " border-radius: 5px; \n" " border: 2px solid rgb(112,112,112);\n" " background-color: rgb(112,112,112);\n" "}") self.verticalLayout_6.addWidget(self.bn_home_rec) self.horizontalLayout_19.addWidget(self.frame_home_stat) self.stackedWidget.addWidget(self.page_home) self.page_about_home = QWidget() self.page_about_home.setObjectName(u"page_about_home") self.page_about_home.setStyleSheet(u"background:rgb(91,90,90);") self.verticalLayout_13 = QVBoxLayout(self.page_about_home) self.verticalLayout_13.setSpacing(5) self.verticalLayout_13.setObjectName(u"verticalLayout_13") self.verticalLayout_13.setContentsMargins(5, 5, 5, 5) self.lab_about_home = QLabel(self.page_about_home) self.lab_about_home.setObjectName(u"lab_about_home") self.lab_about_home.setMinimumSize(QSize(0, 55)) self.lab_about_home.setMaximumSize(QSize(16777215, 55)) font3 = QFont() font3.setFamily(u"Segoe UI") font3.setPointSize(24) self.lab_about_home.setFont(font3) self.lab_about_home.setStyleSheet(u"color:rgb(255,255,255);") self.verticalLayout_13.addWidget(self.lab_about_home) self.frame_about_home = QFrame(self.page_about_home) self.frame_about_home.setObjectName(u"frame_about_home") self.frame_about_home.setFrameShape(QFrame.StyledPanel) self.frame_about_home.setFrameShadow(QFrame.Raised) self.horizontalLayout_28 = QHBoxLayout(self.frame_about_home) self.horizontalLayout_28.setSpacing(0) self.horizontalLayout_28.setObjectName(u"horizontalLayout_28") self.horizontalLayout_28.setContentsMargins(5, 5, 0, 5) self.text_about_home = QTextEdit(self.frame_about_home) self.text_about_home.setObjectName(u"text_about_home") self.text_about_home.setEnabled(True) self.text_about_home.setFont(font2) self.text_about_home.setStyleSheet(u"color:rgb(255,255,255);") self.text_about_home.setFrameShape(QFrame.NoFrame) self.text_about_home.setFrameShadow(QFrame.Plain) self.text_about_home.setReadOnly(True) self.text_about_home.setTextInteractionFlags(Qt.TextBrowserInteraction) self.horizontalLayout_28.addWidget(self.text_about_home) self.vsb_about_home = QScrollBar(self.frame_about_home) self.vsb_about_home.setObjectName(u"vsb_about_home") self.vsb_about_home.setStyleSheet(u"QScrollBar:vertical {\n" " background:rgb(51,51,51);\n" " width:20px;\n" " margin: 0px 0px 0px 0px;\n" "}\n" "QScrollBar::handle:vertical {\n" " background:rgb(0,143,170);\n" "}\n" "QScrollBar::add-page:vertical {\n" " background:rgb(51,51,51);\n" "}\n" "QScrollBar::sub-page:vertical {\n" " background:rgb(51,51,51);\n" "}") self.vsb_about_home.setOrientation(Qt.Vertical) self.horizontalLayout_28.addWidget(self.vsb_about_home) self.verticalLayout_13.addWidget(self.frame_about_home) self.stackedWidget.addWidget(self.page_about_home) self.horizontalLayout_14.addWidget(self.stackedWidget) self.verticalLayout_2.addWidget(self.frame) self.frame_low = QFrame(self.frame_bottom_east) self.frame_low.setObjectName(u"frame_low") self.frame_low.setMinimumSize(QSize(0, 20)) self.frame_low.setMaximumSize(QSize(16777215, 20)) self.frame_low.setStyleSheet(u"") self.frame_low.setFrameShape(QFrame.NoFrame) self.frame_low.setFrameShadow(QFrame.Plain) self.horizontalLayout_11 = QHBoxLayout(self.frame_low) self.horizontalLayout_11.setSpacing(0) self.horizontalLayout_11.setObjectName(u"horizontalLayout_11") self.horizontalLayout_11.setContentsMargins(0, 0, 0, 0) self.frame_tab = QFrame(self.frame_low) self.frame_tab.setObjectName(u"frame_tab") font10 = QFont() font10.setFamily(u"Segoe UI") self.frame_tab.setFont(font10) self.frame_tab.setStyleSheet(u"background:rgb(51,51,51);") self.frame_tab.setFrameShape(QFrame.NoFrame) self.frame_tab.setFrameShadow(QFrame.Plain) self.horizontalLayout_12 = QHBoxLayout(self.frame_tab) self.horizontalLayout_12.setSpacing(0) self.horizontalLayout_12.setObjectName(u"horizontalLayout_12") self.horizontalLayout_12.setContentsMargins(0, 0, 0, 0) self.lab_tab = QLabel(self.frame_tab) self.lab_tab.setObjectName(u"lab_tab") font11 = QFont() font11.setFamily(u"Segoe UI Light") font11.setPointSize(10) self.lab_tab.setFont(font11) self.lab_tab.setStyleSheet(u"color:rgb(255,255,255);") self.horizontalLayout_12.addWidget(self.lab_tab) self.horizontalLayout_11.addWidget(self.frame_tab) self.frame_drag = QFrame(self.frame_low) self.frame_drag.setObjectName(u"frame_drag") self.frame_drag.setMinimumSize(QSize(20, 20)) self.frame_drag.setMaximumSize(QSize(20, 20)) self.frame_drag.setStyleSheet(u"background:rgb(51,51,51);") self.frame_drag.setFrameShape(QFrame.NoFrame) self.frame_drag.setFrameShadow(QFrame.Plain) self.horizontalLayout_13 = QHBoxLayout(self.frame_drag) self.horizontalLayout_13.setSpacing(0) self.horizontalLayout_13.setObjectName(u"horizontalLayout_13") self.horizontalLayout_13.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_11.addWidget(self.frame_drag) self.verticalLayout_2.addWidget(self.frame_low) self.horizontalLayout_2.addWidget(self.frame_bottom_east) self.verticalLayout.addWidget(self.frame_bottom) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) self.stackedWidget.setCurrentIndex(7) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.toodle.setText("") self.lab_appname.setText( QCoreApplication.translate("MainWindow", u"<html><head/><body><p><br/></p></body></html>", None)) self.bn_min.setToolTip(QCoreApplication.translate("MainWindow", u"Minimize", None)) self.bn_min.setText("") self.bn_max.setToolTip(QCoreApplication.translate("MainWindow", u"Maximize", None)) self.bn_max.setText("") self.bn_close.setToolTip(QCoreApplication.translate("MainWindow", u"Close", None)) self.bn_close.setText("") self.bn_home.setToolTip(QCoreApplication.translate("MainWindow", u"Home", None)) self.bn_home.setText("") self.lab_about_home.setText(QCoreApplication.translate("MainWindow", u"How to use", None)) self.bn_home_image.setText(QCoreApplication.translate("MainWindow", u"Upload Image", None)) self.bn_home_rec.setText(QCoreApplication.translate("MainWindow", u"Recognition", None)) self.lab_tab.setText( QCoreApplication.translate("MainWindow", u"<html><head/><body><p><br/></p></body></html>", None)) self.frame_drag.setToolTip(QCoreApplication.translate("MainWindow", u"Drag", None))
class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") MainWindow.resize(787, 415) self.centralwidget = QWidget(MainWindow) self.centralwidget.setObjectName(u"centralwidget") self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setSpacing(0) self.verticalLayout.setObjectName(u"verticalLayout") self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.base = QFrame(self.centralwidget) self.base.setObjectName(u"base") self.base.setStyleSheet(u"QFrame{\n" "\n" " \n" " background-color: rgb(97, 101, 157);\n" "}") self.base.setFrameShape(QFrame.StyledPanel) self.base.setFrameShadow(QFrame.Raised) self.horizontalLayout = QHBoxLayout(self.base) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName(u"horizontalLayout") self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.frame_for_widgets = QFrame(self.base) self.frame_for_widgets.setObjectName(u"frame_for_widgets") self.frame_for_widgets.setStyleSheet( u"QFrame{\n" "\n" "border-radius:25px;\n" "\n" "\n" "\n" "background-color: rgb(24, 25, 39);\n" "\n" "\n" "\n" "\n" "\n" "\n" "}") self.frame_for_widgets.setFrameShape(QFrame.NoFrame) self.frame_for_widgets.setFrameShadow(QFrame.Raised) self.verticalLayout_4 = QVBoxLayout(self.frame_for_widgets) self.verticalLayout_4.setSpacing(0) self.verticalLayout_4.setObjectName(u"verticalLayout_4") self.verticalLayout_4.setContentsMargins(0, 0, 0, 0) self.frame = QFrame(self.frame_for_widgets) self.frame.setObjectName(u"frame") sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QFrame.StyledPanel) self.frame.setFrameShadow(QFrame.Raised) self.horizontalLayout_2 = QHBoxLayout(self.frame) self.horizontalLayout_2.setObjectName(u"horizontalLayout_2") self.select_zip_button = QPushButton(self.frame) self.select_zip_button.setObjectName(u"select_zip_button") self.select_zip_button.setMinimumSize(QSize(75, 75)) self.select_zip_button.setMaximumSize(QSize(75, 75)) font = QFont() font.setFamily(u"Segoe UI Light") font.setPointSize(24) self.select_zip_button.setFont(font) self.select_zip_button.setStyleSheet( u"QPushButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:10px;\n" "}\n" "QPushButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_2.addWidget(self.select_zip_button) self.horizontalSpacer = QSpacerItem(331, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_2.addItem(self.horizontalSpacer) self.verticalLayout_4.addWidget(self.frame) self.frame_left_middle = QFrame(self.frame_for_widgets) self.frame_left_middle.setObjectName(u"frame_left_middle") self.frame_left_middle.setFrameShape(QFrame.StyledPanel) self.frame_left_middle.setFrameShadow(QFrame.Raised) self.verticalLayout_5 = QVBoxLayout(self.frame_left_middle) self.verticalLayout_5.setSpacing(0) self.verticalLayout_5.setObjectName(u"verticalLayout_5") self.verticalLayout_5.setContentsMargins(0, 0, 0, 0) self.frame_left_middle_up = QFrame(self.frame_left_middle) self.frame_left_middle_up.setObjectName(u"frame_left_middle_up") self.frame_left_middle_up.setFrameShape(QFrame.StyledPanel) self.frame_left_middle_up.setFrameShadow(QFrame.Raised) self.horizontalLayout_4 = QHBoxLayout(self.frame_left_middle_up) self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") self.horizontalLayout_3 = QHBoxLayout() self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") self.label = QLabel(self.frame_left_middle_up) self.label.setObjectName(u"label") font1 = QFont() font1.setFamily(u"Arial Rounded MT Bold") font1.setPointSize(11) self.label.setFont(font1) self.label.setStyleSheet(u"QLabel{\n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label.setAlignment(Qt.AlignCenter) self.horizontalLayout_3.addWidget(self.label) self.lineEdit = QLineEdit(self.frame_left_middle_up) self.lineEdit.setObjectName(u"lineEdit") self.lineEdit.setStyleSheet(u"QLineEdit{\n" "color:rgb(30, 149, 198);\n" " background-color: rgb(65, 69, 106);\n" "\n" "border:2px solid black;\n" "\n" "border-radius:3px;\n" "border-color:rgb(240, 123, 255);\n" "\n" "}") self.horizontalLayout_3.addWidget(self.lineEdit) self.same_as_zip_name_checkbox = QCheckBox(self.frame_left_middle_up) self.same_as_zip_name_checkbox.setObjectName( u"same_as_zip_name_checkbox") font2 = QFont() font2.setFamily(u"Arial Rounded MT Bold") font2.setPointSize(10) self.same_as_zip_name_checkbox.setFont(font2) self.same_as_zip_name_checkbox.setStyleSheet( u"QCheckBox{\n" "color:rgb(30, 149, 198);\n" "\n" "}\n" "QCheckBox:unchecked {\n" " \n" " color:rgb(30, 149, 198);\n" "}\n" "QCheckBox::indicator {\n" " width: 13px;\n" " height: 13px;\n" " \n" " color: rgb(30, 149, 198);\n" " background-color: rgb(42, 44, 68);\n" "}\n" "QCheckBox::indicator:checked {\n" " \n" " \n" " background-color: rgb(192, 98, 204);\n" "}\n" "QCheckBox:checked {\n" "\n" "color: rgb(38, 194, 255);\n" " \n" "}\n" "\n" "QCheckBox::indicator:checked {\n" "color: rgb(253, 111, 54);\n" " \n" "}\n" "") self.horizontalLayout_3.addWidget(self.same_as_zip_name_checkbox) self.horizontalLayout_4.addLayout(self.horizontalLayout_3) self.horizontalSpacer_2 = QSpacerItem(85, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_4.addItem(self.horizontalSpacer_2) self.verticalLayout_5.addWidget(self.frame_left_middle_up) self.frame_3 = QFrame(self.frame_left_middle) self.frame_3.setObjectName(u"frame_3") self.frame_3.setFrameShape(QFrame.StyledPanel) self.frame_3.setFrameShadow(QFrame.Raised) self.horizontalLayout_6 = QHBoxLayout(self.frame_3) self.horizontalLayout_6.setObjectName(u"horizontalLayout_6") self.horizontalLayout_5 = QHBoxLayout() self.horizontalLayout_5.setObjectName(u"horizontalLayout_5") self.label_2 = QLabel(self.frame_3) self.label_2.setObjectName(u"label_2") self.label_2.setMinimumSize(QSize(100, 0)) font3 = QFont() font3.setFamily(u"Segoe UI") font3.setPointSize(12) self.label_2.setFont(font3) self.label_2.setStyleSheet(u"QLabel{\n" "\n" " \n" " \n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label_2.setAlignment(Qt.AlignCenter) self.horizontalLayout_5.addWidget(self.label_2) self.algorithm_combobox = QComboBox(self.frame_3) self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.addItem("") self.algorithm_combobox.setObjectName(u"algorithm_combobox") self.algorithm_combobox.setMinimumSize(QSize(150, 0)) font4 = QFont() font4.setFamily(u"Segoe UI") font4.setPointSize(10) font4.setBold(True) font4.setWeight(75) self.algorithm_combobox.setFont(font4) self.algorithm_combobox.setStyleSheet( u"QComboBox{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " border:2px solid black;\n" " border-color:rgb(240, 123, 255);\n" " background-color: rgb(42, 44, 68);\n" " \n" "\n" "}\n" "QComboBox::down-arrow {\n" " border:1px solid black;\n" "border-color:rgb(30, 149, 198);\n" "}\n" "\n" "ComboBox::drop-down {\n" " \n" " color: rgb(30, 149, 198);\n" " background-color: rgb(56, 58, 91);\n" "}\n" "\n" "\n" "QComboBox::down-arrow:on { /* shift the arrow when popup is open */\n" " top: 1px;\n" " left: 1px;\n" "}\n" "") self.horizontalLayout_5.addWidget(self.algorithm_combobox) self.horizontalLayout_6.addLayout(self.horizontalLayout_5) self.horizontalSpacer_3 = QSpacerItem(146, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_6.addItem(self.horizontalSpacer_3) self.verticalLayout_5.addWidget(self.frame_3) self.verticalLayout_4.addWidget(self.frame_left_middle) self.frame_left_bottom = QFrame(self.frame_for_widgets) self.frame_left_bottom.setObjectName(u"frame_left_bottom") self.frame_left_bottom.setFrameShape(QFrame.StyledPanel) self.frame_left_bottom.setFrameShadow(QFrame.Raised) self.verticalLayout_6 = QVBoxLayout(self.frame_left_bottom) self.verticalLayout_6.setSpacing(0) self.verticalLayout_6.setObjectName(u"verticalLayout_6") self.verticalLayout_6.setContentsMargins(0, 0, 0, 0) self.frame_for_start_button = QFrame(self.frame_left_bottom) self.frame_for_start_button.setObjectName(u"frame_for_start_button") self.frame_for_start_button.setFrameShape(QFrame.StyledPanel) self.frame_for_start_button.setFrameShadow(QFrame.Raised) self.horizontalLayout_8 = QHBoxLayout(self.frame_for_start_button) self.horizontalLayout_8.setObjectName(u"horizontalLayout_8") self.horizontalLayout_7 = QHBoxLayout() self.horizontalLayout_7.setObjectName(u"horizontalLayout_7") self.label_3 = QLabel(self.frame_for_start_button) self.label_3.setObjectName(u"label_3") self.label_3.setMinimumSize(QSize(100, 0)) self.label_3.setFont(font2) self.label_3.setStyleSheet(u"QLabel{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " \n" "\n" " }") self.label_3.setAlignment(Qt.AlignCenter) self.horizontalLayout_7.addWidget(self.label_3) self.toolButton = QToolButton(self.frame_for_start_button) self.toolButton.setObjectName(u"toolButton") self.toolButton.setStyleSheet(u"QToolButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:1px;\n" "}\n" "QToolButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_7.addWidget(self.toolButton) self.horizontalLayout_8.addLayout(self.horizontalLayout_7) self.horizontalSpacer_4 = QSpacerItem(190, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_8.addItem(self.horizontalSpacer_4) self.start_button = QPushButton(self.frame_for_start_button) self.start_button.setObjectName(u"start_button") self.start_button.setMinimumSize(QSize(75, 75)) font5 = QFont() font5.setFamily(u"Segoe UI Light") font5.setPointSize(28) self.start_button.setFont(font5) self.start_button.setStyleSheet(u"QPushButton{\n" " color:rgb(30, 149, 198);\n" " border: 2px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:10px;\n" "}\n" "QPushButton:hover{\n" "\n" "\n" "border-color:rgb(255, 37, 255);\n" "\n" "\n" "}") self.horizontalLayout_8.addWidget(self.start_button) self.verticalLayout_6.addWidget(self.frame_for_start_button) self.frame_for_progressbar = QFrame(self.frame_left_bottom) self.frame_for_progressbar.setObjectName(u"frame_for_progressbar") self.frame_for_progressbar.setFrameShape(QFrame.StyledPanel) self.frame_for_progressbar.setFrameShadow(QFrame.Raised) self.horizontalLayout_10 = QHBoxLayout(self.frame_for_progressbar) self.horizontalLayout_10.setObjectName(u"horizontalLayout_10") self.horizontalSpacer_5 = QSpacerItem(13, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.horizontalLayout_10.addItem(self.horizontalSpacer_5) self.horizontalLayout_9 = QHBoxLayout() self.horizontalLayout_9.setObjectName(u"horizontalLayout_9") self.label_progress = QLabel(self.frame_for_progressbar) self.label_progress.setObjectName(u"label_progress") self.label_progress.setFont(font2) self.label_progress.setStyleSheet(u"QLabel{\n" "\n" " color:rgb(30, 149, 198);\n" " \n" "\n" " }") self.label_progress.setAlignment(Qt.AlignCenter) self.horizontalLayout_9.addWidget(self.label_progress) self.progressBar = QProgressBar(self.frame_for_progressbar) self.progressBar.setObjectName(u"progressBar") self.progressBar.setMinimumSize(QSize(350, 20)) self.progressBar.setMaximumSize(QSize(450, 20)) font6 = QFont() font6.setFamily(u"Segoe UI") font6.setPointSize(9) self.progressBar.setFont(font6) self.progressBar.setStyleSheet(u"QProgressBar{\n" "\n" " \n" " color:rgb(30, 149, 198);\n" "\n" " border: 1px solid black;\n" "\n" " border-color:rgb(240, 123, 255);\n" " \n" " background-color: rgb(42, 44, 68);\n" " \n" " border-radius:2px;\n" "}\n" "QProgressBar::chunk{\n" "\n" "border-radius:2px;\n" "\n" " background-color:rgb(30, 149, 198);\n" "}\n" "QProgressBar:hover{\n" "border-color:rgb(255, 37, 255);\n" "}") self.progressBar.setMaximum(100) self.progressBar.setValue(56) self.progressBar.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter) self.progressBar.setTextVisible(True) self.progressBar.setInvertedAppearance(False) self.horizontalLayout_9.addWidget(self.progressBar) self.horizontalLayout_10.addLayout(self.horizontalLayout_9) self.verticalLayout_6.addWidget(self.frame_for_progressbar) self.verticalLayout_4.addWidget(self.frame_left_bottom) self.horizontalLayout.addWidget(self.frame_for_widgets) self.frame_for_textedit = QFrame(self.base) self.frame_for_textedit.setObjectName(u"frame_for_textedit") sizePolicy1 = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred) sizePolicy1.setHorizontalStretch(0) sizePolicy1.setVerticalStretch(0) sizePolicy1.setHeightForWidth( self.frame_for_textedit.sizePolicy().hasHeightForWidth()) self.frame_for_textedit.setSizePolicy(sizePolicy1) self.frame_for_textedit.setMinimumSize(QSize(30, 0)) self.frame_for_textedit.setMaximumSize(QSize(350, 16777215)) self.frame_for_textedit.setFrameShape(QFrame.StyledPanel) self.frame_for_textedit.setFrameShadow(QFrame.Raised) self.verticalLayout_2 = QVBoxLayout(self.frame_for_textedit) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName(u"verticalLayout_2") self.verticalLayout_2.setContentsMargins(-1, 0, 0, 0) self.terminal_output = QTextEdit(self.frame_for_textedit) self.terminal_output.setObjectName(u"terminal_output") self.terminal_output.setFont(font2) self.terminal_output.setStyleSheet( u"\n" "QTextEdit, QListView {\n" " color:rgb(255, 37, 255);\n" " background-color:rgb(40, 41, 65);\n" " border:3px solid black;\n" " border-radius:10px;\n" " border-color:rgb(30, 149, 198);\n" " background-attachment: scroll;\n" "}") self.verticalLayout_2.addWidget(self.terminal_output) self.horizontalLayout.addWidget(self.frame_for_textedit) self.verticalLayout.addWidget(self.base) MainWindow.setCentralWidget(self.centralwidget) self.retranslateUi(MainWindow) QMetaObject.connectSlotsByName(MainWindow) # setupUi def retranslateUi(self, MainWindow): MainWindow.setWindowTitle( QCoreApplication.translate("MainWindow", u"MainWindow", None)) self.select_zip_button.setText( QCoreApplication.translate("MainWindow", u"Zip", None)) self.label.setText( QCoreApplication.translate("MainWindow", u"Video Name :", None)) self.same_as_zip_name_checkbox.setText( QCoreApplication.translate("MainWindow", u"Same as Zip name", None)) self.label_2.setText( QCoreApplication.translate("MainWindow", u"Algorithm", None)) self.algorithm_combobox.setItemText( 0, QCoreApplication.translate("MainWindow", u"Select", None)) self.algorithm_combobox.setItemText( 1, QCoreApplication.translate("MainWindow", u"Very Fast - Good", None)) self.algorithm_combobox.setItemText( 2, QCoreApplication.translate("MainWindow", u"Fast - Better", None)) self.algorithm_combobox.setItemText( 3, QCoreApplication.translate("MainWindow", u"Slow - Best", None)) self.label_3.setText( QCoreApplication.translate("MainWindow", u"Video Location", None)) self.toolButton.setText( QCoreApplication.translate("MainWindow", u"...", None)) self.start_button.setText( QCoreApplication.translate("MainWindow", u"Start", None)) self.label_progress.setText( QCoreApplication.translate("MainWindow", u"Progress :", None)) self.terminal_output.setHtml( QCoreApplication.translate( "MainWindow", u"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" "p, li { white-space: pre-wrap; }\n" "</style></head><body style=\" font-family:'Arial Rounded MT Bold'; font-size:10pt; font-weight:400; font-style:normal;\">\n" "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:'Segoe UI Light'; color:#f07bff;\">Zipvy Ready...</span></p></body></html>", None))