From 8b75f7c5e19877d9648e34c0cae9ad1b99dbb629 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 18 Jul 2018 11:36:33 +0300 Subject: [PATCH] A ChatWindow class template was added, which is intended to create chat windows --- src/Influence.pro | 9 ++++++--- src/chatwindow.cpp | 14 ++++++++++++++ src/chatwindow.hpp | 19 +++++++++++++++++++ src/chatwindow.ui | 21 +++++++++++++++++++++ 4 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 src/chatwindow.cpp create mode 100644 src/chatwindow.hpp create mode 100644 src/chatwindow.ui diff --git a/src/Influence.pro b/src/Influence.pro index 97a68fb..ad05a91 100644 --- a/src/Influence.pro +++ b/src/Influence.pro @@ -27,12 +27,15 @@ SOURCES += \ main.cpp \ mainwindow.cpp \ kernel/network.cpp \ - kernel/handler.cpp + kernel/handler.cpp \ + chatwindow.cpp HEADERS += \ kernel/network.hpp \ mainwindow.h \ - kernel/handler.hpp + kernel/handler.hpp \ + chatwindow.hpp FORMS += \ - mainwindow.ui + mainwindow.ui \ + chatwindow.ui diff --git a/src/chatwindow.cpp b/src/chatwindow.cpp new file mode 100644 index 0000000..49121f3 --- /dev/null +++ b/src/chatwindow.cpp @@ -0,0 +1,14 @@ +#include "chatwindow.hpp" +#include "ui_chatwindow.h" + +ChatWindow::ChatWindow(QWidget *parent) : + QWidget(parent), + ui(new Ui::Form) +{ + ui->setupUi(this); +} + +ChatWindow::~ChatWindow() +{ + delete ui; +} diff --git a/src/chatwindow.hpp b/src/chatwindow.hpp new file mode 100644 index 0000000..10c79c3 --- /dev/null +++ b/src/chatwindow.hpp @@ -0,0 +1,19 @@ +#pragma once + +#include + +namespace Ui { + class Form; +} + +class ChatWindow : public QWidget +{ + Q_OBJECT + + public: + explicit ChatWindow(QWidget *parent = 0); + ~ChatWindow(); + + private: + Ui::ChatWindow *ui; +}; diff --git a/src/chatwindow.ui b/src/chatwindow.ui new file mode 100644 index 0000000..d527737 --- /dev/null +++ b/src/chatwindow.ui @@ -0,0 +1,21 @@ + + + + + Form + + + + 0 + 0 + 400 + 300 + + + + Form + + + + +