├── README.md
├── TcpClient
├── FileType.qrc
├── TcpClient.pro
├── TcpClient.pro.user
├── book.cpp
├── book.h
├── client.config
├── config.qrc
├── friend.cpp
├── friend.h
├── icon
│ ├── dir.jpg
│ └── reg.jpg
├── main.cpp
├── online.cpp
├── online.h
├── online.ui
├── opewidget.cpp
├── opewidget.h
├── privatechat.cpp
├── privatechat.h
├── privatechat.ui
├── protocol.cpp
├── protocol.h
├── sharefile.cpp
├── sharefile.h
├── tcpclient.cpp
├── tcpclient.h
└── tcpclient.ui
├── TcpServer
├── TcpServer.pro
├── TcpServer.pro.user
├── cloud.db
├── config.qrc
├── main.cpp
├── mytcpserver.cpp
├── mytcpserver.h
├── mytcpsocket.cpp
├── mytcpsocket.h
├── opedb.cpp
├── opedb.h
├── protocol.cpp
├── protocol.h
├── server.config
├── tcpserver.cpp
├── tcpserver.h
└── tcpserver.ui
├── build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug
├── .qmake.stash
├── Makefile
├── Makefile.Debug
├── Makefile.Release
├── debug
│ ├── TcpClient.exe
│ ├── book.o
│ ├── friend.o
│ ├── main.o
│ ├── moc_book.cpp
│ ├── moc_book.o
│ ├── moc_friend.cpp
│ ├── moc_friend.o
│ ├── moc_online.cpp
│ ├── moc_online.o
│ ├── moc_opewidget.cpp
│ ├── moc_opewidget.o
│ ├── moc_predefs.h
│ ├── moc_privatechat.cpp
│ ├── moc_privatechat.o
│ ├── moc_sharefile.cpp
│ ├── moc_sharefile.o
│ ├── moc_tcpclient.cpp
│ ├── moc_tcpclient.o
│ ├── online.o
│ ├── opewidget.o
│ ├── privatechat.o
│ ├── protocol.o
│ ├── qrc_FileType.cpp
│ ├── qrc_FileType.o
│ ├── qrc_config.cpp
│ ├── qrc_config.o
│ ├── sharefile.o
│ └── tcpclient.o
├── object_script.TcpClient.Debug
├── object_script.TcpClient.Release
├── ui_online.h
├── ui_privatechat.h
└── ui_tcpclient.h
└── build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug
├── .qmake.stash
├── Makefile
├── Makefile.Debug
├── Makefile.Release
├── debug
├── TcpServer.exe
├── main.o
├── moc_mytcpserver.cpp
├── moc_mytcpserver.o
├── moc_mytcpsocket.cpp
├── moc_mytcpsocket.o
├── moc_opedb.cpp
├── moc_opedb.o
├── moc_predefs.h
├── moc_tcpserver.cpp
├── moc_tcpserver.o
├── mytcpserver.o
├── mytcpsocket.o
├── opedb.o
├── protocol.o
├── qrc_config.cpp
├── qrc_config.o
└── tcpserver.o
├── lucy
└── hello
│ └── hello.txt
├── object_script.TcpServer.Debug
├── object_script.TcpServer.Release
├── rose
├── hello
│ └── hello.txt
├── test_ppt.pptx
└── test_word.docx
├── test
├── hello
│ ├── hello.txt
│ └── test_ppt.pptx
└── test_word.docx
└── ui_tcpserver.h
/README.md:
--------------------------------------------------------------------------------
1 | # 一、项目资源下载
2 | 1. [基于C++的网盘系统项目源码CSDN下载地址](https://download.csdn.net/download/IronmanJay/87798821)
3 | 2. [基于C++的网盘系统项目源码GitHub下载地址](https://github.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus)
4 |
5 |
6 | # 二、项目简介
7 | 本项目基于C++开发,整个项目采用C/S架构,使用Sqlite3数据库存储用户信息,本地磁盘存储用户文件,使用Socket进行客户端和服务器之间的数据传输。完成了网盘中关于用户的几乎所有功能,包括:用户注册、用户登录、用户退出、查看在线好友、搜索好友、添加好友、刷新在线好友、删除好友、私聊、群聊等等;关于文件夹和文件的所有功能也几乎完成了,包括:创建文件夹、查看所有文件、删除文件夹、重命名文件夹、进入文件夹、返回上一级、上传文件、删除文件、下载文件、分享文件、移动文件等等。本项目的完成度非常高,包括了这么多功能,自然代码数也非常多,代码多不是问题,因为我写的非常详细,详细到每一步我都有解释,各位读者一定可以看懂。另外,为了方便读者学习,且本着开源精神,我已经将我写好的源码分享在上面了。此项目作为本科毕设或者写在简历上也不失为一个好的选择。此项目花费了我大量精力和时间,前前后后写了两个多月,希望读者可以收获满满,下面就开始学习吧!
8 |
9 |
10 | # 三、项目开发软件环境
11 | - Windows 11
12 | - Qt Creator 4.11.1 (Community)
13 | - C++ 98
14 | - Gcc 3.4.5
15 |
16 |
17 | # 四、项目开发硬件环境
18 | - CPU:Intel® Core™ i7-8750H CPU @ 2.20GHz 2.20 GHz
19 | - RAM:24GB
20 | - GPU:NVIDIA GeForce GTX 1060
21 |
22 |
23 | # 五、项目演示
24 |
25 | ## 5.1 用户注册
26 |
27 | 1. 当我们启动两个项目后,输入用户名和密码最后点击“注册”,发现提示我们注册成功了:
28 | 
29 |
30 | 2. 然后我们来到数据库查看数据,发现新的注册信息已经保存到数据库中了:
31 | 
32 |
33 | 3. 如果此时我们还是以同样的用户名去注册,就会提示我们注册失败,因为数据库中已经有同名的用户名了,而我们设置用户名字段唯一,所以注册会失败:
34 | 
35 |
36 | ## 5.2 用户登录
37 |
38 | 1. 启动两个项目,当我们使用已经在数据库中存在的用户,并且此用户的“online”字段为0的时候,是可以成功登陆的:
39 | 
40 |
41 | 2. 当我们尝试使用数据库中不存在的用户登陆时,是不可以成功登录的:
42 | 
43 |
44 | ## 5.3 用户退出
45 |
46 | 1. 启动两个项目,使用某一个用户登录,然后查询数据库,发现此用户的“online”字段为1,说明已经成功登陆了:
47 | 
48 |
49 | 2. 然后点击关闭按钮,模仿用户退出行为:
50 | 
51 |
52 | 3. 此时再来数据库查询,就发现对应用户的online字段已经变为了0,说明此用户已经成功退出了:
53 | 
54 |
55 | ## 5.4 查看在线好友
56 |
57 | 1. 同时启动多个客户端,然后分别登陆进去,点击“显示在线用户”按钮,可以发现在线的用户的用户名已经成功显示了:
58 | 
59 |
60 | ## 5.5 搜索好友
61 |
62 | 1. 启动两个项目后,当我们搜索用户“abc”的时候,发现可以成功展示其用户名和状态:
63 | 
64 |
65 | ## 5.6 添加好友
66 |
67 | 1. 打开两个客户端和一个服务器后,发现被加用户可以正常弹出窗口:
68 | 
69 |
70 | 2. 当我们点击“Yes”后,发现可以已经成功添加好友了,并且数据库中也已经保存了两个用户的好友关系:
71 | 
72 |
73 | ## 5.7 刷新在线好友
74 |
75 | 1. 分别启动服务器和客户端并登陆后,我们点击“刷新好友”按钮,发现此时可以将最新在线的好友列表显示出来了:
76 | 
77 |
78 | ## 5.8 删除好友
79 |
80 | 1. 分别启动服务器和有好友关系的两个客户端,点击“删除好友”按钮后就可以成功删除两个用户之间的好友关系了,并且可以显示提示:
81 | 
82 |
83 | ## 5.9 私聊
84 |
85 | 1. 启动服务器和两个客户端进行测试,发现可以正常进行聊天消息的传递:
86 | 
87 |
88 | ## 5.10 群聊
89 |
90 | 1. 启动项目后,发现可以正常发送群聊信息:
91 | 
92 |
93 | ## 5.11 创建文件夹
94 |
95 | 1. 可以成功在用户名同名的目录下新建文件夹
96 | 
97 |
98 | ## 5.12 查看所有文件
99 |
100 | 1. 当我们点击“图书”界面的“刷新文件”,就可以显示此文件夹内所有的文件了:
101 | 
102 |
103 | ## 5.13 删除文件夹
104 |
105 | 1. 当我们选中文件夹后点击“删除文件夹”后,就会弹出删除成功的提示,然后当我们点击“刷新文件”后,就会发现原来的被删除文件夹已经不存在了:
106 | 
107 |
108 | ## 5.14 重命名文件夹
109 |
110 | 1. 选中某个待重命名的文件,然后输入重命名后的文件名称:
111 | 
112 |
113 | 2. 当我们点击“刷新文件”后,可以发现已经成功重命名文件了:
114 | 
115 |
116 | ## 5.15 进入文件夹
117 |
118 | 1. 当我们双击某个文件夹的时候就可以进入到此文件夹:
119 | 
120 |
121 | ## 5.16 返回上一级
122 |
123 | 1. 当我们点击“返回”的时候,可以从子目录返回到主目录:
124 | 
125 |
126 | ## 5.17 上传文件
127 |
128 | 1. 选中本地某个文件进行上传:
129 | 
130 |
131 | 2. 可以发现,文件已经成功上传了:
132 | 
133 |
134 | ## 5.18 删除文件
135 |
136 | 1. 我们可以选中某个文件,然后点击“删除文件”:
137 | 
138 |
139 | 2. 当我们再次“刷新文件”后,就会发现选中的文件已经被我们删除了:
140 | 
141 |
142 | ## 5.19 下载文件
143 |
144 | 1. 选中服务器的某个文件进行下载:
145 | 
146 |
147 | 2. 可以发现,已经下载成功了:
148 | 
149 |
150 | ## 5.20 分享文件
151 |
152 | 1. 首先启动一个服务端和两个客户端,在两个客户端上点击“刷新好友”,要先刷新好友,才能对好友进行分享文件的操作:
153 | 
154 |
155 | 2. 然后将“rose”用户下的“hello”文件夹进行分享:
156 | 
157 |
158 | 3. 选择“lucy”后,点击“确定”:
159 | 
160 |
161 | 4. 此时两个客户端都有相应的提示了,我们只需要点击接收端的“Yes”:
162 | 
163 |
164 | 5. 然后点击“lucy”用户客户端的“刷新文件”,可以看到“rose”用户的“hello”文件夹及其文件夹中的内容已经成功拷贝到“lucy”用户的文件目录中了:
165 | 
166 |
167 | ## 5.21 移动文件
168 |
169 | 1. 首先选择要移动的文件,然后点击“移动文件”:
170 | 
171 |
172 | 2. 然后选择要移动文件的目标目录后,点击“目标目录”:
173 | 
174 |
175 | 3. 当我们进入移动文件的目标目录查看后,发现文件已经移动到目标目录了:
176 | 
177 |
178 | # 六、更多细节
179 | 更多细节请见:[基于C++的网盘系统项目开发教程](https://blog.csdn.net/IronmanJay/article/details/130718228)
180 |
181 |
--------------------------------------------------------------------------------
/TcpClient/FileType.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | icon/dir.jpg
4 | icon/reg.jpg
5 |
6 |
7 |
--------------------------------------------------------------------------------
/TcpClient/TcpClient.pro:
--------------------------------------------------------------------------------
1 | QT += core gui network
2 |
3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
4 |
5 | CONFIG += c++11
6 |
7 | # The following define makes your compiler emit warnings if you use
8 | # any Qt feature that has been marked deprecated (the exact warnings
9 | # depend on your compiler). Please consult the documentation of the
10 | # deprecated API in order to know how to port your code away from it.
11 | DEFINES += QT_DEPRECATED_WARNINGS
12 |
13 | # You can also make your code fail to compile if it uses deprecated APIs.
14 | # In order to do so, uncomment the following line.
15 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
16 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
17 |
18 | SOURCES += \
19 | book.cpp \
20 | friend.cpp \
21 | main.cpp \
22 | online.cpp \
23 | opewidget.cpp \
24 | privatechat.cpp \
25 | protocol.cpp \
26 | sharefile.cpp \
27 | tcpclient.cpp
28 |
29 | HEADERS += \
30 | book.h \
31 | friend.h \
32 | online.h \
33 | opewidget.h \
34 | privatechat.h \
35 | protocol.h \
36 | sharefile.h \
37 | tcpclient.h
38 |
39 | FORMS += \
40 | online.ui \
41 | privatechat.ui \
42 | tcpclient.ui
43 |
44 | # Default rules for deployment.
45 | qnx: target.path = /tmp/$${TARGET}/bin
46 | else: unix:!android: target.path = /opt/$${TARGET}/bin
47 | !isEmpty(target.path): INSTALLS += target
48 |
49 | RESOURCES += \
50 | FileType.qrc \
51 | config.qrc
52 |
--------------------------------------------------------------------------------
/TcpClient/book.cpp:
--------------------------------------------------------------------------------
1 | #include "book.h"
2 | #include "tcpclient.h"
3 | #include
4 | #include
5 | #include
6 | #include "opewidget.h"
7 | #include "sharefile.h"
8 |
9 | Book::Book(QWidget *parent) : QWidget(parent)
10 | {
11 | m_strEnterDir.clear();
12 | m_bDownload = false;
13 | m_pTimer = new QTimer;
14 | m_pBookListW = new QListWidget;
15 | m_pReturnPB = new QPushButton("返回");
16 | m_pCreateDirPB = new QPushButton("创建文件夹");
17 | m_pDelDirPB = new QPushButton("删除文件夹");
18 | m_pRenamePB = new QPushButton("重命名文件");
19 | m_pFlushFilePB = new QPushButton("刷新文件");
20 | QVBoxLayout *pDirVBL = new QVBoxLayout;
21 | pDirVBL->addWidget(m_pReturnPB);
22 | pDirVBL->addWidget(m_pCreateDirPB);
23 | pDirVBL->addWidget(m_pDelDirPB);
24 | pDirVBL->addWidget(m_pRenamePB);
25 | pDirVBL->addWidget(m_pFlushFilePB);
26 | m_pUploadPB = new QPushButton("上传文件");
27 | m_DownLoadPB = new QPushButton("下载文件");
28 | m_pDelFilePB = new QPushButton("删除文件");
29 | m_pShareFilePB = new QPushButton("共享文件");
30 | m_pMoveFilePB = new QPushButton("移动文件");
31 | m_pSelectDirPB = new QPushButton("目标目录");
32 | m_pSelectDirPB->setEnabled(false);
33 | QVBoxLayout *pFileVBL = new QVBoxLayout;
34 | pFileVBL->addWidget(m_pUploadPB);
35 | pFileVBL->addWidget(m_DownLoadPB);
36 | pFileVBL->addWidget(m_pDelFilePB);
37 | pFileVBL->addWidget(m_pShareFilePB);
38 | pFileVBL->addWidget(m_pMoveFilePB);
39 | pFileVBL->addWidget(m_pSelectDirPB);
40 | QHBoxLayout *pMain = new QHBoxLayout;
41 | pMain->addWidget(m_pBookListW);
42 | pMain->addLayout(pDirVBL);
43 | pMain->addLayout(pFileVBL);
44 | setLayout(pMain);
45 | connect(m_pCreateDirPB,SIGNAL(clicked(bool)),this,SLOT(createDir()));
46 | connect(m_pFlushFilePB,SIGNAL(clicked(bool)),this,SLOT(flushFile()));
47 | connect(m_pDelDirPB,SIGNAL(clicked(bool)),this,SLOT(delDir()));
48 | connect(m_pRenamePB,SIGNAL(clicked(bool)),this,SLOT(renameFile()));
49 | connect(m_pBookListW,SIGNAL(doubleClicked(QModelIndex)),this,SLOT(enterDir(QModelIndex)));
50 | connect(m_pReturnPB,SIGNAL(clicked(bool)),this,SLOT(returnPre()));
51 | connect(m_pUploadPB,SIGNAL(clicked(bool)),this,SLOT(uploadFile()));
52 | connect(m_pTimer,SIGNAL(timeout()),this,SLOT(uploadFileData()));
53 | connect(m_pDelFilePB,SIGNAL(clicked(bool)),this,SLOT(delRegFile()));
54 | connect(m_DownLoadPB,SIGNAL(clicked(bool)),this,SLOT(downloadFile()));
55 | connect(m_pShareFilePB,SIGNAL(clicked(bool)),this,SLOT(shareFile()));
56 | connect(m_pMoveFilePB,SIGNAL(clicked(bool)),this,SLOT(moveFile()));
57 | connect(m_pSelectDirPB,SIGNAL(clicked(bool)),this,SLOT(selectDestDir()));
58 | }
59 |
60 | // 更新文件列表
61 | void Book::updateFileList(const PDU *pdu)
62 | {
63 | if(NULL == pdu)
64 | {
65 | return;
66 | }
67 | QListWidgetItem *pItemTemp = NULL;
68 | int row = m_pBookListW->count();
69 | while(m_pBookListW->count() > 0)
70 | {
71 | pItemTemp = m_pBookListW->item(row - 1);
72 | m_pBookListW->removeItemWidget(pItemTemp);
73 | delete pItemTemp;
74 | row -= 1;
75 | }
76 | FileInfo *pFileInfo = NULL;
77 | int iCount = pdu->uiMsgLen / sizeof(FileInfo);
78 | for(int i = 0;icaMsg) + i;
81 | QListWidgetItem *pItem = new QListWidgetItem;
82 | if(0 == pFileInfo->iFileType)
83 | {
84 | pItem->setIcon(QIcon(QPixmap(":/icon/dir.jpg")));
85 | }
86 | else if(1 == pFileInfo->iFileType)
87 | {
88 | pItem->setIcon(QIcon(QPixmap(":/icon/reg.jpg")));
89 | }
90 | pItem->setText(pFileInfo->caFileName);
91 | m_pBookListW->addItem(pItem);
92 | }
93 | }
94 |
95 | // 创建文件夹
96 | void Book::createDir()
97 | {
98 | QString strNewDir = QInputDialog::getText(this,"新建文件夹","新文件夹名字");
99 | if(!strNewDir.isEmpty())
100 | {
101 | if(strNewDir.size() > 32)
102 | {
103 | QMessageBox::warning(this,"新建文件夹","新文件夹名字不能超过32个字符");
104 | }
105 | else
106 | {
107 | QString strName = TcpClient::getInstance().loginName();
108 | QString strCurPath = TcpClient::getInstance().curPath();
109 | PDU *pdu = mkPDU(strCurPath.size() + 1);
110 | pdu->uiMsgType = ENUM_MSG_TYPE_CREATE_DIR_REQUEST;
111 | strncpy(pdu->caData,strName.toStdString().c_str(),strName.size());
112 | strncpy(pdu->caData + 32,strNewDir.toStdString().c_str(),strNewDir.size());
113 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
114 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
115 | free(pdu);
116 | pdu = NULL;
117 | }
118 | }
119 | else
120 | {
121 | QMessageBox::warning(this,"新建文件夹","新文件夹名字不能为空");
122 | }
123 | }
124 |
125 | // 查看所有文件
126 | void Book::flushFile()
127 | {
128 | QString strCurPath = TcpClient::getInstance().curPath();
129 | PDU *pdu = mkPDU(strCurPath.size() + 1);
130 | pdu->uiMsgType = ENUM_MSG_TYPE_FLUSH_FILE_REQUEST;
131 | strncpy((char*)(pdu->caMsg),strCurPath.toStdString().c_str(),strCurPath.size());
132 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
133 | free(pdu);
134 | pdu = NULL;
135 | }
136 |
137 | // 删除文件夹
138 | void Book::delDir()
139 | {
140 | QString strCurPath = TcpClient::getInstance().curPath();
141 | QListWidgetItem *pItem = m_pBookListW->currentItem();
142 | if(NULL == pItem)
143 | {
144 | QMessageBox::warning(this,"删除文件","请选择要删除的文件");
145 | }
146 | else
147 | {
148 | QString strDelName = pItem->text();
149 | PDU *pdu = mkPDU(strCurPath.size() + 1);
150 | pdu->uiMsgType = ENUM_MSG_TYPE_DEL_DIR_REQUEST;
151 | strncpy(pdu->caData,strDelName.toStdString().c_str(),strDelName.size());
152 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
153 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
154 | free(pdu);
155 | pdu = NULL;
156 | }
157 | }
158 |
159 | // 重命名文件
160 | void Book::renameFile()
161 | {
162 | QString strCurPath = TcpClient::getInstance().curPath();
163 | QListWidgetItem *pItem = m_pBookListW->currentItem();
164 | if(NULL == pItem)
165 | {
166 | QMessageBox::warning(this,"重命名文件","请选择要重命名的文件");
167 | }
168 | else
169 | {
170 | QString strOldName = pItem->text();
171 | QString strNewName = QInputDialog::getText(this,"重命名文件","请输入新的文件名");
172 | if(!strNewName.isEmpty())
173 | {
174 | PDU *pdu = mkPDU(strCurPath.size() + 1);
175 | pdu->uiMsgType = ENUM_MSG_TYPE_RENAME_FILE_REQUEST;
176 | strncpy(pdu->caData,strOldName.toStdString().c_str(),strOldName.size());
177 | strncpy(pdu->caData + 32,strNewName.toStdString().c_str(),strNewName.size());
178 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
179 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
180 | free(pdu);
181 | pdu = NULL;
182 | }
183 | else
184 | {
185 | QMessageBox::warning(this,"重命名文件","新文件名不能为空");
186 | }
187 | }
188 | }
189 |
190 | // 进入文件夹
191 | void Book::enterDir(const QModelIndex &index)
192 | {
193 | QString strDirName = index.data().toString();
194 | m_strEnterDir = strDirName;
195 | QString strCurPath = TcpClient::getInstance().curPath();
196 | PDU *pdu = mkPDU(strCurPath.size() + 1);
197 | pdu->uiMsgType = ENUM_MSG_TYPE_ENTER_DIR_REQUEST;
198 | strncpy(pdu->caData,strDirName.toStdString().c_str(),strDirName.size());
199 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
200 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
201 | free(pdu);
202 | pdu = NULL;
203 | }
204 |
205 | // 返回上一级
206 | void Book::returnPre()
207 | {
208 | QString strCurPath = TcpClient::getInstance().curPath();
209 | QString strRootPath = "./" + TcpClient::getInstance().loginName();
210 | if(strCurPath == strRootPath)
211 | {
212 | QMessageBox::warning(this,"返回","返回失败:已经在最开始的文件夹目录中");
213 | }
214 | else
215 | {
216 | int index = strCurPath.lastIndexOf('/');
217 | strCurPath.remove(index,strCurPath.size() - index);
218 | TcpClient::getInstance().setCurPath(strCurPath);
219 | clearEnterDir();
220 | flushFile();
221 | }
222 | }
223 |
224 | // 上传文件请求
225 | void Book::uploadFile()
226 | {
227 | m_strUploadFilePath = QFileDialog::getOpenFileName();
228 | if(!m_strUploadFilePath.isEmpty())
229 | {
230 | int index = m_strUploadFilePath.lastIndexOf('/');
231 | QString strFileName = m_strUploadFilePath.right(m_strUploadFilePath.size() - index - 1);
232 | QFile file(m_strUploadFilePath);
233 | qint64 fileSize = file.size();
234 | QString strCurPath = TcpClient::getInstance().curPath();
235 | PDU *pdu = mkPDU(strCurPath.size() + 1);
236 | pdu->uiMsgType = ENUM_MSG_TYPE_UPLOAD_FILE_REQUEST;
237 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
238 | sprintf(pdu->caData,"%s %lld",strFileName.toStdString().c_str(),fileSize);
239 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
240 | free(pdu);
241 | pdu = NULL;
242 | m_pTimer->start(1000);
243 | }
244 | else
245 | {
246 | QMessageBox::warning(this,"上传文件","上传文件名字不能为空");
247 | }
248 | }
249 |
250 | // 上传文件传输数据
251 | void Book::uploadFileData()
252 | {
253 | m_pTimer->stop();
254 | QFile file(m_strUploadFilePath);
255 | if(!file.open(QIODevice::ReadOnly))
256 | {
257 | QMessageBox::warning(this,"上传文件","打开文件失败");
258 | return;
259 | }
260 | char *pBuffer = new char[4096];
261 | qint64 res = 0;
262 | while(true)
263 | {
264 | res = file.read(pBuffer,4096);
265 | if(res > 0 && res <= 4096)
266 | {
267 | TcpClient::getInstance().getTcpSocket().write(pBuffer,res);
268 | }
269 | else if(0 == res)
270 | {
271 | break;
272 | }
273 | else
274 | {
275 | QMessageBox::warning(this,"上传文件","打开文件失败:读文件失败");
276 | break;
277 | }
278 | }
279 | file.close();
280 | delete []pBuffer;
281 | pBuffer = NULL;
282 | }
283 |
284 | // 删除文件
285 | void Book::delRegFile()
286 | {
287 | QString strCurPath = TcpClient::getInstance().curPath();
288 | QListWidgetItem *pItem = m_pBookListW->currentItem();
289 | if(NULL == pItem)
290 | {
291 | QMessageBox::warning(this,"删除文件","请选择要删除的文件");
292 | }
293 | else
294 | {
295 | QString strDelName = pItem->text();
296 | PDU *pdu = mkPDU(strCurPath.size() + 1);
297 | pdu->uiMsgType = ENUM_MSG_TYPE_DEL_FILE_REQUEST;
298 | strncpy(pdu->caData,strDelName.toStdString().c_str(),strDelName.size());
299 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
300 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
301 | free(pdu);
302 | pdu = NULL;
303 | }
304 | }
305 |
306 | // 下载文件
307 | void Book::downloadFile()
308 | {
309 | QListWidgetItem *pItem = m_pBookListW->currentItem();
310 | if(NULL == pItem)
311 | {
312 | QMessageBox::warning(this,"下载文件","请选择要下载的文件");
313 | }
314 | else
315 | {
316 | QString strSaveFilePath = QFileDialog::getSaveFileName();
317 | if(strSaveFilePath.isEmpty())
318 | {
319 | QMessageBox::warning(this,"下载文件","请指定要保存的位置");
320 | m_strSaveFilePath.clear();
321 | }
322 | else
323 | {
324 | m_strSaveFilePath = strSaveFilePath;
325 | }
326 | QString strCurPath = TcpClient::getInstance().curPath();
327 | PDU *pdu = mkPDU(strCurPath.size() + 1);
328 | pdu->uiMsgType = ENUM_MSG_TYPE_DOWNLOAD_FILE_REQUEST;
329 | QString strFileName = pItem->text();
330 | strcpy(pdu->caData,strFileName.toStdString().c_str());
331 | memcpy(pdu->caMsg,strCurPath.toStdString().c_str(),strCurPath.size());
332 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
333 | }
334 | }
335 |
336 | // 共享文件
337 | void Book::shareFile()
338 | {
339 | QListWidgetItem *pItem = m_pBookListW->currentItem();
340 | if(NULL == pItem)
341 | {
342 | QMessageBox::warning(this,"共享文件","请选择要共享的文件");
343 | return;
344 | }
345 | else
346 | {
347 | m_strShareFileName = pItem->text();
348 | }
349 | Friend *pFriend = OpeWidget::getInstance().getFriend();
350 | QListWidget *pFriendList = pFriend->getFriendList();
351 | ShareFile::getInstance().updateFriend(pFriendList);
352 | if(ShareFile::getInstance().isHidden())
353 | {
354 | ShareFile::getInstance().show();
355 | }
356 | }
357 |
358 | // 移动文件
359 | void Book::moveFile()
360 | {
361 | QListWidgetItem *pCurItem = m_pBookListW->currentItem();
362 | if(NULL != pCurItem)
363 | {
364 | m_strMoveFileName = pCurItem->text();
365 | QString strCurPath = TcpClient::getInstance().curPath();
366 | m_strMoveFilePath = strCurPath + '/' + m_strMoveFileName;
367 | m_pSelectDirPB->setEnabled(true);
368 | }
369 | else
370 | {
371 | QMessageBox::warning(this,"移动文件","请选择要移动的文件");
372 | }
373 | }
374 |
375 | // 选择移动文件的目的地
376 | void Book::selectDestDir()
377 | {
378 | QListWidgetItem *pCurItem = m_pBookListW->currentItem();
379 | if(NULL != pCurItem)
380 | {
381 | QString strDestDir = pCurItem->text();
382 | QString strCurPath = TcpClient::getInstance().curPath();
383 | m_strDestDir = strCurPath + '/' +strDestDir;
384 | int srcLen = m_strMoveFilePath.size();
385 | int destLen = m_strDestDir.size();
386 | PDU *pdu = mkPDU(srcLen + destLen + 2);
387 | pdu->uiMsgType = ENUM_MSG_TYPE_MOVE_FILE_REQUEST;
388 | sprintf(pdu->caData,"%d %d %s",srcLen,destLen,m_strMoveFileName.toStdString().c_str());
389 | memcpy(pdu->caMsg,m_strMoveFilePath.toStdString().c_str(),srcLen);
390 | memcpy((char*)(pdu->caMsg) + srcLen + 1,m_strDestDir.toStdString().c_str(),destLen);
391 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
392 | free(pdu);
393 | pdu = NULL;
394 | }
395 | else
396 | {
397 | QMessageBox::warning(this,"移动文件","请选择要移动的文件");
398 | }
399 | m_pSelectDirPB->setEnabled(false);
400 | }
401 |
402 | // 清空当前保存的目录
403 | void Book::clearEnterDir()
404 | {
405 | m_strEnterDir.clear();
406 | }
407 |
408 | // 获取当前保存的目录
409 | QString Book::enterDir()
410 | {
411 | return m_strEnterDir;
412 | }
413 |
414 | // 设置下载状态
415 | void Book::setDownloadStatus(bool status)
416 | {
417 | m_bDownload = status;
418 | }
419 |
420 | // 返回下载状态
421 | bool Book::getDownloadStatus()
422 | {
423 | return m_bDownload;
424 | }
425 |
426 | // 返回保存文件的路径
427 | QString Book::getSaveFilePath()
428 | {
429 | return m_strSaveFilePath;
430 | }
431 |
432 | // 返回分享的文件名
433 | QString Book::getShareFileName()
434 | {
435 | return m_strShareFileName;
436 | }
437 |
--------------------------------------------------------------------------------
/TcpClient/book.h:
--------------------------------------------------------------------------------
1 | #ifndef BOOK_H
2 | #define BOOK_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include "protocol.h"
10 | #include
11 |
12 |
13 | class Book : public QWidget
14 | {
15 | Q_OBJECT
16 | public:
17 | explicit Book(QWidget *parent = nullptr);
18 | void updateFileList(const PDU *pdu);
19 | void clearEnterDir();
20 | QString enterDir();
21 | void setDownloadStatus(bool status);
22 | qint64 m_iTotal; // 总的文件大小
23 | qint64 m_iRecved; // 已收到多少
24 | bool getDownloadStatus();
25 | QString getSaveFilePath();
26 | QString getShareFileName();
27 |
28 | signals:
29 |
30 | public slots:
31 | void createDir();
32 | void flushFile();
33 | void delDir();
34 | void renameFile();
35 | void enterDir(const QModelIndex &index);
36 | void returnPre();
37 | void uploadFile();
38 | void uploadFileData();
39 | void delRegFile();
40 | void downloadFile();
41 | void shareFile();
42 | void moveFile();
43 | void selectDestDir();
44 |
45 | private:
46 | QListWidget *m_pBookListW;
47 | QPushButton *m_pReturnPB;
48 | QPushButton *m_pCreateDirPB;
49 | QPushButton *m_pDelDirPB;
50 | QPushButton *m_pRenamePB;
51 | QPushButton *m_pFlushFilePB;
52 | QPushButton *m_pUploadPB;
53 | QPushButton *m_DownLoadPB;
54 | QPushButton *m_pDelFilePB;
55 | QPushButton *m_pShareFilePB;
56 | QPushButton *m_pMoveFilePB;
57 | QPushButton *m_pSelectDirPB;
58 | QString m_strEnterDir;
59 | QString m_strUploadFilePath;
60 | QTimer *m_pTimer;
61 | QString m_strSaveFilePath;
62 | bool m_bDownload;
63 | QString m_strShareFileName;
64 | QString m_strMoveFileName;
65 | QString m_strMoveFilePath;
66 | QString m_strDestDir;
67 | };
68 |
69 | #endif // BOOK_H
70 |
--------------------------------------------------------------------------------
/TcpClient/client.config:
--------------------------------------------------------------------------------
1 | 127.0.0.1
2 | 8888
--------------------------------------------------------------------------------
/TcpClient/config.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | client.config
4 |
5 |
6 |
--------------------------------------------------------------------------------
/TcpClient/friend.cpp:
--------------------------------------------------------------------------------
1 | #include "friend.h"
2 | #include "protocol.h"
3 | #include "tcpclient.h"
4 | #include
5 | #include
6 | #include "privatechat.h"
7 | #include
8 |
9 | // 好友功能主体窗口
10 | Friend::Friend(QWidget *parent) : QWidget(parent)
11 | {
12 | m_pShowMsgTE = new QTextEdit;
13 | m_pFriendListWidget = new QListWidget;
14 | m_pInputMsgLE = new QLineEdit;
15 | m_pDelFriendPB = new QPushButton("删除好友");
16 | m_pFlushFriendPB = new QPushButton("刷新好友");
17 | m_pShowOnlineUsrPB = new QPushButton("显示在线用户");
18 | m_pSearchUsrPB = new QPushButton("查找用户");
19 | m_pMsgSendPB = new QPushButton("信息发送");
20 | m_pPrivateChatPB = new QPushButton("私聊");
21 | QVBoxLayout *pRightPBVBL = new QVBoxLayout;
22 | pRightPBVBL->addWidget(m_pDelFriendPB);
23 | pRightPBVBL->addWidget(m_pFlushFriendPB);
24 | pRightPBVBL->addWidget(m_pShowOnlineUsrPB);
25 | pRightPBVBL->addWidget(m_pSearchUsrPB);
26 | pRightPBVBL->addWidget(m_pPrivateChatPB);
27 | QHBoxLayout *pTopHBL = new QHBoxLayout;
28 | pTopHBL->addWidget(m_pShowMsgTE);
29 | pTopHBL->addWidget(m_pFriendListWidget);
30 | pTopHBL->addLayout(pRightPBVBL);
31 | QHBoxLayout *pMsgHBL = new QHBoxLayout;
32 | pMsgHBL->addWidget(m_pInputMsgLE);
33 | pMsgHBL->addWidget(m_pMsgSendPB);
34 | m_pOnline = new Online;
35 | QVBoxLayout *pMain = new QVBoxLayout;
36 | pMain->addLayout(pTopHBL);
37 | pMain->addLayout(pMsgHBL);
38 | pMain->addWidget(m_pOnline);
39 | m_pOnline->hide();
40 | setLayout(pMain);
41 | connect(m_pShowOnlineUsrPB,SIGNAL(clicked(bool)),this,SLOT(showOnline()));
42 | connect(m_pSearchUsrPB,SIGNAL(clicked(bool)),this,SLOT(searchUsr()));
43 | connect(m_pFlushFriendPB,SIGNAL(clicked(bool)),this,SLOT(flushFriend()));
44 | connect(m_pDelFriendPB,SIGNAL(clicked(bool)),this,SLOT(deleteFriend()));
45 | connect(m_pPrivateChatPB,SIGNAL(clicked(bool)),this,SLOT(privateChat()));
46 | connect(m_pMsgSendPB,SIGNAL(clicked(bool)),this,SLOT(groupChat()));
47 | }
48 |
49 | // 显示所有的在线用户的用户名
50 | void Friend::showAllOnlineUsr(PDU *pdu)
51 | {
52 | if(NULL == pdu)
53 | {
54 | return;
55 | }
56 | m_pOnline->showUsr(pdu);
57 | }
58 |
59 | // 更新最新在线好友列表
60 | void Friend::updateFriendList(PDU *pdu)
61 | {
62 | if(NULL == pdu)
63 | {
64 | return;
65 | }
66 | uint uiSize = pdu->uiMsgLen / 32;
67 | char caName[32] = {'\0'};
68 | for(uint i = 0;icaMsg) + i * 32,32);
71 | m_pFriendListWidget->addItem(caName);
72 | }
73 | }
74 |
75 | // 更新群聊信息
76 | void Friend::updateGroupMsg(PDU *pdu)
77 | {
78 | QString strMsg = QString("%1 says: %2").arg(pdu->caData).arg((char*)pdu->caMsg);
79 | m_pShowMsgTE->append(strMsg);
80 | }
81 |
82 | // 返回当前用户的好友列表
83 | QListWidget *Friend::getFriendList()
84 | {
85 | return m_pFriendListWidget;
86 | }
87 |
88 | // 显示在线用户窗口
89 | void Friend::showOnline()
90 | {
91 | if(m_pOnline->isHidden())
92 | {
93 | m_pOnline->show();
94 | PDU *pdu = mkPDU(0);
95 | pdu->uiMsgType = ENUM_MSG_TYPE_ALL_ONLINE_REQUEST;
96 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
97 | free(pdu);
98 | pdu = NULL;
99 | }
100 | else
101 | {
102 | m_pOnline->hide();
103 | }
104 | }
105 |
106 | // 搜索用户
107 | void Friend::searchUsr()
108 | {
109 | m_strSearchName = QInputDialog::getText(this,"搜索","用户名");
110 | if(!m_strSearchName.isEmpty())
111 | {
112 | qDebug() << "待查找的用户名为:" << m_strSearchName;
113 | PDU *pdu = mkPDU(0);
114 | memcpy(pdu->caData, m_strSearchName.toStdString().c_str(), m_strSearchName.size());
115 | pdu->uiMsgType = ENUM_MSG_TYPE_SEARCH_USR_REQUEST;
116 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
117 | free(pdu);
118 | pdu = NULL;
119 | }
120 | }
121 |
122 | // 刷新好友列表
123 | void Friend::flushFriend()
124 | {
125 | QString strName = TcpClient::getInstance().loginName();
126 | PDU *pdu = mkPDU(0);
127 | pdu->uiMsgType = ENUM_MSG_TYPE_FLUSH_FRIEND_REQUEST;
128 | memcpy(pdu->caData,strName.toStdString().c_str(),strName.size());
129 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
130 | free(pdu);
131 | pdu = NULL;
132 | }
133 |
134 | // 删除好友
135 | void Friend::deleteFriend()
136 | {
137 | if(NULL != m_pFriendListWidget->currentItem())
138 | {
139 | QString strFriendName = m_pFriendListWidget->currentItem()->text();
140 | PDU *pdu = mkPDU(0);
141 | pdu->uiMsgType = ENUM_MSG_TYPE_DELETE_FRIEND_REQUEST;
142 | QString strSelName = TcpClient::getInstance().loginName();
143 | memcpy(pdu->caData,strSelName.toStdString().c_str(),strSelName.size());
144 | memcpy(pdu->caData + 32,strFriendName.toStdString().c_str(),strFriendName.size());
145 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
146 | free(pdu);
147 | pdu = NULL;
148 | }
149 | }
150 |
151 | // 私聊
152 | void Friend::privateChat()
153 | {
154 | if(NULL != m_pFriendListWidget->currentItem())
155 | {
156 | QString strChatName = m_pFriendListWidget->currentItem()->text();
157 | PrivateChat::getInstance().setChatName(strChatName);
158 | if(PrivateChat::getInstance().isHidden())
159 | {
160 | PrivateChat::getInstance().show();
161 | }
162 | }
163 | else
164 | {
165 | QMessageBox::warning(this,"私聊","请选择私聊对象");
166 | }
167 | }
168 |
169 | // 群聊
170 | void Friend::groupChat()
171 | {
172 | QString strMsg = m_pInputMsgLE->text();
173 | if(!strMsg.isEmpty())
174 | {
175 | PDU *pdu = mkPDU(strMsg.size() + 1);
176 | pdu->uiMsgType = ENUM_MSG_TYPE_GROUP_CHAT_REQUEST;
177 | QString strName = TcpClient::getInstance().loginName();
178 | strncpy(pdu->caData,strName.toStdString().c_str(),strName.size());
179 | strncpy((char*)(pdu->caMsg),strMsg.toStdString().c_str(),strMsg.size());
180 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
181 | }
182 | else
183 | {
184 | QMessageBox::warning(this,"群聊","信息不能为空");
185 | }
186 | }
187 |
--------------------------------------------------------------------------------
/TcpClient/friend.h:
--------------------------------------------------------------------------------
1 | #ifndef FRIEND_H
2 | #define FRIEND_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include "online.h"
12 |
13 | class Friend : public QWidget
14 | {
15 | Q_OBJECT
16 | public:
17 | explicit Friend(QWidget *parent = nullptr);
18 | void showAllOnlineUsr(PDU *pdu);
19 | QString m_strSearchName;
20 | void updateFriendList(PDU *pdu);
21 | void updateGroupMsg(PDU *pdu);
22 | QListWidget *getFriendList();
23 |
24 | signals:
25 |
26 | public slots:
27 | void showOnline();
28 | void searchUsr();
29 | void flushFriend();
30 | void deleteFriend();
31 | void privateChat();
32 | void groupChat();
33 |
34 | private:
35 | QTextEdit *m_pShowMsgTE;
36 | QListWidget *m_pFriendListWidget;
37 | QLineEdit *m_pInputMsgLE;
38 | QPushButton *m_pDelFriendPB;
39 | QPushButton *m_pFlushFriendPB;
40 | QPushButton *m_pShowOnlineUsrPB;
41 | QPushButton *m_pSearchUsrPB;
42 | QPushButton *m_pMsgSendPB;
43 | QPushButton *m_pPrivateChatPB;
44 | Online *m_pOnline;
45 | };
46 |
47 | #endif // FRIEND_H
48 |
--------------------------------------------------------------------------------
/TcpClient/icon/dir.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/TcpClient/icon/dir.jpg
--------------------------------------------------------------------------------
/TcpClient/icon/reg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/TcpClient/icon/reg.jpg
--------------------------------------------------------------------------------
/TcpClient/main.cpp:
--------------------------------------------------------------------------------
1 | #include "tcpclient.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | TcpClient::getInstance().show();
8 | return a.exec();
9 | }
10 |
--------------------------------------------------------------------------------
/TcpClient/online.cpp:
--------------------------------------------------------------------------------
1 | #include "online.h"
2 | #include "ui_online.h"
3 | #include
4 | #include "tcpclient.h"
5 |
6 | Online::Online(QWidget *parent) :
7 | QWidget(parent),
8 | ui(new Ui::Online)
9 | {
10 | ui->setupUi(this);
11 | }
12 |
13 | Online::~Online()
14 | {
15 | delete ui;
16 | }
17 |
18 | // 将所有的在线用户的用户名显示在UI界面上
19 | void Online::showUsr(PDU *pdu)
20 | {
21 | if(NULL == pdu)
22 | {
23 | return;
24 | }
25 | uint uiSize = pdu->uiMsgLen / 32;
26 | char caTmp[32];
27 | for(uint i = 0;i < uiSize;i++)
28 | {
29 | memcpy(caTmp,(char*)pdu->caMsg + i * 32,32);
30 | ui->online_lw->addItem(caTmp);
31 | }
32 | }
33 |
34 | // 加好友功能实现
35 | void Online::on_addFriend_pb_clicked()
36 | {
37 | QListWidgetItem *pItem = ui->online_lw->currentItem();
38 | QString strPerUsrName = pItem->text();
39 | QString strLoginName = TcpClient::getInstance().loginName();
40 | PDU *pdu = mkPDU(0);
41 | pdu->uiMsgType = ENUM_MSG_TYPE_ADD_FRIEND_REQUEST;
42 | memcpy(pdu->caData,strPerUsrName.toStdString().c_str(),strPerUsrName.size());
43 | memcpy(pdu->caData + 32,strLoginName.toStdString().c_str(),strLoginName.size());
44 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
45 | free(pdu);
46 | pdu = NULL;
47 | }
48 |
--------------------------------------------------------------------------------
/TcpClient/online.h:
--------------------------------------------------------------------------------
1 | #ifndef ONLINE_H
2 | #define ONLINE_H
3 |
4 | #include
5 | #include "protocol.h"
6 |
7 | namespace Ui {
8 | class Online;
9 | }
10 |
11 | class Online : public QWidget
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | explicit Online(QWidget *parent = nullptr);
17 | ~Online();
18 | void showUsr(PDU *pdu);
19 |
20 | private slots:
21 | void on_addFriend_pb_clicked();
22 |
23 | private:
24 | Ui::Online *ui;
25 | };
26 |
27 | #endif // ONLINE_H
28 |
--------------------------------------------------------------------------------
/TcpClient/online.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Online
4 |
5 |
6 |
7 | 0
8 | 0
9 | 645
10 | 470
11 |
12 |
13 |
14 | Form
15 |
16 |
17 | -
18 |
19 |
-
20 |
21 |
22 |
23 | 16
24 |
25 |
26 |
27 |
28 | -
29 |
30 |
-
31 |
32 |
33 | Qt::Vertical
34 |
35 |
36 |
37 | 20
38 | 98
39 |
40 |
41 |
42 |
43 | -
44 |
45 |
46 |
47 | Adobe 宋体 Std L
48 | 24
49 |
50 |
51 |
52 | 加好友
53 |
54 |
55 |
56 | -
57 |
58 |
59 | Qt::Vertical
60 |
61 |
62 |
63 | 20
64 | 98
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/TcpClient/opewidget.cpp:
--------------------------------------------------------------------------------
1 | #include "opewidget.h"
2 |
3 | // 操作主界面UI
4 | OpeWidget::OpeWidget(QWidget *parent) : QWidget(parent)
5 | {
6 | m_pListW = new QListWidget(this);
7 | m_pListW->addItem("好友");
8 | m_pListW->addItem("图书");
9 | m_pFriend = new Friend;
10 | m_pBook = new Book;
11 | m_pSW = new QStackedWidget;
12 | m_pSW->addWidget(m_pFriend);
13 | m_pSW->addWidget(m_pBook);
14 | QHBoxLayout *pMain = new QHBoxLayout;
15 | pMain->addWidget(m_pListW);
16 | pMain->addWidget(m_pSW);
17 | setLayout(pMain);
18 | connect(m_pListW,SIGNAL(currentRowChanged(int)),m_pSW,SLOT(setCurrentIndex(int)));
19 | }
20 |
21 | // 生成OpeWidget实例对象
22 | OpeWidget &OpeWidget::getInstance()
23 | {
24 | static OpeWidget instance;
25 | return instance;
26 | }
27 |
28 | // 返回当前好友的操作对象
29 | Friend *OpeWidget::getFriend()
30 | {
31 | return m_pFriend;
32 | }
33 |
34 | // 获取图书对象
35 | Book *OpeWidget::getBook()
36 | {
37 | return m_pBook;
38 | }
39 |
--------------------------------------------------------------------------------
/TcpClient/opewidget.h:
--------------------------------------------------------------------------------
1 | #ifndef OPEWIDGET_H
2 | #define OPEWIDGET_H
3 |
4 | #include
5 | #include
6 | #include "friend.h"
7 | #include "book.h"
8 | #include
9 |
10 | class OpeWidget : public QWidget
11 | {
12 | Q_OBJECT
13 | public:
14 | explicit OpeWidget(QWidget *parent = nullptr);
15 | static OpeWidget &getInstance();
16 | Friend *getFriend();
17 | Book *getBook();
18 |
19 | signals:
20 |
21 | private:
22 | QListWidget *m_pListW;
23 | Friend *m_pFriend;
24 | Book *m_pBook;
25 | QStackedWidget *m_pSW;
26 | };
27 |
28 | #endif // OPEWIDGET_H
29 |
--------------------------------------------------------------------------------
/TcpClient/privatechat.cpp:
--------------------------------------------------------------------------------
1 | #include "privatechat.h"
2 | #include "ui_privatechat.h"
3 | #include "protocol.h"
4 | #include "tcpclient.h"
5 | #include
6 |
7 | PrivateChat::PrivateChat(QWidget *parent) :
8 | QWidget(parent),
9 | ui(new Ui::PrivateChat)
10 | {
11 | ui->setupUi(this);
12 | }
13 |
14 | PrivateChat::~PrivateChat()
15 | {
16 | delete ui;
17 | }
18 |
19 | // 用单例返回此对象
20 | PrivateChat &PrivateChat::getInstance()
21 | {
22 | static PrivateChat instance;
23 | return instance;
24 | }
25 |
26 | // 保存聊天用户的用户名
27 | void PrivateChat::setChatName(QString strName)
28 | {
29 | m_strChatName = strName;
30 | m_strLoginName = TcpClient::getInstance().loginName();
31 | }
32 |
33 | // 更新聊天框口信息
34 | void PrivateChat::updateMsg(const PDU *pdu)
35 | {
36 | if(NULL == pdu)
37 | {
38 | return;
39 | }
40 | char caSendName[32] = {'\0'};
41 | memcpy(caSendName,pdu->caData,32);
42 | QString strMsg = QString("%1 says: %2").arg(caSendName).arg((char*)(pdu->caMsg));
43 | ui->showMsg_te->append(strMsg);
44 | }
45 |
46 | // 点击“发送”按钮后发送聊天信息
47 | void PrivateChat::on_sendMsg_pb_clicked()
48 | {
49 | QString strMsg = ui->inputMsg_le->text();
50 | ui->inputMsg_le->clear();
51 | if(!strMsg.isEmpty())
52 | {
53 | PDU *pdu = mkPDU(strMsg.size() + 1);
54 | pdu->uiMsgType = ENUM_MSG_TYPE_PRIVATE_CHAT_REQUEST;
55 | memcpy(pdu->caData,m_strLoginName.toStdString().c_str(),m_strLoginName.size());
56 | memcpy(pdu->caData + 32,m_strChatName.toStdString().c_str(),m_strChatName.size());
57 | strcpy((char*)(pdu->caMsg),strMsg.toStdString().c_str());
58 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
59 | free(pdu);
60 | pdu = NULL;
61 | }
62 | else
63 | {
64 | QMessageBox::warning(this,"私聊","发送的聊天信息不能为空");
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/TcpClient/privatechat.h:
--------------------------------------------------------------------------------
1 | #ifndef PRIVATECHAT_H
2 | #define PRIVATECHAT_H
3 |
4 | #include
5 | #include "protocol.h"
6 |
7 | namespace Ui {
8 | class PrivateChat;
9 | }
10 |
11 | class PrivateChat : public QWidget
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | explicit PrivateChat(QWidget *parent = nullptr);
17 | ~PrivateChat();
18 | static PrivateChat &getInstance();
19 | void setChatName(QString strName);
20 | void updateMsg(const PDU *pdu);
21 |
22 | private slots:
23 | void on_sendMsg_pb_clicked();
24 |
25 | private:
26 | Ui::PrivateChat *ui;
27 | QString m_strChatName;
28 | QString m_strLoginName;
29 | };
30 |
31 | #endif // PRIVATECHAT_H
32 |
--------------------------------------------------------------------------------
/TcpClient/privatechat.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | PrivateChat
4 |
5 |
6 |
7 | 0
8 | 0
9 | 545
10 | 383
11 |
12 |
13 |
14 | Form
15 |
16 |
17 | -
18 |
19 |
-
20 |
21 |
22 |
23 | Adobe 宋体 Std L
24 | 24
25 |
26 |
27 |
28 |
29 | -
30 |
31 |
-
32 |
33 |
34 |
35 | Adobe 宋体 Std L
36 | 24
37 |
38 |
39 |
40 |
41 | -
42 |
43 |
44 |
45 | Adobe 宋体 Std L
46 | 24
47 |
48 |
49 |
50 | 发送
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/TcpClient/protocol.cpp:
--------------------------------------------------------------------------------
1 | #include "protocol.h"
2 |
3 | // 动态申请PDU协议空间
4 | PDU *mkPDU(uint uiMsgLen)
5 | {
6 | uint uiPDULen = sizeof(PDU) + uiMsgLen;
7 | PDU *pdu = (PDU*)malloc(uiPDULen);
8 | if(NULL == pdu)
9 | {
10 | exit(EXIT_FAILURE);
11 | }
12 | memset(pdu,0,uiPDULen);
13 | pdu->uiPDULen = uiPDULen;
14 | pdu->uiMsgLen = uiMsgLen;
15 | return pdu;
16 | }
17 |
--------------------------------------------------------------------------------
/TcpClient/protocol.h:
--------------------------------------------------------------------------------
1 | #ifndef PROTOCOL_H
2 | #define PROTOCOL_H
3 | #include
4 | #include
5 | #include
6 |
7 | typedef unsigned int uint;
8 |
9 | // 消息回复类型
10 | #define REGIST_OK "regist ok"
11 | #define REGIST_FAILED "regist failed : name existed"
12 | #define LOGIN_OK "login ok"
13 | #define LOGIN_FAILED "login failed : name error or pwd error or relogin"
14 | #define SEARCH_USR_NO "no such people"
15 | #define SEARCH_USR_ONLINE "online"
16 | #define SEARCH_USR_OFFLINE "offline"
17 | #define UNKNOW_ERROR "unknow error"
18 | #define EXISTED_FRIEND "friend exist"
19 | #define ADD_FRIEND_OFFLINE "usr offline"
20 | #define ADD_FRIEND_NO_EXIST "usr not exist"
21 | #define DEL_FRIEND_OK "delete friend ok"
22 | #define DIR_NO_EXIST "cur dir not exist"
23 | #define FILE_NAME_EXIST "file name exist"
24 | #define CREAT_DIR_OK "create dir ok"
25 | #define DEL_DIR_OK "delete dir ok"
26 | #define DEL_DIR_FAILURED "delete dir failured: is reguler file"
27 | #define RENAME_FILE_OK "rename file ok"
28 | #define RENAME_FILE_FAILURED "rename file failured"
29 | #define ENTER_DIR_FAILURED "enter dir failured: is reguler file"
30 | #define DEL_FILE_OK "delete file ok"
31 | #define DEL_FILE_FAILURED "delete file failured: is diretory"
32 | #define UPLOAD_FILE_OK "upload file ok"
33 | #define UPLOAD_FILE_FAILURED "upload file failured"
34 | #define MOVE_FILE_OK "move file ok"
35 | #define MOVE_FILE_FAILURED "move file failured:is reguler file"
36 | #define COMMON_ERR "operate failed: system is busy"
37 |
38 | // 消息类型枚举
39 | enum ENUM_MSG_TYPE
40 | {
41 | ENUM_MSG_TYPE_MIN = 0,
42 | ENUM_MSG_TYPE_REGIST_REQUEST, // 注册请求
43 | ENUM_MSG_TYPE_REGIST_RESPOND, // 注册回复
44 | ENUM_MSG_TYPE_LOGIN_REQUEST, // 登录请求
45 | ENUM_MSG_TYPE_LOGIN_RESPOND, // 登录回复
46 | ENUM_MSG_TYPE_ALL_ONLINE_REQUEST, // 在线用户请求
47 | ENUM_MSG_TYPE_ALL_ONLINE_RESPOND, // 在线用户回复
48 | ENUM_MSG_TYPE_SEARCH_USR_REQUEST, // 搜索用户请求
49 | ENUM_MSG_TYPE_SEARCH_USR_RESPOND, // 搜索用户回复
50 | ENUM_MSG_TYPE_ADD_FRIEND_REQUEST, // 添加好友请求
51 | ENUM_MSG_TYPE_ADD_FRIEND_RESPOND, // 添加好友回复
52 | ENUM_MSG_TYPE_ADD_FRIEND_AGGREE, // 同意添加好友
53 | ENUM_MSG_TYPE_ADD_FRIEND_REFUSE, // 拒绝添加好友
54 | ENUM_MSG_TYPE_FLUSH_FRIEND_REQUEST, // 刷新好友请求
55 | ENUM_MSG_TYPE_FLUSH_FRIEND_RESPOND, // 刷新好友回复
56 | ENUM_MSG_TYPE_DELETE_FRIEND_REQUEST, // 删除好友请求
57 | ENUM_MSG_TYPE_DELETE_FRIEND_RESPOND, // 删除好友回复
58 | ENUM_MSG_TYPE_PRIVATE_CHAT_REQUEST, // 私聊请求
59 | ENUM_MSG_TYPE_PRIVATE_CHAT_RESPOND, // 私聊回复
60 | ENUM_MSG_TYPE_GROUP_CHAT_REQUEST, // 群聊请求
61 | ENUM_MSG_TYPE_GROUP_CHAT_RESPOND, // 群聊回复
62 | ENUM_MSG_TYPE_CREATE_DIR_REQUEST, // 创建文件夹请求
63 | ENUM_MSG_TYPE_CREATE_DIR_RESPOND, // 创建文件夹回复
64 | ENUM_MSG_TYPE_FLUSH_FILE_REQUEST, // 刷新文件请求
65 | ENUM_MSG_TYPE_FLUSH_FILE_RESPOND, // 刷新文件回复
66 | ENUM_MSG_TYPE_DEL_DIR_REQUEST, // 删除目录请求
67 | ENUM_MSG_TYPE_DEL_DIR_RESPOND, // 删除目录回复
68 | ENUM_MSG_TYPE_RENAME_FILE_REQUEST, // 重命名文件请求
69 | ENUM_MSG_TYPE_RENAME_FILE_RESPOND, // 重命名文件回复
70 | ENUM_MSG_TYPE_ENTER_DIR_REQUEST, // 进入文件夹请求
71 | ENUM_MSG_TYPE_ENTER_DIR_RESPOND, // 进入文件夹回复
72 | ENUM_MSG_TYPE_DEL_FILE_REQUEST, // 删除常规文件请求
73 | ENUM_MSG_TYPE_DEL_FILE_RESPOND, // 删除常规文件回复
74 | ENUM_MSG_TYPE_UPLOAD_FILE_REQUEST, // 上传文件请求
75 | ENUM_MSG_TYPE_UPLOAD_FILE_RESPOND, // 上传文件回复
76 | ENUM_MSG_TYPE_DOWNLOAD_FILE_REQUEST, // 下载文件请求
77 | ENUM_MSG_TYPE_DOWNLOAD_FILE_RESPOND, // 下载文件回复
78 | ENUM_MSG_TYPE_SHARE_FILE_REQUEST, // 共享文件请求
79 | ENUM_MSG_TYPE_SHARE_FILE_RESPOND, // 共享文件回复
80 | ENUM_MSG_TYPE_SHARE_FILE_NOTE_REQUEST, // 共享文件记录请求
81 | ENUM_MSG_TYPE_SHARE_FILE_NOTE_RESPOND, // 共享文件记录回复
82 | ENUM_MSG_TYPE_MOVE_FILE_REQUEST, // 移动文件请求
83 | ENUM_MSG_TYPE_MOVE_FILE_RESPOND, // 移动文件回复
84 | ENUM_MSG_TYPE_MAX = 0x00ffffff,
85 | };
86 |
87 | // 文件信息结构体
88 | struct FileInfo
89 | {
90 | char caFileName[32]; // 文件名字
91 | int iFileType; // 文件类型
92 | };
93 |
94 | struct PDU
95 | {
96 | uint uiPDULen; // 总的协议数据单元大小
97 | uint uiMsgType; // 消息类型
98 | char caData[64]; // 文件名
99 | uint uiMsgLen; // 实际消息长度
100 | int caMsg[]; // 实际消息
101 | };
102 |
103 | PDU *mkPDU(uint uiMsgLen);
104 |
105 | #endif // PROTOCOL_H
106 |
--------------------------------------------------------------------------------
/TcpClient/sharefile.cpp:
--------------------------------------------------------------------------------
1 | #include "sharefile.h"
2 | #include "tcpclient.h"
3 | #include "opewidget.h"
4 |
5 | ShareFile::ShareFile(QWidget *parent) : QWidget(parent)
6 | {
7 | m_pSelectAllPB = new QPushButton("全选");
8 | m_pCancelSelectPB = new QPushButton("取消选择");
9 | m_pOKPB = new QPushButton("确定");
10 | m_pCancelPB = new QPushButton("取消");
11 | m_pSA = new QScrollArea;
12 | m_pFriendW = new QWidget;
13 | m_pFriendWVBL = new QVBoxLayout(m_pFriendW);
14 | m_pButtonGroup = new QButtonGroup(m_pFriendW);
15 | m_pButtonGroup->setExclusive(false);
16 | QHBoxLayout *pTopHBL = new QHBoxLayout;
17 | pTopHBL->addWidget(m_pSelectAllPB);
18 | pTopHBL->addWidget(m_pCancelSelectPB);
19 | pTopHBL->addStretch();
20 | QHBoxLayout *pDownHBL = new QHBoxLayout;
21 | pDownHBL->addWidget(m_pOKPB);
22 | pDownHBL->addWidget(m_pCancelPB);
23 | QVBoxLayout *pMainVBL = new QVBoxLayout;
24 | pMainVBL->addLayout(pTopHBL);
25 | pMainVBL->addWidget(m_pSA);
26 | pMainVBL->addLayout(pDownHBL);
27 | setLayout(pMainVBL);
28 | connect(m_pCancelSelectPB,SIGNAL(clicked(bool)),this,SLOT(cancelSelect()));
29 | connect(m_pSelectAllPB,SIGNAL(clicked(bool)),this,SLOT(selectAll()));
30 | connect(m_pOKPB,SIGNAL(clicked(bool)),this,SLOT(okShare()));
31 | connect(m_pCancelPB,SIGNAL(clicked(bool)),this,SLOT(cancelShare()));
32 | }
33 |
34 | // 返回对象的单例
35 | ShareFile &ShareFile::getInstance()
36 | {
37 | static ShareFile instance;
38 | return instance;
39 | }
40 |
41 | // 更新当前用户的好友列表
42 | void ShareFile::updateFriend(QListWidget *pFriendList)
43 | {
44 | if(NULL == pFriendList)
45 | {
46 | return;
47 | }
48 | QAbstractButton* temp = NULL;
49 | QList preFriendList = m_pButtonGroup->buttons();
50 | for(int i = 0;iremoveWidget(temp);
54 | m_pButtonGroup->removeButton(temp);
55 | preFriendList.removeOne(temp);
56 | delete temp;
57 | temp = NULL;
58 | }
59 | QCheckBox *pCB = NULL;
60 | for(int i = 0;icount();i++)
61 | {
62 | pCB = new QCheckBox(pFriendList->item(i)->text());
63 | m_pFriendWVBL->addWidget(pCB);
64 | m_pButtonGroup->addButton(pCB);
65 | }
66 | m_pSA->setWidget(m_pFriendW);
67 | }
68 |
69 | // 取消选择
70 | void ShareFile::cancelSelect()
71 | {
72 | QList cbList = m_pButtonGroup->buttons();
73 | for(int i = 0;iisChecked())
76 | {
77 | cbList[i]->setChecked(false);
78 | }
79 | }
80 | }
81 |
82 | // 全选
83 | void ShareFile::selectAll()
84 | {
85 | QList cbList = m_pButtonGroup->buttons();
86 | for(int i = 0;iisChecked())
89 | {
90 | cbList[i]->setChecked(true);
91 | }
92 | }
93 | }
94 |
95 | // 取消
96 | void ShareFile::cancelShare()
97 | {
98 | hide();
99 | }
100 |
101 | // 确定
102 | void ShareFile::okShare()
103 | {
104 | QString strName = TcpClient::getInstance().loginName();
105 | QString strCurPath = TcpClient::getInstance().curPath();
106 | QString strShareFileName = OpeWidget::getInstance().getBook()->getShareFileName();
107 | QString strPath = strCurPath + "/" + strShareFileName;
108 | QList cbList = m_pButtonGroup->buttons();
109 | int num = 0;
110 | for(int i = 0;iisChecked())
113 | {
114 | num++;
115 | }
116 | }
117 | PDU *pdu = mkPDU(32 * num + strPath.size() + 1);
118 | pdu->uiMsgType = ENUM_MSG_TYPE_SHARE_FILE_REQUEST;
119 | sprintf(pdu->caData,"%s %d",strName.toStdString().c_str(),num);
120 | int j = 0;
121 | for(int i = 0;iisChecked())
124 | {
125 | memcpy((char*)(pdu->caMsg) + j * 32,cbList[i]->text().toStdString().c_str(),cbList[i]->text().size());
126 | j++;
127 | }
128 | }
129 | memcpy((char*)(pdu->caMsg) + num * 32,strPath.toStdString().c_str(),strPath.size());
130 | TcpClient::getInstance().getTcpSocket().write((char*)pdu,pdu->uiPDULen);
131 | free(pdu);
132 | pdu = NULL;
133 | }
134 |
--------------------------------------------------------------------------------
/TcpClient/sharefile.h:
--------------------------------------------------------------------------------
1 | #ifndef SHAREFILE_H
2 | #define SHAREFILE_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | class ShareFile : public QWidget
14 | {
15 | Q_OBJECT
16 | public:
17 | explicit ShareFile(QWidget *parent = nullptr);
18 | static ShareFile &getInstance();
19 | void updateFriend(QListWidget *pFriendList);
20 |
21 | signals:
22 |
23 | public slots:
24 | void cancelSelect();
25 | void selectAll();
26 | void okShare();
27 | void cancelShare();
28 |
29 |
30 | private:
31 | QPushButton *m_pSelectAllPB;
32 | QPushButton *m_pCancelSelectPB;
33 | QPushButton *m_pOKPB;
34 | QPushButton *m_pCancelPB;
35 | QScrollArea *m_pSA;
36 | QWidget *m_pFriendW;
37 | QVBoxLayout *m_pFriendWVBL;
38 | QButtonGroup *m_pButtonGroup;
39 | };
40 |
41 | #endif // SHAREFILE_H
42 |
--------------------------------------------------------------------------------
/TcpClient/tcpclient.cpp:
--------------------------------------------------------------------------------
1 | #include "tcpclient.h"
2 | #include "ui_tcpclient.h"
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include "opewidget.h"
8 | #include "privatechat.h"
9 |
10 | TcpClient::TcpClient(QWidget *parent) : QWidget(parent), ui(new Ui::TcpClient)
11 | {
12 | ui->setupUi(this);
13 | loadConfig();
14 | connect(&m_tcpSockey,SIGNAL(connected()),this,SLOT(showConnect()));
15 | connect(&m_tcpSockey,SIGNAL(readyRead()),this,SLOT(recvMsg()));
16 | // 连接服务器
17 | m_tcpSockey.connectToHost(QHostAddress(m_strIP),m_usPort);
18 | }
19 |
20 | TcpClient::~TcpClient()
21 | {
22 | delete ui;
23 | }
24 |
25 | // 加载配置文件
26 | void TcpClient::loadConfig()
27 | {
28 | QFile file(":/client.config");
29 | if(file.open(QIODevice::ReadOnly))
30 | {
31 | QByteArray baData = file.readAll();
32 | QString strData = baData.toStdString().c_str();
33 | strData.replace("\r\n"," ");
34 | QStringList strList = strData.split(" ");
35 | m_strIP = strList.at(0);
36 | m_usPort = strList.at(1).toUShort();
37 | qDebug() << "IP地址为:" << m_strIP << "端口为:" << m_usPort;
38 | file.close();
39 | }
40 | else
41 | {
42 | QMessageBox::critical(this,"open config","open config failed");
43 | }
44 | }
45 |
46 |
47 | // 返回TcpClient实例对象
48 | TcpClient &TcpClient::getInstance()
49 | {
50 | static TcpClient instance;
51 | return instance;
52 | }
53 |
54 | // 获取TcpSocket
55 | QTcpSocket &TcpClient::getTcpSocket()
56 | {
57 | return m_tcpSockey;
58 | }
59 |
60 | // 获取当前登录用户的用户名
61 | QString TcpClient::loginName()
62 | {
63 | return m_strLoginName;
64 | }
65 |
66 | // 返回当前文件夹目录
67 | QString TcpClient::curPath()
68 | {
69 | return m_strCurPath;
70 | }
71 |
72 | // 设置当前目录位置
73 | void TcpClient::setCurPath(QString strCurPath)
74 | {
75 | m_strCurPath = strCurPath;
76 | }
77 |
78 | // 获取和服务器连接结果
79 | void TcpClient::showConnect()
80 | {
81 | QMessageBox::information(this,"连接服务器","连接服务器成功");
82 | }
83 |
84 | # if 0
85 | // 发送点击事件
86 | void TcpClient::on_send_pd_clicked()
87 | {
88 | QString strMsg = ui->lineEdit->text();
89 | if(!strMsg.isEmpty())
90 | {
91 | PDU *pdu = mkPDU(strMsg.size());
92 | pdu->uiMsgType = 8888;
93 | memcpy(pdu->caMsg,strMsg.toStdString().c_str(),strMsg.size());
94 | m_tcpSockey.write((char*)pdu,pdu->uiPDULen);
95 | free(pdu);
96 | pdu = NULL;
97 | }
98 | else
99 | {
100 | QMessageBox::warning(this,"信息发送","发送的信息不能为空");
101 | }
102 | }
103 | # endif
104 |
105 | // 登录事件
106 | void TcpClient::on_login_pb_clicked()
107 | {
108 | QString strName = ui->name_le->text();
109 | QString strPwd = ui->pwd_le->text();
110 | if(!strName.isNull() && !strPwd.isNull())
111 | {
112 | m_strLoginName = strName;
113 | PDU *pdu = mkPDU(0);
114 | pdu->uiMsgType = ENUM_MSG_TYPE_LOGIN_REQUEST;
115 | strncpy(pdu->caData,strName.toStdString().c_str(),32);
116 | strncpy(pdu->caData + 32,strName.toStdString().c_str(),32);
117 | m_tcpSockey.write((char*)pdu,pdu->uiPDULen);
118 | free(pdu);
119 | pdu = NULL;
120 | }
121 | else
122 | {
123 | QMessageBox::critical(this,"登录","登录失败:用户名或密码为空");
124 | }
125 | }
126 |
127 | // 注册事件
128 | void TcpClient::on_regist_pb_clicked()
129 | {
130 | QString strName = ui->name_le->text();
131 | QString strPwd = ui->pwd_le->text();
132 | if(!strName.isNull() && !strPwd.isNull())
133 | {
134 | PDU *pdu = mkPDU(0);
135 | pdu->uiMsgType = ENUM_MSG_TYPE_REGIST_REQUEST;
136 | strncpy(pdu->caData,strName.toStdString().c_str(),32);
137 | strncpy(pdu->caData + 32,strName.toStdString().c_str(),32);
138 | m_tcpSockey.write((char*)pdu,pdu->uiPDULen);
139 | free(pdu);
140 | pdu = NULL;
141 | }
142 | else
143 | {
144 | QMessageBox::critical(this,"注册","注册失败:用户名或密码为空");
145 | }
146 | }
147 |
148 | // 注销事件
149 | void TcpClient::on_cancel_pb_clicked()
150 | {
151 |
152 | }
153 |
154 | // 接收服务器信息
155 | void TcpClient::recvMsg()
156 | {
157 | if(!OpeWidget::getInstance().getBook()->getDownloadStatus())
158 | {
159 | qDebug() << m_tcpSockey.bytesAvailable();
160 | uint uiPDULen = 0;
161 | m_tcpSockey.read((char*)&uiPDULen,sizeof(uint));
162 | uint uiMsgLen = uiPDULen - sizeof(PDU);
163 | PDU *pdu = mkPDU(uiMsgLen);
164 | m_tcpSockey.read((char*)pdu+sizeof(uint),uiPDULen-sizeof(uint));
165 | switch (pdu->uiMsgType)
166 | {
167 | // 注册回复
168 | case ENUM_MSG_TYPE_REGIST_RESPOND:
169 | {
170 | if(0 == strcmp(pdu->caData,REGIST_OK))
171 | {
172 | QMessageBox::information(this,"注册",REGIST_OK);
173 | }
174 | else if(0 == strcmp(pdu->caData,REGIST_FAILED))
175 | {
176 | QMessageBox::warning(this,"注册",REGIST_FAILED);
177 | }
178 | break;
179 | }
180 | // 登录回复
181 | case ENUM_MSG_TYPE_LOGIN_RESPOND:
182 | {
183 | if(0 == strcmp(pdu->caData,LOGIN_OK))
184 | {
185 | m_strCurPath = QString("./%1").arg(m_strLoginName);
186 | QMessageBox::information(this,"登录",LOGIN_OK);
187 | OpeWidget::getInstance().show();
188 | this->hide();
189 | }
190 | else if(0 == strcmp(pdu->caData,LOGIN_FAILED))
191 | {
192 | QMessageBox::warning(this,"登录",LOGIN_FAILED);
193 | }
194 | break;
195 | }
196 | // 查看在线用户回复
197 | case ENUM_MSG_TYPE_ALL_ONLINE_RESPOND:
198 | {
199 | OpeWidget::getInstance().getFriend()->showAllOnlineUsr(pdu);
200 | break;
201 | }
202 | // 查看查找用户回复
203 | case ENUM_MSG_TYPE_SEARCH_USR_RESPOND:
204 | {
205 | if(0 == strcmp(SEARCH_USR_NO,pdu->caData))
206 | {
207 | QMessageBox::information(this, "搜索", QString("%1: not exist").arg(OpeWidget::getInstance().getFriend()->m_strSearchName));
208 | }
209 | else if(0 == strcmp(SEARCH_USR_ONLINE,pdu->caData))
210 | {
211 | QMessageBox::information(this,"搜索",QString("%1: online").arg(OpeWidget::getInstance().getFriend()->m_strSearchName));
212 | }
213 | else if(0 == strcmp(SEARCH_USR_OFFLINE,pdu->caData))
214 | {
215 | QMessageBox::information(this,"搜索",QString("%1: offline").arg(OpeWidget::getInstance().getFriend()->m_strSearchName));
216 | }
217 | break;
218 | }
219 | // 查看添加好友回复
220 | case ENUM_MSG_TYPE_ADD_FRIEND_REQUEST:
221 | {
222 | char caName[32] = {'\0'};
223 | strncpy(caName,pdu->caData+32,32);
224 | qDebug() << "添加好友";
225 | int res = QMessageBox::information(this,"添加好友",QString("%1 wang to add you as friend").arg(caName),QMessageBox::Yes,QMessageBox::No);
226 | qDebug() << "结果为:" << res;
227 | PDU *respdu = mkPDU(0);
228 | memcpy(respdu->caData,pdu->caData,64);
229 | if(res == QMessageBox::Yes)
230 | {
231 | respdu->uiMsgType = ENUM_MSG_TYPE_ADD_FRIEND_AGGREE;
232 | }
233 | else
234 | {
235 | respdu->uiMsgType = ENUM_MSG_TYPE_ADD_FRIEND_REFUSE;
236 | }
237 | m_tcpSockey.write((char*)respdu,respdu->uiPDULen);
238 | free(respdu);
239 | respdu = NULL;
240 | break;
241 | }
242 | case ENUM_MSG_TYPE_ADD_FRIEND_RESPOND:
243 | {
244 | QMessageBox::information(this,"添加好友",pdu->caData);
245 | break;
246 | }
247 | case ENUM_MSG_TYPE_ADD_FRIEND_AGGREE:
248 | {
249 | char caPerName[32] = {'\0'};
250 | memcpy(caPerName, pdu->caData, 32);
251 | QMessageBox::information(this, "添加好友", QString("添加%1好友成功").arg(caPerName));
252 | break;
253 | }
254 | case ENUM_MSG_TYPE_ADD_FRIEND_REFUSE:
255 | {
256 | char caPerName[32] = {'\0'};
257 | memcpy(caPerName, pdu->caData, 32);
258 | QMessageBox::information(this, "添加好友", QString("添加%1好友失败").arg(caPerName));
259 | break;
260 | }
261 | // 查看刷新在线好友列表回复
262 | case ENUM_MSG_TYPE_FLUSH_FRIEND_RESPOND:
263 | {
264 | OpeWidget::getInstance().getFriend()->updateFriendList(pdu);
265 | break;
266 | }
267 | // 查看删除好友回复
268 | case ENUM_MSG_TYPE_DELETE_FRIEND_REQUEST:
269 | {
270 | char caName[32] = {'\0'};
271 | memcpy(caName,pdu->caData,32);
272 | QMessageBox::information(this,"删除好友",QString("%1删除你作为他的好友").arg(caName));
273 | break;
274 | }
275 | case ENUM_MSG_TYPE_DELETE_FRIEND_RESPOND:
276 | {
277 | QMessageBox::information(this,"删除好友","删除好友成功");
278 | break;
279 | }
280 | // 查看私聊回复
281 | case ENUM_MSG_TYPE_PRIVATE_CHAT_REQUEST:
282 | {
283 | if(PrivateChat::getInstance().isHidden())
284 | {
285 | PrivateChat::getInstance().show();
286 | }
287 | char caSendName[32] = {'\0'};
288 | memcpy(caSendName,pdu->caData,32);
289 | QString strSendName = caSendName;
290 | PrivateChat::getInstance().setChatName(caSendName);
291 | PrivateChat::getInstance().updateMsg(pdu);
292 | break;
293 | }
294 | // 查看群聊回复
295 | case ENUM_MSG_TYPE_GROUP_CHAT_REQUEST:
296 | {
297 | OpeWidget::getInstance().getFriend()->updateGroupMsg(pdu);
298 | break;
299 | }
300 | // 查看创建文件夹回复
301 | case ENUM_MSG_TYPE_CREATE_DIR_RESPOND:
302 | {
303 | QMessageBox::information(this,"创建文件",pdu->caData);
304 | break;
305 | }
306 | // 查看查看所有文件回复
307 | case ENUM_MSG_TYPE_FLUSH_FILE_RESPOND:
308 | {
309 | OpeWidget::getInstance().getBook()->updateFileList(pdu);
310 | QString strEnterDir = OpeWidget::getInstance().getBook()->enterDir();
311 | if(!strEnterDir.isEmpty())
312 | {
313 | m_strCurPath = m_strCurPath + "/" + strEnterDir;
314 | }
315 | break;
316 | }
317 | // 查看删除文件夹回复
318 | case ENUM_MSG_TYPE_DEL_DIR_RESPOND:
319 | {
320 | QMessageBox::information(this,"删除文件夹",pdu->caData);
321 | break;
322 | }
323 | // 查看重命名文件回复
324 | case ENUM_MSG_TYPE_RENAME_FILE_RESPOND:
325 | {
326 | QMessageBox::information(this,"重命名文件",pdu->caData);
327 | break;
328 | }
329 | // 查看进入文件夹回复
330 | case ENUM_MSG_TYPE_ENTER_DIR_RESPOND:
331 | {
332 | OpeWidget::getInstance().getBook()->clearEnterDir();
333 | QMessageBox::information(this,"进入文件夹",pdu->caData);
334 | break;
335 | }
336 | // 查看上传文件回复
337 | case ENUM_MSG_TYPE_UPLOAD_FILE_RESPOND:
338 | {
339 | QMessageBox::information(this,"上传文件",pdu->caData);
340 | break;
341 | }
342 | // 查看删除文件回复
343 | case ENUM_MSG_TYPE_DEL_FILE_RESPOND:
344 | {
345 | QMessageBox::information(this,"删除文件",pdu->caData);
346 | break;
347 | }
348 | // 查看下载文件回复
349 | case ENUM_MSG_TYPE_DOWNLOAD_FILE_RESPOND:
350 | {
351 | qDebug() << pdu->caData;
352 | char caFileName[32] = {'\0'};
353 | sscanf(pdu->caData,"%s %lld",caFileName,&(OpeWidget::getInstance().getBook()->m_iTotal));
354 | if(strlen(caFileName) > 0 && OpeWidget::getInstance().getBook()->m_iTotal > 0)
355 | {
356 | OpeWidget::getInstance().getBook()->setDownloadStatus(true);
357 | m_file.setFileName(OpeWidget::getInstance().getBook()->getSaveFilePath());
358 | if(!m_file.open(QIODevice::WriteOnly))
359 | {
360 | QMessageBox::warning(this,"下载文件","获得保存文件的路径失败");
361 | }
362 | }
363 | break;
364 | }
365 | // 查看分享文件回复
366 | case ENUM_MSG_TYPE_SHARE_FILE_RESPOND:
367 | {
368 | QMessageBox::information(this,"分享文件",pdu->caData);
369 | break;
370 | }
371 | // 查看分享文件通知请求
372 | case ENUM_MSG_TYPE_SHARE_FILE_NOTE_REQUEST:
373 | {
374 | char *pPath = new char[pdu->uiMsgLen];
375 | memcpy(pPath,pdu->caMsg,pdu->uiMsgLen);
376 | char *pos = strrchr(pPath,'/');
377 | if(NULL != pos)
378 | {
379 | pos++;
380 | QString strNote = QString("%1 share file->%2 \n Do you accept?").arg(pdu->caData).arg(pos);
381 | int res = QMessageBox::question(this,"分享文件",strNote);
382 | if(QMessageBox::Yes == res)
383 | {
384 | PDU *respdu = mkPDU(pdu->uiMsgLen);
385 | respdu->uiMsgType = ENUM_MSG_TYPE_SHARE_FILE_NOTE_RESPOND;
386 | memcpy(respdu->caMsg,pdu->caMsg,pdu->uiMsgLen);
387 | QString strName = TcpClient::getInstance().loginName();
388 | strcpy(respdu->caData,strName.toStdString().c_str());
389 | m_tcpSockey.write((char*)respdu,respdu->uiPDULen);
390 | }
391 | }
392 | break;
393 | }
394 | // 查看移动文件回复
395 | case ENUM_MSG_TYPE_MOVE_FILE_RESPOND:
396 | {
397 | QMessageBox::information(this,"移动文件",pdu->caData);
398 | break;
399 | }
400 | default:
401 | {
402 | break;
403 | }
404 | }
405 | free(pdu);
406 | pdu = NULL;
407 | }
408 | else
409 | {
410 | QByteArray buffer = m_tcpSockey.readAll();
411 | m_file.write(buffer);
412 | Book *pBook = OpeWidget::getInstance().getBook();
413 | pBook->m_iRecved += buffer.size();
414 | if (pBook->m_iTotal == pBook->m_iRecved)
415 | {
416 | m_file.close();
417 | pBook->m_iTotal = 0;
418 | pBook->m_iRecved = 0;
419 | pBook->setDownloadStatus(false);
420 | QMessageBox::information(this, "下载文件", "下载文件成功");
421 | }
422 | else if (pBook->m_iTotal < pBook->m_iRecved)
423 | {
424 | m_file.close();
425 | pBook->m_iTotal = 0;
426 | pBook->m_iRecved = 0;
427 | pBook->setDownloadStatus(false);
428 | QMessageBox::critical(this, "下载文件", "下载文件失败");
429 | }
430 | }
431 | }
432 |
--------------------------------------------------------------------------------
/TcpClient/tcpclient.h:
--------------------------------------------------------------------------------
1 | #ifndef TCPCLIENT_H
2 | #define TCPCLIENT_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include "protocol.h"
8 |
9 | QT_BEGIN_NAMESPACE
10 | namespace Ui { class TcpClient; }
11 | QT_END_NAMESPACE
12 |
13 | class TcpClient : public QWidget
14 | {
15 | Q_OBJECT
16 |
17 | public:
18 | TcpClient(QWidget *parent = nullptr);
19 | ~TcpClient();
20 | void loadConfig();
21 | static TcpClient &getInstance();
22 | QTcpSocket &getTcpSocket();
23 | QString loginName();
24 | QString curPath();
25 | void setCurPath(QString strCurPath);
26 |
27 | public slots:
28 | void showConnect();
29 |
30 | private slots:
31 | // void on_send_pd_clicked();
32 |
33 | void on_login_pb_clicked();
34 |
35 | void on_regist_pb_clicked();
36 |
37 | void on_cancel_pb_clicked();
38 |
39 | void recvMsg();
40 |
41 | private:
42 | Ui::TcpClient *ui;
43 | QString m_strIP;
44 | quint16 m_usPort;
45 | // 连接服务器,和服务器进行数据交互
46 | QTcpSocket m_tcpSockey;
47 | QString m_strLoginName;
48 | QString m_strCurPath;
49 | QFile m_file;
50 | };
51 | #endif // TCPCLIENT_H
52 |
--------------------------------------------------------------------------------
/TcpClient/tcpclient.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | TcpClient
4 |
5 |
6 |
7 | 0
8 | 0
9 | 543
10 | 356
11 |
12 |
13 |
14 |
15 | Adobe 宋体 Std L
16 | 24
17 |
18 |
19 |
20 | TcpClient
21 |
22 |
23 |
24 |
25 | 10
26 | 10
27 | 511
28 | 321
29 |
30 |
31 |
32 | -
33 |
34 |
-
35 |
36 |
37 |
38 | Adobe 宋体 Std L
39 | 24
40 |
41 |
42 |
43 | 用户名:
44 |
45 |
46 |
47 | -
48 |
49 |
50 |
51 | 20
52 |
53 |
54 |
55 |
56 |
57 |
58 | -
59 |
60 |
-
61 |
62 |
63 |
64 | 24
65 |
66 |
67 |
68 | 密 码:
69 |
70 |
71 |
72 | -
73 |
74 |
75 |
76 | 20
77 |
78 |
79 |
80 | QLineEdit::Password
81 |
82 |
83 |
84 |
85 |
86 | -
87 |
88 |
89 |
90 | Adobe 宋体 Std L
91 | 20
92 |
93 |
94 |
95 | 登录
96 |
97 |
98 |
99 | -
100 |
101 |
102 |
103 | Adobe 宋体 Std L
104 | 20
105 |
106 |
107 |
108 | 注册
109 |
110 |
111 |
112 | -
113 |
114 |
115 |
116 | Adobe 宋体 Std L
117 | 20
118 |
119 |
120 |
121 | 注销
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/TcpServer/TcpServer.pro:
--------------------------------------------------------------------------------
1 | QT += core gui network sql
2 |
3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
4 |
5 | CONFIG += c++11
6 |
7 | # The following define makes your compiler emit warnings if you use
8 | # any Qt feature that has been marked deprecated (the exact warnings
9 | # depend on your compiler). Please consult the documentation of the
10 | # deprecated API in order to know how to port your code away from it.
11 | DEFINES += QT_DEPRECATED_WARNINGS
12 |
13 | # You can also make your code fail to compile if it uses deprecated APIs.
14 | # In order to do so, uncomment the following line.
15 | # You can also select to disable deprecated APIs only up to a certain version of Qt.
16 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
17 |
18 | SOURCES += \
19 | main.cpp \
20 | mytcpserver.cpp \
21 | mytcpsocket.cpp \
22 | opedb.cpp \
23 | protocol.cpp \
24 | tcpserver.cpp
25 |
26 | HEADERS += \
27 | mytcpserver.h \
28 | mytcpsocket.h \
29 | opedb.h \
30 | protocol.h \
31 | tcpserver.h
32 |
33 | FORMS += \
34 | tcpserver.ui
35 |
36 | # Default rules for deployment.
37 | qnx: target.path = /tmp/$${TARGET}/bin
38 | else: unix:!android: target.path = /opt/$${TARGET}/bin
39 | !isEmpty(target.path): INSTALLS += target
40 |
41 | RESOURCES += \
42 | config.qrc
43 |
--------------------------------------------------------------------------------
/TcpServer/cloud.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/TcpServer/cloud.db
--------------------------------------------------------------------------------
/TcpServer/config.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | server.config
4 |
5 |
6 |
--------------------------------------------------------------------------------
/TcpServer/main.cpp:
--------------------------------------------------------------------------------
1 | #include "tcpserver.h"
2 |
3 | #include
4 | #include "opedb.h"
5 |
6 | int main(int argc, char *argv[])
7 | {
8 | QApplication a(argc, argv);
9 | OpeDB::getInstance().init();
10 | TcpServer w;
11 | w.show();
12 | return a.exec();
13 | }
14 |
--------------------------------------------------------------------------------
/TcpServer/mytcpserver.cpp:
--------------------------------------------------------------------------------
1 | #include "mytcpserver.h"
2 | #include
3 |
4 | MyTcpServer::MyTcpServer()
5 | {
6 |
7 | }
8 |
9 | MyTcpServer &MyTcpServer::getInstance()
10 | {
11 | static MyTcpServer instance;
12 | return instance;
13 | }
14 |
15 | // 接收客户端的请求
16 | void MyTcpServer::incomingConnection(qintptr handle)
17 | {
18 | qDebug() << "new client connected";
19 | MyTcpSocket *pTcpSocket = new MyTcpSocket;
20 | pTcpSocket->setSocketDescriptor(handle);
21 | m_tcpSocketList.append(pTcpSocket);
22 | connect(pTcpSocket,SIGNAL(offline(MyTcpSocket*)),this,SLOT(deleteSocket(MyTcpSocket*)));
23 | }
24 |
25 | // 将添加好友的请求转发给客户端
26 | void MyTcpServer::resend(const char *pername, PDU *pdu)
27 | {
28 | if(NULL == pername || NULL == pdu)
29 | {
30 | return;
31 | }
32 | QString strName = pername;
33 | for(int i = 0;igetName())
36 | {
37 | qDebug() << "待添加用户的用户名为:" << strName;
38 | m_tcpSocketList.at(i)->write((char*)pdu,pdu->uiPDULen);
39 | break;
40 | }
41 | }
42 | }
43 |
44 | // 删除当前登录用户的socket
45 | void MyTcpServer::deleteSocket(MyTcpSocket *mysocket)
46 | {
47 | QList::iterator iter = m_tcpSocketList.begin();
48 | for(;iter!=m_tcpSocketList.end();iter++)
49 | {
50 | if(mysocket == *iter)
51 | {
52 | delete *iter;
53 | *iter = NULL;
54 | m_tcpSocketList.erase(iter);
55 | break;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/TcpServer/mytcpserver.h:
--------------------------------------------------------------------------------
1 | #ifndef MYTCPSERVER_H
2 | #define MYTCPSERVER_H
3 | #include
4 | #include
5 | #include "mytcpsocket.h"
6 |
7 | class MyTcpServer : public QTcpServer
8 | {
9 | Q_OBJECT
10 | public:
11 | MyTcpServer();
12 | static MyTcpServer &getInstance();
13 | void incomingConnection(qintptr handle);
14 | void resend(const char *pername,PDU *pdu);
15 | public slots:
16 | void deleteSocket(MyTcpSocket *mysocket);
17 |
18 | private:
19 | QList m_tcpSocketList;
20 | };
21 |
22 | #endif // MYTCPSERVER_H
23 |
--------------------------------------------------------------------------------
/TcpServer/mytcpsocket.h:
--------------------------------------------------------------------------------
1 | #ifndef MYTCPSOCKET_H
2 | #define MYTCPSOCKET_H
3 | #include
4 | #include "protocol.h"
5 | #include "opedb.h"
6 | #include
7 | #include
8 | #include
9 |
10 | class MyTcpSocket : public QTcpSocket
11 | {
12 | Q_OBJECT;
13 | public:
14 | MyTcpSocket();
15 | QString getName();
16 | void copyDir(QString strSrcDir,QString strDestDir);
17 |
18 | signals:
19 | void offline(MyTcpSocket *mysocket);
20 | public slots:
21 | void recvMsg();
22 | void clientOffline();
23 | void sendFileToClient();
24 | private:
25 | QString m_strName;
26 | QFile m_file;
27 | qint64 m_iTotal;
28 | qint64 m_iRecved;
29 | bool m_bUpload;
30 | QTimer *m_pTimer;
31 | };
32 |
33 | #endif // MYTCPSOCKET_H
34 |
--------------------------------------------------------------------------------
/TcpServer/opedb.cpp:
--------------------------------------------------------------------------------
1 | #include "opedb.h"
2 | #include
3 | #include
4 |
5 | OpeDB::OpeDB(QObject *parent) : QObject(parent)
6 | {
7 | m_db = QSqlDatabase::addDatabase("QSQLITE");
8 |
9 | }
10 |
11 | // 生成实例
12 | OpeDB &OpeDB::getInstance()
13 | {
14 | static OpeDB instance;
15 | return instance;
16 | }
17 |
18 | // 数据库连接初始化
19 | void OpeDB::init()
20 | {
21 | m_db.setHostName("localhost");
22 | // 不同的数据库存放的位置,要更改为对应的位置
23 | m_db.setDatabaseName("D:\\Software\\C++_Code\\NetworkDiskSystem\\TcpServer\\cloud.db");
24 | if(m_db.open())
25 | {
26 | QSqlQuery query;
27 | query.exec("select * from usrInfo");
28 | while(query.next())
29 | {
30 | QString data = QString("%1,%2,%3").arg(query.value(0).toString()).arg(query.value(1).toString()).arg(query.value(2).toString());
31 | qDebug() << data;
32 | }
33 | }
34 | else
35 | {
36 | QMessageBox::critical(NULL,"打开数据库","打开数据库失败");
37 | }
38 | }
39 |
40 | // 析构函数用来关闭数据库连接
41 | OpeDB::~OpeDB()
42 | {
43 | m_db.close();
44 | }
45 |
46 | // 处理客户端的用户注册信息
47 | bool OpeDB::handleRegist(const char *name, const char *pwd)
48 | {
49 | if(NULL == name || NULL == pwd)
50 | {
51 | return false;
52 | }
53 | QString data = QString("insert into usrInfo(name,pwd) values(\'%1\',\'%2\')").arg(name).arg(pwd);
54 | QSqlQuery query;
55 | return query.exec(data);
56 | }
57 |
58 | // 处理客户端的用户登录信息
59 | bool OpeDB::handleLogin(const char *name, const char *pwd)
60 | {
61 | if(NULL == name || NULL == pwd)
62 | {
63 | return false;
64 | }
65 | QString data = QString("select * from usrInfo where name = \'%1\' and pwd = \'%2\' and online = 0").arg(name).arg(pwd);
66 | QSqlQuery query;
67 | query.exec(data);
68 | if(query.next())
69 | {
70 | data = QString("update usrInfo set online = 1 where name = \'%1\' and pwd = \'%2\'").arg(name).arg(pwd);
71 | QSqlQuery query;
72 | query.exec(data);
73 | return true;
74 | }
75 | else
76 | {
77 | return false;
78 | }
79 | }
80 |
81 | // 处理客户端的用户退出信息
82 | void OpeDB::handleOffline(const char *name)
83 | {
84 | if(NULL == name)
85 | {
86 | return;
87 | }
88 | QString data = QString("update usrInfo set online = 0 where name = \'%1\'").arg(name);
89 | QSqlQuery query;
90 | query.exec(data);
91 | }
92 |
93 | // 查询所有在线用户的用户名列表
94 | QStringList OpeDB::handleAllOnline()
95 | {
96 | QString data = QString("select name from usrInfo where online = 1");
97 | QSqlQuery query;
98 | query.exec(data);
99 | QStringList result;
100 | result.clear();
101 | while(query.next())
102 | {
103 | result.append(query.value(0).toString());
104 | }
105 | return result;
106 | }
107 |
108 | // 搜索用户
109 | int OpeDB::handleSearchUsr(const char *name)
110 | {
111 | if(NULL == name)
112 | {
113 | return -1;
114 | }
115 | QString data = QString("select online from usrInfo where name = \'%1\'").arg(name);
116 | QSqlQuery query;
117 | query.exec(data);
118 | if(query.next())
119 | {
120 | int res = query.value(0).toInt();
121 | if(1 == res)
122 | {
123 | return 1;
124 | }
125 | else if(0 == res)
126 | {
127 | return 0;
128 | }
129 | }
130 | else
131 | {
132 | return -1;
133 | }
134 | }
135 |
136 | // 查看当前用户和待添加好友之间的关系
137 | int OpeDB::handleAddFriend(const char *pername, const char *name)
138 | {
139 | if(NULL == pername || NULL == name)
140 | {
141 | return -1;
142 | }
143 | QString data = QString("select * from friend where (id = (select id from usrInfo where name=\'%1\') and friendId = (select id from usrInfo where name=\'%2\')) or (id = (select id from usrInfo where name=\'%3\') and friendId = (select id from usrInfo where name=\'%4\'))").arg(pername).arg(name).arg(name).arg(pername);
144 | qDebug() << data;
145 | QSqlQuery query;
146 | query.exec(data);
147 | if(query.next())
148 | {
149 | return 0;
150 | }
151 | else
152 | {
153 | QString data = QString("select online from usrInfo where name = \'%1\'").arg(pername);
154 | QSqlQuery query;
155 | query.exec(data);
156 | if(query.next())
157 | {
158 | int res = query.value(0).toInt();
159 | if(1 == res)
160 | {
161 | return 1;
162 | }
163 | else if(0 == res)
164 | {
165 | return 2;
166 | }
167 | }
168 | else
169 | {
170 | return 3;
171 | }
172 | }
173 | }
174 |
175 | // 在同意添加好友之后向数据库中写入相关数据
176 | void OpeDB::handleAgreeAddFriend(const char *pername, const char *name)
177 | {
178 | if (NULL == pername || NULL == name)
179 | {
180 | return;
181 | }
182 | QString data = QString("insert into friend(id, friendId) values((select id from usrInfo where name=\'%1\'), (select id from usrInfo where name=\'%2\'))").arg(pername).arg(name);
183 | QSqlQuery query;
184 | query.exec(data);
185 | }
186 |
187 | // 获取当前用户的好友列表
188 | QStringList OpeDB::handleFlushFriend(const char *name)
189 | {
190 | QStringList strFriendList;
191 | strFriendList.clear();
192 | if(NULL == name)
193 | {
194 | return strFriendList;
195 | }
196 | QString data = QString("select name from usrInfo where online=1 and id in (select id from friend where friendId=(select id from usrInfo where name=\'%1\'))").arg(name);
197 | QSqlQuery query;
198 | query.exec(data);
199 | while(query.next())
200 | {
201 | strFriendList.append(query.value(0).toString());
202 | qDebug() << query.value(0).toString();
203 | }
204 | data = QString("select name from usrInfo where online=1 and id in (select friendId from friend where id=(select id from usrInfo where name=\'%1\'))").arg(name);
205 | query.exec(data);
206 | while(query.next())
207 | {
208 | strFriendList.append(query.value(0).toString());
209 | qDebug() << query.value(0).toString();
210 | }
211 | return strFriendList;
212 | }
213 |
214 | // 数据库删除好友操作
215 | bool OpeDB::handleDelFriend(const char *name, const char *friendName)
216 | {
217 | if(NULL == name || NULL == friendName)
218 | {
219 | return false;
220 | }
221 | QString data = QString("delete from friend where id = (select id from usrInfo where name = \'%1\') and friendId = (select id from usrInfo where name = \'%2\')").arg(name).arg(friendName);
222 | QSqlQuery query;
223 | query.exec(data);
224 | data = QString("delete from friend where id = (select id from usrInfo where name = \'%1\') and friendId = (select id from usrInfo where name = \'%2\')").arg(friendName).arg(name);
225 | query.exec(data);
226 | return true;
227 | }
228 |
--------------------------------------------------------------------------------
/TcpServer/opedb.h:
--------------------------------------------------------------------------------
1 | #ifndef OPEDB_H
2 | #define OPEDB_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class OpeDB : public QObject
10 | {
11 | Q_OBJECT
12 | public:
13 | explicit OpeDB(QObject *parent = nullptr);
14 | static OpeDB& getInstance();
15 | void init();
16 | ~OpeDB();
17 | bool handleRegist(const char *name,const char *pwd);
18 | bool handleLogin(const char *name,const char *pwd);
19 | void handleOffline(const char *name);
20 | QStringList handleAllOnline();
21 | int handleSearchUsr(const char *name);
22 | int handleAddFriend(const char *pername,const char *name);
23 | void handleAgreeAddFriend(const char *pername, const char *name);
24 | QStringList handleFlushFriend(const char *name);
25 | bool handleDelFriend(const char *name, const char *friendName);
26 | signals:
27 |
28 | public slots:
29 |
30 | private:
31 | QSqlDatabase m_db; // 连接数据库
32 |
33 | };
34 |
35 | #endif // OPEDB_H
36 |
--------------------------------------------------------------------------------
/TcpServer/protocol.cpp:
--------------------------------------------------------------------------------
1 | #include "protocol.h"
2 |
3 | // 动态申请PDU协议空间
4 | PDU *mkPDU(uint uiMsgLen)
5 | {
6 | uint uiPDULen = sizeof(PDU) + uiMsgLen;
7 | PDU *pdu = (PDU*)malloc(uiPDULen);
8 | if(NULL == pdu)
9 | {
10 | exit(EXIT_FAILURE);
11 | }
12 | memset(pdu,0,uiPDULen);
13 | pdu->uiPDULen = uiPDULen;
14 | pdu->uiMsgLen = uiMsgLen;
15 | return pdu;
16 | }
17 |
--------------------------------------------------------------------------------
/TcpServer/protocol.h:
--------------------------------------------------------------------------------
1 | #ifndef PROTOCOL_H
2 | #define PROTOCOL_H
3 | #include
4 | #include
5 | #include
6 |
7 | typedef unsigned int uint;
8 |
9 | // 消息回复类型
10 | #define REGIST_OK "regist ok"
11 | #define REGIST_FAILED "regist failed : name existed"
12 | #define LOGIN_OK "login ok"
13 | #define LOGIN_FAILED "login failed : name error or pwd error or relogin"
14 | #define SEARCH_USR_NO "no such people"
15 | #define SEARCH_USR_ONLINE "online"
16 | #define SEARCH_USR_OFFLINE "offline"
17 | #define UNKNOW_ERROR "unknow error"
18 | #define EXISTED_FRIEND "friend exist"
19 | #define ADD_FRIEND_OFFLINE "usr offline"
20 | #define ADD_FRIEND_NO_EXIST "usr not exist"
21 | #define DEL_FRIEND_OK "delete friend ok"
22 | #define DIR_NO_EXIST "cur dir not exist"
23 | #define FILE_NAME_EXIST "file name exist"
24 | #define CREAT_DIR_OK "create dir ok"
25 | #define DEL_DIR_OK "delete dir ok"
26 | #define DEL_DIR_FAILURED "delete dir failured: is reguler file"
27 | #define RENAME_FILE_OK "rename file ok"
28 | #define RENAME_FILE_FAILURED "rename file failured"
29 | #define ENTER_DIR_FAILURED "enter dir failured: is reguler file"
30 | #define DEL_FILE_OK "delete file ok"
31 | #define DEL_FILE_FAILURED "delete file failured: is diretory"
32 | #define UPLOAD_FILE_OK "upload file ok"
33 | #define UPLOAD_FILE_FAILURED "upload file failured"
34 | #define MOVE_FILE_OK "move file ok"
35 | #define MOVE_FILE_FAILURED "move file failured:is reguler file"
36 | #define COMMON_ERR "operate failed: system is busy"
37 |
38 | // 消息类型枚举
39 | enum ENUM_MSG_TYPE
40 | {
41 | ENUM_MSG_TYPE_MIN = 0,
42 | ENUM_MSG_TYPE_REGIST_REQUEST, // 注册请求
43 | ENUM_MSG_TYPE_REGIST_RESPOND, // 注册回复
44 | ENUM_MSG_TYPE_LOGIN_REQUEST, // 登录请求
45 | ENUM_MSG_TYPE_LOGIN_RESPOND, // 登录回复
46 | ENUM_MSG_TYPE_ALL_ONLINE_REQUEST, // 在线用户请求
47 | ENUM_MSG_TYPE_ALL_ONLINE_RESPOND, // 在线用户回复
48 | ENUM_MSG_TYPE_SEARCH_USR_REQUEST, // 搜索用户请求
49 | ENUM_MSG_TYPE_SEARCH_USR_RESPOND, // 搜索用户回复
50 | ENUM_MSG_TYPE_ADD_FRIEND_REQUEST, // 添加好友请求
51 | ENUM_MSG_TYPE_ADD_FRIEND_RESPOND, // 添加好友回复
52 | ENUM_MSG_TYPE_ADD_FRIEND_AGGREE, // 同意添加好友
53 | ENUM_MSG_TYPE_ADD_FRIEND_REFUSE, // 拒绝添加好友
54 | ENUM_MSG_TYPE_FLUSH_FRIEND_REQUEST, // 刷新好友请求
55 | ENUM_MSG_TYPE_FLUSH_FRIEND_RESPOND, // 刷新好友回复
56 | ENUM_MSG_TYPE_DELETE_FRIEND_REQUEST, // 删除好友请求
57 | ENUM_MSG_TYPE_DELETE_FRIEND_RESPOND, // 删除好友回复
58 | ENUM_MSG_TYPE_PRIVATE_CHAT_REQUEST, // 私聊请求
59 | ENUM_MSG_TYPE_PRIVATE_CHAT_RESPOND, // 私聊回复
60 | ENUM_MSG_TYPE_GROUP_CHAT_REQUEST, // 群聊请求
61 | ENUM_MSG_TYPE_GROUP_CHAT_RESPOND, // 群聊回复
62 | ENUM_MSG_TYPE_CREATE_DIR_REQUEST, // 创建文件夹请求
63 | ENUM_MSG_TYPE_CREATE_DIR_RESPOND, // 创建文件夹回复
64 | ENUM_MSG_TYPE_FLUSH_FILE_REQUEST, // 刷新文件请求
65 | ENUM_MSG_TYPE_FLUSH_FILE_RESPOND, // 刷新文件回复
66 | ENUM_MSG_TYPE_DEL_DIR_REQUEST, // 删除目录请求
67 | ENUM_MSG_TYPE_DEL_DIR_RESPOND, // 删除目录回复
68 | ENUM_MSG_TYPE_RENAME_FILE_REQUEST, // 重命名文件请求
69 | ENUM_MSG_TYPE_RENAME_FILE_RESPOND, // 重命名文件回复
70 | ENUM_MSG_TYPE_ENTER_DIR_REQUEST, // 进入文件夹请求
71 | ENUM_MSG_TYPE_ENTER_DIR_RESPOND, // 进入文件夹回复
72 | ENUM_MSG_TYPE_DEL_FILE_REQUEST, // 删除常规文件请求
73 | ENUM_MSG_TYPE_DEL_FILE_RESPOND, // 删除常规文件回复
74 | ENUM_MSG_TYPE_UPLOAD_FILE_REQUEST, // 上传文件请求
75 | ENUM_MSG_TYPE_UPLOAD_FILE_RESPOND, // 上传文件回复
76 | ENUM_MSG_TYPE_DOWNLOAD_FILE_REQUEST, // 下载文件请求
77 | ENUM_MSG_TYPE_DOWNLOAD_FILE_RESPOND, // 下载文件回复
78 | ENUM_MSG_TYPE_SHARE_FILE_REQUEST, // 共享文件请求
79 | ENUM_MSG_TYPE_SHARE_FILE_RESPOND, // 共享文件回复
80 | ENUM_MSG_TYPE_SHARE_FILE_NOTE_REQUEST, // 共享文件记录请求
81 | ENUM_MSG_TYPE_SHARE_FILE_NOTE_RESPOND, // 共享文件记录回复
82 | ENUM_MSG_TYPE_MOVE_FILE_REQUEST, // 移动文件请求
83 | ENUM_MSG_TYPE_MOVE_FILE_RESPOND, // 移动文件回复
84 | ENUM_MSG_TYPE_MAX = 0x00ffffff,
85 | };
86 |
87 | // 文件信息结构体
88 | struct FileInfo
89 | {
90 | char caFileName[32]; // 文件名字
91 | int iFileType; // 文件类型
92 | };
93 |
94 | struct PDU
95 | {
96 | uint uiPDULen; // 总的协议数据单元大小
97 | uint uiMsgType; // 消息类型
98 | char caData[64]; // 文件名
99 | uint uiMsgLen; // 实际消息长度
100 | int caMsg[]; // 实际消息
101 | };
102 |
103 | PDU *mkPDU(uint uiMsgLen);
104 |
105 | #endif // PROTOCOL_H
106 |
--------------------------------------------------------------------------------
/TcpServer/server.config:
--------------------------------------------------------------------------------
1 | 127.0.0.1
2 | 8888
--------------------------------------------------------------------------------
/TcpServer/tcpserver.cpp:
--------------------------------------------------------------------------------
1 | #include "tcpserver.h"
2 | #include "ui_tcpserver.h"
3 | #include "mytcpserver.h"
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | TcpServer::TcpServer(QWidget *parent): QWidget(parent), ui(new Ui::TcpServer)
11 | {
12 | ui->setupUi(this);
13 | loadConfig();
14 | MyTcpServer::getInstance().listen(QHostAddress(m_strIP),m_usPort);
15 | }
16 |
17 | TcpServer::~TcpServer()
18 | {
19 | delete ui;
20 | }
21 |
22 | // 加载配置文件
23 | void TcpServer::loadConfig()
24 | {
25 | QFile file(":/server.config");
26 | if(file.open(QIODevice::ReadOnly))
27 | {
28 | QByteArray baData = file.readAll();
29 | QString strData = baData.toStdString().c_str();
30 | strData.replace("\r\n"," ");
31 | QStringList strList = strData.split(" ");
32 | m_strIP = strList.at(0);
33 | m_usPort = strList.at(1).toUShort();
34 | qDebug() << "IP地址为:" << m_strIP << "端口为:" << m_usPort;
35 | file.close();
36 | }
37 | else
38 | {
39 | QMessageBox::critical(this,"open config","open config failed");
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/TcpServer/tcpserver.h:
--------------------------------------------------------------------------------
1 | #ifndef TCPSERVER_H
2 | #define TCPSERVER_H
3 |
4 | #include
5 |
6 | QT_BEGIN_NAMESPACE
7 | namespace Ui { class TcpServer; }
8 | QT_END_NAMESPACE
9 |
10 | class TcpServer : public QWidget
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | TcpServer(QWidget *parent = nullptr);
16 | ~TcpServer();
17 | void loadConfig();
18 |
19 | private:
20 | Ui::TcpServer *ui;
21 | QString m_strIP;
22 | quint16 m_usPort;
23 | };
24 | #endif // TCPSERVER_H
25 |
--------------------------------------------------------------------------------
/TcpServer/tcpserver.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | TcpServer
4 |
5 |
6 |
7 | 0
8 | 0
9 | 800
10 | 600
11 |
12 |
13 |
14 | TcpServer
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/.qmake.stash:
--------------------------------------------------------------------------------
1 | QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
2 | QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
3 | QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
4 | QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
5 | QMAKE_CXX.COMPILER_MACROS = \
6 | QT_COMPILER_STDCXX \
7 | QMAKE_GCC_MAJOR_VERSION \
8 | QMAKE_GCC_MINOR_VERSION \
9 | QMAKE_GCC_PATCH_VERSION
10 | QMAKE_CXX.INCDIRS = \
11 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ \
12 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \
13 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward \
14 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include \
15 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed \
16 | D:/Software/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/include
17 | QMAKE_CXX.LIBDIRS = \
18 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0 \
19 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc \
20 | D:/Software/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/lib \
21 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib
22 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/TcpClient.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/TcpClient.exe
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/book.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/book.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/friend.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/friend.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/main.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_book.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'book.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/book.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'book.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_Book_t {
25 | QByteArrayData data[17];
26 | char stringdata0[164];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_Book_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_Book_t qt_meta_stringdata_Book = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 4), // "Book"
36 | QT_MOC_LITERAL(1, 5, 9), // "createDir"
37 | QT_MOC_LITERAL(2, 15, 0), // ""
38 | QT_MOC_LITERAL(3, 16, 9), // "flushFile"
39 | QT_MOC_LITERAL(4, 26, 6), // "delDir"
40 | QT_MOC_LITERAL(5, 33, 10), // "renameFile"
41 | QT_MOC_LITERAL(6, 44, 8), // "enterDir"
42 | QT_MOC_LITERAL(7, 53, 11), // "QModelIndex"
43 | QT_MOC_LITERAL(8, 65, 5), // "index"
44 | QT_MOC_LITERAL(9, 71, 9), // "returnPre"
45 | QT_MOC_LITERAL(10, 81, 10), // "uploadFile"
46 | QT_MOC_LITERAL(11, 92, 14), // "uploadFileData"
47 | QT_MOC_LITERAL(12, 107, 10), // "delRegFile"
48 | QT_MOC_LITERAL(13, 118, 12), // "downloadFile"
49 | QT_MOC_LITERAL(14, 131, 9), // "shareFile"
50 | QT_MOC_LITERAL(15, 141, 8), // "moveFile"
51 | QT_MOC_LITERAL(16, 150, 13) // "selectDestDir"
52 |
53 | },
54 | "Book\0createDir\0\0flushFile\0delDir\0"
55 | "renameFile\0enterDir\0QModelIndex\0index\0"
56 | "returnPre\0uploadFile\0uploadFileData\0"
57 | "delRegFile\0downloadFile\0shareFile\0"
58 | "moveFile\0selectDestDir"
59 | };
60 | #undef QT_MOC_LITERAL
61 |
62 | static const uint qt_meta_data_Book[] = {
63 |
64 | // content:
65 | 8, // revision
66 | 0, // classname
67 | 0, 0, // classinfo
68 | 13, 14, // methods
69 | 0, 0, // properties
70 | 0, 0, // enums/sets
71 | 0, 0, // constructors
72 | 0, // flags
73 | 0, // signalCount
74 |
75 | // slots: name, argc, parameters, tag, flags
76 | 1, 0, 79, 2, 0x0a /* Public */,
77 | 3, 0, 80, 2, 0x0a /* Public */,
78 | 4, 0, 81, 2, 0x0a /* Public */,
79 | 5, 0, 82, 2, 0x0a /* Public */,
80 | 6, 1, 83, 2, 0x0a /* Public */,
81 | 9, 0, 86, 2, 0x0a /* Public */,
82 | 10, 0, 87, 2, 0x0a /* Public */,
83 | 11, 0, 88, 2, 0x0a /* Public */,
84 | 12, 0, 89, 2, 0x0a /* Public */,
85 | 13, 0, 90, 2, 0x0a /* Public */,
86 | 14, 0, 91, 2, 0x0a /* Public */,
87 | 15, 0, 92, 2, 0x0a /* Public */,
88 | 16, 0, 93, 2, 0x0a /* Public */,
89 |
90 | // slots: parameters
91 | QMetaType::Void,
92 | QMetaType::Void,
93 | QMetaType::Void,
94 | QMetaType::Void,
95 | QMetaType::Void, 0x80000000 | 7, 8,
96 | QMetaType::Void,
97 | QMetaType::Void,
98 | QMetaType::Void,
99 | QMetaType::Void,
100 | QMetaType::Void,
101 | QMetaType::Void,
102 | QMetaType::Void,
103 | QMetaType::Void,
104 |
105 | 0 // eod
106 | };
107 |
108 | void Book::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
109 | {
110 | if (_c == QMetaObject::InvokeMetaMethod) {
111 | auto *_t = static_cast(_o);
112 | Q_UNUSED(_t)
113 | switch (_id) {
114 | case 0: _t->createDir(); break;
115 | case 1: _t->flushFile(); break;
116 | case 2: _t->delDir(); break;
117 | case 3: _t->renameFile(); break;
118 | case 4: _t->enterDir((*reinterpret_cast< const QModelIndex(*)>(_a[1]))); break;
119 | case 5: _t->returnPre(); break;
120 | case 6: _t->uploadFile(); break;
121 | case 7: _t->uploadFileData(); break;
122 | case 8: _t->delRegFile(); break;
123 | case 9: _t->downloadFile(); break;
124 | case 10: _t->shareFile(); break;
125 | case 11: _t->moveFile(); break;
126 | case 12: _t->selectDestDir(); break;
127 | default: ;
128 | }
129 | }
130 | }
131 |
132 | QT_INIT_METAOBJECT const QMetaObject Book::staticMetaObject = { {
133 | QMetaObject::SuperData::link(),
134 | qt_meta_stringdata_Book.data,
135 | qt_meta_data_Book,
136 | qt_static_metacall,
137 | nullptr,
138 | nullptr
139 | } };
140 |
141 |
142 | const QMetaObject *Book::metaObject() const
143 | {
144 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
145 | }
146 |
147 | void *Book::qt_metacast(const char *_clname)
148 | {
149 | if (!_clname) return nullptr;
150 | if (!strcmp(_clname, qt_meta_stringdata_Book.stringdata0))
151 | return static_cast(this);
152 | return QWidget::qt_metacast(_clname);
153 | }
154 |
155 | int Book::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
156 | {
157 | _id = QWidget::qt_metacall(_c, _id, _a);
158 | if (_id < 0)
159 | return _id;
160 | if (_c == QMetaObject::InvokeMetaMethod) {
161 | if (_id < 13)
162 | qt_static_metacall(this, _c, _id, _a);
163 | _id -= 13;
164 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
165 | if (_id < 13)
166 | *reinterpret_cast(_a[0]) = -1;
167 | _id -= 13;
168 | }
169 | return _id;
170 | }
171 | QT_WARNING_POP
172 | QT_END_MOC_NAMESPACE
173 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_book.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_book.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_friend.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'friend.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/friend.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'friend.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_Friend_t {
25 | QByteArrayData data[8];
26 | char stringdata0[76];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_Friend_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_Friend_t qt_meta_stringdata_Friend = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 6), // "Friend"
36 | QT_MOC_LITERAL(1, 7, 10), // "showOnline"
37 | QT_MOC_LITERAL(2, 18, 0), // ""
38 | QT_MOC_LITERAL(3, 19, 9), // "searchUsr"
39 | QT_MOC_LITERAL(4, 29, 11), // "flushFriend"
40 | QT_MOC_LITERAL(5, 41, 12), // "deleteFriend"
41 | QT_MOC_LITERAL(6, 54, 11), // "privateChat"
42 | QT_MOC_LITERAL(7, 66, 9) // "groupChat"
43 |
44 | },
45 | "Friend\0showOnline\0\0searchUsr\0flushFriend\0"
46 | "deleteFriend\0privateChat\0groupChat"
47 | };
48 | #undef QT_MOC_LITERAL
49 |
50 | static const uint qt_meta_data_Friend[] = {
51 |
52 | // content:
53 | 8, // revision
54 | 0, // classname
55 | 0, 0, // classinfo
56 | 6, 14, // methods
57 | 0, 0, // properties
58 | 0, 0, // enums/sets
59 | 0, 0, // constructors
60 | 0, // flags
61 | 0, // signalCount
62 |
63 | // slots: name, argc, parameters, tag, flags
64 | 1, 0, 44, 2, 0x0a /* Public */,
65 | 3, 0, 45, 2, 0x0a /* Public */,
66 | 4, 0, 46, 2, 0x0a /* Public */,
67 | 5, 0, 47, 2, 0x0a /* Public */,
68 | 6, 0, 48, 2, 0x0a /* Public */,
69 | 7, 0, 49, 2, 0x0a /* Public */,
70 |
71 | // slots: parameters
72 | QMetaType::Void,
73 | QMetaType::Void,
74 | QMetaType::Void,
75 | QMetaType::Void,
76 | QMetaType::Void,
77 | QMetaType::Void,
78 |
79 | 0 // eod
80 | };
81 |
82 | void Friend::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
83 | {
84 | if (_c == QMetaObject::InvokeMetaMethod) {
85 | auto *_t = static_cast(_o);
86 | Q_UNUSED(_t)
87 | switch (_id) {
88 | case 0: _t->showOnline(); break;
89 | case 1: _t->searchUsr(); break;
90 | case 2: _t->flushFriend(); break;
91 | case 3: _t->deleteFriend(); break;
92 | case 4: _t->privateChat(); break;
93 | case 5: _t->groupChat(); break;
94 | default: ;
95 | }
96 | }
97 | Q_UNUSED(_a);
98 | }
99 |
100 | QT_INIT_METAOBJECT const QMetaObject Friend::staticMetaObject = { {
101 | QMetaObject::SuperData::link(),
102 | qt_meta_stringdata_Friend.data,
103 | qt_meta_data_Friend,
104 | qt_static_metacall,
105 | nullptr,
106 | nullptr
107 | } };
108 |
109 |
110 | const QMetaObject *Friend::metaObject() const
111 | {
112 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
113 | }
114 |
115 | void *Friend::qt_metacast(const char *_clname)
116 | {
117 | if (!_clname) return nullptr;
118 | if (!strcmp(_clname, qt_meta_stringdata_Friend.stringdata0))
119 | return static_cast(this);
120 | return QWidget::qt_metacast(_clname);
121 | }
122 |
123 | int Friend::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
124 | {
125 | _id = QWidget::qt_metacall(_c, _id, _a);
126 | if (_id < 0)
127 | return _id;
128 | if (_c == QMetaObject::InvokeMetaMethod) {
129 | if (_id < 6)
130 | qt_static_metacall(this, _c, _id, _a);
131 | _id -= 6;
132 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
133 | if (_id < 6)
134 | *reinterpret_cast(_a[0]) = -1;
135 | _id -= 6;
136 | }
137 | return _id;
138 | }
139 | QT_WARNING_POP
140 | QT_END_MOC_NAMESPACE
141 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_friend.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_friend.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_online.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'online.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/online.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'online.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_Online_t {
25 | QByteArrayData data[3];
26 | char stringdata0[32];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_Online_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_Online_t qt_meta_stringdata_Online = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 6), // "Online"
36 | QT_MOC_LITERAL(1, 7, 23), // "on_addFriend_pb_clicked"
37 | QT_MOC_LITERAL(2, 31, 0) // ""
38 |
39 | },
40 | "Online\0on_addFriend_pb_clicked\0"
41 | };
42 | #undef QT_MOC_LITERAL
43 |
44 | static const uint qt_meta_data_Online[] = {
45 |
46 | // content:
47 | 8, // revision
48 | 0, // classname
49 | 0, 0, // classinfo
50 | 1, 14, // methods
51 | 0, 0, // properties
52 | 0, 0, // enums/sets
53 | 0, 0, // constructors
54 | 0, // flags
55 | 0, // signalCount
56 |
57 | // slots: name, argc, parameters, tag, flags
58 | 1, 0, 19, 2, 0x08 /* Private */,
59 |
60 | // slots: parameters
61 | QMetaType::Void,
62 |
63 | 0 // eod
64 | };
65 |
66 | void Online::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
67 | {
68 | if (_c == QMetaObject::InvokeMetaMethod) {
69 | auto *_t = static_cast(_o);
70 | Q_UNUSED(_t)
71 | switch (_id) {
72 | case 0: _t->on_addFriend_pb_clicked(); break;
73 | default: ;
74 | }
75 | }
76 | Q_UNUSED(_a);
77 | }
78 |
79 | QT_INIT_METAOBJECT const QMetaObject Online::staticMetaObject = { {
80 | QMetaObject::SuperData::link(),
81 | qt_meta_stringdata_Online.data,
82 | qt_meta_data_Online,
83 | qt_static_metacall,
84 | nullptr,
85 | nullptr
86 | } };
87 |
88 |
89 | const QMetaObject *Online::metaObject() const
90 | {
91 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
92 | }
93 |
94 | void *Online::qt_metacast(const char *_clname)
95 | {
96 | if (!_clname) return nullptr;
97 | if (!strcmp(_clname, qt_meta_stringdata_Online.stringdata0))
98 | return static_cast(this);
99 | return QWidget::qt_metacast(_clname);
100 | }
101 |
102 | int Online::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
103 | {
104 | _id = QWidget::qt_metacall(_c, _id, _a);
105 | if (_id < 0)
106 | return _id;
107 | if (_c == QMetaObject::InvokeMetaMethod) {
108 | if (_id < 1)
109 | qt_static_metacall(this, _c, _id, _a);
110 | _id -= 1;
111 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
112 | if (_id < 1)
113 | *reinterpret_cast(_a[0]) = -1;
114 | _id -= 1;
115 | }
116 | return _id;
117 | }
118 | QT_WARNING_POP
119 | QT_END_MOC_NAMESPACE
120 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_online.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_online.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opewidget.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'opewidget.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/opewidget.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'opewidget.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_OpeWidget_t {
25 | QByteArrayData data[1];
26 | char stringdata0[10];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_OpeWidget_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_OpeWidget_t qt_meta_stringdata_OpeWidget = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 9) // "OpeWidget"
36 |
37 | },
38 | "OpeWidget"
39 | };
40 | #undef QT_MOC_LITERAL
41 |
42 | static const uint qt_meta_data_OpeWidget[] = {
43 |
44 | // content:
45 | 8, // revision
46 | 0, // classname
47 | 0, 0, // classinfo
48 | 0, 0, // methods
49 | 0, 0, // properties
50 | 0, 0, // enums/sets
51 | 0, 0, // constructors
52 | 0, // flags
53 | 0, // signalCount
54 |
55 | 0 // eod
56 | };
57 |
58 | void OpeWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 | {
60 | Q_UNUSED(_o);
61 | Q_UNUSED(_id);
62 | Q_UNUSED(_c);
63 | Q_UNUSED(_a);
64 | }
65 |
66 | QT_INIT_METAOBJECT const QMetaObject OpeWidget::staticMetaObject = { {
67 | QMetaObject::SuperData::link(),
68 | qt_meta_stringdata_OpeWidget.data,
69 | qt_meta_data_OpeWidget,
70 | qt_static_metacall,
71 | nullptr,
72 | nullptr
73 | } };
74 |
75 |
76 | const QMetaObject *OpeWidget::metaObject() const
77 | {
78 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
79 | }
80 |
81 | void *OpeWidget::qt_metacast(const char *_clname)
82 | {
83 | if (!_clname) return nullptr;
84 | if (!strcmp(_clname, qt_meta_stringdata_OpeWidget.stringdata0))
85 | return static_cast(this);
86 | return QWidget::qt_metacast(_clname);
87 | }
88 |
89 | int OpeWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
90 | {
91 | _id = QWidget::qt_metacall(_c, _id, _a);
92 | return _id;
93 | }
94 | QT_WARNING_POP
95 | QT_END_MOC_NAMESPACE
96 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opewidget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opewidget.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_predefs.h:
--------------------------------------------------------------------------------
1 | #define __DBL_MIN_EXP__ (-1021)
2 | #define __FLT32X_MAX_EXP__ 1024
3 | #define __cpp_attributes 200809
4 | #define __UINT_LEAST16_MAX__ 0xffff
5 | #define __ATOMIC_ACQUIRE 2
6 | #define __FLT128_MAX_10_EXP__ 4932
7 | #define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
8 | #define __GCC_IEC_559_COMPLEX 2
9 | #define __UINT_LEAST8_TYPE__ unsigned char
10 | #define __SIZEOF_FLOAT80__ 16
11 | #define _WIN32 1
12 | #define __INTMAX_C(c) c ## LL
13 | #define __CHAR_BIT__ 8
14 | #define __UINT8_MAX__ 0xff
15 | #define _WIN64 1
16 | #define __WINT_MAX__ 0xffff
17 | #define __FLT32_MIN_EXP__ (-125)
18 | #define __cpp_static_assert 200410
19 | #define __ORDER_LITTLE_ENDIAN__ 1234
20 | #define __SIZE_MAX__ 0xffffffffffffffffULL
21 | #define __WCHAR_MAX__ 0xffff
22 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
23 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
24 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
25 | #define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
26 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
27 | #define __GCC_ATOMIC_CHAR_LOCK_FREE 2
28 | #define __GCC_IEC_559 2
29 | #define __FLT32X_DECIMAL_DIG__ 17
30 | #define __FLT_EVAL_METHOD__ 0
31 | #define __cpp_binary_literals 201304
32 | #define __FLT64_DECIMAL_DIG__ 17
33 | #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
34 | #define __x86_64 1
35 | #define __cpp_variadic_templates 200704
36 | #define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
37 | #define __SIG_ATOMIC_TYPE__ int
38 | #define __DBL_MIN_10_EXP__ (-307)
39 | #define __FINITE_MATH_ONLY__ 0
40 | #define __GNUC_PATCHLEVEL__ 0
41 | #define __FLT32_HAS_DENORM__ 1
42 | #define __UINT_FAST8_MAX__ 0xff
43 | #define __has_include(STR) __has_include__(STR)
44 | #define _stdcall __attribute__((__stdcall__))
45 | #define __DEC64_MAX_EXP__ 385
46 | #define __INT8_C(c) c
47 | #define __INT_LEAST8_WIDTH__ 8
48 | #define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
49 | #define __SHRT_MAX__ 0x7fff
50 | #define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
51 | #define __FLT64X_MAX_10_EXP__ 4932
52 | #define __UINT_LEAST8_MAX__ 0xff
53 | #define __GCC_ATOMIC_BOOL_LOCK_FREE 2
54 | #define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
55 | #define __UINTMAX_TYPE__ long long unsigned int
56 | #define __DEC32_EPSILON__ 1E-6DF
57 | #define __FLT_EVAL_METHOD_TS_18661_3__ 0
58 | #define __UINT32_MAX__ 0xffffffffU
59 | #define __GXX_EXPERIMENTAL_CXX0X__ 1
60 | #define __LDBL_MAX_EXP__ 16384
61 | #define __FLT128_MIN_EXP__ (-16381)
62 | #define __WINT_MIN__ 0
63 | #define __FLT128_MIN_10_EXP__ (-4931)
64 | #define __INT_LEAST16_WIDTH__ 16
65 | #define __SCHAR_MAX__ 0x7f
66 | #define __FLT128_MANT_DIG__ 113
67 | #define __WCHAR_MIN__ 0
68 | #define __INT64_C(c) c ## LL
69 | #define __DBL_DIG__ 15
70 | #define __GCC_ATOMIC_POINTER_LOCK_FREE 2
71 | #define __FLT64X_MANT_DIG__ 64
72 | #define __SIZEOF_INT__ 4
73 | #define __SIZEOF_POINTER__ 8
74 | #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
75 | #define __USER_LABEL_PREFIX__
76 | #define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
77 | #define __STDC_HOSTED__ 1
78 | #define __WIN32 1
79 | #define __LDBL_HAS_INFINITY__ 1
80 | #define __WIN64 1
81 | #define __FLT32_DIG__ 6
82 | #define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
83 | #define __GXX_WEAK__ 1
84 | #define __SHRT_WIDTH__ 16
85 | #define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
86 | #define __DEC32_MAX__ 9.999999E96DF
87 | #define __cpp_threadsafe_static_init 200806
88 | #define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
89 | #define __MINGW32__ 1
90 | #define __FLT32X_HAS_INFINITY__ 1
91 | #define __INT32_MAX__ 0x7fffffff
92 | #define __INT_WIDTH__ 32
93 | #define __SIZEOF_LONG__ 4
94 | #define __UINT16_C(c) c
95 | #define __PTRDIFF_WIDTH__ 64
96 | #define __DECIMAL_DIG__ 21
97 | #define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
98 | #define __INTMAX_WIDTH__ 64
99 | #define __FLT64_MIN_EXP__ (-1021)
100 | #define __has_include_next(STR) __has_include_next__(STR)
101 | #define __FLT64X_MIN_10_EXP__ (-4931)
102 | #define __LDBL_HAS_QUIET_NAN__ 1
103 | #define __FLT64_MANT_DIG__ 53
104 | #define _REENTRANT 1
105 | #define __GNUC__ 7
106 | #define _cdecl __attribute__((__cdecl__))
107 | #define __GXX_RTTI 1
108 | #define __MMX__ 1
109 | #define __cpp_delegating_constructors 200604
110 | #define __FLT_HAS_DENORM__ 1
111 | #define __SIZEOF_LONG_DOUBLE__ 16
112 | #define __BIGGEST_ALIGNMENT__ 16
113 | #define __STDC_UTF_16__ 1
114 | #define __FLT64_MAX_10_EXP__ 308
115 | #define __FLT32_HAS_INFINITY__ 1
116 | #define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
117 | #define _thiscall __attribute__((__thiscall__))
118 | #define __cpp_raw_strings 200710
119 | #define __INT_FAST32_MAX__ 0x7fffffff
120 | #define __WINNT 1
121 | #define __DBL_HAS_INFINITY__ 1
122 | #define __INT64_MAX__ 0x7fffffffffffffffLL
123 | #define __WINNT__ 1
124 | #define __DEC32_MIN_EXP__ (-94)
125 | #define __INTPTR_WIDTH__ 64
126 | #define __FLT32X_HAS_DENORM__ 1
127 | #define __INT_FAST16_TYPE__ short int
128 | #define _fastcall __attribute__((__fastcall__))
129 | #define __LDBL_HAS_DENORM__ 1
130 | #define __cplusplus 201103L
131 | #define __cpp_ref_qualifiers 200710
132 | #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
133 | #define __INT_LEAST32_MAX__ 0x7fffffff
134 | #define __DEC32_MIN__ 1E-95DF
135 | #define __DEPRECATED 1
136 | #define __cpp_rvalue_references 200610
137 | #define __DBL_MAX_EXP__ 1024
138 | #define __WCHAR_WIDTH__ 16
139 | #define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
140 | #define __DEC128_EPSILON__ 1E-33DL
141 | #define __SSE2_MATH__ 1
142 | #define __ATOMIC_HLE_RELEASE 131072
143 | #define __WIN32__ 1
144 | #define __PTRDIFF_MAX__ 0x7fffffffffffffffLL
145 | #define __amd64 1
146 | #define __tune_core2__ 1
147 | #define __ATOMIC_HLE_ACQUIRE 65536
148 | #define __FLT32_HAS_QUIET_NAN__ 1
149 | #define __GNUG__ 7
150 | #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
151 | #define __SIZEOF_SIZE_T__ 8
152 | #define __cpp_rvalue_reference 200610
153 | #define __cpp_nsdmi 200809
154 | #define __FLT64X_MIN_EXP__ (-16381)
155 | #define __SIZEOF_WINT_T__ 2
156 | #define __LONG_LONG_WIDTH__ 64
157 | #define __cpp_initializer_lists 200806
158 | #define __FLT32_MAX_EXP__ 128
159 | #define __cpp_hex_float 201603
160 | #define __GCC_HAVE_DWARF2_CFI_ASM 1
161 | #define __GXX_ABI_VERSION 1011
162 | #define __FLT128_HAS_INFINITY__ 1
163 | #define __FLT_MIN_EXP__ (-125)
164 | #define __cpp_lambdas 200907
165 | #define __FLT64X_HAS_QUIET_NAN__ 1
166 | #define __INT_FAST64_TYPE__ long long int
167 | #define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
168 | #define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
169 | #define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
170 | #define __DECIMAL_BID_FORMAT__ 1
171 | #define __GXX_TYPEINFO_EQUALITY_INLINE 0
172 | #define __FLT64_MIN_10_EXP__ (-307)
173 | #define __FLT64X_DECIMAL_DIG__ 21
174 | #define __DEC128_MIN__ 1E-6143DL
175 | #define __REGISTER_PREFIX__
176 | #define __UINT16_MAX__ 0xffff
177 | #define __DBL_HAS_DENORM__ 1
178 | #define __cdecl __attribute__((__cdecl__))
179 | #define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
180 | #define __UINT8_TYPE__ unsigned char
181 | #define __NO_INLINE__ 1
182 | #define __FLT_MANT_DIG__ 24
183 | #define __LDBL_DECIMAL_DIG__ 21
184 | #define __VERSION__ "7.3.0"
185 | #define __UINT64_C(c) c ## ULL
186 | #define __cpp_unicode_characters 200704
187 | #define __GCC_ATOMIC_INT_LOCK_FREE 2
188 | #define __FLT128_MAX_EXP__ 16384
189 | #define __FLT32_MANT_DIG__ 24
190 | #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
191 | #define __FLT128_HAS_DENORM__ 1
192 | #define __FLT128_DIG__ 33
193 | #define __SCHAR_WIDTH__ 8
194 | #define __INT32_C(c) c
195 | #define __DEC64_EPSILON__ 1E-15DD
196 | #define __ORDER_PDP_ENDIAN__ 3412
197 | #define __DEC128_MIN_EXP__ (-6142)
198 | #define __FLT32_MAX_10_EXP__ 38
199 | #define __INT_FAST32_TYPE__ int
200 | #define __UINT_LEAST16_TYPE__ short unsigned int
201 | #define __FLT64X_HAS_INFINITY__ 1
202 | #define __INT16_MAX__ 0x7fff
203 | #define __cpp_rtti 199711
204 | #define __SIZE_TYPE__ long long unsigned int
205 | #define __UINT64_MAX__ 0xffffffffffffffffULL
206 | #define __FLT64X_DIG__ 18
207 | #define __INT8_TYPE__ signed char
208 | #define __GCC_ASM_FLAG_OUTPUTS__ 1
209 | #define __FLT_RADIX__ 2
210 | #define __INT_LEAST16_TYPE__ short int
211 | #define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
212 | #define __UINTMAX_C(c) c ## ULL
213 | #define __GLIBCXX_BITSIZE_INT_N_0 128
214 | #define __SEH__ 1
215 | #define __SIG_ATOMIC_MAX__ 0x7fffffff
216 | #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
217 | #define __SIZEOF_PTRDIFF_T__ 8
218 | #define __FLT32X_MANT_DIG__ 53
219 | #define __x86_64__ 1
220 | #define __FLT32X_MIN_EXP__ (-1021)
221 | #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
222 | #define __MSVCRT__ 1
223 | #define __INT_FAST16_MAX__ 0x7fff
224 | #define __FLT64_DIG__ 15
225 | #define __UINT_FAST32_MAX__ 0xffffffffU
226 | #define __UINT_LEAST64_TYPE__ long long unsigned int
227 | #define __FLT_HAS_QUIET_NAN__ 1
228 | #define __FLT_MAX_10_EXP__ 38
229 | #define __LONG_MAX__ 0x7fffffffL
230 | #define __FLT64X_HAS_DENORM__ 1
231 | #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
232 | #define __FLT_HAS_INFINITY__ 1
233 | #define __cpp_unicode_literals 200710
234 | #define __UINT_FAST16_TYPE__ short unsigned int
235 | #define __DEC64_MAX__ 9.999999999999999E384DD
236 | #define __INT_FAST32_WIDTH__ 32
237 | #define __CHAR16_TYPE__ short unsigned int
238 | #define __PRAGMA_REDEFINE_EXTNAME 1
239 | #define __SIZE_WIDTH__ 64
240 | #define __SEG_FS 1
241 | #define __INT_LEAST16_MAX__ 0x7fff
242 | #define __DEC64_MANT_DIG__ 16
243 | #define __UINT_LEAST32_MAX__ 0xffffffffU
244 | #define __SEG_GS 1
245 | #define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
246 | #define __GCC_ATOMIC_LONG_LOCK_FREE 2
247 | #define __SIG_ATOMIC_WIDTH__ 32
248 | #define __INT_LEAST64_TYPE__ long long int
249 | #define __INT16_TYPE__ short int
250 | #define __INT_LEAST8_TYPE__ signed char
251 | #define __DEC32_MAX_EXP__ 97
252 | #define __INT_FAST8_MAX__ 0x7f
253 | #define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
254 | #define __INTPTR_MAX__ 0x7fffffffffffffffLL
255 | #define __GXX_MERGED_TYPEINFO_NAMES 0
256 | #define __cpp_range_based_for 200907
257 | #define __FLT64_HAS_QUIET_NAN__ 1
258 | #define __stdcall __attribute__((__stdcall__))
259 | #define __FLT32_MIN_10_EXP__ (-37)
260 | #define __SSE2__ 1
261 | #define __EXCEPTIONS 1
262 | #define __LDBL_MANT_DIG__ 64
263 | #define __DBL_HAS_QUIET_NAN__ 1
264 | #define __FLT64_HAS_INFINITY__ 1
265 | #define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
266 | #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
267 | #define __INTPTR_TYPE__ long long int
268 | #define __UINT16_TYPE__ short unsigned int
269 | #define __WCHAR_TYPE__ short unsigned int
270 | #define __SIZEOF_FLOAT__ 4
271 | #define __pic__ 1
272 | #define __UINTPTR_MAX__ 0xffffffffffffffffULL
273 | #define __INT_FAST64_WIDTH__ 64
274 | #define __DEC64_MIN_EXP__ (-382)
275 | #define __cpp_decltype 200707
276 | #define __FLT32_DECIMAL_DIG__ 9
277 | #define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
278 | #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
279 | #define __FLT_DIG__ 6
280 | #define __FLT64X_MAX_EXP__ 16384
281 | #define __UINT_FAST64_TYPE__ long long unsigned int
282 | #define __INT_MAX__ 0x7fffffff
283 | #define __amd64__ 1
284 | #define WIN32 1
285 | #define __nocona 1
286 | #define __code_model_medium__ 1
287 | #define __INT64_TYPE__ long long int
288 | #define __FLT_MAX_EXP__ 128
289 | #define WIN64 1
290 | #define __ORDER_BIG_ENDIAN__ 4321
291 | #define __DBL_MANT_DIG__ 53
292 | #define __cpp_inheriting_constructors 201511
293 | #define __SIZEOF_FLOAT128__ 16
294 | #define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
295 | #define __DEC64_MIN__ 1E-383DD
296 | #define __WINT_TYPE__ short unsigned int
297 | #define __UINT_LEAST32_TYPE__ unsigned int
298 | #define __SIZEOF_SHORT__ 2
299 | #define __SSE__ 1
300 | #define __LDBL_MIN_EXP__ (-16381)
301 | #define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
302 | #define __WINT_WIDTH__ 16
303 | #define __INT_LEAST8_MAX__ 0x7f
304 | #define __FLT32X_MAX_10_EXP__ 308
305 | #define __SIZEOF_INT128__ 16
306 | #define __WCHAR_UNSIGNED__ 1
307 | #define __LDBL_MAX_10_EXP__ 4932
308 | #define __ATOMIC_RELAXED 0
309 | #define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
310 | #define __thiscall __attribute__((__thiscall__))
311 | #define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
312 | #define __UINT8_C(c) c
313 | #define __FLT64_MAX_EXP__ 1024
314 | #define __INT_LEAST32_TYPE__ int
315 | #define __SIZEOF_WCHAR_T__ 2
316 | #define __FLT128_HAS_QUIET_NAN__ 1
317 | #define __INT_FAST8_TYPE__ signed char
318 | #define __fastcall __attribute__((__fastcall__))
319 | #define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
320 | #define __GNUC_STDC_INLINE__ 1
321 | #define __FLT64_HAS_DENORM__ 1
322 | #define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
323 | #define __DBL_DECIMAL_DIG__ 17
324 | #define __STDC_UTF_32__ 1
325 | #define __INT_FAST8_WIDTH__ 8
326 | #define __FXSR__ 1
327 | #define __DEC_EVAL_METHOD__ 2
328 | #define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
329 | #define __MINGW64__ 1
330 | #define __cpp_runtime_arrays 198712
331 | #define __UINT64_TYPE__ long long unsigned int
332 | #define __UINT32_C(c) c ## U
333 | #define __INTMAX_MAX__ 0x7fffffffffffffffLL
334 | #define __cpp_alias_templates 200704
335 | #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
336 | #define WINNT 1
337 | #define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
338 | #define __INT8_MAX__ 0x7f
339 | #define __LONG_WIDTH__ 32
340 | #define __PIC__ 1
341 | #define __UINT_FAST32_TYPE__ unsigned int
342 | #define __CHAR32_TYPE__ unsigned int
343 | #define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
344 | #define __cpp_constexpr 200704
345 | #define __INT32_TYPE__ int
346 | #define __SIZEOF_DOUBLE__ 8
347 | #define __cpp_exceptions 199711
348 | #define __FLT_MIN_10_EXP__ (-37)
349 | #define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
350 | #define __INT_LEAST32_WIDTH__ 32
351 | #define __INTMAX_TYPE__ long long int
352 | #define _INTEGRAL_MAX_BITS 64
353 | #define __DEC128_MAX_EXP__ 6145
354 | #define __FLT32X_HAS_QUIET_NAN__ 1
355 | #define __ATOMIC_CONSUME 1
356 | #define __nocona__ 1
357 | #define __GNUC_MINOR__ 3
358 | #define __GLIBCXX_TYPE_INT_N_0 __int128
359 | #define __INT_FAST16_WIDTH__ 16
360 | #define __UINTMAX_MAX__ 0xffffffffffffffffULL
361 | #define __DEC32_MANT_DIG__ 7
362 | #define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
363 | #define __DBL_MAX_10_EXP__ 308
364 | #define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
365 | #define __INT16_C(c) c
366 | #define __STDC__ 1
367 | #define __FLT32X_DIG__ 15
368 | #define __PTRDIFF_TYPE__ long long int
369 | #define __ATOMIC_SEQ_CST 5
370 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
371 | #define __UINT32_TYPE__ unsigned int
372 | #define __FLT32X_MIN_10_EXP__ (-307)
373 | #define __UINTPTR_TYPE__ long long unsigned int
374 | #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
375 | #define __DEC128_MANT_DIG__ 34
376 | #define __LDBL_MIN_10_EXP__ (-4931)
377 | #define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
378 | #define __SSE_MATH__ 1
379 | #define __SIZEOF_LONG_LONG__ 8
380 | #define __cpp_user_defined_literals 200809
381 | #define __FLT128_DECIMAL_DIG__ 36
382 | #define __GCC_ATOMIC_LLONG_LOCK_FREE 2
383 | #define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
384 | #define __LDBL_DIG__ 18
385 | #define __FLT_DECIMAL_DIG__ 9
386 | #define __UINT_FAST16_MAX__ 0xffff
387 | #define __GCC_ATOMIC_SHORT_LOCK_FREE 2
388 | #define __INT_LEAST64_WIDTH__ 64
389 | #define __SSE3__ 1
390 | #define __UINT_FAST8_TYPE__ unsigned char
391 | #define __WIN64__ 1
392 | #define __ATOMIC_ACQ_REL 4
393 | #define __ATOMIC_RELEASE 3
394 | #define __declspec(x) __attribute__((x))
395 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_privatechat.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'privatechat.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/privatechat.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'privatechat.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_PrivateChat_t {
25 | QByteArrayData data[3];
26 | char stringdata0[35];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_PrivateChat_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_PrivateChat_t qt_meta_stringdata_PrivateChat = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 11), // "PrivateChat"
36 | QT_MOC_LITERAL(1, 12, 21), // "on_sendMsg_pb_clicked"
37 | QT_MOC_LITERAL(2, 34, 0) // ""
38 |
39 | },
40 | "PrivateChat\0on_sendMsg_pb_clicked\0"
41 | };
42 | #undef QT_MOC_LITERAL
43 |
44 | static const uint qt_meta_data_PrivateChat[] = {
45 |
46 | // content:
47 | 8, // revision
48 | 0, // classname
49 | 0, 0, // classinfo
50 | 1, 14, // methods
51 | 0, 0, // properties
52 | 0, 0, // enums/sets
53 | 0, 0, // constructors
54 | 0, // flags
55 | 0, // signalCount
56 |
57 | // slots: name, argc, parameters, tag, flags
58 | 1, 0, 19, 2, 0x08 /* Private */,
59 |
60 | // slots: parameters
61 | QMetaType::Void,
62 |
63 | 0 // eod
64 | };
65 |
66 | void PrivateChat::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
67 | {
68 | if (_c == QMetaObject::InvokeMetaMethod) {
69 | auto *_t = static_cast(_o);
70 | Q_UNUSED(_t)
71 | switch (_id) {
72 | case 0: _t->on_sendMsg_pb_clicked(); break;
73 | default: ;
74 | }
75 | }
76 | Q_UNUSED(_a);
77 | }
78 |
79 | QT_INIT_METAOBJECT const QMetaObject PrivateChat::staticMetaObject = { {
80 | QMetaObject::SuperData::link(),
81 | qt_meta_stringdata_PrivateChat.data,
82 | qt_meta_data_PrivateChat,
83 | qt_static_metacall,
84 | nullptr,
85 | nullptr
86 | } };
87 |
88 |
89 | const QMetaObject *PrivateChat::metaObject() const
90 | {
91 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
92 | }
93 |
94 | void *PrivateChat::qt_metacast(const char *_clname)
95 | {
96 | if (!_clname) return nullptr;
97 | if (!strcmp(_clname, qt_meta_stringdata_PrivateChat.stringdata0))
98 | return static_cast(this);
99 | return QWidget::qt_metacast(_clname);
100 | }
101 |
102 | int PrivateChat::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
103 | {
104 | _id = QWidget::qt_metacall(_c, _id, _a);
105 | if (_id < 0)
106 | return _id;
107 | if (_c == QMetaObject::InvokeMetaMethod) {
108 | if (_id < 1)
109 | qt_static_metacall(this, _c, _id, _a);
110 | _id -= 1;
111 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
112 | if (_id < 1)
113 | *reinterpret_cast(_a[0]) = -1;
114 | _id -= 1;
115 | }
116 | return _id;
117 | }
118 | QT_WARNING_POP
119 | QT_END_MOC_NAMESPACE
120 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_privatechat.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_privatechat.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_sharefile.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'sharefile.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/sharefile.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'sharefile.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_ShareFile_t {
25 | QByteArrayData data[6];
26 | char stringdata0[54];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_ShareFile_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_ShareFile_t qt_meta_stringdata_ShareFile = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 9), // "ShareFile"
36 | QT_MOC_LITERAL(1, 10, 12), // "cancelSelect"
37 | QT_MOC_LITERAL(2, 23, 0), // ""
38 | QT_MOC_LITERAL(3, 24, 9), // "selectAll"
39 | QT_MOC_LITERAL(4, 34, 7), // "okShare"
40 | QT_MOC_LITERAL(5, 42, 11) // "cancelShare"
41 |
42 | },
43 | "ShareFile\0cancelSelect\0\0selectAll\0"
44 | "okShare\0cancelShare"
45 | };
46 | #undef QT_MOC_LITERAL
47 |
48 | static const uint qt_meta_data_ShareFile[] = {
49 |
50 | // content:
51 | 8, // revision
52 | 0, // classname
53 | 0, 0, // classinfo
54 | 4, 14, // methods
55 | 0, 0, // properties
56 | 0, 0, // enums/sets
57 | 0, 0, // constructors
58 | 0, // flags
59 | 0, // signalCount
60 |
61 | // slots: name, argc, parameters, tag, flags
62 | 1, 0, 34, 2, 0x0a /* Public */,
63 | 3, 0, 35, 2, 0x0a /* Public */,
64 | 4, 0, 36, 2, 0x0a /* Public */,
65 | 5, 0, 37, 2, 0x0a /* Public */,
66 |
67 | // slots: parameters
68 | QMetaType::Void,
69 | QMetaType::Void,
70 | QMetaType::Void,
71 | QMetaType::Void,
72 |
73 | 0 // eod
74 | };
75 |
76 | void ShareFile::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
77 | {
78 | if (_c == QMetaObject::InvokeMetaMethod) {
79 | auto *_t = static_cast(_o);
80 | Q_UNUSED(_t)
81 | switch (_id) {
82 | case 0: _t->cancelSelect(); break;
83 | case 1: _t->selectAll(); break;
84 | case 2: _t->okShare(); break;
85 | case 3: _t->cancelShare(); break;
86 | default: ;
87 | }
88 | }
89 | Q_UNUSED(_a);
90 | }
91 |
92 | QT_INIT_METAOBJECT const QMetaObject ShareFile::staticMetaObject = { {
93 | QMetaObject::SuperData::link(),
94 | qt_meta_stringdata_ShareFile.data,
95 | qt_meta_data_ShareFile,
96 | qt_static_metacall,
97 | nullptr,
98 | nullptr
99 | } };
100 |
101 |
102 | const QMetaObject *ShareFile::metaObject() const
103 | {
104 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
105 | }
106 |
107 | void *ShareFile::qt_metacast(const char *_clname)
108 | {
109 | if (!_clname) return nullptr;
110 | if (!strcmp(_clname, qt_meta_stringdata_ShareFile.stringdata0))
111 | return static_cast(this);
112 | return QWidget::qt_metacast(_clname);
113 | }
114 |
115 | int ShareFile::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
116 | {
117 | _id = QWidget::qt_metacall(_c, _id, _a);
118 | if (_id < 0)
119 | return _id;
120 | if (_c == QMetaObject::InvokeMetaMethod) {
121 | if (_id < 4)
122 | qt_static_metacall(this, _c, _id, _a);
123 | _id -= 4;
124 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
125 | if (_id < 4)
126 | *reinterpret_cast(_a[0]) = -1;
127 | _id -= 4;
128 | }
129 | return _id;
130 | }
131 | QT_WARNING_POP
132 | QT_END_MOC_NAMESPACE
133 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_sharefile.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_sharefile.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpclient.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'tcpclient.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpClient/tcpclient.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'tcpclient.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_TcpClient_t {
25 | QByteArrayData data[7];
26 | char stringdata0[93];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_TcpClient_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_TcpClient_t qt_meta_stringdata_TcpClient = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 9), // "TcpClient"
36 | QT_MOC_LITERAL(1, 10, 11), // "showConnect"
37 | QT_MOC_LITERAL(2, 22, 0), // ""
38 | QT_MOC_LITERAL(3, 23, 19), // "on_login_pb_clicked"
39 | QT_MOC_LITERAL(4, 43, 20), // "on_regist_pb_clicked"
40 | QT_MOC_LITERAL(5, 64, 20), // "on_cancel_pb_clicked"
41 | QT_MOC_LITERAL(6, 85, 7) // "recvMsg"
42 |
43 | },
44 | "TcpClient\0showConnect\0\0on_login_pb_clicked\0"
45 | "on_regist_pb_clicked\0on_cancel_pb_clicked\0"
46 | "recvMsg"
47 | };
48 | #undef QT_MOC_LITERAL
49 |
50 | static const uint qt_meta_data_TcpClient[] = {
51 |
52 | // content:
53 | 8, // revision
54 | 0, // classname
55 | 0, 0, // classinfo
56 | 5, 14, // methods
57 | 0, 0, // properties
58 | 0, 0, // enums/sets
59 | 0, 0, // constructors
60 | 0, // flags
61 | 0, // signalCount
62 |
63 | // slots: name, argc, parameters, tag, flags
64 | 1, 0, 39, 2, 0x0a /* Public */,
65 | 3, 0, 40, 2, 0x08 /* Private */,
66 | 4, 0, 41, 2, 0x08 /* Private */,
67 | 5, 0, 42, 2, 0x08 /* Private */,
68 | 6, 0, 43, 2, 0x08 /* Private */,
69 |
70 | // slots: parameters
71 | QMetaType::Void,
72 | QMetaType::Void,
73 | QMetaType::Void,
74 | QMetaType::Void,
75 | QMetaType::Void,
76 |
77 | 0 // eod
78 | };
79 |
80 | void TcpClient::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
81 | {
82 | if (_c == QMetaObject::InvokeMetaMethod) {
83 | auto *_t = static_cast(_o);
84 | Q_UNUSED(_t)
85 | switch (_id) {
86 | case 0: _t->showConnect(); break;
87 | case 1: _t->on_login_pb_clicked(); break;
88 | case 2: _t->on_regist_pb_clicked(); break;
89 | case 3: _t->on_cancel_pb_clicked(); break;
90 | case 4: _t->recvMsg(); break;
91 | default: ;
92 | }
93 | }
94 | Q_UNUSED(_a);
95 | }
96 |
97 | QT_INIT_METAOBJECT const QMetaObject TcpClient::staticMetaObject = { {
98 | QMetaObject::SuperData::link(),
99 | qt_meta_stringdata_TcpClient.data,
100 | qt_meta_data_TcpClient,
101 | qt_static_metacall,
102 | nullptr,
103 | nullptr
104 | } };
105 |
106 |
107 | const QMetaObject *TcpClient::metaObject() const
108 | {
109 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
110 | }
111 |
112 | void *TcpClient::qt_metacast(const char *_clname)
113 | {
114 | if (!_clname) return nullptr;
115 | if (!strcmp(_clname, qt_meta_stringdata_TcpClient.stringdata0))
116 | return static_cast(this);
117 | return QWidget::qt_metacast(_clname);
118 | }
119 |
120 | int TcpClient::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
121 | {
122 | _id = QWidget::qt_metacall(_c, _id, _a);
123 | if (_id < 0)
124 | return _id;
125 | if (_c == QMetaObject::InvokeMetaMethod) {
126 | if (_id < 5)
127 | qt_static_metacall(this, _c, _id, _a);
128 | _id -= 5;
129 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
130 | if (_id < 5)
131 | *reinterpret_cast(_a[0]) = -1;
132 | _id -= 5;
133 | }
134 | return _id;
135 | }
136 | QT_WARNING_POP
137 | QT_END_MOC_NAMESPACE
138 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpclient.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpclient.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/online.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/online.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/opewidget.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/opewidget.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/privatechat.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/privatechat.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/protocol.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/protocol.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_FileType.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_FileType.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Resource object code
3 | **
4 | ** Created by: The Resource Compiler for Qt version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | static const unsigned char qt_resource_data[] = {
10 | // D:/Software/C++_Code/NetworkDiskSystem/TcpClient/client.config
11 | 0x0,0x0,0x0,0xf,
12 | 0x31,
13 | 0x32,0x37,0x2e,0x30,0x2e,0x30,0x2e,0x31,0xd,0xa,0x38,0x38,0x38,0x38,
14 |
15 | };
16 |
17 | static const unsigned char qt_resource_name[] = {
18 | // client.config
19 | 0x0,0xd,
20 | 0x0,0xfd,0xc7,0xb7,
21 | 0x0,0x63,
22 | 0x0,0x6c,0x0,0x69,0x0,0x65,0x0,0x6e,0x0,0x74,0x0,0x2e,0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x66,0x0,0x69,0x0,0x67,
23 |
24 | };
25 |
26 | static const unsigned char qt_resource_struct[] = {
27 | // :
28 | 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
29 | 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
30 | // :/client.config
31 | 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
32 | 0x0,0x0,0x1,0x87,0x4a,0xde,0x7,0xfd,
33 |
34 | };
35 |
36 | #ifdef QT_NAMESPACE
37 | # define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
38 | # define QT_RCC_MANGLE_NAMESPACE0(x) x
39 | # define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
40 | # define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
41 | # define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
42 | QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
43 | #else
44 | # define QT_RCC_PREPEND_NAMESPACE(name) name
45 | # define QT_RCC_MANGLE_NAMESPACE(name) name
46 | #endif
47 |
48 | #ifdef QT_NAMESPACE
49 | namespace QT_NAMESPACE {
50 | #endif
51 |
52 | bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
53 | bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
54 |
55 | #ifdef QT_NAMESPACE
56 | }
57 | #endif
58 |
59 | int QT_RCC_MANGLE_NAMESPACE(qInitResources_config)();
60 | int QT_RCC_MANGLE_NAMESPACE(qInitResources_config)()
61 | {
62 | int version = 3;
63 | QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
64 | (version, qt_resource_struct, qt_resource_name, qt_resource_data);
65 | return 1;
66 | }
67 |
68 | int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)();
69 | int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)()
70 | {
71 | int version = 3;
72 | QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
73 | (version, qt_resource_struct, qt_resource_name, qt_resource_data);
74 | return 1;
75 | }
76 |
77 | namespace {
78 | struct initializer {
79 | initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_config)(); }
80 | ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)(); }
81 | } dummy;
82 | }
83 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/sharefile.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/sharefile.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/tcpclient.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/tcpclient.o
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/object_script.TcpClient.Debug:
--------------------------------------------------------------------------------
1 | debug/book.o
2 | debug/friend.o
3 | debug/main.o
4 | debug/online.o
5 | debug/opewidget.o
6 | debug/privatechat.o
7 | debug/protocol.o
8 | debug/sharefile.o
9 | debug/tcpclient.o
10 | debug/qrc_FileType.o
11 | debug/qrc_config.o
12 | debug/moc_book.o
13 | debug/moc_friend.o
14 | debug/moc_online.o
15 | debug/moc_opewidget.o
16 | debug/moc_privatechat.o
17 | debug/moc_sharefile.o
18 | debug/moc_tcpclient.o
19 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/object_script.TcpClient.Release:
--------------------------------------------------------------------------------
1 | release/book.o
2 | release/friend.o
3 | release/main.o
4 | release/online.o
5 | release/opewidget.o
6 | release/privatechat.o
7 | release/protocol.o
8 | release/sharefile.o
9 | release/tcpclient.o
10 | release/qrc_FileType.o
11 | release/qrc_config.o
12 | release/moc_book.o
13 | release/moc_friend.o
14 | release/moc_online.o
15 | release/moc_opewidget.o
16 | release/moc_privatechat.o
17 | release/moc_sharefile.o
18 | release/moc_tcpclient.o
19 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/ui_online.h:
--------------------------------------------------------------------------------
1 | /********************************************************************************
2 | ** Form generated from reading UI file 'online.ui'
3 | **
4 | ** Created by: Qt User Interface Compiler version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 | ********************************************************************************/
8 |
9 | #ifndef UI_ONLINE_H
10 | #define UI_ONLINE_H
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | QT_BEGIN_NAMESPACE
22 |
23 | class Ui_Online
24 | {
25 | public:
26 | QVBoxLayout *verticalLayout_2;
27 | QHBoxLayout *horizontalLayout;
28 | QListWidget *online_lw;
29 | QVBoxLayout *verticalLayout;
30 | QSpacerItem *verticalSpacer;
31 | QPushButton *addFriend_pb;
32 | QSpacerItem *verticalSpacer_2;
33 |
34 | void setupUi(QWidget *Online)
35 | {
36 | if (Online->objectName().isEmpty())
37 | Online->setObjectName(QString::fromUtf8("Online"));
38 | Online->resize(645, 470);
39 | verticalLayout_2 = new QVBoxLayout(Online);
40 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
41 | horizontalLayout = new QHBoxLayout();
42 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
43 | online_lw = new QListWidget(Online);
44 | online_lw->setObjectName(QString::fromUtf8("online_lw"));
45 | QFont font;
46 | font.setPointSize(16);
47 | online_lw->setFont(font);
48 |
49 | horizontalLayout->addWidget(online_lw);
50 |
51 | verticalLayout = new QVBoxLayout();
52 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
53 | verticalSpacer = new QSpacerItem(20, 98, QSizePolicy::Minimum, QSizePolicy::Expanding);
54 |
55 | verticalLayout->addItem(verticalSpacer);
56 |
57 | addFriend_pb = new QPushButton(Online);
58 | addFriend_pb->setObjectName(QString::fromUtf8("addFriend_pb"));
59 | QFont font1;
60 | font1.setFamily(QString::fromUtf8("Adobe \345\256\213\344\275\223 Std L"));
61 | font1.setPointSize(24);
62 | addFriend_pb->setFont(font1);
63 |
64 | verticalLayout->addWidget(addFriend_pb);
65 |
66 | verticalSpacer_2 = new QSpacerItem(20, 98, QSizePolicy::Minimum, QSizePolicy::Expanding);
67 |
68 | verticalLayout->addItem(verticalSpacer_2);
69 |
70 |
71 | horizontalLayout->addLayout(verticalLayout);
72 |
73 |
74 | verticalLayout_2->addLayout(horizontalLayout);
75 |
76 |
77 | retranslateUi(Online);
78 |
79 | QMetaObject::connectSlotsByName(Online);
80 | } // setupUi
81 |
82 | void retranslateUi(QWidget *Online)
83 | {
84 | Online->setWindowTitle(QCoreApplication::translate("Online", "Form", nullptr));
85 | addFriend_pb->setText(QCoreApplication::translate("Online", "\345\212\240\345\245\275\345\217\213", nullptr));
86 | } // retranslateUi
87 |
88 | };
89 |
90 | namespace Ui {
91 | class Online: public Ui_Online {};
92 | } // namespace Ui
93 |
94 | QT_END_NAMESPACE
95 |
96 | #endif // UI_ONLINE_H
97 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/ui_privatechat.h:
--------------------------------------------------------------------------------
1 | /********************************************************************************
2 | ** Form generated from reading UI file 'privatechat.ui'
3 | **
4 | ** Created by: Qt User Interface Compiler version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 | ********************************************************************************/
8 |
9 | #ifndef UI_PRIVATECHAT_H
10 | #define UI_PRIVATECHAT_H
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | QT_BEGIN_NAMESPACE
22 |
23 | class Ui_PrivateChat
24 | {
25 | public:
26 | QVBoxLayout *verticalLayout_2;
27 | QVBoxLayout *verticalLayout;
28 | QTextEdit *showMsg_te;
29 | QHBoxLayout *horizontalLayout;
30 | QLineEdit *inputMsg_le;
31 | QPushButton *sendMsg_pb;
32 |
33 | void setupUi(QWidget *PrivateChat)
34 | {
35 | if (PrivateChat->objectName().isEmpty())
36 | PrivateChat->setObjectName(QString::fromUtf8("PrivateChat"));
37 | PrivateChat->resize(545, 383);
38 | verticalLayout_2 = new QVBoxLayout(PrivateChat);
39 | verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
40 | verticalLayout = new QVBoxLayout();
41 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
42 | showMsg_te = new QTextEdit(PrivateChat);
43 | showMsg_te->setObjectName(QString::fromUtf8("showMsg_te"));
44 | QFont font;
45 | font.setFamily(QString::fromUtf8("Adobe \345\256\213\344\275\223 Std L"));
46 | font.setPointSize(24);
47 | showMsg_te->setFont(font);
48 |
49 | verticalLayout->addWidget(showMsg_te);
50 |
51 | horizontalLayout = new QHBoxLayout();
52 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
53 | inputMsg_le = new QLineEdit(PrivateChat);
54 | inputMsg_le->setObjectName(QString::fromUtf8("inputMsg_le"));
55 | inputMsg_le->setFont(font);
56 |
57 | horizontalLayout->addWidget(inputMsg_le);
58 |
59 | sendMsg_pb = new QPushButton(PrivateChat);
60 | sendMsg_pb->setObjectName(QString::fromUtf8("sendMsg_pb"));
61 | sendMsg_pb->setFont(font);
62 |
63 | horizontalLayout->addWidget(sendMsg_pb);
64 |
65 |
66 | verticalLayout->addLayout(horizontalLayout);
67 |
68 |
69 | verticalLayout_2->addLayout(verticalLayout);
70 |
71 |
72 | retranslateUi(PrivateChat);
73 |
74 | QMetaObject::connectSlotsByName(PrivateChat);
75 | } // setupUi
76 |
77 | void retranslateUi(QWidget *PrivateChat)
78 | {
79 | PrivateChat->setWindowTitle(QCoreApplication::translate("PrivateChat", "Form", nullptr));
80 | sendMsg_pb->setText(QCoreApplication::translate("PrivateChat", "\345\217\221\351\200\201", nullptr));
81 | } // retranslateUi
82 |
83 | };
84 |
85 | namespace Ui {
86 | class PrivateChat: public Ui_PrivateChat {};
87 | } // namespace Ui
88 |
89 | QT_END_NAMESPACE
90 |
91 | #endif // UI_PRIVATECHAT_H
92 |
--------------------------------------------------------------------------------
/build-TcpClient-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/ui_tcpclient.h:
--------------------------------------------------------------------------------
1 | /********************************************************************************
2 | ** Form generated from reading UI file 'tcpclient.ui'
3 | **
4 | ** Created by: Qt User Interface Compiler version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 | ********************************************************************************/
8 |
9 | #ifndef UI_TCPCLIENT_H
10 | #define UI_TCPCLIENT_H
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 |
21 | QT_BEGIN_NAMESPACE
22 |
23 | class Ui_TcpClient
24 | {
25 | public:
26 | QWidget *layoutWidget;
27 | QVBoxLayout *verticalLayout;
28 | QHBoxLayout *horizontalLayout;
29 | QLabel *name_lab;
30 | QLineEdit *name_le;
31 | QHBoxLayout *horizontalLayout_2;
32 | QLabel *pwd_lab_2;
33 | QLineEdit *pwd_le;
34 | QPushButton *login_pb;
35 | QPushButton *regist_pb;
36 | QPushButton *cancel_pb;
37 |
38 | void setupUi(QWidget *TcpClient)
39 | {
40 | if (TcpClient->objectName().isEmpty())
41 | TcpClient->setObjectName(QString::fromUtf8("TcpClient"));
42 | TcpClient->resize(543, 356);
43 | QFont font;
44 | font.setFamily(QString::fromUtf8("Adobe \345\256\213\344\275\223 Std L"));
45 | font.setPointSize(24);
46 | TcpClient->setFont(font);
47 | layoutWidget = new QWidget(TcpClient);
48 | layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
49 | layoutWidget->setGeometry(QRect(10, 10, 511, 321));
50 | verticalLayout = new QVBoxLayout(layoutWidget);
51 | verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
52 | verticalLayout->setContentsMargins(0, 0, 0, 0);
53 | horizontalLayout = new QHBoxLayout();
54 | horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
55 | name_lab = new QLabel(layoutWidget);
56 | name_lab->setObjectName(QString::fromUtf8("name_lab"));
57 | name_lab->setFont(font);
58 |
59 | horizontalLayout->addWidget(name_lab);
60 |
61 | name_le = new QLineEdit(layoutWidget);
62 | name_le->setObjectName(QString::fromUtf8("name_le"));
63 | QFont font1;
64 | font1.setPointSize(20);
65 | name_le->setFont(font1);
66 |
67 | horizontalLayout->addWidget(name_le);
68 |
69 |
70 | verticalLayout->addLayout(horizontalLayout);
71 |
72 | horizontalLayout_2 = new QHBoxLayout();
73 | horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
74 | pwd_lab_2 = new QLabel(layoutWidget);
75 | pwd_lab_2->setObjectName(QString::fromUtf8("pwd_lab_2"));
76 | QFont font2;
77 | font2.setPointSize(24);
78 | pwd_lab_2->setFont(font2);
79 |
80 | horizontalLayout_2->addWidget(pwd_lab_2);
81 |
82 | pwd_le = new QLineEdit(layoutWidget);
83 | pwd_le->setObjectName(QString::fromUtf8("pwd_le"));
84 | pwd_le->setFont(font1);
85 | pwd_le->setEchoMode(QLineEdit::Password);
86 |
87 | horizontalLayout_2->addWidget(pwd_le);
88 |
89 |
90 | verticalLayout->addLayout(horizontalLayout_2);
91 |
92 | login_pb = new QPushButton(layoutWidget);
93 | login_pb->setObjectName(QString::fromUtf8("login_pb"));
94 | QFont font3;
95 | font3.setFamily(QString::fromUtf8("Adobe \345\256\213\344\275\223 Std L"));
96 | font3.setPointSize(20);
97 | login_pb->setFont(font3);
98 |
99 | verticalLayout->addWidget(login_pb);
100 |
101 | regist_pb = new QPushButton(layoutWidget);
102 | regist_pb->setObjectName(QString::fromUtf8("regist_pb"));
103 | regist_pb->setFont(font3);
104 |
105 | verticalLayout->addWidget(regist_pb);
106 |
107 | cancel_pb = new QPushButton(layoutWidget);
108 | cancel_pb->setObjectName(QString::fromUtf8("cancel_pb"));
109 | cancel_pb->setFont(font3);
110 |
111 | verticalLayout->addWidget(cancel_pb);
112 |
113 |
114 | retranslateUi(TcpClient);
115 |
116 | QMetaObject::connectSlotsByName(TcpClient);
117 | } // setupUi
118 |
119 | void retranslateUi(QWidget *TcpClient)
120 | {
121 | TcpClient->setWindowTitle(QCoreApplication::translate("TcpClient", "TcpClient", nullptr));
122 | name_lab->setText(QCoreApplication::translate("TcpClient", "\347\224\250\346\210\267\345\220\215\357\274\232", nullptr));
123 | pwd_lab_2->setText(QCoreApplication::translate("TcpClient", "\345\257\206 \347\240\201\357\274\232", nullptr));
124 | login_pb->setText(QCoreApplication::translate("TcpClient", "\347\231\273\345\275\225", nullptr));
125 | regist_pb->setText(QCoreApplication::translate("TcpClient", "\346\263\250\345\206\214", nullptr));
126 | cancel_pb->setText(QCoreApplication::translate("TcpClient", "\346\263\250\351\224\200", nullptr));
127 | } // retranslateUi
128 |
129 | };
130 |
131 | namespace Ui {
132 | class TcpClient: public Ui_TcpClient {};
133 | } // namespace Ui
134 |
135 | QT_END_NAMESPACE
136 |
137 | #endif // UI_TCPCLIENT_H
138 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/.qmake.stash:
--------------------------------------------------------------------------------
1 | QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
2 | QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 7
3 | QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
4 | QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
5 | QMAKE_CXX.COMPILER_MACROS = \
6 | QT_COMPILER_STDCXX \
7 | QMAKE_GCC_MAJOR_VERSION \
8 | QMAKE_GCC_MINOR_VERSION \
9 | QMAKE_GCC_PATCH_VERSION
10 | QMAKE_CXX.INCDIRS = \
11 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++ \
12 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32 \
13 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward \
14 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include \
15 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed \
16 | D:/Software/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/include
17 | QMAKE_CXX.LIBDIRS = \
18 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0 \
19 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib/gcc \
20 | D:/Software/Qt5.14.2/Tools/mingw730_64/x86_64-w64-mingw32/lib \
21 | D:/Software/Qt5.14.2/Tools/mingw730_64/lib
22 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/TcpServer.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/TcpServer.exe
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/main.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/main.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpserver.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'mytcpserver.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpServer/mytcpserver.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'mytcpserver.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_MyTcpServer_t {
25 | QByteArrayData data[5];
26 | char stringdata0[48];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_MyTcpServer_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_MyTcpServer_t qt_meta_stringdata_MyTcpServer = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 11), // "MyTcpServer"
36 | QT_MOC_LITERAL(1, 12, 12), // "deleteSocket"
37 | QT_MOC_LITERAL(2, 25, 0), // ""
38 | QT_MOC_LITERAL(3, 26, 12), // "MyTcpSocket*"
39 | QT_MOC_LITERAL(4, 39, 8) // "mysocket"
40 |
41 | },
42 | "MyTcpServer\0deleteSocket\0\0MyTcpSocket*\0"
43 | "mysocket"
44 | };
45 | #undef QT_MOC_LITERAL
46 |
47 | static const uint qt_meta_data_MyTcpServer[] = {
48 |
49 | // content:
50 | 8, // revision
51 | 0, // classname
52 | 0, 0, // classinfo
53 | 1, 14, // methods
54 | 0, 0, // properties
55 | 0, 0, // enums/sets
56 | 0, 0, // constructors
57 | 0, // flags
58 | 0, // signalCount
59 |
60 | // slots: name, argc, parameters, tag, flags
61 | 1, 1, 19, 2, 0x0a /* Public */,
62 |
63 | // slots: parameters
64 | QMetaType::Void, 0x80000000 | 3, 4,
65 |
66 | 0 // eod
67 | };
68 |
69 | void MyTcpServer::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
70 | {
71 | if (_c == QMetaObject::InvokeMetaMethod) {
72 | auto *_t = static_cast(_o);
73 | Q_UNUSED(_t)
74 | switch (_id) {
75 | case 0: _t->deleteSocket((*reinterpret_cast< MyTcpSocket*(*)>(_a[1]))); break;
76 | default: ;
77 | }
78 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
79 | switch (_id) {
80 | default: *reinterpret_cast(_a[0]) = -1; break;
81 | case 0:
82 | switch (*reinterpret_cast(_a[1])) {
83 | default: *reinterpret_cast(_a[0]) = -1; break;
84 | case 0:
85 | *reinterpret_cast(_a[0]) = qRegisterMetaType< MyTcpSocket* >(); break;
86 | }
87 | break;
88 | }
89 | }
90 | }
91 |
92 | QT_INIT_METAOBJECT const QMetaObject MyTcpServer::staticMetaObject = { {
93 | QMetaObject::SuperData::link(),
94 | qt_meta_stringdata_MyTcpServer.data,
95 | qt_meta_data_MyTcpServer,
96 | qt_static_metacall,
97 | nullptr,
98 | nullptr
99 | } };
100 |
101 |
102 | const QMetaObject *MyTcpServer::metaObject() const
103 | {
104 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
105 | }
106 |
107 | void *MyTcpServer::qt_metacast(const char *_clname)
108 | {
109 | if (!_clname) return nullptr;
110 | if (!strcmp(_clname, qt_meta_stringdata_MyTcpServer.stringdata0))
111 | return static_cast(this);
112 | return QTcpServer::qt_metacast(_clname);
113 | }
114 |
115 | int MyTcpServer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
116 | {
117 | _id = QTcpServer::qt_metacall(_c, _id, _a);
118 | if (_id < 0)
119 | return _id;
120 | if (_c == QMetaObject::InvokeMetaMethod) {
121 | if (_id < 1)
122 | qt_static_metacall(this, _c, _id, _a);
123 | _id -= 1;
124 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
125 | if (_id < 1)
126 | qt_static_metacall(this, _c, _id, _a);
127 | _id -= 1;
128 | }
129 | return _id;
130 | }
131 | QT_WARNING_POP
132 | QT_END_MOC_NAMESPACE
133 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpserver.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpserver.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpsocket.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'mytcpsocket.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpServer/mytcpsocket.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'mytcpsocket.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_MyTcpSocket_t {
25 | QByteArrayData data[8];
26 | char stringdata0[82];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_MyTcpSocket_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_MyTcpSocket_t qt_meta_stringdata_MyTcpSocket = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 11), // "MyTcpSocket"
36 | QT_MOC_LITERAL(1, 12, 7), // "offline"
37 | QT_MOC_LITERAL(2, 20, 0), // ""
38 | QT_MOC_LITERAL(3, 21, 12), // "MyTcpSocket*"
39 | QT_MOC_LITERAL(4, 34, 8), // "mysocket"
40 | QT_MOC_LITERAL(5, 43, 7), // "recvMsg"
41 | QT_MOC_LITERAL(6, 51, 13), // "clientOffline"
42 | QT_MOC_LITERAL(7, 65, 16) // "sendFileToClient"
43 |
44 | },
45 | "MyTcpSocket\0offline\0\0MyTcpSocket*\0"
46 | "mysocket\0recvMsg\0clientOffline\0"
47 | "sendFileToClient"
48 | };
49 | #undef QT_MOC_LITERAL
50 |
51 | static const uint qt_meta_data_MyTcpSocket[] = {
52 |
53 | // content:
54 | 8, // revision
55 | 0, // classname
56 | 0, 0, // classinfo
57 | 4, 14, // methods
58 | 0, 0, // properties
59 | 0, 0, // enums/sets
60 | 0, 0, // constructors
61 | 0, // flags
62 | 1, // signalCount
63 |
64 | // signals: name, argc, parameters, tag, flags
65 | 1, 1, 34, 2, 0x06 /* Public */,
66 |
67 | // slots: name, argc, parameters, tag, flags
68 | 5, 0, 37, 2, 0x0a /* Public */,
69 | 6, 0, 38, 2, 0x0a /* Public */,
70 | 7, 0, 39, 2, 0x0a /* Public */,
71 |
72 | // signals: parameters
73 | QMetaType::Void, 0x80000000 | 3, 4,
74 |
75 | // slots: parameters
76 | QMetaType::Void,
77 | QMetaType::Void,
78 | QMetaType::Void,
79 |
80 | 0 // eod
81 | };
82 |
83 | void MyTcpSocket::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
84 | {
85 | if (_c == QMetaObject::InvokeMetaMethod) {
86 | auto *_t = static_cast(_o);
87 | Q_UNUSED(_t)
88 | switch (_id) {
89 | case 0: _t->offline((*reinterpret_cast< MyTcpSocket*(*)>(_a[1]))); break;
90 | case 1: _t->recvMsg(); break;
91 | case 2: _t->clientOffline(); break;
92 | case 3: _t->sendFileToClient(); break;
93 | default: ;
94 | }
95 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
96 | switch (_id) {
97 | default: *reinterpret_cast(_a[0]) = -1; break;
98 | case 0:
99 | switch (*reinterpret_cast(_a[1])) {
100 | default: *reinterpret_cast(_a[0]) = -1; break;
101 | case 0:
102 | *reinterpret_cast(_a[0]) = qRegisterMetaType< MyTcpSocket* >(); break;
103 | }
104 | break;
105 | }
106 | } else if (_c == QMetaObject::IndexOfMethod) {
107 | int *result = reinterpret_cast(_a[0]);
108 | {
109 | using _t = void (MyTcpSocket::*)(MyTcpSocket * );
110 | if (*reinterpret_cast<_t *>(_a[1]) == static_cast<_t>(&MyTcpSocket::offline)) {
111 | *result = 0;
112 | return;
113 | }
114 | }
115 | }
116 | }
117 |
118 | QT_INIT_METAOBJECT const QMetaObject MyTcpSocket::staticMetaObject = { {
119 | QMetaObject::SuperData::link(),
120 | qt_meta_stringdata_MyTcpSocket.data,
121 | qt_meta_data_MyTcpSocket,
122 | qt_static_metacall,
123 | nullptr,
124 | nullptr
125 | } };
126 |
127 |
128 | const QMetaObject *MyTcpSocket::metaObject() const
129 | {
130 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
131 | }
132 |
133 | void *MyTcpSocket::qt_metacast(const char *_clname)
134 | {
135 | if (!_clname) return nullptr;
136 | if (!strcmp(_clname, qt_meta_stringdata_MyTcpSocket.stringdata0))
137 | return static_cast(this);
138 | return QTcpSocket::qt_metacast(_clname);
139 | }
140 |
141 | int MyTcpSocket::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
142 | {
143 | _id = QTcpSocket::qt_metacall(_c, _id, _a);
144 | if (_id < 0)
145 | return _id;
146 | if (_c == QMetaObject::InvokeMetaMethod) {
147 | if (_id < 4)
148 | qt_static_metacall(this, _c, _id, _a);
149 | _id -= 4;
150 | } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
151 | if (_id < 4)
152 | qt_static_metacall(this, _c, _id, _a);
153 | _id -= 4;
154 | }
155 | return _id;
156 | }
157 |
158 | // SIGNAL 0
159 | void MyTcpSocket::offline(MyTcpSocket * _t1)
160 | {
161 | void *_a[] = { nullptr, const_cast(reinterpret_cast(std::addressof(_t1))) };
162 | QMetaObject::activate(this, &staticMetaObject, 0, _a);
163 | }
164 | QT_WARNING_POP
165 | QT_END_MOC_NAMESPACE
166 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpsocket.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_mytcpsocket.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opedb.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'opedb.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpServer/opedb.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'opedb.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_OpeDB_t {
25 | QByteArrayData data[1];
26 | char stringdata0[6];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_OpeDB_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_OpeDB_t qt_meta_stringdata_OpeDB = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 5) // "OpeDB"
36 |
37 | },
38 | "OpeDB"
39 | };
40 | #undef QT_MOC_LITERAL
41 |
42 | static const uint qt_meta_data_OpeDB[] = {
43 |
44 | // content:
45 | 8, // revision
46 | 0, // classname
47 | 0, 0, // classinfo
48 | 0, 0, // methods
49 | 0, 0, // properties
50 | 0, 0, // enums/sets
51 | 0, 0, // constructors
52 | 0, // flags
53 | 0, // signalCount
54 |
55 | 0 // eod
56 | };
57 |
58 | void OpeDB::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 | {
60 | Q_UNUSED(_o);
61 | Q_UNUSED(_id);
62 | Q_UNUSED(_c);
63 | Q_UNUSED(_a);
64 | }
65 |
66 | QT_INIT_METAOBJECT const QMetaObject OpeDB::staticMetaObject = { {
67 | QMetaObject::SuperData::link(),
68 | qt_meta_stringdata_OpeDB.data,
69 | qt_meta_data_OpeDB,
70 | qt_static_metacall,
71 | nullptr,
72 | nullptr
73 | } };
74 |
75 |
76 | const QMetaObject *OpeDB::metaObject() const
77 | {
78 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
79 | }
80 |
81 | void *OpeDB::qt_metacast(const char *_clname)
82 | {
83 | if (!_clname) return nullptr;
84 | if (!strcmp(_clname, qt_meta_stringdata_OpeDB.stringdata0))
85 | return static_cast(this);
86 | return QObject::qt_metacast(_clname);
87 | }
88 |
89 | int OpeDB::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
90 | {
91 | _id = QObject::qt_metacall(_c, _id, _a);
92 | return _id;
93 | }
94 | QT_WARNING_POP
95 | QT_END_MOC_NAMESPACE
96 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opedb.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_opedb.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_predefs.h:
--------------------------------------------------------------------------------
1 | #define __DBL_MIN_EXP__ (-1021)
2 | #define __FLT32X_MAX_EXP__ 1024
3 | #define __cpp_attributes 200809
4 | #define __UINT_LEAST16_MAX__ 0xffff
5 | #define __ATOMIC_ACQUIRE 2
6 | #define __FLT128_MAX_10_EXP__ 4932
7 | #define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F
8 | #define __GCC_IEC_559_COMPLEX 2
9 | #define __UINT_LEAST8_TYPE__ unsigned char
10 | #define __SIZEOF_FLOAT80__ 16
11 | #define _WIN32 1
12 | #define __INTMAX_C(c) c ## LL
13 | #define __CHAR_BIT__ 8
14 | #define __UINT8_MAX__ 0xff
15 | #define _WIN64 1
16 | #define __WINT_MAX__ 0xffff
17 | #define __FLT32_MIN_EXP__ (-125)
18 | #define __cpp_static_assert 200410
19 | #define __ORDER_LITTLE_ENDIAN__ 1234
20 | #define __SIZE_MAX__ 0xffffffffffffffffULL
21 | #define __WCHAR_MAX__ 0xffff
22 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
23 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
24 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
25 | #define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L)
26 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
27 | #define __GCC_ATOMIC_CHAR_LOCK_FREE 2
28 | #define __GCC_IEC_559 2
29 | #define __FLT32X_DECIMAL_DIG__ 17
30 | #define __FLT_EVAL_METHOD__ 0
31 | #define __cpp_binary_literals 201304
32 | #define __FLT64_DECIMAL_DIG__ 17
33 | #define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
34 | #define __x86_64 1
35 | #define __cpp_variadic_templates 200704
36 | #define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
37 | #define __SIG_ATOMIC_TYPE__ int
38 | #define __DBL_MIN_10_EXP__ (-307)
39 | #define __FINITE_MATH_ONLY__ 0
40 | #define __GNUC_PATCHLEVEL__ 0
41 | #define __FLT32_HAS_DENORM__ 1
42 | #define __UINT_FAST8_MAX__ 0xff
43 | #define __has_include(STR) __has_include__(STR)
44 | #define _stdcall __attribute__((__stdcall__))
45 | #define __DEC64_MAX_EXP__ 385
46 | #define __INT8_C(c) c
47 | #define __INT_LEAST8_WIDTH__ 8
48 | #define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
49 | #define __SHRT_MAX__ 0x7fff
50 | #define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L
51 | #define __FLT64X_MAX_10_EXP__ 4932
52 | #define __UINT_LEAST8_MAX__ 0xff
53 | #define __GCC_ATOMIC_BOOL_LOCK_FREE 2
54 | #define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128
55 | #define __UINTMAX_TYPE__ long long unsigned int
56 | #define __DEC32_EPSILON__ 1E-6DF
57 | #define __FLT_EVAL_METHOD_TS_18661_3__ 0
58 | #define __UINT32_MAX__ 0xffffffffU
59 | #define __GXX_EXPERIMENTAL_CXX0X__ 1
60 | #define __LDBL_MAX_EXP__ 16384
61 | #define __FLT128_MIN_EXP__ (-16381)
62 | #define __WINT_MIN__ 0
63 | #define __FLT128_MIN_10_EXP__ (-4931)
64 | #define __INT_LEAST16_WIDTH__ 16
65 | #define __SCHAR_MAX__ 0x7f
66 | #define __FLT128_MANT_DIG__ 113
67 | #define __WCHAR_MIN__ 0
68 | #define __INT64_C(c) c ## LL
69 | #define __DBL_DIG__ 15
70 | #define __GCC_ATOMIC_POINTER_LOCK_FREE 2
71 | #define __FLT64X_MANT_DIG__ 64
72 | #define __SIZEOF_INT__ 4
73 | #define __SIZEOF_POINTER__ 8
74 | #define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
75 | #define __USER_LABEL_PREFIX__
76 | #define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x
77 | #define __STDC_HOSTED__ 1
78 | #define __WIN32 1
79 | #define __LDBL_HAS_INFINITY__ 1
80 | #define __WIN64 1
81 | #define __FLT32_DIG__ 6
82 | #define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F
83 | #define __GXX_WEAK__ 1
84 | #define __SHRT_WIDTH__ 16
85 | #define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
86 | #define __DEC32_MAX__ 9.999999E96DF
87 | #define __cpp_threadsafe_static_init 200806
88 | #define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x
89 | #define __MINGW32__ 1
90 | #define __FLT32X_HAS_INFINITY__ 1
91 | #define __INT32_MAX__ 0x7fffffff
92 | #define __INT_WIDTH__ 32
93 | #define __SIZEOF_LONG__ 4
94 | #define __UINT16_C(c) c
95 | #define __PTRDIFF_WIDTH__ 64
96 | #define __DECIMAL_DIG__ 21
97 | #define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64
98 | #define __INTMAX_WIDTH__ 64
99 | #define __FLT64_MIN_EXP__ (-1021)
100 | #define __has_include_next(STR) __has_include_next__(STR)
101 | #define __FLT64X_MIN_10_EXP__ (-4931)
102 | #define __LDBL_HAS_QUIET_NAN__ 1
103 | #define __FLT64_MANT_DIG__ 53
104 | #define _REENTRANT 1
105 | #define __GNUC__ 7
106 | #define _cdecl __attribute__((__cdecl__))
107 | #define __GXX_RTTI 1
108 | #define __MMX__ 1
109 | #define __cpp_delegating_constructors 200604
110 | #define __FLT_HAS_DENORM__ 1
111 | #define __SIZEOF_LONG_DOUBLE__ 16
112 | #define __BIGGEST_ALIGNMENT__ 16
113 | #define __STDC_UTF_16__ 1
114 | #define __FLT64_MAX_10_EXP__ 308
115 | #define __FLT32_HAS_INFINITY__ 1
116 | #define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L)
117 | #define _thiscall __attribute__((__thiscall__))
118 | #define __cpp_raw_strings 200710
119 | #define __INT_FAST32_MAX__ 0x7fffffff
120 | #define __WINNT 1
121 | #define __DBL_HAS_INFINITY__ 1
122 | #define __INT64_MAX__ 0x7fffffffffffffffLL
123 | #define __WINNT__ 1
124 | #define __DEC32_MIN_EXP__ (-94)
125 | #define __INTPTR_WIDTH__ 64
126 | #define __FLT32X_HAS_DENORM__ 1
127 | #define __INT_FAST16_TYPE__ short int
128 | #define _fastcall __attribute__((__fastcall__))
129 | #define __LDBL_HAS_DENORM__ 1
130 | #define __cplusplus 201103L
131 | #define __cpp_ref_qualifiers 200710
132 | #define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
133 | #define __INT_LEAST32_MAX__ 0x7fffffff
134 | #define __DEC32_MIN__ 1E-95DF
135 | #define __DEPRECATED 1
136 | #define __cpp_rvalue_references 200610
137 | #define __DBL_MAX_EXP__ 1024
138 | #define __WCHAR_WIDTH__ 16
139 | #define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32
140 | #define __DEC128_EPSILON__ 1E-33DL
141 | #define __SSE2_MATH__ 1
142 | #define __ATOMIC_HLE_RELEASE 131072
143 | #define __WIN32__ 1
144 | #define __PTRDIFF_MAX__ 0x7fffffffffffffffLL
145 | #define __amd64 1
146 | #define __tune_core2__ 1
147 | #define __ATOMIC_HLE_ACQUIRE 65536
148 | #define __FLT32_HAS_QUIET_NAN__ 1
149 | #define __GNUG__ 7
150 | #define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
151 | #define __SIZEOF_SIZE_T__ 8
152 | #define __cpp_rvalue_reference 200610
153 | #define __cpp_nsdmi 200809
154 | #define __FLT64X_MIN_EXP__ (-16381)
155 | #define __SIZEOF_WINT_T__ 2
156 | #define __LONG_LONG_WIDTH__ 64
157 | #define __cpp_initializer_lists 200806
158 | #define __FLT32_MAX_EXP__ 128
159 | #define __cpp_hex_float 201603
160 | #define __GCC_HAVE_DWARF2_CFI_ASM 1
161 | #define __GXX_ABI_VERSION 1011
162 | #define __FLT128_HAS_INFINITY__ 1
163 | #define __FLT_MIN_EXP__ (-125)
164 | #define __cpp_lambdas 200907
165 | #define __FLT64X_HAS_QUIET_NAN__ 1
166 | #define __INT_FAST64_TYPE__ long long int
167 | #define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64
168 | #define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L)
169 | #define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x
170 | #define __DECIMAL_BID_FORMAT__ 1
171 | #define __GXX_TYPEINFO_EQUALITY_INLINE 0
172 | #define __FLT64_MIN_10_EXP__ (-307)
173 | #define __FLT64X_DECIMAL_DIG__ 21
174 | #define __DEC128_MIN__ 1E-6143DL
175 | #define __REGISTER_PREFIX__
176 | #define __UINT16_MAX__ 0xffff
177 | #define __DBL_HAS_DENORM__ 1
178 | #define __cdecl __attribute__((__cdecl__))
179 | #define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32
180 | #define __UINT8_TYPE__ unsigned char
181 | #define __NO_INLINE__ 1
182 | #define __FLT_MANT_DIG__ 24
183 | #define __LDBL_DECIMAL_DIG__ 21
184 | #define __VERSION__ "7.3.0"
185 | #define __UINT64_C(c) c ## ULL
186 | #define __cpp_unicode_characters 200704
187 | #define __GCC_ATOMIC_INT_LOCK_FREE 2
188 | #define __FLT128_MAX_EXP__ 16384
189 | #define __FLT32_MANT_DIG__ 24
190 | #define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__
191 | #define __FLT128_HAS_DENORM__ 1
192 | #define __FLT128_DIG__ 33
193 | #define __SCHAR_WIDTH__ 8
194 | #define __INT32_C(c) c
195 | #define __DEC64_EPSILON__ 1E-15DD
196 | #define __ORDER_PDP_ENDIAN__ 3412
197 | #define __DEC128_MIN_EXP__ (-6142)
198 | #define __FLT32_MAX_10_EXP__ 38
199 | #define __INT_FAST32_TYPE__ int
200 | #define __UINT_LEAST16_TYPE__ short unsigned int
201 | #define __FLT64X_HAS_INFINITY__ 1
202 | #define __INT16_MAX__ 0x7fff
203 | #define __cpp_rtti 199711
204 | #define __SIZE_TYPE__ long long unsigned int
205 | #define __UINT64_MAX__ 0xffffffffffffffffULL
206 | #define __FLT64X_DIG__ 18
207 | #define __INT8_TYPE__ signed char
208 | #define __GCC_ASM_FLAG_OUTPUTS__ 1
209 | #define __FLT_RADIX__ 2
210 | #define __INT_LEAST16_TYPE__ short int
211 | #define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L
212 | #define __UINTMAX_C(c) c ## ULL
213 | #define __GLIBCXX_BITSIZE_INT_N_0 128
214 | #define __SEH__ 1
215 | #define __SIG_ATOMIC_MAX__ 0x7fffffff
216 | #define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
217 | #define __SIZEOF_PTRDIFF_T__ 8
218 | #define __FLT32X_MANT_DIG__ 53
219 | #define __x86_64__ 1
220 | #define __FLT32X_MIN_EXP__ (-1021)
221 | #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
222 | #define __MSVCRT__ 1
223 | #define __INT_FAST16_MAX__ 0x7fff
224 | #define __FLT64_DIG__ 15
225 | #define __UINT_FAST32_MAX__ 0xffffffffU
226 | #define __UINT_LEAST64_TYPE__ long long unsigned int
227 | #define __FLT_HAS_QUIET_NAN__ 1
228 | #define __FLT_MAX_10_EXP__ 38
229 | #define __LONG_MAX__ 0x7fffffffL
230 | #define __FLT64X_HAS_DENORM__ 1
231 | #define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
232 | #define __FLT_HAS_INFINITY__ 1
233 | #define __cpp_unicode_literals 200710
234 | #define __UINT_FAST16_TYPE__ short unsigned int
235 | #define __DEC64_MAX__ 9.999999999999999E384DD
236 | #define __INT_FAST32_WIDTH__ 32
237 | #define __CHAR16_TYPE__ short unsigned int
238 | #define __PRAGMA_REDEFINE_EXTNAME 1
239 | #define __SIZE_WIDTH__ 64
240 | #define __SEG_FS 1
241 | #define __INT_LEAST16_MAX__ 0x7fff
242 | #define __DEC64_MANT_DIG__ 16
243 | #define __UINT_LEAST32_MAX__ 0xffffffffU
244 | #define __SEG_GS 1
245 | #define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32
246 | #define __GCC_ATOMIC_LONG_LOCK_FREE 2
247 | #define __SIG_ATOMIC_WIDTH__ 32
248 | #define __INT_LEAST64_TYPE__ long long int
249 | #define __INT16_TYPE__ short int
250 | #define __INT_LEAST8_TYPE__ signed char
251 | #define __DEC32_MAX_EXP__ 97
252 | #define __INT_FAST8_MAX__ 0x7f
253 | #define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128
254 | #define __INTPTR_MAX__ 0x7fffffffffffffffLL
255 | #define __GXX_MERGED_TYPEINFO_NAMES 0
256 | #define __cpp_range_based_for 200907
257 | #define __FLT64_HAS_QUIET_NAN__ 1
258 | #define __stdcall __attribute__((__stdcall__))
259 | #define __FLT32_MIN_10_EXP__ (-37)
260 | #define __SSE2__ 1
261 | #define __EXCEPTIONS 1
262 | #define __LDBL_MANT_DIG__ 64
263 | #define __DBL_HAS_QUIET_NAN__ 1
264 | #define __FLT64_HAS_INFINITY__ 1
265 | #define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x
266 | #define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
267 | #define __INTPTR_TYPE__ long long int
268 | #define __UINT16_TYPE__ short unsigned int
269 | #define __WCHAR_TYPE__ short unsigned int
270 | #define __SIZEOF_FLOAT__ 4
271 | #define __pic__ 1
272 | #define __UINTPTR_MAX__ 0xffffffffffffffffULL
273 | #define __INT_FAST64_WIDTH__ 64
274 | #define __DEC64_MIN_EXP__ (-382)
275 | #define __cpp_decltype 200707
276 | #define __FLT32_DECIMAL_DIG__ 9
277 | #define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
278 | #define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
279 | #define __FLT_DIG__ 6
280 | #define __FLT64X_MAX_EXP__ 16384
281 | #define __UINT_FAST64_TYPE__ long long unsigned int
282 | #define __INT_MAX__ 0x7fffffff
283 | #define __amd64__ 1
284 | #define WIN32 1
285 | #define __nocona 1
286 | #define __code_model_medium__ 1
287 | #define __INT64_TYPE__ long long int
288 | #define __FLT_MAX_EXP__ 128
289 | #define WIN64 1
290 | #define __ORDER_BIG_ENDIAN__ 4321
291 | #define __DBL_MANT_DIG__ 53
292 | #define __cpp_inheriting_constructors 201511
293 | #define __SIZEOF_FLOAT128__ 16
294 | #define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
295 | #define __DEC64_MIN__ 1E-383DD
296 | #define __WINT_TYPE__ short unsigned int
297 | #define __UINT_LEAST32_TYPE__ unsigned int
298 | #define __SIZEOF_SHORT__ 2
299 | #define __SSE__ 1
300 | #define __LDBL_MIN_EXP__ (-16381)
301 | #define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64
302 | #define __WINT_WIDTH__ 16
303 | #define __INT_LEAST8_MAX__ 0x7f
304 | #define __FLT32X_MAX_10_EXP__ 308
305 | #define __SIZEOF_INT128__ 16
306 | #define __WCHAR_UNSIGNED__ 1
307 | #define __LDBL_MAX_10_EXP__ 4932
308 | #define __ATOMIC_RELAXED 0
309 | #define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L)
310 | #define __thiscall __attribute__((__thiscall__))
311 | #define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128
312 | #define __UINT8_C(c) c
313 | #define __FLT64_MAX_EXP__ 1024
314 | #define __INT_LEAST32_TYPE__ int
315 | #define __SIZEOF_WCHAR_T__ 2
316 | #define __FLT128_HAS_QUIET_NAN__ 1
317 | #define __INT_FAST8_TYPE__ signed char
318 | #define __fastcall __attribute__((__fastcall__))
319 | #define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x
320 | #define __GNUC_STDC_INLINE__ 1
321 | #define __FLT64_HAS_DENORM__ 1
322 | #define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32
323 | #define __DBL_DECIMAL_DIG__ 17
324 | #define __STDC_UTF_32__ 1
325 | #define __INT_FAST8_WIDTH__ 8
326 | #define __FXSR__ 1
327 | #define __DEC_EVAL_METHOD__ 2
328 | #define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x
329 | #define __MINGW64__ 1
330 | #define __cpp_runtime_arrays 198712
331 | #define __UINT64_TYPE__ long long unsigned int
332 | #define __UINT32_C(c) c ## U
333 | #define __INTMAX_MAX__ 0x7fffffffffffffffLL
334 | #define __cpp_alias_templates 200704
335 | #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
336 | #define WINNT 1
337 | #define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F
338 | #define __INT8_MAX__ 0x7f
339 | #define __LONG_WIDTH__ 32
340 | #define __PIC__ 1
341 | #define __UINT_FAST32_TYPE__ unsigned int
342 | #define __CHAR32_TYPE__ unsigned int
343 | #define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F
344 | #define __cpp_constexpr 200704
345 | #define __INT32_TYPE__ int
346 | #define __SIZEOF_DOUBLE__ 8
347 | #define __cpp_exceptions 199711
348 | #define __FLT_MIN_10_EXP__ (-37)
349 | #define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64
350 | #define __INT_LEAST32_WIDTH__ 32
351 | #define __INTMAX_TYPE__ long long int
352 | #define _INTEGRAL_MAX_BITS 64
353 | #define __DEC128_MAX_EXP__ 6145
354 | #define __FLT32X_HAS_QUIET_NAN__ 1
355 | #define __ATOMIC_CONSUME 1
356 | #define __nocona__ 1
357 | #define __GNUC_MINOR__ 3
358 | #define __GLIBCXX_TYPE_INT_N_0 __int128
359 | #define __INT_FAST16_WIDTH__ 16
360 | #define __UINTMAX_MAX__ 0xffffffffffffffffULL
361 | #define __DEC32_MANT_DIG__ 7
362 | #define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x
363 | #define __DBL_MAX_10_EXP__ 308
364 | #define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L
365 | #define __INT16_C(c) c
366 | #define __STDC__ 1
367 | #define __FLT32X_DIG__ 15
368 | #define __PTRDIFF_TYPE__ long long int
369 | #define __ATOMIC_SEQ_CST 5
370 | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1
371 | #define __UINT32_TYPE__ unsigned int
372 | #define __FLT32X_MIN_10_EXP__ (-307)
373 | #define __UINTPTR_TYPE__ long long unsigned int
374 | #define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
375 | #define __DEC128_MANT_DIG__ 34
376 | #define __LDBL_MIN_10_EXP__ (-4931)
377 | #define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128
378 | #define __SSE_MATH__ 1
379 | #define __SIZEOF_LONG_LONG__ 8
380 | #define __cpp_user_defined_literals 200809
381 | #define __FLT128_DECIMAL_DIG__ 36
382 | #define __GCC_ATOMIC_LLONG_LOCK_FREE 2
383 | #define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x
384 | #define __LDBL_DIG__ 18
385 | #define __FLT_DECIMAL_DIG__ 9
386 | #define __UINT_FAST16_MAX__ 0xffff
387 | #define __GCC_ATOMIC_SHORT_LOCK_FREE 2
388 | #define __INT_LEAST64_WIDTH__ 64
389 | #define __SSE3__ 1
390 | #define __UINT_FAST8_TYPE__ unsigned char
391 | #define __WIN64__ 1
392 | #define __ATOMIC_ACQ_REL 4
393 | #define __ATOMIC_RELEASE 3
394 | #define __declspec(x) __attribute__((x))
395 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpserver.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Meta object code from reading C++ file 'tcpserver.h'
3 | **
4 | ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.14.2)
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | #include
10 | #include "../../TcpServer/tcpserver.h"
11 | #include
12 | #include
13 | #if !defined(Q_MOC_OUTPUT_REVISION)
14 | #error "The header file 'tcpserver.h' doesn't include ."
15 | #elif Q_MOC_OUTPUT_REVISION != 67
16 | #error "This file was generated using the moc from 5.14.2. It"
17 | #error "cannot be used with the include files from this version of Qt."
18 | #error "(The moc has changed too much.)"
19 | #endif
20 |
21 | QT_BEGIN_MOC_NAMESPACE
22 | QT_WARNING_PUSH
23 | QT_WARNING_DISABLE_DEPRECATED
24 | struct qt_meta_stringdata_TcpServer_t {
25 | QByteArrayData data[1];
26 | char stringdata0[10];
27 | };
28 | #define QT_MOC_LITERAL(idx, ofs, len) \
29 | Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \
30 | qptrdiff(offsetof(qt_meta_stringdata_TcpServer_t, stringdata0) + ofs \
31 | - idx * sizeof(QByteArrayData)) \
32 | )
33 | static const qt_meta_stringdata_TcpServer_t qt_meta_stringdata_TcpServer = {
34 | {
35 | QT_MOC_LITERAL(0, 0, 9) // "TcpServer"
36 |
37 | },
38 | "TcpServer"
39 | };
40 | #undef QT_MOC_LITERAL
41 |
42 | static const uint qt_meta_data_TcpServer[] = {
43 |
44 | // content:
45 | 8, // revision
46 | 0, // classname
47 | 0, 0, // classinfo
48 | 0, 0, // methods
49 | 0, 0, // properties
50 | 0, 0, // enums/sets
51 | 0, 0, // constructors
52 | 0, // flags
53 | 0, // signalCount
54 |
55 | 0 // eod
56 | };
57 |
58 | void TcpServer::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
59 | {
60 | Q_UNUSED(_o);
61 | Q_UNUSED(_id);
62 | Q_UNUSED(_c);
63 | Q_UNUSED(_a);
64 | }
65 |
66 | QT_INIT_METAOBJECT const QMetaObject TcpServer::staticMetaObject = { {
67 | QMetaObject::SuperData::link(),
68 | qt_meta_stringdata_TcpServer.data,
69 | qt_meta_data_TcpServer,
70 | qt_static_metacall,
71 | nullptr,
72 | nullptr
73 | } };
74 |
75 |
76 | const QMetaObject *TcpServer::metaObject() const
77 | {
78 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
79 | }
80 |
81 | void *TcpServer::qt_metacast(const char *_clname)
82 | {
83 | if (!_clname) return nullptr;
84 | if (!strcmp(_clname, qt_meta_stringdata_TcpServer.stringdata0))
85 | return static_cast(this);
86 | return QWidget::qt_metacast(_clname);
87 | }
88 |
89 | int TcpServer::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
90 | {
91 | _id = QWidget::qt_metacall(_c, _id, _a);
92 | return _id;
93 | }
94 | QT_WARNING_POP
95 | QT_END_MOC_NAMESPACE
96 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpserver.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/moc_tcpserver.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/mytcpserver.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/mytcpserver.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/mytcpsocket.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/mytcpsocket.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/opedb.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/opedb.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/protocol.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/protocol.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.cpp:
--------------------------------------------------------------------------------
1 | /****************************************************************************
2 | ** Resource object code
3 | **
4 | ** Created by: The Resource Compiler for Qt version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost!
7 | *****************************************************************************/
8 |
9 | static const unsigned char qt_resource_data[] = {
10 | // D:/Software/C++_Code/NetworkDiskSystem/TcpServer/server.config
11 | 0x0,0x0,0x0,0xf,
12 | 0x31,
13 | 0x32,0x37,0x2e,0x30,0x2e,0x30,0x2e,0x31,0xd,0xa,0x38,0x38,0x38,0x38,
14 |
15 | };
16 |
17 | static const unsigned char qt_resource_name[] = {
18 | // server.config
19 | 0x0,0xd,
20 | 0x7,0x39,0xd5,0xb7,
21 | 0x0,0x73,
22 | 0x0,0x65,0x0,0x72,0x0,0x76,0x0,0x65,0x0,0x72,0x0,0x2e,0x0,0x63,0x0,0x6f,0x0,0x6e,0x0,0x66,0x0,0x69,0x0,0x67,
23 |
24 | };
25 |
26 | static const unsigned char qt_resource_struct[] = {
27 | // :
28 | 0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x1,
29 | 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
30 | // :/server.config
31 | 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
32 | 0x0,0x0,0x1,0x87,0x4a,0xde,0x7,0xfd,
33 |
34 | };
35 |
36 | #ifdef QT_NAMESPACE
37 | # define QT_RCC_PREPEND_NAMESPACE(name) ::QT_NAMESPACE::name
38 | # define QT_RCC_MANGLE_NAMESPACE0(x) x
39 | # define QT_RCC_MANGLE_NAMESPACE1(a, b) a##_##b
40 | # define QT_RCC_MANGLE_NAMESPACE2(a, b) QT_RCC_MANGLE_NAMESPACE1(a,b)
41 | # define QT_RCC_MANGLE_NAMESPACE(name) QT_RCC_MANGLE_NAMESPACE2( \
42 | QT_RCC_MANGLE_NAMESPACE0(name), QT_RCC_MANGLE_NAMESPACE0(QT_NAMESPACE))
43 | #else
44 | # define QT_RCC_PREPEND_NAMESPACE(name) name
45 | # define QT_RCC_MANGLE_NAMESPACE(name) name
46 | #endif
47 |
48 | #ifdef QT_NAMESPACE
49 | namespace QT_NAMESPACE {
50 | #endif
51 |
52 | bool qRegisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
53 | bool qUnregisterResourceData(int, const unsigned char *, const unsigned char *, const unsigned char *);
54 |
55 | #ifdef QT_NAMESPACE
56 | }
57 | #endif
58 |
59 | int QT_RCC_MANGLE_NAMESPACE(qInitResources_config)();
60 | int QT_RCC_MANGLE_NAMESPACE(qInitResources_config)()
61 | {
62 | int version = 3;
63 | QT_RCC_PREPEND_NAMESPACE(qRegisterResourceData)
64 | (version, qt_resource_struct, qt_resource_name, qt_resource_data);
65 | return 1;
66 | }
67 |
68 | int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)();
69 | int QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)()
70 | {
71 | int version = 3;
72 | QT_RCC_PREPEND_NAMESPACE(qUnregisterResourceData)
73 | (version, qt_resource_struct, qt_resource_name, qt_resource_data);
74 | return 1;
75 | }
76 |
77 | namespace {
78 | struct initializer {
79 | initializer() { QT_RCC_MANGLE_NAMESPACE(qInitResources_config)(); }
80 | ~initializer() { QT_RCC_MANGLE_NAMESPACE(qCleanupResources_config)(); }
81 | } dummy;
82 | }
83 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/qrc_config.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/tcpserver.o:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/debug/tcpserver.o
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/lucy/hello/hello.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/lucy/hello/hello.txt
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/object_script.TcpServer.Debug:
--------------------------------------------------------------------------------
1 | debug/main.o
2 | debug/mytcpserver.o
3 | debug/mytcpsocket.o
4 | debug/opedb.o
5 | debug/protocol.o
6 | debug/tcpserver.o
7 | debug/qrc_config.o
8 | debug/moc_mytcpserver.o
9 | debug/moc_mytcpsocket.o
10 | debug/moc_opedb.o
11 | debug/moc_tcpserver.o
12 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/object_script.TcpServer.Release:
--------------------------------------------------------------------------------
1 | release/main.o
2 | release/mytcpserver.o
3 | release/mytcpsocket.o
4 | release/opedb.o
5 | release/protocol.o
6 | release/tcpserver.o
7 | release/qrc_config.o
8 | release/moc_mytcpserver.o
9 | release/moc_mytcpsocket.o
10 | release/moc_opedb.o
11 | release/moc_tcpserver.o
12 |
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/hello/hello.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/hello/hello.txt
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/test_ppt.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/test_ppt.pptx
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/test_word.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/rose/test_word.docx
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/hello/hello.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/hello/hello.txt
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/hello/test_ppt.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/hello/test_ppt.pptx
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/test_word.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/IronmanJay/NetworkDiskSystemProjectBasedOnCPlusPlus/6991de36b3f8b75e84d450182b198cb2a9be08eb/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/test/test_word.docx
--------------------------------------------------------------------------------
/build-TcpServer-Desktop_Qt_5_14_2_MinGW_64_bit-Debug/ui_tcpserver.h:
--------------------------------------------------------------------------------
1 | /********************************************************************************
2 | ** Form generated from reading UI file 'tcpserver.ui'
3 | **
4 | ** Created by: Qt User Interface Compiler version 5.14.2
5 | **
6 | ** WARNING! All changes made in this file will be lost when recompiling UI file!
7 | ********************************************************************************/
8 |
9 | #ifndef UI_TCPSERVER_H
10 | #define UI_TCPSERVER_H
11 |
12 | #include
13 | #include
14 | #include
15 |
16 | QT_BEGIN_NAMESPACE
17 |
18 | class Ui_TcpServer
19 | {
20 | public:
21 |
22 | void setupUi(QWidget *TcpServer)
23 | {
24 | if (TcpServer->objectName().isEmpty())
25 | TcpServer->setObjectName(QString::fromUtf8("TcpServer"));
26 | TcpServer->resize(800, 600);
27 |
28 | retranslateUi(TcpServer);
29 |
30 | QMetaObject::connectSlotsByName(TcpServer);
31 | } // setupUi
32 |
33 | void retranslateUi(QWidget *TcpServer)
34 | {
35 | TcpServer->setWindowTitle(QCoreApplication::translate("TcpServer", "TcpServer", nullptr));
36 | } // retranslateUi
37 |
38 | };
39 |
40 | namespace Ui {
41 | class TcpServer: public Ui_TcpServer {};
42 | } // namespace Ui
43 |
44 | QT_END_NAMESPACE
45 |
46 | #endif // UI_TCPSERVER_H
47 |
--------------------------------------------------------------------------------