-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathspawn_ui.py
executable file
·71 lines (62 loc) · 3.4 KB
/
spawn_ui.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
# Form implementation generated from reading ui file 'spawn.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt6 import QtGui, QtCore, QtWidgets
from PyQt6.QtWidgets import QTextBrowser
class AppListBrowserClass(QTextBrowser):
target_id_clicked_signal = QtCore.pyqtSignal(str)
def __init__(self, args):
super(AppListBrowserClass, self).__init__(args)
def mousePressEvent(self, e: QtGui.QMouseEvent) -> None:
super(AppListBrowserClass, self).mousePressEvent(e)
pos = e.pos()
tc = self.cursorForPosition(pos)
self.target_id_clicked_signal.emit(tc.block().text())
class Ui_SpawnDialogUi(object):
def setupUi(self, SpawnDialogUi):
SpawnDialogUi.setObjectName("SpawnDialogUi")
SpawnDialogUi.resize(317, 435)
font = QtGui.QFont()
font.setFamily("Courier New")
SpawnDialogUi.setFont(font)
self.gridLayout = QtWidgets.QGridLayout(SpawnDialogUi)
self.gridLayout.setObjectName("gridLayout")
# self.appListBrowser = QtWidgets.QTextBrowser(SpawnDialogUi)
self.appListBrowser = AppListBrowserClass(SpawnDialogUi)
self.appListBrowser.setObjectName("appListBrowser")
self.gridLayout.addWidget(self.appListBrowser, 1, 0, 1, 2)
self.spawnBtn = QtWidgets.QPushButton(SpawnDialogUi)
self.spawnBtn.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.spawnBtn.setObjectName("spawnBtn")
self.gridLayout.addWidget(self.spawnBtn, 3, 1, 1, 1)
self.spawnTargetIdInput = QtWidgets.QLineEdit(SpawnDialogUi)
self.spawnTargetIdInput.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
self.spawnTargetIdInput.setObjectName("spawnTargetIdInput")
self.gridLayout.addWidget(self.spawnTargetIdInput, 3, 0, 1, 1)
self.appListLabel = QtWidgets.QLabel(SpawnDialogUi)
self.appListLabel.setObjectName("appListLabel")
self.appListLabel.setIndent(2)
self.gridLayout.addWidget(self.appListLabel, 0, 0, 1, 2)
self.remoteAddrInput = QtWidgets.QLineEdit(SpawnDialogUi)
self.remoteAddrInput.setEnabled(True)
self.remoteAddrInput.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
self.remoteAddrInput.setFrame(True)
self.remoteAddrInput.setObjectName("remoteAddrInput")
self.gridLayout.addWidget(self.remoteAddrInput, 2, 0, 1, 1)
self.appListBtn = QtWidgets.QPushButton(SpawnDialogUi)
self.appListBtn.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
self.appListBtn.setObjectName("appListBtn")
self.gridLayout.addWidget(self.appListBtn, 2, 1, 1, 1)
self.retranslateUi(SpawnDialogUi)
QtCore.QMetaObject.connectSlotsByName(SpawnDialogUi)
def retranslateUi(self, SpawnDialogUi):
_translate = QtCore.QCoreApplication.translate
SpawnDialogUi.setWindowTitle(_translate("SpawnDialogUi", "App List"))
self.spawnBtn.setText(_translate("SpawnDialogUi", "Spawn"))
self.spawnTargetIdInput.setPlaceholderText(_translate("SpawnDialogUi", "com.example.test"))
self.appListLabel.setText(_translate("SpawnDialogUi", "Identifier Name"))
self.remoteAddrInput.setPlaceholderText(_translate("SpawnDialogUi", "IP:PORT"))
self.appListBtn.setText(_translate("SpawnDialogUi", "List"))