-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.py
266 lines (258 loc) · 14.8 KB
/
form.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'form.ui'
#
# Created: Fri Apr 18 01:36:28 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(689, 480)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.mode = QtGui.QComboBox(self.centralwidget)
self.mode.setGeometry(QtCore.QRect(50, 70, 231, 22))
self.mode.setObjectName(_fromUtf8("mode"))
self.mode.addItem(_fromUtf8(""))
self.mode.addItem(_fromUtf8(""))
self.mode.addItem(_fromUtf8(""))
self.frame_2 = QtGui.QFrame(self.centralwidget)
self.frame_2.setGeometry(QtCore.QRect(360, 10, 311, 421))
self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
self.frame_2.setObjectName(_fromUtf8("frame_2"))
self.frame_user = QtGui.QFrame(self.frame_2)
self.frame_user.setEnabled(False)
self.frame_user.setGeometry(QtCore.QRect(10, 230, 291, 181))
self.frame_user.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_user.setFrameShadow(QtGui.QFrame.Raised)
self.frame_user.setObjectName(_fromUtf8("frame_user"))
self.edit_name = QtGui.QLineEdit(self.frame_user)
self.edit_name.setGeometry(QtCore.QRect(60, 10, 191, 20))
self.edit_name.setObjectName(_fromUtf8("edit_name"))
self.label_5 = QtGui.QLabel(self.frame_user)
self.label_5.setGeometry(QtCore.QRect(10, 10, 46, 13))
self.label_5.setObjectName(_fromUtf8("label_5"))
self.tabWidget = QtGui.QTabWidget(self.frame_user)
self.tabWidget.setGeometry(QtCore.QRect(0, 40, 291, 141))
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.tab = QtGui.QWidget()
self.tab.setObjectName(_fromUtf8("tab"))
self.edit_ip = QtGui.QLineEdit(self.tab)
self.edit_ip.setGeometry(QtCore.QRect(50, 10, 211, 20))
self.edit_ip.setObjectName(_fromUtf8("edit_ip"))
self.label_6 = QtGui.QLabel(self.tab)
self.label_6.setGeometry(QtCore.QRect(10, 10, 46, 13))
self.label_6.setObjectName(_fromUtf8("label_6"))
self.save_person = QtGui.QPushButton(self.tab)
self.save_person.setGeometry(QtCore.QRect(190, 80, 75, 23))
self.save_person.setObjectName(_fromUtf8("save_person"))
self.tabWidget.addTab(self.tab, _fromUtf8(""))
self.tab_2 = QtGui.QWidget()
self.tab_2.setObjectName(_fromUtf8("tab_2"))
self.pc_period = QtGui.QDoubleSpinBox(self.tab_2)
self.pc_period.setGeometry(QtCore.QRect(131, 20, 121, 22))
self.pc_period.setMaximum(100.0)
self.pc_period.setSingleStep(0.5)
self.pc_period.setProperty("value", 5.0)
self.pc_period.setObjectName(_fromUtf8("pc_period"))
self.label_7 = QtGui.QLabel(self.tab_2)
self.label_7.setGeometry(QtCore.QRect(20, 20, 46, 13))
self.label_7.setObjectName(_fromUtf8("label_7"))
self.pc_command = QtGui.QComboBox(self.tab_2)
self.pc_command.setGeometry(QtCore.QRect(130, 60, 121, 22))
self.pc_command.setObjectName(_fromUtf8("pc_command"))
self.pc_command.addItem(_fromUtf8(""))
self.pc_command.addItem(_fromUtf8(""))
self.pc_command.addItem(_fromUtf8(""))
self.label_8 = QtGui.QLabel(self.tab_2)
self.label_8.setGeometry(QtCore.QRect(20, 60, 61, 16))
self.label_8.setObjectName(_fromUtf8("label_8"))
self.save_pc = QtGui.QPushButton(self.tab_2)
self.save_pc.setGeometry(QtCore.QRect(200, 90, 75, 23))
self.save_pc.setObjectName(_fromUtf8("save_pc"))
self.tabWidget.addTab(self.tab_2, _fromUtf8(""))
self.random_name = QtGui.QPushButton(self.frame_user)
self.random_name.setGeometry(QtCore.QRect(260, 10, 21, 23))
self.random_name.setObjectName(_fromUtf8("random_name"))
self.lst_del = QtGui.QPushButton(self.frame_2)
self.lst_del.setGeometry(QtCore.QRect(280, 90, 21, 23))
self.lst_del.setObjectName(_fromUtf8("lst_del"))
self.label_2 = QtGui.QLabel(self.frame_2)
self.label_2.setGeometry(QtCore.QRect(10, 10, 71, 16))
self.label_2.setObjectName(_fromUtf8("label_2"))
self.lst_add = QtGui.QPushButton(self.frame_2)
self.lst_add.setGeometry(QtCore.QRect(280, 30, 21, 23))
self.lst_add.setObjectName(_fromUtf8("lst_add"))
self.lst_edit = QtGui.QPushButton(self.frame_2)
self.lst_edit.setGeometry(QtCore.QRect(280, 60, 21, 23))
self.lst_edit.setObjectName(_fromUtf8("lst_edit"))
self.table_user = QtGui.QTreeWidget(self.frame_2)
self.table_user.setGeometry(QtCore.QRect(10, 30, 261, 191))
self.table_user.setObjectName(_fromUtf8("table_user"))
self.frame_3 = QtGui.QFrame(self.centralwidget)
self.frame_3.setGeometry(QtCore.QRect(40, 100, 261, 101))
self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_3.setFrameShadow(QtGui.QFrame.Raised)
self.frame_3.setObjectName(_fromUtf8("frame_3"))
self.label = QtGui.QLabel(self.frame_3)
self.label.setGeometry(QtCore.QRect(10, 10, 46, 13))
self.label.setObjectName(_fromUtf8("label"))
self.time_democracy = QtGui.QDoubleSpinBox(self.frame_3)
self.time_democracy.setGeometry(QtCore.QRect(120, 40, 121, 22))
self.time_democracy.setMaximum(100.0)
self.time_democracy.setSingleStep(0.5)
self.time_democracy.setProperty("value", 5.0)
self.time_democracy.setObjectName(_fromUtf8("time_democracy"))
self.label_3 = QtGui.QLabel(self.frame_3)
self.label_3.setGeometry(QtCore.QRect(10, 40, 91, 16))
self.label_3.setObjectName(_fromUtf8("label_3"))
self.time_delay = QtGui.QDoubleSpinBox(self.frame_3)
self.time_delay.setGeometry(QtCore.QRect(121, 10, 121, 22))
self.time_delay.setMaximum(100.0)
self.time_delay.setSingleStep(0.5)
self.time_delay.setObjectName(_fromUtf8("time_delay"))
self.label_4 = QtGui.QLabel(self.frame_3)
self.label_4.setGeometry(QtCore.QRect(10, 70, 91, 16))
self.label_4.setObjectName(_fromUtf8("label_4"))
self.time_raffle = QtGui.QDoubleSpinBox(self.frame_3)
self.time_raffle.setGeometry(QtCore.QRect(120, 70, 121, 22))
self.time_raffle.setMaximum(100.0)
self.time_raffle.setSingleStep(0.5)
self.time_raffle.setProperty("value", 1.0)
self.time_raffle.setObjectName(_fromUtf8("time_raffle"))
self.frame_4 = QtGui.QFrame(self.centralwidget)
self.frame_4.setGeometry(QtCore.QRect(40, 210, 261, 111))
self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_4.setFrameShadow(QtGui.QFrame.Raised)
self.frame_4.setObjectName(_fromUtf8("frame_4"))
self.checkBox = QtGui.QCheckBox(self.frame_4)
self.checkBox.setGeometry(QtCore.QRect(10, 10, 151, 17))
self.checkBox.setObjectName(_fromUtf8("checkBox"))
self.frame_5 = QtGui.QFrame(self.frame_4)
self.frame_5.setEnabled(False)
self.frame_5.setGeometry(QtCore.QRect(0, 30, 261, 81))
self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_5.setFrameShadow(QtGui.QFrame.Raised)
self.frame_5.setObjectName(_fromUtf8("frame_5"))
self.interval_democracy = QtGui.QDoubleSpinBox(self.frame_5)
self.interval_democracy.setGeometry(QtCore.QRect(120, 10, 121, 22))
self.interval_democracy.setMaximum(100.0)
self.interval_democracy.setSingleStep(0.5)
self.interval_democracy.setProperty("value", 20.0)
self.interval_democracy.setObjectName(_fromUtf8("interval_democracy"))
self.label_9 = QtGui.QLabel(self.frame_5)
self.label_9.setGeometry(QtCore.QRect(10, 10, 91, 16))
self.label_9.setObjectName(_fromUtf8("label_9"))
self.duration_democracy = QtGui.QDoubleSpinBox(self.frame_5)
self.duration_democracy.setGeometry(QtCore.QRect(120, 50, 121, 22))
self.duration_democracy.setMaximum(100.0)
self.duration_democracy.setSingleStep(0.5)
self.duration_democracy.setProperty("value", 5.0)
self.duration_democracy.setObjectName(_fromUtf8("duration_democracy"))
self.label_10 = QtGui.QLabel(self.frame_5)
self.label_10.setGeometry(QtCore.QRect(10, 50, 91, 16))
self.label_10.setObjectName(_fromUtf8("label_10"))
self.line = QtGui.QFrame(self.centralwidget)
self.line.setGeometry(QtCore.QRect(312, 10, 21, 421))
self.line.setFrameShape(QtGui.QFrame.VLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.frame_6 = QtGui.QFrame(self.centralwidget)
self.frame_6.setGeometry(QtCore.QRect(40, 340, 261, 71))
self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel)
self.frame_6.setFrameShadow(QtGui.QFrame.Raised)
self.frame_6.setObjectName(_fromUtf8("frame_6"))
self.box_hold_button = QtGui.QCheckBox(self.frame_6)
self.box_hold_button.setGeometry(QtCore.QRect(10, 10, 111, 17))
self.box_hold_button.setObjectName(_fromUtf8("box_hold_button"))
self.time_button_hold = QtGui.QDoubleSpinBox(self.frame_6)
self.time_button_hold.setGeometry(QtCore.QRect(120, 10, 121, 22))
self.time_button_hold.setMaximum(100.0)
self.time_button_hold.setSingleStep(0.01)
self.time_button_hold.setProperty("value", 0.05)
self.time_button_hold.setObjectName(_fromUtf8("time_button_hold"))
self.set_buttons = QtGui.QPushButton(self.frame_6)
self.set_buttons.setGeometry(QtCore.QRect(10, 40, 75, 23))
self.set_buttons.setObjectName(_fromUtf8("set_buttons"))
self.connection = QtGui.QLabel(self.centralwidget)
self.connection.setGeometry(QtCore.QRect(210, 20, 91, 16))
self.connection.setObjectName(_fromUtf8("connection"))
self.activate = QtGui.QCheckBox(self.centralwidget)
self.activate.setGeometry(QtCore.QRect(50, 20, 70, 17))
self.activate.setObjectName(_fromUtf8("activate"))
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 689, 21))
self.menubar.setObjectName(_fromUtf8("menubar"))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL(_fromUtf8("toggled(bool)")), self.frame_5.setEnabled)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
MainWindow.setTabOrder(self.lst_edit, self.lst_add)
MainWindow.setTabOrder(self.lst_add, self.time_democracy)
MainWindow.setTabOrder(self.time_democracy, self.mode)
MainWindow.setTabOrder(self.mode, self.time_delay)
MainWindow.setTabOrder(self.time_delay, self.lst_del)
MainWindow.setTabOrder(self.lst_del, self.time_raffle)
MainWindow.setTabOrder(self.time_raffle, self.tabWidget)
MainWindow.setTabOrder(self.tabWidget, self.edit_ip)
MainWindow.setTabOrder(self.edit_ip, self.pc_period)
MainWindow.setTabOrder(self.pc_period, self.pc_command)
MainWindow.setTabOrder(self.pc_command, self.save_pc)
MainWindow.setTabOrder(self.save_pc, self.save_person)
MainWindow.setTabOrder(self.save_person, self.checkBox)
MainWindow.setTabOrder(self.checkBox, self.interval_democracy)
MainWindow.setTabOrder(self.interval_democracy, self.duration_democracy)
MainWindow.setTabOrder(self.duration_democracy, self.edit_name)
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "Private Twitch Controller Server", None))
self.mode.setItemText(0, _translate("MainWindow", "Anarchy", None))
self.mode.setItemText(1, _translate("MainWindow", "Democracy", None))
self.mode.setItemText(2, _translate("MainWindow", "Raffle", None))
self.label_5.setText(_translate("MainWindow", "Name", None))
self.label_6.setText(_translate("MainWindow", "IP", None))
self.save_person.setText(_translate("MainWindow", "Save", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Person", None))
self.label_7.setText(_translate("MainWindow", "Period", None))
self.pc_command.setItemText(0, _translate("MainWindow", "Random", None))
self.pc_command.setItemText(1, _translate("MainWindow", "Positive", None))
self.pc_command.setItemText(2, _translate("MainWindow", "Negative", None))
self.label_8.setText(_translate("MainWindow", "Commands", None))
self.save_pc.setText(_translate("MainWindow", "Save", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "PC", None))
self.random_name.setText(_translate("MainWindow", "R", None))
self.lst_del.setText(_translate("MainWindow", "-", None))
self.label_2.setText(_translate("MainWindow", "Players", None))
self.lst_add.setText(_translate("MainWindow", "+", None))
self.lst_edit.setText(_translate("MainWindow", "E", None))
self.table_user.headerItem().setText(0, _translate("MainWindow", "Name", None))
self.table_user.headerItem().setText(1, _translate("MainWindow", "CMD", None))
self.label.setText(_translate("MainWindow", "Delay", None))
self.label_3.setText(_translate("MainWindow", "Democracy Time", None))
self.label_4.setText(_translate("MainWindow", "Raffle Time", None))
self.checkBox.setText(_translate("MainWindow", "Automatic Democracy", None))
self.label_9.setText(_translate("MainWindow", "Interval (min)", None))
self.label_10.setText(_translate("MainWindow", "Duration (min)", None))
self.box_hold_button.setText(_translate("MainWindow", "Click Buttons", None))
self.set_buttons.setText(_translate("MainWindow", "Set Buttons", None))
self.connection.setText(_translate("MainWindow", "Not Connected...", None))
self.activate.setText(_translate("MainWindow", "Enable", None))