feat: 对 Tcp 的 Server/Client的 UI进行设计
且添加了对于MacOS和Win10的应用程序图标;使用QMake设置(.pro文件书写)
@ -34,7 +34,25 @@ HEADERS += \
|
||||
FORMS += \
|
||||
ExTcpClient.ui
|
||||
|
||||
macx {
|
||||
ICON = images/icon.icns
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
# linux only
|
||||
}
|
||||
|
||||
win32 {
|
||||
RC_ICONS = images/icon.ico
|
||||
}
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
DISTFILES += \
|
||||
images/Image2.jpg \
|
||||
images/Image1.png \
|
||||
images/Image4.png \
|
||||
images/Image5.png
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ExTcpClient</class>
|
||||
<widget class="QMainWindow" name="ExTcpClient">
|
||||
@ -12,13 +13,104 @@
|
||||
<property name="windowTitle">
|
||||
<string>ExTcpClient</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labIP">
|
||||
<property name="text">
|
||||
<string>服务器地址:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labPort">
|
||||
<property name="text">
|
||||
<string>端口:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="maximum">
|
||||
<number>65000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSenf">
|
||||
<property name="text">
|
||||
<string>发送</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
BIN
QtTcpEx/ExTcpClient/images/Image1.png
Normal file
After Width: | Height: | Size: 603 B |
BIN
QtTcpEx/ExTcpClient/images/Image2.jpg
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
QtTcpEx/ExTcpClient/images/Image3.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
QtTcpEx/ExTcpClient/images/Image4.png
Normal file
After Width: | Height: | Size: 803 B |
BIN
QtTcpEx/ExTcpClient/images/Image5.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
QtTcpEx/ExTcpClient/images/Image6.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
QtTcpEx/ExTcpClient/images/icon.icns
Executable file
BIN
QtTcpEx/ExTcpClient/images/icon.ico
Executable file
After Width: | Height: | Size: 4.2 KiB |
@ -34,7 +34,25 @@ HEADERS += \
|
||||
FORMS += \
|
||||
ExTcpServer.ui
|
||||
|
||||
macx {
|
||||
ICON = images/icon.icns
|
||||
}
|
||||
|
||||
unix:!macx{
|
||||
# linux only
|
||||
}
|
||||
|
||||
win32 {
|
||||
RC_ICONS = images/icon.ico
|
||||
}
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
DISTFILES += \
|
||||
images/Image2.jpg \
|
||||
images/Image1.png \
|
||||
images/Image3.png \
|
||||
images/Image6.png
|
||||
|
@ -1,3 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ExTcpServer</class>
|
||||
<widget class="QMainWindow" name="ExTcpServer">
|
||||
@ -5,20 +6,111 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
<width>517</width>
|
||||
<height>314</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>ExTcpServer</string>
|
||||
</property>
|
||||
<widget class="QMenuBar" name="menuBar" />
|
||||
<widget class="QToolBar" name="mainToolBar" />
|
||||
<widget class="QWidget" name="centralWidget" />
|
||||
<widget class="QStatusBar" name="statusBar" />
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labIP">
|
||||
<property name="text">
|
||||
<string>监听地址:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<layoutDefault spacing="6" margin="11" />
|
||||
<pixmapfunction></pixmapfunction>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labPort">
|
||||
<property name="text">
|
||||
<string>端口:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBox">
|
||||
<property name="maximum">
|
||||
<number>65000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnSenf">
|
||||
<property name="text">
|
||||
<string>发送</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>517</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
<attribute name="toolBarBreak">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
BIN
QtTcpEx/ExTcpServer/images/Image1.png
Normal file
After Width: | Height: | Size: 603 B |
BIN
QtTcpEx/ExTcpServer/images/Image2.jpg
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
QtTcpEx/ExTcpServer/images/Image3.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
QtTcpEx/ExTcpServer/images/Image4.png
Normal file
After Width: | Height: | Size: 803 B |
BIN
QtTcpEx/ExTcpServer/images/Image5.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
QtTcpEx/ExTcpServer/images/Image6.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
QtTcpEx/ExTcpServer/images/icon.icns
Executable file
BIN
QtTcpEx/ExTcpServer/images/icon.ico
Executable file
After Width: | Height: | Size: 4.2 KiB |