Initial commit with empty qt client and empty 'server'
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
build/
|
||||
compile_commands.json
|
||||
.cache
|
||||
.qtcreator
|
||||
5
CMakeLists.txt
Normal file
5
CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
project(chat LANGUAGES CXX)
|
||||
|
||||
add_subdirectory(server)
|
||||
add_subdirectory(client)
|
||||
105
CMakePresets.json
Normal file
105
CMakePresets.json
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"version": 10,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 19
|
||||
},
|
||||
"include": [],
|
||||
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "base",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_PREFIX_PATH": "$env{HOME}/Qt/6.10.2/gcc_64/lib/cmake"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-debug",
|
||||
"displayName": "Linux Debug",
|
||||
"description": "Debug build for Linux",
|
||||
"inherits": "base",
|
||||
"binaryDir": "${sourceDir}/build/Linux_Qt6.10.2_Debug",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0"
|
||||
} },
|
||||
{
|
||||
"name": "linux-release",
|
||||
"displayName": "Linux Release",
|
||||
"description": "Release build for Linux",
|
||||
"inherits": "base",
|
||||
"binaryDir": "${sourceDir}/build/Linux_Qt6.10.2_Release",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -DNDEBUG"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "debug",
|
||||
"configurePreset": "linux-debug",
|
||||
"displayName": "Build Debug",
|
||||
"description": "Build Debug configuration"
|
||||
},
|
||||
{
|
||||
"name": "release",
|
||||
"configurePreset": "linux-release",
|
||||
"displayName": "Build Release",
|
||||
"description": "Build Release configuration"
|
||||
}
|
||||
],
|
||||
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "test-debug",
|
||||
"configurePreset": "linux-debug",
|
||||
"displayName": "Test Debug",
|
||||
"description": "Run tests on Debug build"
|
||||
},
|
||||
{
|
||||
"name": "test-release",
|
||||
"configurePreset": "linux-release",
|
||||
"displayName": "Test Release",
|
||||
"description": "Run tests on Release build"
|
||||
}
|
||||
],
|
||||
|
||||
"packagePresets": [
|
||||
{
|
||||
"name": "package-debug",
|
||||
"configurePreset": "linux-debug",
|
||||
"displayName": "Package Debug",
|
||||
"description": "Package Debug build"
|
||||
},
|
||||
{
|
||||
"name": "package-release",
|
||||
"configurePreset": "linux-release",
|
||||
"displayName": "Package Release",
|
||||
"description": "Package Release build"
|
||||
}
|
||||
],
|
||||
|
||||
"workflowPresets": [
|
||||
{
|
||||
"name": "linux-build-debug",
|
||||
"steps": [
|
||||
{
|
||||
"type": "configure",
|
||||
"name": "linux-debug"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"name": "debug"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
29
client/CMakeLists.txt
Normal file
29
client/CMakeLists.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
project(chat_client LANGUAGES CXX)
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "src/*.ui" "src/*.cpp" "inc/*.h" "res/*.qrc")
|
||||
|
||||
qt_add_executable(chat_client
|
||||
WIN32 MACOSX_BUNDLE
|
||||
main.cpp
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(chat_client
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/inc
|
||||
)
|
||||
|
||||
target_link_libraries(chat_client
|
||||
PRIVATE
|
||||
Qt::Core
|
||||
Qt::Widgets
|
||||
)
|
||||
0
client/inc/.gitempty
Normal file
0
client/inc/.gitempty
Normal file
0
client/inc/logic/.gitempty
Normal file
0
client/inc/logic/.gitempty
Normal file
0
client/inc/models/.gitempty
Normal file
0
client/inc/models/.gitempty
Normal file
19
client/inc/ui/mainwindow.h
Normal file
19
client/inc/ui/mainwindow.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
QT_END_NAMESPACE
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
};
|
||||
0
client/lib/.gitempty
Normal file
0
client/lib/.gitempty
Normal file
10
client/main.cpp
Normal file
10
client/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "ui/mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
QApplication a(argc, argv);
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
}
|
||||
0
client/res/.gitempty
Normal file
0
client/res/.gitempty
Normal file
0
client/src/.gitempty
Normal file
0
client/src/.gitempty
Normal file
0
client/src/logic/.gitempty
Normal file
0
client/src/logic/.gitempty
Normal file
0
client/src/models/.gitempty
Normal file
0
client/src/models/.gitempty
Normal file
9
client/src/ui/mainwindow.cpp
Normal file
9
client/src/ui/mainwindow.cpp
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "ui/mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent)
|
||||
: QMainWindow(parent), ui(new Ui::MainWindow) {
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() { delete ui; }
|
||||
32
client/src/ui/mainwindow.ui
Normal file
32
client/src/ui/mainwindow.ui
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget"/>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
19
server/CMakeLists.txt
Normal file
19
server/CMakeLists.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.23)
|
||||
project(chat_server LANGUAGES CXX)
|
||||
|
||||
find_package(protobuf CONFIG REQUIRED)
|
||||
find_package(gRPC CONFIG REQUIRED)
|
||||
|
||||
file(GLOB_RECURSE SOURCES "src/*.ui" "src/*.cpp" "inc/*.h" "res/*.qrc")
|
||||
|
||||
add_executable(chat_server
|
||||
main.cpp
|
||||
${SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(chat_server
|
||||
PRIVATE
|
||||
protobuf::libprotobuf
|
||||
gRPC::grpc
|
||||
gRPC::grpc++
|
||||
)
|
||||
2
server/main.cpp
Normal file
2
server/main.cpp
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
int main(int argc, char *argv[]) { return 0; }
|
||||
Reference in New Issue
Block a user