A ChatWindow class template was added, which is intended to create chat windows

This commit is contained in:
Denis Davydov 2018-07-18 11:36:33 +03:00
parent 2050f635ff
commit 8b75f7c5e1
4 changed files with 60 additions and 3 deletions

View File

@ -27,12 +27,15 @@ SOURCES += \
main.cpp \ main.cpp \
mainwindow.cpp \ mainwindow.cpp \
kernel/network.cpp \ kernel/network.cpp \
kernel/handler.cpp kernel/handler.cpp \
chatwindow.cpp
HEADERS += \ HEADERS += \
kernel/network.hpp \ kernel/network.hpp \
mainwindow.h \ mainwindow.h \
kernel/handler.hpp kernel/handler.hpp \
chatwindow.hpp
FORMS += \ FORMS += \
mainwindow.ui mainwindow.ui \
chatwindow.ui

14
src/chatwindow.cpp Normal file
View File

@ -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;
}

19
src/chatwindow.hpp Normal file
View File

@ -0,0 +1,19 @@
#pragma once
#include <QWidget>
namespace Ui {
class Form;
}
class ChatWindow : public QWidget
{
Q_OBJECT
public:
explicit ChatWindow(QWidget *parent = 0);
~ChatWindow();
private:
Ui::ChatWindow *ui;
};

21
src/chatwindow.ui Normal file
View File

@ -0,0 +1,21 @@
<ui version="4.0">
<author/>
<comment/>
<exportmacro/>
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<pixmapfunction/>
<connections/>
</ui>