def __init__(self, tree_view, path, **kwargs): """File chooser constructor.""" super().__init__(**kwargs) self._tree_view = tree_view model = QtWidgets.QDirModel() self._tree_view.setModel(model) self._tree_view.setRootIndex(model.index(path))
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) completer = self.Completer() model = QtWidgets.QDirModel(completer) model.setIconProvider(FileIconProvider()) completer.setModel(model) self.setCompleter(completer) self.setDragEnabled(True)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(800, 600) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.treeView = QtWidgets.QTreeView(self.centralwidget) # 创建树对象 self.treeView.setGeometry(QtCore.QRect(10, 10, 781, 521)) # 设置坐标位置和大小 # 设置垂直滚动条为按需显示 self.treeView.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) # 设置水平滚动条为按需显示 self.treeView.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) # 设置双击或者按下回车键时,使树节点可编辑 self.treeView.setEditTriggers( QtWidgets.QAbstractItemView.DoubleClicked | QtWidgets.QAbstractItemView.EditKeyPressed) # 设置树节点为单选 self.treeView.setSelectionMode( QtWidgets.QAbstractItemView.SingleSelection) # 设置选中节点时为整行选中 self.treeView.setSelectionBehavior( QtWidgets.QAbstractItemView.SelectRows) # 设置自动展开的延时为-1,表示自动展开不可用 self.treeView.setAutoExpandDelay(-1) # 设置是否可以展开项 self.treeView.setItemsExpandable(True) # 设置单击头部可排序 self.treeView.setSortingEnabled(True) # 设置自动换行 self.treeView.setWordWrap(True) # 设置不影藏头部 self.treeView.setHeaderHidden(False) # 设置双击可以展开节点 self.treeView.setExpandsOnDoubleClick(True) # 设置显示头部 self.treeView.header().setVisible(True) self.treeView.setObjectName("treeView") MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 26)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow) # 创建存储文件系统的模型 model = QtWidgets.QDirModel() # 为树控件设置数据模型 self.treeView.setModel(model)
def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.loadram_cbx = QtWidgets.QCheckBox('Load data in memory', self) self.ignorelags_cbx = QtWidgets.QCheckBox('Ignore time lags between Z-layers', self) self.forceinterp_cbx = QtWidgets.QCheckBox('Force time interpolation of Z-layers (even if time-aligned data is present)', self) self.ignoreunknowndata_cbx = QtWidgets.QCheckBox('Ignore data sets that are not recognised automatically', self) self.loadram_cbx.setEnabled(True) self.ignorelags_cbx.setEnabled(True) self.path_le = QtWidgets.QLineEdit('') self.path_completer = QtWidgets.QCompleter([], self.path_le) self.path_completer.setModel(QtWidgets.QDirModel(self.path_completer)) self.path_completer.setCompletionMode(QtWidgets.QCompleter.PopupCompletion) self.path_le.setCompleter(self.path_completer) self._c_path = '' self.path_le.textChanged.connect(self.path_modified) self.path_le.returnPressed.connect(self.path_validated) self.directoryEntered.connect(self.dir_entered)
def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.setupUi(self) # 显示文件夹 self.dirModel = QtWidgets.QDirModel(self) self.dirModel.setFilter(QtCore.QDir.AllEntries | QtCore.QDir.NoDotAndDotDot) self.treeView.setModel(self.dirModel) # DirTree事件响应 self.treeView.selectionModel().selectionChanged.connect(self.dirTreeClicked) self.treeView.hideColumn(1) self.treeView.hideColumn(2) self.treeView.hideColumn(3) # 设置listwidget的显示的图片格式 self.listWidget.setIconSize(QtCore.QSize(THUMB_WIDTH, THUMB_HEIGHT)) self.listWidget.setResizeMode(QtWidgets.QListWidget.Adjust) self.listWidget.setViewMode(QtWidgets.QListWidget.IconMode) self.listWidget.setSpacing(10) # 设置图片的双击事件 self.listWidget.itemDoubleClicked.connect(lambda: self.showPicture(self.listWidget.currentRow()))
def __init__(self): super(SelectAbsg, self).__init__() self.title = 'Select directory with Abs. g files (.project.txt)' self.left = 100 self.top = 100 self.width = 800 self.height = 480 self.new_datums = [] self.splitter_window = QtWidgets.QSplitter(QtCore.Qt.Horizontal, self) self.tree_model = QtWidgets.QDirModel() self.tree = QtWidgets.QTreeView() self.table_model = DatumTableModel() self.table = QtWidgets.QTableView() self.ProxyModel = QtCore.QSortFilterProxyModel(self) self.table.setModel(self.ProxyModel) self.table.setSortingEnabled(True) self.init_ui()
def create_catalog_list(self): self.catalog_list = QtWidgets.QTableView() self.model_list = QtWidgets.QDirModel() self.model_list.setFilter(QtCore.QDir.AllEntries | QtCore.QDir.NoDot) self.model_list.setSorting(QtCore.QDir.DirsFirst | QtCore.QDir.IgnoreCase | QtCore.QDir.Name) self.index = self.model_list.index(QtCore.QDir.homePath()) self.catalog_list.setModel(self.model_list) self.catalog_list.setCurrentIndex(self.index) self.catalog_list.setRootIndex(self.index) self.catalog_list.horizontalHeader().setStretchLastSection(False) self.catalog_list.horizontalHeader().setSectionResizeMode( 0, QtWidgets.QHeaderView.Stretch) self.catalog_list.resizeColumnsToContents() self.catalog_list.setIconSize(QtCore.QSize(15, 15)) self.catalog_list.resizeRowsToContents() self.catalog_list.setShowGrid(False) self.catalog_list.verticalHeader().setVisible(False) self.catalog_list.clicked.connect(self.on_click_catalog_list) self.catalog_list.doubleClicked.connect( self.on_double_click_catalog_list)
def __init__(self, parent=None): u"""GUI初期設定.""" # QtGui.QWidget.__init__(self,parent) super(MainView, self).__init__(parent) self.ui = Ui_MainWindow() self.setupUi(self) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) # 変数 self.painter = QtGui.QPainter() self.model = QtWidgets.QDirModel() self.points = [] # GUIの初期設定 self.setFixedSize(self.width(), self.height()) self.model.setFilter(QtCore.QDir.AllDirs | QtCore.QDir.NoDotAndDotDot | QtCore.QDir.AllEntries) self.treeView.setModel(self.model) self.treeView.setColumnWidth(0, 200) self.treeView.setColumnHidden(2, True) self.treeView.setColumnHidden(3, True) self.treeView.setIndentation(10) self.treeView.setEnabled(False) self.detectionTop_Edit.setValidator(QtGui.QIntValidator( 1, 65535, self)) self.detectionBottom_Edit.setValidator( QtGui.QIntValidator(1, 65535, self)) self.detectionLeft_Edit.setValidator( QtGui.QIntValidator(1, 65535, self)) self.detectionRight_Edit.setValidator( QtGui.QIntValidator(1, 65535, self)) self.trackSlider.setEnabled(False) self.pixmap = QtGui.QPixmap(640, 360) self.pixmap.fill(QtCore.Qt.black) self.videoFrame.setPixmap(self.pixmap) self.imgscale_comboBox.addItem("1.0") self.imgscale_comboBox.addItem("0.5") self.imgscale_comboBox.addItem("0.25")
def __init__(self): self.image_dir = '' self.image_map_list = [] self.image_map = [] self.image_index = 0 self.image_name = '' self.classes_list = CLASSES self.low = 0 self.high = 1024 * 1024 app = QtWidgets.QApplication(sys.argv) super(MainWindow, self).__init__() self.setWindowTitle("数据集图像筛查系统") self.resize(1460, 1000) # 屏幕居中 self.screen = QtWidgets.QDesktopWidget().screenGeometry() self.size = self.geometry() self.move((self.screen.width() - self.size.width()) / 2, (self.screen.height() - self.size.height()) / 2) self.show() mainSpliter = QtWidgets.QSplitter(QtCore.Qt.Horizontal) # 文件夹列表model self.dirModel = QtWidgets.QDirModel(self) # 只显示文件夹 # self.dirModel.setFilter(QtCore.QDir.Dirs | QtCore.QDir.NoDotAndDotDot) # 文件夹列表view self.dirTreeView = QtWidgets.QTreeView() # 绑定model self.dirTreeView.setModel(self.dirModel) self.dirTreeView.hideColumn(1) self.dirTreeView.hideColumn(2) self.dirTreeView.hideColumn(3) # DirTree事件响应 self.dirTreeView.selectionModel().selectionChanged.connect( self.dirTreeClicked) mainLayout = QtWidgets.QVBoxLayout() mainSpliter.addWidget(self.dirTreeView) self.imageContainer = QtWidgets.QFrame(mainSpliter) self.imageContainer.setMinimumWidth(self.geometry().width() * 0.6) containerLayout = QtWidgets.QVBoxLayout() # 类别筛选框 filtrate_area = QtWidgets.QHBoxLayout() classLabel = QtWidgets.QLabel("类别选择") classLabel.setFixedWidth(60) filtrate_area.addWidget(classLabel) self.check_box = ComboCheckBox(CLASSES) self.check_box.setFixedWidth(350) filtrate_area.addWidget(self.check_box) # bounding-box筛选框 self.box_input = BoxInput() self.box_input.setFixedWidth(200) filtrate_area.addWidget(self.box_input) self.confirm_button = QtWidgets.QPushButton('确定') self.confirm_button.setFixedWidth(150) self.confirm_button.clicked.connect(self.confim_choice) filtrate_area.addWidget(self.confirm_button) containerLayout.addLayout(filtrate_area) # 图片显示区域 image_area_layout = QtWidgets.QHBoxLayout() self.image_list = ImageList() self.image_list.image_name.connect(self.get_name) # self.image_list.connect(self, QtCore.SIGNAL("transfer_child"), self.w2.receive) image_area_layout.addWidget(self.image_list) self.item_area = QtWidgets.QWidget() self.item_area.setFixedSize(800, 800) self.image_area = QtWidgets.QLabel(self.item_area) self.image_area.setFixedSize(800, 800) self.image_area.setStyleSheet( "background-color: rgb(255, 255, 255); border:1px solid black") image_area_layout.addWidget(self.item_area) containerLayout.addLayout(image_area_layout) # 图片切换按钮 photo_change_area = QtWidgets.QHBoxLayout() self.pre_photo_button = QtWidgets.QPushButton('上一张') self.next_photo_button = QtWidgets.QPushButton('下一张') self.pre_photo_button.setFixedWidth(150) self.next_photo_button.setFixedWidth(150) self.pre_photo_button.clicked.connect(self.pre_photo) self.next_photo_button.clicked.connect(self.next_photo) photo_change_area.addWidget(self.pre_photo_button) photo_change_area.addWidget(self.next_photo_button) containerLayout.addLayout(photo_change_area) self.imageContainer.setLayout(containerLayout) mainSpliter.addWidget(self.imageContainer) mainLayout.addWidget(mainSpliter) self.setLayout(mainLayout) sys.exit(app.exec_())
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.setWindowModality(QtCore.Qt.WindowModal) MainWindow.resize(872, 585) MainWindow.setMinimumSize(QtCore.QSize(872, 585)) MainWindow.setMaximumSize(QtCore.QSize(872, 585)) MainWindow.setSizeIncrement(QtCore.QSize(0, 0)) MainWindow.setToolTipDuration(-1) MainWindow.setAutoFillBackground(True) MainWindow.setIconSize(QtCore.QSize(84, 128)) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.frameLeft = QtWidgets.QFrame(self.centralwidget) self.frameLeft.setGeometry(QtCore.QRect(0, -30, 171, 611)) self.frameLeft.setAutoFillBackground(True) self.frameLeft.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frameLeft.setFrameShadow(QtWidgets.QFrame.Raised) self.frameLeft.setObjectName("frameLeft") self.treeWidget = QtWidgets.QTreeWidget(self.frameLeft) self.treeWidget.setGeometry(QtCore.QRect(10, 60, 151, 491)) #给树绑定事件 self.treeWidget.clicked.connect(self.click) self.treeWidget.setObjectName("treeWidget") item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/电脑.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon) list = psutil.disk_partitions() #实例化磁盘的个数 for index in list: item_1 = QtWidgets.QTreeWidgetItem(item_0) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon1 = QtGui.QIcon() icon1.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/文档.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon1) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon2 = QtGui.QIcon() icon2.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/图片.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon2) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon3 = QtGui.QIcon() icon3.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/视频.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon3) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon4 = QtGui.QIcon() icon4.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/音乐.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon4) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon5 = QtGui.QIcon() icon5.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/删除.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon5) self.progressBar = QtWidgets.QProgressBar(self.frameLeft) self.progressBar.setGeometry(QtCore.QRect(20, 570, 151, 15)) # io = psutil.disk_partitions() # for i in io: # o = psutil.disk_usage(i.device) # print("总容量:" + str(int(o.total / (1024.0 * 1024.0 * 1024.0))) + "G") # print("已用容量:" + str(int(o.used / (1024.0 * 1024.0 * 1024.0))) + "G") # print("可用容量:" + str(int(o.free / (1024.0 * 1024.0 * 1024.0))) + "G") self.progressBar.setProperty("value", 24) self.progressBar.setObjectName("progressBar") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setGeometry(QtCore.QRect(180, 30, 691, 41)) self.frame.setAutoFillBackground(True) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.pushButton_2 = QtWidgets.QPushButton(self.frame) self.pushButton_2.setGeometry(QtCore.QRect(100, 10, 75, 23)) icon6 = QtGui.QIcon() icon6.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/下载.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_2.setIcon(icon6) self.pushButton_2.setIconSize(QtCore.QSize(24, 16)) self.pushButton_2.setObjectName("pushButton_2") self.pushButton_3 = QtWidgets.QPushButton(self.frame) self.pushButton_3.setGeometry(QtCore.QRect(180, 10, 75, 23)) icon7 = QtGui.QIcon() icon7.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/分享.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_3.setIcon(icon7) self.pushButton_3.setIconSize(QtCore.QSize(24, 16)) self.pushButton_3.setObjectName("pushButton_3") self.pushButton_4 = QtWidgets.QPushButton(self.frame) self.pushButton_4.setGeometry(QtCore.QRect(270, 10, 75, 23)) self.pushButton_4.setIcon(icon5) self.pushButton_4.setIconSize(QtCore.QSize(24, 16)) self.pushButton_4.setObjectName("pushButton_4") self.pushButton_5 = QtWidgets.QPushButton(self.frame) self.pushButton_5.setGeometry(QtCore.QRect(350, 10, 101, 23)) icon8 = QtGui.QIcon() icon8.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/网盘-新建文件夹.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_5.setIcon(icon8) self.pushButton_5.setIconSize(QtCore.QSize(24, 16)) self.pushButton_5.setObjectName("pushButton_5") self.pushButton = QtWidgets.QPushButton(self.frame) self.pushButton.setGeometry(QtCore.QRect(20, 10, 75, 23)) icon9 = QtGui.QIcon() icon9.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/上传.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton.setIcon(icon9) self.pushButton.setIconSize(QtCore.QSize(24, 16)) self.pushButton.setObjectName("pushButton") self.frame_2 = QtWidgets.QFrame(self.centralwidget) self.frame_2.setGeometry(QtCore.QRect(180, 80, 691, 41)) self.frame_2.setAutoFillBackground(True) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.lineEdit = QtWidgets.QLineEdit(self.frame_2) self.lineEdit.setGeometry(QtCore.QRect(520, 10, 113, 21)) self.lineEdit.setObjectName("lineEdit") self.pushButton_6 = QtWidgets.QPushButton(self.frame_2) self.pushButton_6.setGeometry(QtCore.QRect(630, 10, 41, 23)) self.pushButton_6.setText("") icon10 = QtGui.QIcon() icon10.addPixmap( QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/搜索.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_6.setIcon(icon10) self.pushButton_6.setIconSize(QtCore.QSize(24, 16)) self.pushButton_6.setObjectName("pushButton_6") self.frame_3 = QtWidgets.QFrame(self.centralwidget) self.frame_3.setGeometry(QtCore.QRect(180, 120, 691, 441)) self.frame_3.setAutoFillBackground(True) self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.tree = QtWidgets.QTreeView(self.frame_3) self.model = QtWidgets.QDirModel() self.tree.setModel(self.model) self.tree.setRootIndex(self.model.index(r'C:')) self.tree.setGeometry(QtCore.QRect(0, 0, 691, 400)) # self.frame_5 = QtWidgets.QFrame(self.frame_3) # self.frame_5.setGeometry(QtCore.QRect(30, 10, 121, 81)) # self.frame_5.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_5.setAutoFillBackground(True) # self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_5.setObjectName("frame_5") # self.pushButton_7 = QtWidgets.QPushButton(self.frame_5) # self.pushButton_7.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_7.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_7.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_7.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_7.setText("") # icon11 = QtGui.QIcon() # icon11.addPixmap(QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/文件夹 (1).png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) # self.pushButton_7.setIcon(icon11) # self.pushButton_7.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_7.setAutoRepeatInterval(102) # self.pushButton_7.setObjectName("pushButton_7") # self.label = QtWidgets.QLabel(self.frame_5) # self.label.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label.setTextFormat(QtCore.Qt.AutoText) # self.label.setObjectName("label") # self.frame_6 = QtWidgets.QFrame(self.frame_3) # self.frame_6.setGeometry(QtCore.QRect(160, 10, 121, 81)) # self.frame_6.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_6.setAutoFillBackground(True) # self.frame_6.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_6.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_6.setObjectName("frame_6") # self.pushButton_8 = QtWidgets.QPushButton(self.frame_6) # self.pushButton_8.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_8.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_8.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_8.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_8.setText("") # self.pushButton_8.setIcon(icon11) # self.pushButton_8.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_8.setAutoRepeatInterval(102) # self.pushButton_8.setObjectName("pushButton_8") # self.label_2 = QtWidgets.QLabel(self.frame_6) # self.label_2.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_2.setTextFormat(QtCore.Qt.AutoText) # self.label_2.setObjectName("label_2") # self.frame_7 = QtWidgets.QFrame(self.frame_3) # self.frame_7.setGeometry(QtCore.QRect(290, 10, 121, 81)) # self.frame_7.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_7.setAutoFillBackground(True) # self.frame_7.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_7.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_7.setObjectName("frame_7") # self.pushButton_9 = QtWidgets.QPushButton(self.frame_7) # self.pushButton_9.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_9.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_9.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_9.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_9.setText("") # self.pushButton_9.setIcon(icon11) # self.pushButton_9.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_9.setAutoRepeatInterval(102) # self.pushButton_9.setObjectName("pushButton_9") # self.label_3 = QtWidgets.QLabel(self.frame_7) # self.label_3.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_3.setTextFormat(QtCore.Qt.AutoText) # self.label_3.setObjectName("label_3") # self.frame_8 = QtWidgets.QFrame(self.frame_3) # self.frame_8.setGeometry(QtCore.QRect(420, 10, 121, 81)) # self.frame_8.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_8.setAutoFillBackground(True) # self.frame_8.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_8.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_8.setObjectName("frame_8") # self.pushButton_12 = QtWidgets.QPushButton(self.frame_8) # self.pushButton_12.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_12.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_12.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_12.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_12.setText("") # self.pushButton_12.setIcon(icon11) # self.pushButton_12.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_12.setAutoRepeatInterval(102) # self.pushButton_12.setObjectName("pushButton_12") # self.label_6 = QtWidgets.QLabel(self.frame_8) # self.label_6.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_6.setTextFormat(QtCore.Qt.AutoText) # self.label_6.setObjectName("label_6") # self.frame_9 = QtWidgets.QFrame(self.frame_3) # self.frame_9.setGeometry(QtCore.QRect(550, 10, 121, 81)) # self.frame_9.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_9.setAutoFillBackground(True) # self.frame_9.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_9.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_9.setObjectName("frame_9") # self.pushButton_13 = QtWidgets.QPushButton(self.frame_9) # self.pushButton_13.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_13.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_13.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_13.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_13.setText("") # self.pushButton_13.setIcon(icon11) # self.pushButton_13.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_13.setAutoRepeatInterval(102) # self.pushButton_13.setObjectName("pushButton_13") # self.label_7 = QtWidgets.QLabel(self.frame_9) # self.label_7.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_7.setTextFormat(QtCore.Qt.AutoText) # self.label_7.setObjectName("label_7") # self.frame_10 = QtWidgets.QFrame(self.frame_3) # self.frame_10.setGeometry(QtCore.QRect(30, 90, 121, 81)) # self.frame_10.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_10.setAutoFillBackground(True) # self.frame_10.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_10.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_10.setObjectName("frame_10") # self.pushButton_11 = QtWidgets.QPushButton(self.frame_10) # self.pushButton_11.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_11.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_11.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_11.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_11.setText("") # self.pushButton_11.setIcon(icon11) # self.pushButton_11.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_11.setAutoRepeatInterval(102) # self.pushButton_11.setObjectName("pushButton_11") # self.label_5 = QtWidgets.QLabel(self.frame_10) # self.label_5.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_5.setTextFormat(QtCore.Qt.AutoText) # self.label_5.setObjectName("label_5") # self.frame_11 = QtWidgets.QFrame(self.frame_3) # self.frame_11.setGeometry(QtCore.QRect(160, 90, 121, 81)) # self.frame_11.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_11.setAutoFillBackground(True) # self.frame_11.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_11.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_11.setObjectName("frame_11") # self.pushButton_14 = QtWidgets.QPushButton(self.frame_11) # self.pushButton_14.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_14.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_14.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_14.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_14.setText("") # self.pushButton_14.setIcon(icon11) # self.pushButton_14.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_14.setAutoRepeatInterval(102) # self.pushButton_14.setObjectName("pushButton_14") # self.label_8 = QtWidgets.QLabel(self.frame_11) # self.label_8.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_8.setTextFormat(QtCore.Qt.AutoText) # self.label_8.setObjectName("label_8") # self.frame_15 = QtWidgets.QFrame(self.frame_11) # self.frame_15.setGeometry(QtCore.QRect(0, 0, 121, 81)) # self.frame_15.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_15.setAutoFillBackground(True) # self.frame_15.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_15.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_15.setObjectName("frame_15") # self.pushButton_18 = QtWidgets.QPushButton(self.frame_15) # self.pushButton_18.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_18.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_18.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_18.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_18.setText("") # self.pushButton_18.setIcon(icon11) # self.pushButton_18.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_18.setAutoRepeatInterval(102) # self.pushButton_18.setObjectName("pushButton_18") # self.label_12 = QtWidgets.QLabel(self.frame_15) # self.label_12.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_12.setTextFormat(QtCore.Qt.AutoText) # self.label_12.setObjectName("label_12") # self.frame_16 = QtWidgets.QFrame(self.frame_11) # self.frame_16.setGeometry(QtCore.QRect(130, 0, 121, 81)) # self.frame_16.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_16.setAutoFillBackground(True) # self.frame_16.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_16.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_16.setObjectName("frame_16") # self.pushButton_19 = QtWidgets.QPushButton(self.frame_16) # self.pushButton_19.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_19.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_19.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_19.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_19.setText("") # self.pushButton_19.setIcon(icon11) # self.pushButton_19.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_19.setAutoRepeatInterval(102) # self.pushButton_19.setObjectName("pushButton_19") # self.label_13 = QtWidgets.QLabel(self.frame_16) # self.label_13.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_13.setTextFormat(QtCore.Qt.AutoText) # self.label_13.setObjectName("label_13") # self.frame_17 = QtWidgets.QFrame(self.frame_11) # self.frame_17.setGeometry(QtCore.QRect(260, 0, 121, 81)) # self.frame_17.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_17.setAutoFillBackground(True) # self.frame_17.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_17.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_17.setObjectName("frame_17") # self.pushButton_20 = QtWidgets.QPushButton(self.frame_17) # self.pushButton_20.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_20.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_20.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_20.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_20.setText("") # self.pushButton_20.setIcon(icon11) # self.pushButton_20.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_20.setAutoRepeatInterval(102) # self.pushButton_20.setObjectName("pushButton_20") # self.label_14 = QtWidgets.QLabel(self.frame_17) # self.label_14.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_14.setTextFormat(QtCore.Qt.AutoText) # self.label_14.setObjectName("label_14") # self.frame_18 = QtWidgets.QFrame(self.frame_11) # self.frame_18.setGeometry(QtCore.QRect(390, 0, 121, 81)) # self.frame_18.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_18.setAutoFillBackground(True) # self.frame_18.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_18.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_18.setObjectName("frame_18") # self.pushButton_21 = QtWidgets.QPushButton(self.frame_18) # self.pushButton_21.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_21.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_21.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_21.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_21.setText("") # self.pushButton_21.setIcon(icon11) # self.pushButton_21.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_21.setAutoRepeatInterval(102) # self.pushButton_21.setObjectName("pushButton_21") # self.label_15 = QtWidgets.QLabel(self.frame_18) # self.label_15.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_15.setTextFormat(QtCore.Qt.AutoText) # self.label_15.setObjectName("label_15") # self.frame_19 = QtWidgets.QFrame(self.frame_11) # self.frame_19.setGeometry(QtCore.QRect(520, 0, 121, 81)) # self.frame_19.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_19.setAutoFillBackground(True) # self.frame_19.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_19.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_19.setObjectName("frame_19") # self.pushButton_22 = QtWidgets.QPushButton(self.frame_19) # self.pushButton_22.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_22.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_22.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_22.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_22.setText("") # self.pushButton_22.setIcon(icon11) # self.pushButton_22.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_22.setAutoRepeatInterval(102) # self.pushButton_22.setObjectName("pushButton_22") # self.label_16 = QtWidgets.QLabel(self.frame_19) # self.label_16.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_16.setTextFormat(QtCore.Qt.AutoText) # self.label_16.setObjectName("label_16") # self.frame_12 = QtWidgets.QFrame(self.frame_3) # self.frame_12.setGeometry(QtCore.QRect(290, 90, 121, 81)) # self.frame_12.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_12.setAutoFillBackground(True) # self.frame_12.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_12.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_12.setObjectName("frame_12") # self.pushButton_15 = QtWidgets.QPushButton(self.frame_12) # self.pushButton_15.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_15.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_15.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_15.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_15.setText("") # self.pushButton_15.setIcon(icon11) # self.pushButton_15.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_15.setAutoRepeatInterval(102) # self.pushButton_15.setObjectName("pushButton_15") # self.label_9 = QtWidgets.QLabel(self.frame_12) # self.label_9.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_9.setTextFormat(QtCore.Qt.AutoText) # self.label_9.setObjectName("label_9") # self.frame_13 = QtWidgets.QFrame(self.frame_3) # self.frame_13.setGeometry(QtCore.QRect(420, 90, 121, 81)) # self.frame_13.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_13.setAutoFillBackground(True) # self.frame_13.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_13.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_13.setObjectName("frame_13") # self.pushButton_16 = QtWidgets.QPushButton(self.frame_13) # self.pushButton_16.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_16.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_16.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_16.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_16.setText("") # self.pushButton_16.setIcon(icon11) # self.pushButton_16.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_16.setAutoRepeatInterval(102) # self.pushButton_16.setObjectName("pushButton_16") # self.label_10 = QtWidgets.QLabel(self.frame_13) # self.label_10.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_10.setTextFormat(QtCore.Qt.AutoText) # self.label_10.setObjectName("label_10") # self.frame_14 = QtWidgets.QFrame(self.frame_3) # self.frame_14.setGeometry(QtCore.QRect(550, 90, 121, 81)) # self.frame_14.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_14.setAutoFillBackground(True) # self.frame_14.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_14.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_14.setObjectName("frame_14") # self.pushButton_17 = QtWidgets.QPushButton(self.frame_14) # self.pushButton_17.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_17.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_17.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_17.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_17.setText("") # self.pushButton_17.setIcon(icon11) # self.pushButton_17.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_17.setAutoRepeatInterval(102) # self.pushButton_17.setObjectName("pushButton_17") # self.label_11 = QtWidgets.QLabel(self.frame_14) # self.label_11.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_11.setTextFormat(QtCore.Qt.AutoText) # self.label_11.setObjectName("label_11") # self.frame_20 = QtWidgets.QFrame(self.frame_3) # self.frame_20.setGeometry(QtCore.QRect(420, 170, 121, 81)) # self.frame_20.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_20.setAutoFillBackground(True) # self.frame_20.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_20.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_20.setObjectName("frame_20") # self.pushButton_23 = QtWidgets.QPushButton(self.frame_20) # self.pushButton_23.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_23.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_23.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_23.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_23.setText("") # self.pushButton_23.setIcon(icon11) # self.pushButton_23.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_23.setAutoRepeatInterval(102) # self.pushButton_23.setObjectName("pushButton_23") # self.label_17 = QtWidgets.QLabel(self.frame_20) # self.label_17.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_17.setTextFormat(QtCore.Qt.AutoText) # self.label_17.setObjectName("label_17") # self.frame_21 = QtWidgets.QFrame(self.frame_3) # self.frame_21.setGeometry(QtCore.QRect(290, 170, 121, 81)) # self.frame_21.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_21.setAutoFillBackground(True) # self.frame_21.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_21.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_21.setObjectName("frame_21") # self.pushButton_24 = QtWidgets.QPushButton(self.frame_21) # self.pushButton_24.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_24.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_24.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_24.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_24.setText("") # self.pushButton_24.setIcon(icon11) # self.pushButton_24.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_24.setAutoRepeatInterval(102) # self.pushButton_24.setObjectName("pushButton_24") # self.label_18 = QtWidgets.QLabel(self.frame_21) # self.label_18.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_18.setTextFormat(QtCore.Qt.AutoText) # self.label_18.setObjectName("label_18") # self.frame_22 = QtWidgets.QFrame(self.frame_3) # self.frame_22.setGeometry(QtCore.QRect(160, 170, 121, 81)) # self.frame_22.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_22.setAutoFillBackground(True) # self.frame_22.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_22.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_22.setObjectName("frame_22") # self.pushButton_25 = QtWidgets.QPushButton(self.frame_22) # self.pushButton_25.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_25.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_25.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_25.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_25.setText("") # self.pushButton_25.setIcon(icon11) # self.pushButton_25.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_25.setAutoRepeatInterval(102) # self.pushButton_25.setObjectName("pushButton_25") # self.label_19 = QtWidgets.QLabel(self.frame_22) # self.label_19.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_19.setTextFormat(QtCore.Qt.AutoText) # self.label_19.setObjectName("label_19") # self.frame_23 = QtWidgets.QFrame(self.frame_3) # self.frame_23.setGeometry(QtCore.QRect(30, 170, 121, 81)) # self.frame_23.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_23.setAutoFillBackground(True) # self.frame_23.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_23.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_23.setObjectName("frame_23") # self.pushButton_26 = QtWidgets.QPushButton(self.frame_23) # self.pushButton_26.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_26.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_26.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_26.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_26.setText("") # self.pushButton_26.setIcon(icon11) # self.pushButton_26.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_26.setAutoRepeatInterval(102) # self.pushButton_26.setObjectName("pushButton_26") # self.label_20 = QtWidgets.QLabel(self.frame_23) # self.label_20.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_20.setTextFormat(QtCore.Qt.AutoText) # self.label_20.setObjectName("label_20") # self.frame_24 = QtWidgets.QFrame(self.frame_3) # self.frame_24.setGeometry(QtCore.QRect(550, 170, 121, 81)) # self.frame_24.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_24.setAutoFillBackground(True) # self.frame_24.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_24.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_24.setObjectName("frame_24") # self.pushButton_27 = QtWidgets.QPushButton(self.frame_24) # self.pushButton_27.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_27.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_27.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_27.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_27.setText("") # self.pushButton_27.setIcon(icon11) # self.pushButton_27.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_27.setAutoRepeatInterval(102) # self.pushButton_27.setObjectName("pushButton_27") # self.label_21 = QtWidgets.QLabel(self.frame_24) # self.label_21.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_21.setTextFormat(QtCore.Qt.AutoText) # self.label_21.setObjectName("label_21") # self.frame_25 = QtWidgets.QFrame(self.frame_3) # self.frame_25.setGeometry(QtCore.QRect(420, 250, 121, 81)) # self.frame_25.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_25.setAutoFillBackground(True) # self.frame_25.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_25.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_25.setObjectName("frame_25") # self.pushButton_33 = QtWidgets.QPushButton(self.frame_25) # self.pushButton_33.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_33.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_33.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_33.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_33.setText("") # self.pushButton_33.setIcon(icon11) # self.pushButton_33.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_33.setAutoRepeatInterval(102) # self.pushButton_33.setObjectName("pushButton_33") # self.label_27 = QtWidgets.QLabel(self.frame_25) # self.label_27.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_27.setTextFormat(QtCore.Qt.AutoText) # self.label_27.setObjectName("label_27") # self.frame_26 = QtWidgets.QFrame(self.frame_3) # self.frame_26.setGeometry(QtCore.QRect(290, 250, 121, 81)) # self.frame_26.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_26.setAutoFillBackground(True) # self.frame_26.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_26.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_26.setObjectName("frame_26") # self.pushButton_34 = QtWidgets.QPushButton(self.frame_26) # self.pushButton_34.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_34.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_34.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_34.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_34.setText("") # self.pushButton_34.setIcon(icon11) # self.pushButton_34.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_34.setAutoRepeatInterval(102) # self.pushButton_34.setObjectName("pushButton_34") # self.label_28 = QtWidgets.QLabel(self.frame_26) # self.label_28.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_28.setTextFormat(QtCore.Qt.AutoText) # self.label_28.setObjectName("label_28") # self.frame_27 = QtWidgets.QFrame(self.frame_3) # self.frame_27.setGeometry(QtCore.QRect(160, 250, 121, 81)) # self.frame_27.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_27.setAutoFillBackground(True) # self.frame_27.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_27.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_27.setObjectName("frame_27") # self.pushButton_35 = QtWidgets.QPushButton(self.frame_27) # self.pushButton_35.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_35.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_35.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_35.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_35.setText("") # self.pushButton_35.setIcon(icon11) # self.pushButton_35.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_35.setAutoRepeatInterval(102) # self.pushButton_35.setObjectName("pushButton_35") # self.label_29 = QtWidgets.QLabel(self.frame_27) # self.label_29.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_29.setTextFormat(QtCore.Qt.AutoText) # self.label_29.setObjectName("label_29") # self.frame_28 = QtWidgets.QFrame(self.frame_3) # self.frame_28.setGeometry(QtCore.QRect(550, 250, 121, 81)) # self.frame_28.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_28.setAutoFillBackground(True) # self.frame_28.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_28.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_28.setObjectName("frame_28") # self.pushButton_36 = QtWidgets.QPushButton(self.frame_28) # self.pushButton_36.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_36.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_36.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_36.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_36.setText("") # self.pushButton_36.setIcon(icon11) # self.pushButton_36.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_36.setAutoRepeatInterval(102) # self.pushButton_36.setObjectName("pushButton_36") # self.label_30 = QtWidgets.QLabel(self.frame_28) # self.label_30.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_30.setTextFormat(QtCore.Qt.AutoText) # self.label_30.setObjectName("label_30") # self.frame_29 = QtWidgets.QFrame(self.frame_3) # self.frame_29.setGeometry(QtCore.QRect(30, 250, 121, 81)) # self.frame_29.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_29.setAutoFillBackground(True) # self.frame_29.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_29.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_29.setObjectName("frame_29") # self.pushButton_37 = QtWidgets.QPushButton(self.frame_29) # self.pushButton_37.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_37.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_37.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_37.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_37.setText("") # self.pushButton_37.setIcon(icon11) # self.pushButton_37.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_37.setAutoRepeatInterval(102) # self.pushButton_37.setObjectName("pushButton_37") # self.label_31 = QtWidgets.QLabel(self.frame_29) # self.label_31.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_31.setTextFormat(QtCore.Qt.AutoText) # self.label_31.setObjectName("label_31") # self.frame_32 = QtWidgets.QFrame(self.frame_3) # self.frame_32.setGeometry(QtCore.QRect(160, 330, 121, 81)) # self.frame_32.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_32.setAutoFillBackground(True) # self.frame_32.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_32.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_32.setObjectName("frame_32") # self.pushButton_40 = QtWidgets.QPushButton(self.frame_32) # self.pushButton_40.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_40.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_40.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_40.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_40.setText("") # self.pushButton_40.setIcon(icon11) # self.pushButton_40.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_40.setAutoRepeatInterval(102) # self.pushButton_40.setObjectName("pushButton_40") # self.label_34 = QtWidgets.QLabel(self.frame_32) # self.label_34.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_34.setTextFormat(QtCore.Qt.AutoText) # self.label_34.setObjectName("label_34") # self.frame_33 = QtWidgets.QFrame(self.frame_3) # self.frame_33.setGeometry(QtCore.QRect(300, 330, 121, 81)) # self.frame_33.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_33.setAutoFillBackground(True) # self.frame_33.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_33.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_33.setObjectName("frame_33") # self.pushButton_41 = QtWidgets.QPushButton(self.frame_33) # self.pushButton_41.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_41.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_41.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_41.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_41.setText("") # icon12 = QtGui.QIcon() # icon12.addPixmap(QtGui.QPixmap("C:/Users/Administrator/Desktop/矢量图/add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) # self.pushButton_41.setIcon(icon12) # self.pushButton_41.setIconSize(QtCore.QSize(32, 32)) # self.pushButton_41.setAutoRepeatInterval(102) # self.pushButton_41.setObjectName("pushButton_41") # self.label_35 = QtWidgets.QLabel(self.frame_33) # self.label_35.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_35.setTextFormat(QtCore.Qt.AutoText) # self.label_35.setObjectName("label_35") # self.frame_34 = QtWidgets.QFrame(self.frame_3) # self.frame_34.setGeometry(QtCore.QRect(30, 330, 121, 81)) # self.frame_34.setLayoutDirection(QtCore.Qt.LeftToRight) # self.frame_34.setAutoFillBackground(True) # self.frame_34.setFrameShape(QtWidgets.QFrame.StyledPanel) # self.frame_34.setFrameShadow(QtWidgets.QFrame.Raised) # self.frame_34.setObjectName("frame_34") # self.pushButton_42 = QtWidgets.QPushButton(self.frame_34) # self.pushButton_42.setGeometry(QtCore.QRect(0, 0, 121, 61)) # self.pushButton_42.setFocusPolicy(QtCore.Qt.NoFocus) # self.pushButton_42.setContextMenuPolicy(QtCore.Qt.PreventContextMenu) # self.pushButton_42.setLayoutDirection(QtCore.Qt.LeftToRight) # self.pushButton_42.setText("") # self.pushButton_42.setIcon(icon11) # self.pushButton_42.setIconSize(QtCore.QSize(64, 64)) # self.pushButton_42.setAutoRepeatInterval(102) # self.pushButton_42.setObjectName("pushButton_42") # self.label_36 = QtWidgets.QLabel(self.frame_34) # self.label_36.setGeometry(QtCore.QRect(50, 60, 54, 21)) # self.label_36.setTextFormat(QtCore.Qt.AutoText) # self.label_36.setObjectName("label_36") MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, MainWindow): #数据模型 self.model = QtWidgets.QDirModel() MainWindow.setObjectName("家庭数据中心") MainWindow.resize(950, 568) MainWindow.setContextMenuPolicy(QtCore.Qt.NoContextMenu) MainWindow.setLayoutDirection(QtCore.Qt.LeftToRight) MainWindow.setAutoFillBackground(False) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.frame = QtWidgets.QFrame(self.centralwidget) self.frame.setGeometry(QtCore.QRect(10,40, 161, 531)) self.frame.setAutoFillBackground(True) self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setObjectName("frame") self.treeWidget = QtWidgets.QTreeWidget(self.frame) self.treeWidget.setGeometry(QtCore.QRect(10, 0, 151, 461)) _translate = QtCore.QCoreApplication.translate self.treeWidget.headerItem().setText(0, _translate("MainWindow", "")) # 给树绑定事件 self.treeWidget.clicked.connect(self.treeclick) self.treeWidget.setObjectName("treeWidget") item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("../ioc/电脑.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon) list = psutil.disk_partitions() # 实例化磁盘的个数 for index in list: item_1 = QtWidgets.QTreeWidgetItem(item_0) #实例化数据结束 item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("../ioc/文档.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon1) item_1 = QtWidgets.QTreeWidgetItem(item_0) item_1 = QtWidgets.QTreeWidgetItem(item_0) item_1 = QtWidgets.QTreeWidgetItem(item_0) item_0 = QtWidgets.QTreeWidgetItem(self.treeWidget) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap("../ioc/删除.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) item_0.setIcon(0, icon2) self.treeWidget.expandAll() self.progressBar = QtWidgets.QProgressBar(self.frame) self.progressBar.setGeometry(QtCore.QRect(10, 483, 151, 16)) self.progressBar.setProperty("value", 24) self.progressBar.setObjectName("progressBar") self.frame_2 = QtWidgets.QFrame(self.centralwidget) self.frame_2.setGeometry(QtCore.QRect(190, 40, 741, 41)) self.frame_2.setAutoFillBackground(True) self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_2.setObjectName("frame_2") self.horizontalLayoutWidget = QtWidgets.QWidget(self.frame_2) self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 0, 414, 31)) self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget") self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget) self.horizontalLayout.setContentsMargins(0, 0, 0, 0) self.horizontalLayout.setObjectName("horizontalLayout") self.pushButton_2 = QtWidgets.QPushButton(self.horizontalLayoutWidget) self.pushButton_2.setAutoFillBackground(False) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap("../ioc/上传.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_2.setIcon(icon3) self.pushButton_2.setObjectName("pushButton_2") self.horizontalLayout.addWidget(self.pushButton_2) self.pushButton = QtWidgets.QPushButton(self.horizontalLayoutWidget) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap("../ioc/下载.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton.setIcon(icon4) self.pushButton.setObjectName("pushButton") self.horizontalLayout.addWidget(self.pushButton) self.pushButton_4 = QtWidgets.QPushButton(self.horizontalLayoutWidget) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap("../ioc/分享.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_4.setIcon(icon5) self.pushButton_4.setObjectName("pushButton_4") self.horizontalLayout.addWidget(self.pushButton_4) self.pushButton_3 = QtWidgets.QPushButton(self.horizontalLayoutWidget) self.pushButton_3.setIcon(icon2) self.pushButton_3.setObjectName("pushButton_3") self.horizontalLayout.addWidget(self.pushButton_3) self.pushButton_5 = QtWidgets.QPushButton(self.horizontalLayoutWidget) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap("../ioc/网盘-新建文件夹.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_5.setIcon(icon6) self.pushButton_5.setObjectName("pushButton_5") self.horizontalLayout.addWidget(self.pushButton_5) self.frame_3 = QtWidgets.QFrame(self.centralwidget) self.frame_3.setGeometry(QtCore.QRect(190, 80, 741, 41)) self.frame_3.setAutoFillBackground(True) self.frame_3.setFrameShape(QtWidgets.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtWidgets.QFrame.Raised) self.frame_3.setObjectName("frame_3") self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.frame_3) self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(10, 0, 161, 31)) self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2) self.horizontalLayout_2.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.pushButton_8 = QtWidgets.QPushButton(self.horizontalLayoutWidget_2) self.pushButton_8.setText("") icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap("../ioc/leftnot.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_8.setIcon(icon7) self.pushButton_8.setObjectName("pushButton_8") self.horizontalLayout_2.addWidget(self.pushButton_8) self.pushButton_7 = QtWidgets.QPushButton(self.horizontalLayoutWidget_2) self.pushButton_7.setText("") icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap("../ioc/rightnot.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_7.setIcon(icon8) self.pushButton_7.setObjectName("pushButton_7") #设置禁用 self.pushButton_7.setEnabled(False) self.pushButton_8.setEnabled(False) self.horizontalLayout_2.addWidget(self.pushButton_7) self.pushButton_6 = QtWidgets.QPushButton(self.horizontalLayoutWidget_2) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap("../ioc/刷新.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_6.setIcon(icon9) self.pushButton_6.setObjectName("pushButton_6") self.horizontalLayout_2.addWidget(self.pushButton_6) self.layoutWidget = QtWidgets.QWidget(self.frame_3) self.layoutWidget.setGeometry(QtCore.QRect(560,6 , 169, 26)) self.layoutWidget.setObjectName("layoutWidget") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.layoutWidget) self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.lineEdit = QtWidgets.QLineEdit(self.layoutWidget) self.lineEdit.setObjectName("lineEdit") self.horizontalLayout_3.addWidget(self.lineEdit) self.pushButton_9 = QtWidgets.QPushButton(self.layoutWidget) self.pushButton_9.setText("") icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap("../ioc/搜索.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.pushButton_9.setIcon(icon10) self.pushButton_9.setObjectName("pushButton_9") self.horizontalLayout_3.addWidget(self.pushButton_9) #路径保存的地方 self.label_2 = QtWidgets.QLabel(self.frame_3) self.label_2.setGeometry(QtCore.QRect(190, 5, 351, 20)) self.label_2.setFont(QtGui.QFont("Roman times",12,QtGui.QFont.Bold)) self.label_2.setObjectName("label_2") self.scrollArea = QtWidgets.QScrollArea(self.centralwidget) self.scrollArea.setGeometry(QtCore.QRect(190, 130, 741, 411)) self.scrollArea.setLayoutDirection(QtCore.Qt.LeftToRight) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName("scrollArea") self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setMinimumSize(250, 2000) self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 739, 409)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.gridLayoutWidget = QtWidgets.QWidget(self.scrollAreaWidgetContents) self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 0, 721, 600)) self.gridLayoutWidget.setObjectName("gridLayoutWidget") self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") path = '{0}{1}'.format('C', ':') self.getFile(os.listdir(path)) self.nextPath=0 #搜索得到的一个结果 self.result = [] #单击选中Click Select self.clickSelectList=[] self.scrollArea.setWidget(self.scrollAreaWidgetContents) MainWindow.setCentralWidget(self.centralwidget) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) for attr in dir(self): if not attr.startswith('__') and 'pushButton' in attr: getattr(self, attr).setStyleSheet("border:none;") self.pushButton_2.clicked.connect(self.upload) self.pushButton.clicked.connect(self.download) self.pushButton_4.clicked.connect(self.share) self.pushButton_3.clicked.connect(self.delete) self.pushButton_5.clicked.connect(self.newfile) self.pushButton_9.clicked.connect(self.searchfile) self.pushButton_8.clicked.connect(self.back) self.pushButton_7.clicked.connect(self.forward) self.pushButton_6.clicked.connect(self.refresh) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def __init__(self, parent=None): self.image_dir = '' self.image_map_list = [] self.image_map = [] self.image_index = 0 self.image_name = '' self.classes_list = CLASSES self.roi_list_one = [] # 保存一张图片的roi self.roi_list_many = [] # 保存多张图片的roi self.low = 0 self.high = 1024 * 1024 super(Pic_Menu, self).__init__(parent) self.mainLayout = QtWidgets.QVBoxLayout() self.containerLayout = QtWidgets.QVBoxLayout() # 垂直图片展示布局管理器 self.filtrate_area = QtWidgets.QHBoxLayout() # 上部类别布局管理器 self.image_area_layout = QtWidgets.QHBoxLayout() # 中间图片展示布局管理包括文件列表和展示 self.photo_change_area = QtWidgets.QHBoxLayout() # 底部图片切换布局管理 self.mainSpliter = QtWidgets.QSplitter(Qt.Horizontal) self.dirModel = QtWidgets.QDirModel(self) self.dirModel.setFilter(QDir.Dirs | QDir.NoDotAndDotDot) # 文件夹列表view self.dirTreeView = QtWidgets.QTreeView() # 绑定model self.dirTreeView.setModel(self.dirModel) # self.dirTreeView.setRootIndex(self.dirModel.index(dir)) # 设置文件夹路径 # self.dirTreeView.expand(self.dirModel.index(dir)) #展开当前文件夹 # self.dirTreeView.scrollTo(self.dirModel.index(dir)) #视图滚动 self.dirTreeView.hideColumn(1) # 控制显示列数据 self.dirTreeView.hideColumn(2) self.dirTreeView.hideColumn(3) # DirTree事件响应 self.dirTreeView.selectionModel().selectionChanged.connect( self.dirTreeClicked) self.mainSpliter.addWidget(self.dirTreeView) self.imageContainer = QtWidgets.QFrame(self.mainSpliter) self.imageContainer.setMinimumWidth(int(self.geometry().width() * 0.6)) # 类别筛选框 classLabel = QtWidgets.QLabel("类别选择") classLabel.setFixedWidth(60) self.filtrate_area.addWidget(classLabel) self.check_box = ComboCheckBox(CLASSES) self.check_box.setFixedWidth(350) self.filtrate_area.addWidget(self.check_box) # bounding-box筛选框 self.box_input = BoxInput() self.box_input.setFixedWidth(200) self.filtrate_area.addWidget(self.box_input) self.confirm_button = QtWidgets.QPushButton('确定') self.confirm_button.setFixedWidth(150) self.confirm_button.clicked.connect(self.confim_choice) self.filtrate_area.addWidget(self.confirm_button) self.containerLayout.addLayout(self.filtrate_area) # 图片显示区域 self.image_list = ImageList() self.image_list.image_name.connect(self.get_name) # self.image_list.connect(self, QtCore.SIGNAL("transfer_child"), self.w2.receive) self.image_area_layout.addWidget(self.image_list) # self.item_area = QtWidgets.QWidget() # self.item_area.setFixedSize(800, 800) # # self.image_area = QtWidgets.QLabel(self.item_area) # self.image_area.setFixedSize(800, 800) # self.image_area.setStyleSheet("background-color: rgb(255, 255, 255); border:1px solid black") # # self.image_area_layout.addWidget(self.item_area) self.image_area = ImageArea() self.image_area_layout.addWidget(self.image_area) self.containerLayout.addLayout(self.image_area_layout) # 图片切换按钮 self.pre_photo_button = QtWidgets.QPushButton('上一张') self.next_photo_button = QtWidgets.QPushButton('下一张') self.pre_photo_button.setFixedWidth(150) self.next_photo_button.setFixedWidth(150) self.pre_photo_button.clicked.connect(self.pre_photo) self.next_photo_button.clicked.connect(self.next_photo) self.photo_change_area.addWidget(self.pre_photo_button) self.photo_change_area.addWidget(self.next_photo_button) self.containerLayout.addLayout(self.photo_change_area) self.imageContainer.setLayout(self.containerLayout) self.mainSpliter.addWidget(self.imageContainer) self.mainLayout.addWidget(self.mainSpliter)
def setupUi(self, Puuttuvatsarjat, Paaikkuna): Puuttuvatsarjat.setObjectName("Puuttuvatsarjat") self.MARGINAALIT = [10, 10] self.MITAT = [850, 220] Puuttuvatsarjat.resize(self.MITAT[0], self.MITAT[1]) Puuttuvatsarjat.setMinimumSize(self.MITAT[0], self.MITAT[1]) Puuttuvatsarjat.setMaximumSize(self.MITAT[0], self.MITAT[1]) # font = QtGui.QFont() # font.setPointSize(12) self.sarjalista = QtWidgets.QListWidget(Puuttuvatsarjat) self.sarjalista.setGeometry( QtCore.QRect(self.MARGINAALIT[0], self.MARGINAALIT[1], 210, 200)) self.sarjalista.setObjectName("sarjalista") self.sarjalista.setSelectionMode( QtWidgets.QAbstractItemView.SingleSelection) self.sarjalista.selectionModel().selectionChanged.connect( self.nayta_tiedot) self.Paaikkuna = Paaikkuna self.sarjat = Paaikkuna.SARJAT # lista kaikista sarjoista self.indeksit = Paaikkuna.muuttuneetindeksit # puuttuvien indeksit self.ehdotukset = Paaikkuna.ehdotukset # kansioehdotukset self.label_vanhapolku = QtWidgets.QLabel(Puuttuvatsarjat) self.label_vanhapolku.setGeometry( QtCore.QRect(self.MARGINAALIT[0] * 2 + 210, 5, 600, 30)) self.label_vanhapolku.setObjectName("label_vanhapolku") self.teksti_vanhapolku = QtWidgets.QLineEdit(Puuttuvatsarjat) self.teksti_vanhapolku.setGeometry( QtCore.QRect(self.MARGINAALIT[0] * 2 + 210, 30, 600, 30)) # self.teksti_vanhapolku.setFont(font) self.teksti_vanhapolku.setText("") self.teksti_vanhapolku.setReadOnly(True) self.teksti_vanhapolku.setObjectName("teksti_vanhapolku") self.label_uusipolku = QtWidgets.QLabel(Puuttuvatsarjat) self.label_uusipolku.setGeometry( QtCore.QRect(self.MARGINAALIT[0] * 2 + 210, 60, 600, 30)) self.label_uusipolku.setObjectName("label_uusipolku") self.teksti_uusipolku = QtWidgets.QLineEdit(Puuttuvatsarjat) self.teksti_uusipolku.setGeometry( QtCore.QRect(self.MARGINAALIT[0] * 2 + 210, 85, 600, 30)) # self.teksti_uusipolku.setFont(font) self.teksti_uusipolku.setText("") self.teksti_uusipolku.setObjectName("teksti_uusipolku") self.teksti_uusipolku.textChanged.connect(self.tarkistakansio) completer = QtWidgets.QCompleter() completer.setModel(QtWidgets.QDirModel(completer)) self.teksti_uusipolku.setCompleter(completer) self.Aseta = QtWidgets.QPushButton(Puuttuvatsarjat) # self.Aseta.setGeometry(QtCore.QRect(230, 170, 50, 40)) self.Aseta.setGeometry(QtCore.QRect(230, 125, 600, 40)) self.Aseta.setObjectName("Aseta") self.Aseta.clicked.connect(self.aseta_uusikansio) self.Aseta.setStyleSheet("background-color: #4682B4; color: white") self.Aseta.setShortcut("Return") self.Poista = QtWidgets.QPushButton(Puuttuvatsarjat) self.Poista.setGeometry(QtCore.QRect(230, 170, 50, 40)) # self.Poista.setGeometry(QtCore.QRect(290, 170, 50, 40)) self.Poista.setObjectName("Poista") self.Poista.clicked.connect(self.poistasarja) self.Kansio = QtWidgets.QPushButton(Puuttuvatsarjat) # self.Kansio.setGeometry(QtCore.QRect(350, 170, 50, 40)) self.Kansio.setGeometry(QtCore.QRect(290, 170, 50, 40)) self.Kansio.setObjectName("Kansio") self.Kansio.clicked.connect(self.avaa_ehdotuskansio) self.buttonBox = QtWidgets.QDialogButtonBox(Puuttuvatsarjat) self.buttonBox.setGeometry( QtCore.QRect(370, 170, self.MITAT[0] - 370 - 20, 40)) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) # self.buttonBox.setLayoutDirection(1) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) # self.buttonBox.setCenterButtons(True) self.buttonBox.setObjectName("buttonBox") self.retranslateUi(Puuttuvatsarjat) self.buttonBox.accepted.connect(Puuttuvatsarjat.accept) self.buttonBox.rejected.connect(Puuttuvatsarjat.reject) QtCore.QMetaObject.connectSlotsByName(Puuttuvatsarjat)
import sys from PyQt5 import QtCore, QtGui, QtWidgets # 直接运行程序时的入口 if __name__ == "__main__": app = QtWidgets.QApplication(sys.argv) app.aboutToQuit.connect(app.deleteLater) # Window系统提供的模式 model = QtWidgets.QDirModel() tree = QtWidgets.QTreeView() # 为部件添加模式 tree.setColumnHidden(0, True) # tree.setHeaderHidden(True) tree.setModel(model) tree.setWindowTitle(tree.tr("Dir View")) tree.resize(640, 480) tree.show() sys.exit(app.exec_())