-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_link_add.py
129 lines (120 loc) · 7.46 KB
/
ui_link_add.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Stockage\GIT\GitHub\smartest2\ui\ui_link_add.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_LinkAdd(object):
def setupUi(self, LinkAdd):
LinkAdd.setObjectName("LinkAdd")
LinkAdd.setWindowModality(QtCore.Qt.ApplicationModal)
LinkAdd.resize(400, 400)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/Images/asc.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
LinkAdd.setWindowIcon(icon)
LinkAdd.setStyleSheet("QWidget#LinkAdd {background:rgb(248, 248, 248)}")
self.gridLayout = QtWidgets.QGridLayout(LinkAdd)
self.gridLayout.setContentsMargins(0, -1, 0, 0)
self.gridLayout.setHorizontalSpacing(6)
self.gridLayout.setVerticalSpacing(15)
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(9, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
self.links_list = QtWidgets.QListView(LinkAdd)
self.links_list.setMinimumSize(QtCore.QSize(0, 0))
self.links_list.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.links_list.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.links_list.setAlternatingRowColors(True)
self.links_list.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.links_list.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.links_list.setObjectName("links_list")
self.gridLayout.addWidget(self.links_list, 1, 1, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.search_bar = QtWidgets.QLineEdit(LinkAdd)
self.search_bar.setMinimumSize(QtCore.QSize(0, 30))
self.search_bar.setMaximumSize(QtCore.QSize(16777215, 30))
font = QtGui.QFont()
font.setFamily("Segoe UI")
font.setPointSize(10)
self.search_bar.setFont(font)
self.search_bar.setStyleSheet("QLineEdit{border: 1px solid #8f8f91; border-right-width: 0px; border-top-left-radius: 5px; border-bottom-left-radius: 5px; padding-left: 5px; }")
self.search_bar.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.search_bar.setObjectName("search_bar")
self.horizontalLayout.addWidget(self.search_bar)
self.search_clear = QtWidgets.QPushButton(LinkAdd)
self.search_clear.setMinimumSize(QtCore.QSize(40, 30))
self.search_clear.setMaximumSize(QtCore.QSize(40, 30))
self.search_clear.setStyleSheet("QPushButton{border: 1px solid #8f8f91; border-top-right-radius: 5px ; border-bottom-right-radius: 5px; 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.search_clear.setText("")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/Images/search_clear.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.search_clear.setIcon(icon1)
self.search_clear.setIconSize(QtCore.QSize(20, 20))
self.search_clear.setObjectName("search_clear")
self.horizontalLayout.addWidget(self.search_clear)
self.gridLayout.addLayout(self.horizontalLayout, 0, 1, 1, 1)
spacerItem1 = QtWidgets.QSpacerItem(9, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.gridLayout.addItem(spacerItem1, 1, 2, 1, 1)
self.fond = QtWidgets.QWidget(LinkAdd)
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")
spacerItem2 = QtWidgets.QSpacerItem(157, 50, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem2)
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)
spacerItem3 = QtWidgets.QSpacerItem(15, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_4.addItem(spacerItem3)
self.gridLayout.addWidget(self.fond, 2, 0, 1, 3)
self.retranslateUi(LinkAdd)
QtCore.QMetaObject.connectSlotsByName(LinkAdd)
def retranslateUi(self, LinkAdd):
_translate = QtCore.QCoreApplication.translate
LinkAdd.setWindowTitle(_translate("LinkAdd", "Ajouter un nouveau lien"))
self.search_bar.setPlaceholderText(_translate("LinkAdd", "Rechercher"))
self.search_clear.setToolTip(_translate("LinkAdd", "Supprimer la recherche"))
self.ok.setText(_translate("LinkAdd", "Ajouter"))
self.quit.setText(_translate("LinkAdd", "Quitter"))
import icons_rc
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
LinkAdd = QtWidgets.QWidget()
ui = Ui_LinkAdd()
ui.setupUi(LinkAdd)
LinkAdd.show()
sys.exit(app.exec_())