Initial commit with empty qt client and empty 'server'
This commit is contained in:
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>
|
||||
|
||||
Reference in New Issue
Block a user