From cc78800cdc9293a74bbf3e5a6f6748a3aa0f13ba Mon Sep 17 00:00:00 2001 From: Tanguy Herbron Date: Wed, 13 Dec 2017 00:02:02 +0100 Subject: [PATCH] Something looking like a chat... --- ENSIM/QT5/qSocketClient/main.cpp | 11 + ENSIM/QT5/qSocketClient/mainwindow.cpp | 198 ++++++ ENSIM/QT5/qSocketClient/mainwindow.h | 35 ++ ENSIM/QT5/qSocketClient/mainwindow.ui | 83 +++ ENSIM/QT5/qSocketClient/qSocketClient.pro | 34 ++ .../QT5/qSocketClient/qSocketClient.pro.user | 562 ++++++++++++++++++ ENSIM/QT5/qSocketServer/main.cpp | 11 + ENSIM/QT5/qSocketServer/mainwindow.cpp | 102 ++++ ENSIM/QT5/qSocketServer/mainwindow.h | 38 ++ ENSIM/QT5/qSocketServer/mainwindow.ui | 69 +++ ENSIM/QT5/qSocketServer/qSocketServer.pro | 34 ++ .../QT5/qSocketServer/qSocketServer.pro.user | 562 ++++++++++++++++++ 12 files changed, 1739 insertions(+) create mode 100644 ENSIM/QT5/qSocketClient/main.cpp create mode 100644 ENSIM/QT5/qSocketClient/mainwindow.cpp create mode 100644 ENSIM/QT5/qSocketClient/mainwindow.h create mode 100644 ENSIM/QT5/qSocketClient/mainwindow.ui create mode 100644 ENSIM/QT5/qSocketClient/qSocketClient.pro create mode 100644 ENSIM/QT5/qSocketClient/qSocketClient.pro.user create mode 100644 ENSIM/QT5/qSocketServer/main.cpp create mode 100644 ENSIM/QT5/qSocketServer/mainwindow.cpp create mode 100644 ENSIM/QT5/qSocketServer/mainwindow.h create mode 100644 ENSIM/QT5/qSocketServer/mainwindow.ui create mode 100644 ENSIM/QT5/qSocketServer/qSocketServer.pro create mode 100644 ENSIM/QT5/qSocketServer/qSocketServer.pro.user diff --git a/ENSIM/QT5/qSocketClient/main.cpp b/ENSIM/QT5/qSocketClient/main.cpp new file mode 100644 index 0000000..aab39bb --- /dev/null +++ b/ENSIM/QT5/qSocketClient/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/ENSIM/QT5/qSocketClient/mainwindow.cpp b/ENSIM/QT5/qSocketClient/mainwindow.cpp new file mode 100644 index 0000000..eff7390 --- /dev/null +++ b/ENSIM/QT5/qSocketClient/mainwindow.cpp @@ -0,0 +1,198 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + soc = new QTcpSocket(this); + ui->listWidgetState->setAutoScroll(true); + connect(soc, SIGNAL(connected()), this, SLOT(onQTcpSocket_Connected())); + connect(soc, SIGNAL(disconnected()), this, SLOT(onQTcpSocket_Disconnected())); + connect(soc, SIGNAL(readChannelFinished()), this, SLOT(onQTcpSocket_read())); + connect(soc, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(onQTcpSocket_error(QAbstractSocket::SocketError))); + connect(soc, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(onQTcpSocket_stateChanged(QAbstractSocket::SocketState))); + connect(ui->listWidgetState->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), ui->listWidgetState, SLOT(scrollToBottom())); +} + +void MainWindow::onQTcpSocket_Connected() +{ + qDebug("Connecté"); + ui->pushButtonConnection->setText("Déconnexion"); +} + +void MainWindow::onQTcpSocket_Disconnected() +{ + qDebug("Deconnecté"); + ui->pushButtonConnection->setText("Connexion"); +} + +void MainWindow::onQTcpSocket_read() +{ + qDebug("Message : %c", data); + ui->listWidgetState->addItem("Message : " + QString(data)); +} + +void MainWindow::onQTcpSocket_stateChanged(QAbstractSocket::SocketState etat) +{ + switch(etat) + { + case 0: + ui->listWidgetState->addItem("Déconnecté"); + break; + + case 1: + ui->listWidgetState->addItem("Résolution de l'adresse"); + break; + + case 2: + ui->listWidgetState->addItem("Connexion..."); + break; + + case 3: + ui->listWidgetState->addItem("Connecté"); + break; + + case 4: + ui->listWidgetState->addItem("Déjà connecté"); + break; + + case 6: + ui->listWidgetState->addItem("Déconnexion..."); + break; + + case 5: + ui->listWidgetState->addItem("Ecoute..."); + break; + + default: + ui->listWidgetState->addItem("Error 404 : Error not found"); + break; + } +} + +void MainWindow::onQTcpSocket_error(QAbstractSocket::SocketError error) +{ + qDebug("Erreur : %d", QString::number(error)); + + switch (error) { + + case 0: + ui->listWidgetState->addItem("Erreur : Connexion refusée"); + break; + + case 1: + ui->listWidgetState->addItem("Erreur : Connexion terminée par le serveur"); + break; + + case 2: + ui->listWidgetState->addItem("Erreur : Adresse inconnue"); + break; + + case 3: + ui->listWidgetState->addItem("Erreur : Aucune permission"); + break; + + case 4: + ui->listWidgetState->addItem("Erreur : Manque de ressource"); + break; + + case 5: + ui->listWidgetState->addItem("Erreur : Temps écoulé"); + break; + + case 6: + ui->listWidgetState->addItem("Erreur : Datagramme trop grand"); + break; + + case 7: + ui->listWidgetState->addItem("Erreur : Erreur réseau"); + break; + + case 8: + ui->listWidgetState->addItem("Erreur : Adresse déjà utilisée"); + break; + + case 9: + ui->listWidgetState->addItem("Erreur : Adresse spécifiée non conforme au serveur"); + break; + + case 10: + ui->listWidgetState->addItem("Erreur : Opération non supportée"); + break; + + case 11: + ui->listWidgetState->addItem("Erreur : Flux de communication non terminée"); + break; + + case 12: + ui->listWidgetState->addItem("Erreur : Erreur d'authentification avec le proxy"); + break; + + case 13: + ui->listWidgetState->addItem("Erreur : Erreur SSL/TLS"); + break; + + case 14: + ui->listWidgetState->addItem("Erreur : Connexion refusée par le proxy"); + break; + + case 15: + ui->listWidgetState->addItem("Erreur : Connexion avec le proxy terminée"); + break; + + case 16: + ui->listWidgetState->addItem("Erreur : Le proxy a cessé de répondre"); + break; + + case 17: + ui->listWidgetState->addItem("Erreur : Proxy non reconnu"); + break; + + case 18: + ui->listWidgetState->addItem("Erreur : Réponse proxy invalide"); + break; + + case 19: + ui->listWidgetState->addItem("Erreur : Opération non permise au moment de l'exécution"); + break; + + case 20: + ui->listWidgetState->addItem("Erreur : Erreur de la librairie SSL"); + break; + + case 21: + ui->listWidgetState->addItem("Erreur : Informations SSL invalides"); + break; + + case 22: + ui->listWidgetState->addItem("Erreur : Erreur temporaire"); + break; + + default: + ui->listWidgetState->addItem("Erreur : Erreur inconnue"); + break; + } +} + +void MainWindow::on_pushButtonConnection_clicked() +{ + ui->pushButtonConnection->setText("Connexion..."); + soc->abort(); + soc->connectToHost("127.0.0.1", 8454); +} + +void MainWindow::on_pushButtonSend_clicked() +{ + if(ui->lineEditMessage->text() != "") + { + soc->write(ui->lineEditMessage->text().toLatin1()); + ui->lineEditMessage->clear(); + } +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/ENSIM/QT5/qSocketClient/mainwindow.h b/ENSIM/QT5/qSocketClient/mainwindow.h new file mode 100644 index 0000000..d0859b1 --- /dev/null +++ b/ENSIM/QT5/qSocketClient/mainwindow.h @@ -0,0 +1,35 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private: + Ui::MainWindow *ui; + QTcpSocket *soc; + QChar data; + +private slots: + void onQTcpSocket_Connected(); + void onQTcpSocket_Disconnected(); + void onQTcpSocket_read(); + void onQTcpSocket_stateChanged(QAbstractSocket::SocketState); + void onQTcpSocket_error(QAbstractSocket::SocketError); + void on_pushButtonConnection_clicked(); + void on_pushButtonSend_clicked(); +}; + +#endif // MAINWINDOW_H diff --git a/ENSIM/QT5/qSocketClient/mainwindow.ui b/ENSIM/QT5/qSocketClient/mainwindow.ui new file mode 100644 index 0000000..07b5823 --- /dev/null +++ b/ENSIM/QT5/qSocketClient/mainwindow.ui @@ -0,0 +1,83 @@ + + + MainWindow + + + + 0 + 0 + 869 + 509 + + + + MainWindow + + + + + + 770 + 20 + 80 + 21 + + + + Connexion + + + + + + 570 + 10 + 291 + 111 + + + + + + + 10 + 10 + 851 + 471 + + + + + + + 780 + 480 + 80 + 21 + + + + Envoyer + + + + + + 10 + 480 + 771 + 21 + + + + listWidgetMessage + listWidgetState + pushButtonConnection + pushButtonSend + lineEditMessage + + + + + + diff --git a/ENSIM/QT5/qSocketClient/qSocketClient.pro b/ENSIM/QT5/qSocketClient/qSocketClient.pro new file mode 100644 index 0000000..7a75597 --- /dev/null +++ b/ENSIM/QT5/qSocketClient/qSocketClient.pro @@ -0,0 +1,34 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2017-12-12T16:52:49 +# +#------------------------------------------------- + +QT += core gui network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = qSocketClient +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui diff --git a/ENSIM/QT5/qSocketClient/qSocketClient.pro.user b/ENSIM/QT5/qSocketClient/qSocketClient.pro.user new file mode 100644 index 0000000..0f6907f --- /dev/null +++ b/ENSIM/QT5/qSocketClient/qSocketClient.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {fb51cc98-47ec-4803-8da2-9983c643e4f2} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.9.1 MinGW 32bit + Desktop Qt 5.9.1 MinGW 32bit + qt.591.win32_mingw53_kit + 0 + 0 + 0 + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MinGW_32bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MinGW_32bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MinGW_32bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Déployer localement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + qSocketClient + + Qt4ProjectManager.Qt4RunConfiguration:E:/QTProject/qSocketClient/qSocketClient.pro + true + + qSocketClient.pro + false + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MinGW_32bit-Debug + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.9.1 MSVC2017 64bit + Desktop Qt 5.9.1 MSVC2017 64bit + qt.591.win64_msvc2017_64_kit + 0 + 0 + 0 + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MSVC2017_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MSVC2017_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + E:/QTProject/build-qSocketClient-Desktop_Qt_5_9_1_MSVC2017_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Déployer localement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + + + %{buildDir} + Custom Executable + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/ENSIM/QT5/qSocketServer/main.cpp b/ENSIM/QT5/qSocketServer/main.cpp new file mode 100644 index 0000000..aab39bb --- /dev/null +++ b/ENSIM/QT5/qSocketServer/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/ENSIM/QT5/qSocketServer/mainwindow.cpp b/ENSIM/QT5/qSocketServer/mainwindow.cpp new file mode 100644 index 0000000..c37dda6 --- /dev/null +++ b/ENSIM/QT5/qSocketServer/mainwindow.cpp @@ -0,0 +1,102 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::MainWindow) +{ + ui->setupUi(this); + soc = new QTcpServer(); + process = new QProcess(); + connexionClient = NULL; + QList ipAdressList = QNetworkInterface::allAddresses(); + + connect(ui->listWidgetState->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), ui->listWidgetState, SLOT(scrollToBottom())); + + soc->setMaxPendingConnections(NUMCO); + + if(soc->listen(QHostAddress::Any, 8454)) + { + for(int i = 0; i < ipAdressList.size(); i++) + { + if(ipAdressList.at(i).toIPv4Address()) + { + ui->listWidgetState->addItem(ipAdressList.at(i).toString()); + } + } + + if(!connect(soc, SIGNAL(newConnection()), this, SLOT(onQTcpServer_newConnection()))) + { + qDebug() << "Erreur connect newConnection avec onQTcpServer_newConnection"; + } + } + + if(!connect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(onQProcess_readyRead()))) + { + qDebug() << "Erreur connect readyRead vers onQTcpSocket_readyRead"; + } +} + +void MainWindow::onQTcpServer_newConnection() +{ + if(connexionClient == NULL) + { + connexionClient = soc->nextPendingConnection(); + + ui->listWidgetState->addItem(QString("Nouvelle connexion : ") + QString(connexionClient->peerAddress().toString())); + + qDebug("Nouvelle connexion : %s", QString(connexionClient->peerAddress().toString())); + + if(!connect(connexionClient, SIGNAL(readyRead()), this, SLOT(onQTcpSocket_readyRead()))) + { + qDebug("Erreur connect readyRead avec onQTcpSocket_readyRead"); + } + + if(!connect(connexionClient, SIGNAL(disconnected()), this, SLOT(onQTcpSocket_disconnected()))) + { + qDebug("Erreur connect newConnection avec onQTcpServer_newConnection"); + } + } + else + { + ui->listWidgetState->addItem("Connexion refusée"); + connexionClient = soc->nextPendingConnection(); + connexionClient->write("Connexion refusée"); + connexionClient->abort(); + } +} + +void MainWindow::onQTcpSocket_readyRead() +{ + QByteArray data; + data = connexionClient->readLine(); + ui->listWidgetMessage->addItem(QString::fromLatin1(data)); + + qDebug("Data : %s", QString(data)); +} + +void MainWindow::onQTcpSocket_disconnected() +{ + ui->listWidgetState->addItem("Deconnexion du client"); + connexionClient->deleteLater(); + connexionClient = NULL; +} + +void MainWindow::onQProcess_readyRead() +{ + qDebug("Process output : %s", process->readLine()); +} + +void MainWindow::on_pushButtonSend_clicked() +{ + if(ui->lineEditMessage->text() != "") + { + connexionClient->write(ui->lineEditMessage->text().toLatin1()); + ui->lineEditMessage->clear(); + } +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/ENSIM/QT5/qSocketServer/mainwindow.h b/ENSIM/QT5/qSocketServer/mainwindow.h new file mode 100644 index 0000000..d66b49e --- /dev/null +++ b/ENSIM/QT5/qSocketServer/mainwindow.h @@ -0,0 +1,38 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include +#include + +#define NUMCO 10 + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private: + Ui::MainWindow *ui; + QTcpServer *soc; + QTcpSocket *connexionClient; + QProcess *process; + +private slots: + void onQTcpServer_newConnection(); + void onQTcpSocket_readyRead(); + void onQTcpSocket_disconnected(); + void onQProcess_readyRead(); + void on_pushButtonSend_clicked(); +}; + +#endif // MAINWINDOW_H diff --git a/ENSIM/QT5/qSocketServer/mainwindow.ui b/ENSIM/QT5/qSocketServer/mainwindow.ui new file mode 100644 index 0000000..819764e --- /dev/null +++ b/ENSIM/QT5/qSocketServer/mainwindow.ui @@ -0,0 +1,69 @@ + + + MainWindow + + + + 0 + 0 + 809 + 520 + + + + MainWindow + + + + + + 540 + 10 + 256 + 141 + + + + + + + 10 + 10 + 791 + 481 + + + + + + + 10 + 490 + 711 + 21 + + + + + + + 720 + 490 + 80 + 21 + + + + Envoyer + + + listWidgetMessage + listWidgetState + lineEditMessage + pushButtonSend + + + + + + diff --git a/ENSIM/QT5/qSocketServer/qSocketServer.pro b/ENSIM/QT5/qSocketServer/qSocketServer.pro new file mode 100644 index 0000000..e4cb8f9 --- /dev/null +++ b/ENSIM/QT5/qSocketServer/qSocketServer.pro @@ -0,0 +1,34 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2017-12-12T20:20:21 +# +#------------------------------------------------- + +QT += core gui network + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = qSocketServer +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui diff --git a/ENSIM/QT5/qSocketServer/qSocketServer.pro.user b/ENSIM/QT5/qSocketServer/qSocketServer.pro.user new file mode 100644 index 0000000..047987a --- /dev/null +++ b/ENSIM/QT5/qSocketServer/qSocketServer.pro.user @@ -0,0 +1,562 @@ + + + + + + EnvironmentId + {fb51cc98-47ec-4803-8da2-9983c643e4f2} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop Qt 5.9.1 MinGW 32bit + Desktop Qt 5.9.1 MinGW 32bit + qt.591.win32_mingw53_kit + 0 + 0 + 0 + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MinGW_32bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MinGW_32bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MinGW_32bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Déployer localement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + qSocketServer + + Qt4ProjectManager.Qt4RunConfiguration:E:/QTProject/qSocketServer/qSocketServer.pro + true + + qSocketServer.pro + false + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MinGW_32bit-Debug + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.Target.1 + + Desktop Qt 5.9.1 MSVC2017 64bit + Desktop Qt 5.9.1 MSVC2017 64bit + qt.591.win64_msvc2017_64_kit + 0 + 0 + 0 + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MSVC2017_64bit-Debug + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Debug + + Qt4ProjectManager.Qt4BuildConfiguration + 2 + true + + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MSVC2017_64bit-Release + + + true + qmake + + QtProjectManager.QMakeBuildStep + false + + false + false + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Release + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + + E:/QTProject/build-qSocketServer-Desktop_Qt_5_9_1_MSVC2017_64bit-Profile + + + true + qmake + + QtProjectManager.QMakeBuildStep + true + + false + true + false + + + true + Make + + Qt4ProjectManager.MakeStep + + false + + + + 2 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + true + Make + + Qt4ProjectManager.MakeStep + + true + clean + + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Profile + + Qt4ProjectManager.Qt4BuildConfiguration + 0 + true + + 3 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Déployer localement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + -1 + + + + %{buildDir} + Custom Executable + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 2 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + +