forked from dxghost/JMFileManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connection_win.py
141 lines (132 loc) · 6.95 KB
/
connection_win.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
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'connection.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# 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(527, 230)
MainWindow.setMinimumSize(QtCore.QSize(0, 0))
MainWindow.setMaximumSize(QtCore.QSize(527, 366))
MainWindow.setTabShape(QtWidgets.QTabWidget.Triangular)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
self.tabWidget.setGeometry(QtCore.QRect(14, 9, 501, 211))
self.tabWidget.setStyleSheet("")
self.tabWidget.setTabPosition(QtWidgets.QTabWidget.West)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
self.tabWidget.setElideMode(QtCore.Qt.ElideNone)
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.lineEdit = QtWidgets.QLineEdit(self.tab)
self.lineEdit.setGeometry(QtCore.QRect(90, 41, 281, 22))
self.lineEdit.setStyleSheet("")
self.lineEdit.setFrame(True)
self.lineEdit.setEchoMode(QtWidgets.QLineEdit.Normal)
self.lineEdit.setObjectName("lineEdit")
self.lineEdit_2 = QtWidgets.QLineEdit(self.tab)
self.lineEdit_2.setGeometry(QtCore.QRect(90, 80, 281, 22))
self.lineEdit_2.setObjectName("lineEdit_2")
self.label_2 = QtWidgets.QLabel(self.tab)
self.label_2.setGeometry(QtCore.QRect(40, 82, 32, 16))
self.label_2.setObjectName("label_2")
self.label = QtWidgets.QLabel(self.tab)
self.label.setGeometry(QtCore.QRect(40, 42, 38, 16))
self.label.setObjectName("label")
self.label_3 = QtWidgets.QLabel(self.tab)
self.label_3.setGeometry(QtCore.QRect(20, 10, 331, 16))
self.label_3.setTextFormat(QtCore.Qt.AutoText)
self.label_3.setScaledContents(False)
self.label_3.setWordWrap(True)
self.label_3.setObjectName("label_3")
self.pushButton = QtWidgets.QPushButton(self.tab)
self.pushButton.setGeometry(QtCore.QRect(352, 170, 111, 28))
self.pushButton.setObjectName("pushButton")
self.pushButton_2 = QtWidgets.QPushButton(self.tab)
self.pushButton_2.setGeometry(QtCore.QRect(230, 170, 111, 28))
self.pushButton_2.setObjectName("pushButton_2")
self.label_4 = QtWidgets.QLabel(self.tab)
self.label_4.setGeometry(QtCore.QRect(20, 120, 421, 31))
self.label_4.setTextFormat(QtCore.Qt.AutoText)
self.label_4.setScaledContents(False)
self.label_4.setWordWrap(True)
self.label_4.setObjectName("label_4")
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.label_5 = QtWidgets.QLabel(self.tab_2)
self.label_5.setGeometry(QtCore.QRect(20, 110, 421, 31))
self.label_5.setTextFormat(QtCore.Qt.AutoText)
self.label_5.setScaledContents(False)
self.label_5.setWordWrap(True)
self.label_5.setObjectName("label_5")
self.label_6 = QtWidgets.QLabel(self.tab_2)
self.label_6.setGeometry(QtCore.QRect(40, 82, 32, 16))
self.label_6.setObjectName("label_6")
self.label_7 = QtWidgets.QLabel(self.tab_2)
self.label_7.setGeometry(QtCore.QRect(40, 42, 38, 16))
self.label_7.setObjectName("label_7")
self.label_8 = QtWidgets.QLabel(self.tab_2)
self.label_8.setGeometry(QtCore.QRect(20, 10, 331, 16))
self.label_8.setTextFormat(QtCore.Qt.AutoText)
self.label_8.setScaledContents(False)
self.label_8.setWordWrap(True)
self.label_8.setObjectName("label_8")
self.lineEdit_3 = QtWidgets.QLineEdit(self.tab_2)
self.lineEdit_3.setGeometry(QtCore.QRect(90, 41, 281, 22))
self.lineEdit_3.setStyleSheet("")
self.lineEdit_3.setFrame(True)
self.lineEdit_3.setEchoMode(QtWidgets.QLineEdit.Normal)
self.lineEdit_3.setPlaceholderText("")
self.lineEdit_3.setObjectName("lineEdit_3")
self.lineEdit_4 = QtWidgets.QLineEdit(self.tab_2)
self.lineEdit_4.setGeometry(QtCore.QRect(90, 80, 281, 22))
self.lineEdit_4.setPlaceholderText("")
self.lineEdit_4.setObjectName("lineEdit_4")
self.pushButton_3 = QtWidgets.QPushButton(self.tab_2)
self.pushButton_3.setGeometry(QtCore.QRect(270, 170, 93, 28))
self.pushButton_3.setObjectName("pushButton_3")
self.pushButton_4 = QtWidgets.QPushButton(self.tab_2)
self.pushButton_4.setGeometry(QtCore.QRect(370, 170, 93, 28))
self.pushButton_4.setObjectName("pushButton_4")
self.tabWidget.addTab(self.tab_2, "")
self.tabWidget.raise_()
self.lineEdit.raise_()
self.lineEdit_2.raise_()
MainWindow.setCentralWidget(self.centralwidget)
self.retranslateUi(MainWindow)
self.tabWidget.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Connection configure"))
self.lineEdit.setPlaceholderText(_translate("MainWindow", "For example: localhost"))
self.lineEdit_2.setPlaceholderText(_translate("MainWindow", "For example: 8080"))
self.label_2.setText(_translate("MainWindow", "Port :"))
self.label.setText(_translate("MainWindow", "Host : "))
self.label_3.setText(_translate("MainWindow", "Setup the host and Port as a server:"))
self.pushButton.setText(_translate("MainWindow", "Run Server"))
self.pushButton_2.setText(_translate("MainWindow", "Discard"))
self.label_4.setText(_translate("MainWindow",
"These are the Specifications that the other devices will use that to connect to this server."))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("MainWindow", "Server"))
self.label_5.setText(_translate("MainWindow", "Host and port must be specified on a server"))
self.label_6.setText(_translate("MainWindow", "Port :"))
self.label_7.setText(_translate("MainWindow", "Host : "))
self.label_8.setText(_translate("MainWindow", "Enter the host and Port as a client:"))
self.pushButton_3.setText(_translate("MainWindow", "Discard"))
self.pushButton_4.setText(_translate("MainWindow", "Connect"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("MainWindow", "Client"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())