-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesign.py
More file actions
126 lines (119 loc) · 6.75 KB
/
design.py
File metadata and controls
126 lines (119 loc) · 6.75 KB
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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(530, 427)
MainWindow.setStyleSheet("QWidget#centralwidget{background-color:#FFF;}")
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setStyleSheet("#centralwidget{margin:0;padding:0;}")
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setContentsMargins(5, 5, 5, 5)
self.gridLayout.setSpacing(0)
self.gridLayout.setObjectName("gridLayout")
self.label = QtWidgets.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setPointSize(11)
self.label.setFont(font)
self.label.setStyleSheet("color:#999;")
self.label.setText("")
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.label_2 = QtWidgets.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily("Verdana")
font.setPointSize(11)
self.label_2.setFont(font)
self.label_2.setStyleSheet("color:#999;")
self.label_2.setText("")
self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 1, 1, 1, 1)
self.textBrowser = QtWidgets.QTextBrowser(self.centralwidget)
self.textBrowser.setStyleSheet("")
self.textBrowser.setReadOnly(False)
self.textBrowser.setObjectName("textBrowser")
self.gridLayout.addWidget(self.textBrowser, 0, 0, 1, 2)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 530, 22))
self.menubar.setObjectName("menubar")
self.menuFile = QtWidgets.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
self.menuFont = QtWidgets.QMenu(self.menubar)
self.menuFont.setObjectName("menuFont")
MainWindow.setMenuBar(self.menubar)
self.actionOpen = QtWidgets.QAction(MainWindow)
self.actionOpen.setObjectName("actionOpen")
self.actionNew = QtWidgets.QAction(MainWindow)
self.actionNew.setObjectName("actionNew")
self.actionSave = QtWidgets.QAction(MainWindow)
self.actionSave.setObjectName("actionSave")
self.actionSave_as = QtWidgets.QAction(MainWindow)
self.actionSave_as.setObjectName("actionSave_as")
self.actionexit = QtWidgets.QAction(MainWindow)
self.actionexit.setObjectName("actionexit")
self.actionChange_font_family = QtWidgets.QAction(MainWindow)
self.actionChange_font_family.setObjectName("actionChange_font_family")
self.actionSize = QtWidgets.QAction(MainWindow)
self.actionSize.setObjectName("actionSize")
self.actionColor = QtWidgets.QAction(MainWindow)
self.actionColor.setObjectName("actionColor")
self.actionBackground_color = QtWidgets.QAction(MainWindow)
self.actionBackground_color.setObjectName("actionBackground_color")
self.actionBack_Color = QtWidgets.QAction(MainWindow)
self.actionBack_Color.setObjectName("actionBack_Color")
self.menuFile.addAction(self.actionOpen)
self.menuFile.addAction(self.actionNew)
self.menuFile.addAction(self.actionSave)
self.menuFile.addAction(self.actionSave_as)
self.menuFile.addAction(self.actionexit)
self.menuFont.addAction(self.actionChange_font_family)
self.menuFont.addAction(self.actionSize)
self.menuFont.addAction(self.actionColor)
self.menuFont.addAction(self.actionBackground_color)
self.menuFont.addAction(self.actionBack_Color)
self.menubar.addAction(self.menuFile.menuAction())
self.menubar.addAction(self.menuFont.menuAction())
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
self.font_size = 13
self.font_family = ".SF NS Text"
self.font_color = "#000"
self.html = """<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n
<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n
p, li { white-space: pre-wrap; }\n
</style></head><body style=\"font-weight:400; %s font-style:normal;\">\n
<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"""
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Untitled"))
self.textBrowser.setHtml(_translate("MainWindow", """<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n
<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n
p, li { white-space: pre-wrap; }\n
</style></head><body style=\"font-weight:400; font-style:normal;\">\n
<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"""))
self.menuFile.setTitle(_translate("MainWindow", "File"))
self.menuFont.setTitle(_translate("MainWindow", "Font"))
self.actionOpen.setText(_translate("MainWindow", "Open"))
self.actionOpen.setShortcut(_translate("MainWindow", "Ctrl+O"))
self.actionNew.setText(_translate("MainWindow", "New"))
self.actionNew.setShortcut(_translate("MainWindow", "Ctrl+N"))
self.actionSave.setText(_translate("MainWindow", "Save"))
self.actionSave.setShortcut(_translate("MainWindow", "Ctrl+S"))
self.actionSave_as.setText(_translate("MainWindow", "Save as"))
self.actionSave_as.setShortcut(_translate("MainWindow", "Ctrl+Shift+S"))
self.actionexit.setText(_translate("MainWindow", "Exit"))
self.actionexit.setShortcut(_translate("MainWindow", "Ctrl+W"))
self.actionChange_font_family.setText(_translate("MainWindow", "Family"))
self.actionSize.setText(_translate("MainWindow", "Size"))
self.actionColor.setText(_translate("MainWindow", "Color"))
self.actionBackground_color.setText(_translate("MainWindow", "Background Color"))
self.actionBack_Color.setText(_translate("MainWindow", "All Text Background Color"))
self.mainwindow = MainWindow