-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui_main.py
144 lines (137 loc) · 7.72 KB
/
ui_main.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_main.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# 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 PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint,
QRect, QSize, QUrl, Qt)
from PySide2.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont,
QFontDatabase, QIcon, QLinearGradient, QPalette, QPainter, QPixmap,
QRadialGradient)
from PySide2.QtWidgets import *
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(250, 150)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.drop_shadow_layout = QVBoxLayout(self.centralwidget)
self.drop_shadow_layout.setContentsMargins(10, 10, 10, 10)
self.drop_shadow_layout.setSpacing(0)
self.drop_shadow_layout.setObjectName("drop_shadow_layout")
self.drop_shadow_frame = QFrame(self.centralwidget)
self.drop_shadow_frame.setStyleSheet(
"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(42, 44, 111, 255), stop:0.479212 rgba(28, 29, 73, 255));\n"
"border-radius: 10px;")
self.drop_shadow_frame.setFrameShape(QFrame.NoFrame)
self.drop_shadow_frame.setFrameShadow(QFrame.Raised)
self.drop_shadow_frame.setObjectName("drop_shadow_frame")
self.verticalLayout = QVBoxLayout(self.drop_shadow_frame)
self.verticalLayout.setObjectName("verticalLayout")
self.title_bar = QFrame(self.drop_shadow_frame)
self.title_bar.setFrameShape(QFrame.StyledPanel)
self.title_bar.setFrameShadow(QFrame.Raised)
self.title_bar.setObjectName("title_bar")
self.horizontalLayout = QHBoxLayout(self.title_bar)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setObjectName("horizontalLayout")
self.frame_title = QFrame(self.title_bar)
self.frame_title.setStyleSheet("background: none;")
self.frame_title.setFrameShape(QFrame.StyledPanel)
self.frame_title.setFrameShadow(QFrame.Raised)
self.frame_title.setObjectName("frame_title")
self.label = QLabel(self.frame_title)
self.label.setGeometry(QRect(0, 0, 111, 21))
font = QFont()
font.setFamily("Roboto")
font.setPointSize(13)
self.label.setFont(font)
self.label.setStyleSheet("color: rgb(60, 231, 195);")
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.frame_title)
self.frame_buttons = QFrame(self.title_bar)
self.frame_buttons.setStyleSheet("background: none;")
self.frame_buttons.setFrameShape(QFrame.StyledPanel)
self.frame_buttons.setFrameShadow(QFrame.Raised)
self.frame_buttons.setObjectName("frame_buttons")
self.button_minimize = QPushButton(self.frame_buttons)
self.button_minimize.setGeometry(QRect(60, 0, 16, 16))
self.button_minimize.setMinimumSize(QSize(16, 16))
self.button_minimize.setMaximumSize(QSize(16, 16))
self.button_minimize.setStyleSheet("QPushButton {\n"
" border: none;\n"
" border-radius: 8px;\n"
" background-color: rgb(255, 170, 0);\n"
"}\n"
"QPushButton:hover {\n"
" \n"
" background-color: rgba(255, 170, 0, 150);\n"
"}")
self.button_minimize.setText("")
self.button_minimize.setObjectName("button_minimize")
self.button_close = QPushButton(self.frame_buttons)
self.button_close.setGeometry(QRect(90, 0, 16, 16))
self.button_close.setMinimumSize(QSize(16, 16))
self.button_close.setMaximumSize(QSize(16, 16))
self.button_close.setStyleSheet("QPushButton {\n"
" border: none;\n"
" border-radius: 8px;\n"
" \n"
" background-color: rgb(255, 0, 0);\n"
"}\n"
"QPushButton:hover {\n"
" \n"
" background-color: rgba(255, 0, 0, 150);\n"
"}")
self.button_close.setText("")
self.button_close.setObjectName("button_close")
self.horizontalLayout.addWidget(self.frame_buttons)
self.verticalLayout.addWidget(self.title_bar)
self.content_bar = QFrame(self.drop_shadow_frame)
self.content_bar.setFrameShape(QFrame.StyledPanel)
self.content_bar.setFrameShadow(QFrame.Raised)
self.content_bar.setObjectName("content_bar")
self.horizontalLayout_3 = QHBoxLayout(self.content_bar)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.openfile_button = QPushButton(self.content_bar)
self.openfile_button.setMinimumSize(QSize(115, 25))
self.openfile_button.setMaximumSize(QSize(115, 25))
self.openfile_button.setStyleSheet("QPushButton {\n"
" border: none;\n"
" border-radius: 8px;\n"
" \n"
" \n"
" background-color: rgb(255, 170, 0);\n"
"}\n"
"QPushButton:hover {\n"
" \n"
" background-color: rgb(255, 170, 0, 150);\n"
"}")
self.openfile_button.setObjectName("openfile_button")
self.horizontalLayout_3.addWidget(self.openfile_button)
self.verticalLayout.addWidget(self.content_bar)
self.credits_bar = QFrame(self.drop_shadow_frame)
self.credits_bar.setMaximumSize(QSize(16777215, 30))
self.credits_bar.setFrameShape(QFrame.StyledPanel)
self.credits_bar.setFrameShadow(QFrame.Raised)
self.credits_bar.setObjectName("credits_bar")
self.horizontalLayout_2 = QHBoxLayout(self.credits_bar)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.label_credits = QLabel(self.credits_bar)
self.label_credits.setStyleSheet("color: rgb(105, 76, 106)")
self.label_credits.setObjectName("label_credits")
self.horizontalLayout_2.addWidget(self.label_credits)
self.verticalLayout.addWidget(self.credits_bar)
self.drop_shadow_layout.addWidget(self.drop_shadow_frame)
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
self.label.setText(_translate("MainWindow", "DocScanner"))
self.openfile_button.setText(_translate("MainWindow", "Open File to Scan"))
self.label_credits.setText(_translate("MainWindow", "By: Hector Moya"))