-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_backup_restore.py
106 lines (97 loc) · 5.71 KB
/
ui_backup_restore.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Stockage\GIT\GitHub\smartest2\ui\ui_backup_restore.ui'
#
# Created by: PyQt5 UI code generator 5.15.10
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_BackupRestore(object):
def setupUi(self, BackupRestore):
BackupRestore.setObjectName("BackupRestore")
BackupRestore.setWindowModality(QtCore.Qt.ApplicationModal)
BackupRestore.resize(500, 500)
BackupRestore.setMinimumSize(QtCore.QSize(500, 500))
BackupRestore.setMaximumSize(QtCore.QSize(500, 500))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Images/asc.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
BackupRestore.setWindowIcon(icon)
BackupRestore.setStyleSheet("QWidget#BackupRestore {background-color: #FFFFFF}")
self.gridLayout = QtWidgets.QGridLayout(BackupRestore)
self.gridLayout.setContentsMargins(0, 9, 0, 0)
self.gridLayout.setVerticalSpacing(15)
self.gridLayout.setObjectName("gridLayout")
self.fond = QtWidgets.QWidget(BackupRestore)
self.fond.setMinimumSize(QtCore.QSize(0, 38))
self.fond.setMaximumSize(QtCore.QSize(16777215, 38))
self.fond.setStyleSheet("QWidget#fond{background-color: #DBE4EE}")
self.fond.setObjectName("fond")
self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.fond)
self.horizontalLayout_4.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
spacerItem = QtWidgets.QSpacerItem(157, 50, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem)
self.ok = QtWidgets.QPushButton(self.fond)
self.ok.setMinimumSize(QtCore.QSize(120, 24))
self.ok.setMaximumSize(QtCore.QSize(16777215, 24))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.ok.setFont(font)
self.ok.setStyleSheet("QPushButton{border: 1px solid #8f8f91; border-radius: 5px ; padding-right: 10px; padding-left: 10px; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFFF, stop:1 #BAD0E7); }\n"
"QPushButton:hover{background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #F8F8F8, stop:1 #8FADCC); }\n"
"QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8FADCC, stop:1 #F8F8F8); }")
self.ok.setShortcut("Ctrl+S")
self.ok.setObjectName("ok")
self.horizontalLayout_4.addWidget(self.ok)
self.quit = QtWidgets.QPushButton(self.fond)
self.quit.setMinimumSize(QtCore.QSize(120, 24))
self.quit.setMaximumSize(QtCore.QSize(16777215, 24))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(9)
self.quit.setFont(font)
self.quit.setStyleSheet("QPushButton{border: 1px solid #8f8f91; border-radius: 5px ; padding-right: 10px; padding-left: 10px; background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFFF, stop:1 #BAD0E7); }\n"
"QPushButton:hover{background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #F8F8F8, stop:1 #8FADCC); }\n"
"QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #8FADCC, stop:1 #F8F8F8); }")
self.quit.setShortcut("Esc")
self.quit.setObjectName("quit")
self.horizontalLayout_4.addWidget(self.quit)
spacerItem1 = QtWidgets.QSpacerItem(15, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem1)
self.gridLayout.addWidget(self.fond, 1, 0, 1, 3)
spacerItem2 = QtWidgets.QSpacerItem(9, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem2, 0, 2, 1, 1)
self.table = QtWidgets.QTableView(BackupRestore)
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(10)
self.table.setFont(font)
self.table.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.table.setAlternatingRowColors(True)
self.table.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
self.table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.table.setIconSize(QtCore.QSize(20, 20))
self.table.setObjectName("table")
self.table.horizontalHeader().setStretchLastSection(True)
self.table.verticalHeader().setVisible(False)
self.gridLayout.addWidget(self.table, 0, 1, 1, 1)
spacerItem3 = QtWidgets.QSpacerItem(9, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem3, 0, 0, 1, 1)
self.retranslateUi(BackupRestore)
QtCore.QMetaObject.connectSlotsByName(BackupRestore)
def retranslateUi(self, BackupRestore):
_translate = QtCore.QCoreApplication.translate
BackupRestore.setWindowTitle(_translate("BackupRestore", "Restaurer une sauvegarde"))
self.ok.setText(_translate("BackupRestore", "Restaurer"))
self.quit.setText(_translate("BackupRestore", "Quitter"))
import icons_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
BackupRestore = QtWidgets.QWidget()
ui = Ui_BackupRestore()
ui.setupUi(BackupRestore)
BackupRestore.show()
sys.exit(app.exec_())