-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMyPing.py
More file actions
81 lines (73 loc) · 3.33 KB
/
Copy pathMyPing.py
File metadata and controls
81 lines (73 loc) · 3.33 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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MyPing.ui'
#
# Created by: PyQt5 UI code generator 5.8.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtWidgets, QtGui
class Ui_MyPing(object):
def setupUi(self, MyPing):
MyPing.setObjectName("MyPing")
MyPing.setWindowIcon(QtGui.QIcon("ping.ico"))
# MyPing.resize(660, 385)
MyPing.setMaximumSize(QtCore.QSize(660, 425))
MyPing.setMinimumSize(QtCore.QSize(660, 425))
self.groupBox = QtWidgets.QGroupBox(MyPing)
self.groupBox.setGeometry(QtCore.QRect(10, 10, 470, 50))
self.groupBox.setObjectName("groupBox")
self.widget = QtWidgets.QWidget(self.groupBox)
self.widget.setGeometry(QtCore.QRect(10, 20, 441, 25))
self.widget.setObjectName("widget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.widget)
self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.horizontalLayout.setSpacing(30)
self.horizontalLayout.setObjectName("horizontalLayout")
self.startIP = QtWidgets.QLineEdit(self.widget)
self.startIP.setText("192.168.0.0")
self.startIP.selectAll()
self.startIP.setObjectName("startIP")
self.horizontalLayout.addWidget(self.startIP)
self.label_2 = QtWidgets.QLabel(self.widget)
self.label_2.setObjectName("label_2")
self.horizontalLayout.addWidget(self.label_2)
self.endIP = QtWidgets.QLineEdit(self.widget)
self.endIP.setObjectName("endIP")
self.horizontalLayout.addWidget(self.endIP)
self.pingButton = QtWidgets.QPushButton(self.widget)
self.pingButton.setObjectName("pingButton")
self.horizontalLayout.addWidget(self.pingButton)
self.widget1 = QtWidgets.QWidget(MyPing)
self.widget1.setGeometry(QtCore.QRect(10, 70, 630, 345))
self.widget1.setObjectName("widget1")
self.gridlayout = QtWidgets.QGridLayout(self.widget1)
self.gridlayout.setContentsMargins(0, 0, 0, 0)
self.gridlayout.setObjectName("gridlayout")
self.gridlayout.setSpacing(7)
self.label_list = []
list_index = 0
for i in range(1, 17):
for j in range(1, 17):
label = QtWidgets.QLabel(self.widget1)
label.setMinimumSize(QtCore.QSize(32, 15))
label.setStyleSheet("background-color: rgb(203, 203, 203);")
label.setAlignment(QtCore.Qt.AlignCenter)
label.setText(QtCore.QCoreApplication.translate("MyPing", str(list_index)))
self.label_list.append(label)
self.gridlayout.addWidget(label, i-1, j-1, 1, 1)
list_index += 1
self.retranslateUi(MyPing)
QtCore.QMetaObject.connectSlotsByName(MyPing)
def retranslateUi(self, MyPing):
_translate = QtCore.QCoreApplication.translate
MyPing.setWindowTitle(_translate("MyPing", "MyPing"))
self.groupBox.setTitle(_translate("MyPing", "Set IP Range"))
self.label_2.setText(_translate("MyPing", "——"))
self.pingButton.setText(_translate("MyPing", "Ping"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MyPing = QtWidgets.QWidget()
ui = Ui_MyPing()
ui.setupUi(MyPing)
MyPing.show()
sys.exit(app.exec_())