-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathalarm_dialog.py
102 lines (93 loc) · 3.99 KB
/
alarm_dialog.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'alarm_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# 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_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(390, 301)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("icon/clock.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Dialog.setWindowIcon(icon)
Dialog.setStyleSheet("border:none;\n"
"outline:none;\n"
"background: #F0F0F0;\n"
"border-radius:10px")
self.label_3 = QtWidgets.QLabel(Dialog)
self.label_3.setGeometry(QtCore.QRect(20, 130, 47, 13))
font = QtGui.QFont()
font.setFamily("Roboto")
self.label_3.setFont(font)
self.label_3.setObjectName("label_3")
self.label_2 = QtWidgets.QLabel(Dialog)
self.label_2.setGeometry(QtCore.QRect(20, 70, 47, 13))
font = QtGui.QFont()
font.setFamily("Roboto")
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.alarm_message = QtWidgets.QPlainTextEdit(Dialog)
self.alarm_message.setGeometry(QtCore.QRect(20, 150, 351, 61))
font = QtGui.QFont()
font.setFamily("Roboto")
self.alarm_message.setFont(font)
self.alarm_message.setStyleSheet("background: rgb(255, 255, 255)")
self.alarm_message.setObjectName("alarm_message")
self.label = QtWidgets.QLabel(Dialog)
self.label.setGeometry(QtCore.QRect(160, 20, 81, 21))
font = QtGui.QFont()
font.setFamily("Roboto")
font.setPointSize(12)
self.label.setFont(font)
self.label.setStyleSheet("size: 16px;")
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.btn_cancel_set_alarm = QtWidgets.QPushButton(Dialog)
self.btn_cancel_set_alarm.setGeometry(QtCore.QRect(220, 240, 75, 23))
font = QtGui.QFont()
font.setFamily("Roboto")
self.btn_cancel_set_alarm.setFont(font)
self.btn_cancel_set_alarm.setStyleSheet("background: white;\n"
"border: none;\n"
"border-radius: 10px")
self.btn_cancel_set_alarm.setObjectName("btn_cancel_set_alarm")
self.btn_set_alarm = QtWidgets.QPushButton(Dialog)
self.btn_set_alarm.setGeometry(QtCore.QRect(100, 240, 75, 23))
font = QtGui.QFont()
font.setFamily("Roboto")
self.btn_set_alarm.setFont(font)
self.btn_set_alarm.setStyleSheet("background: #000;\n"
"color: #fff;\n"
"border: none;\n"
"border-radius: 10px")
self.btn_set_alarm.setObjectName("btn_set_alarm")
self.alarm_time = QtWidgets.QTimeEdit(Dialog)
self.alarm_time.setGeometry(QtCore.QRect(20, 90, 118, 22))
self.alarm_time.setStyleSheet("background:white;\n"
"border-radius:10px;")
self.alarm_time.setObjectName("alarm_time")
self.isOnce = QtWidgets.QCheckBox(Dialog)
self.isOnce.setGeometry(QtCore.QRect(180, 91, 70, 17))
self.isOnce.setObjectName("isOnce")
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Alarm"))
self.label_3.setText(_translate("Dialog", "Message"))
self.label_2.setText(_translate("Dialog", "Time"))
self.label.setText(_translate("Dialog", "New Alarm"))
self.btn_cancel_set_alarm.setText(_translate("Dialog", "Cancel"))
self.btn_set_alarm.setText(_translate("Dialog", "OK"))
self.isOnce.setText(_translate("Dialog", "Once"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())