-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnewConfigWindow.py
44 lines (37 loc) · 1.6 KB
/
newConfigWindow.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
from PyQt5.QtWidgets import QWidget, QLabel, QLineEdit, QPushButton, QStyleFactory, QCheckBox
from PyQt5.QtGui import QFont, QIcon
from PyQt5.QtCore import Qt
class newConf(QWidget):
def __init__(self, dM):
super().__init__()
self.setFixedSize(400, 130)
self.arial12 = QFont('Arial', 12)
icon = QIcon('Settings/icon.png')
self.setWindowIcon(icon)
self.setWindowTitle('New config')
'''if dM:
self.setStyleSheet(open('Settings/darkModeSS').read())
self.setStyle(QStyleFactory.create('Fusion'))
else:
self.setStyle(QStyleFactory().create('Fusion'))
self.setStyleSheet('{background-color: #f0f0ed;} QAbstractItemView {border: 2px solid darkgray;selection-background-color: lightgray;}')'''
self.show()
self.initUI()
def initUI(self):
self.nameLabel = QLabel('Config name', self)
self.nameLabel.move(10, 10)
self.nameLabel.resize(380, 20)
self.nameLabel.setAlignment(Qt.AlignCenter)
self.nameLabel.setFont(self.arial12)
self.nameLabel.show()
self.nameTB = QLineEdit(self)
self.nameTB.move(10, 40)
self.nameTB.resize(380, 20)
self.nameTB.show()
self.oldConfigCB = QCheckBox('Quest Config Format', self)
self.oldConfigCB.setGeometry(10, 70, 380, 23)
self.oldConfigCB.show()
self.confirmButton = QPushButton('Confirm', self)
self.confirmButton.move(10, 100)
self.confirmButton.resize(380, 20)
self.confirmButton.show()