2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef CHAT_H
|
|
|
|
#define CHAT_H
|
|
|
|
|
2012-11-23 13:27:50 +00:00
|
|
|
#include <QStringList>
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#include "ui_chatmainwindow.h"
|
|
|
|
|
|
|
|
class ChatMainWindow: public QMainWindow, Ui::ChatMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
QString m_nickname;
|
|
|
|
QStringList m_messages;
|
|
|
|
public:
|
|
|
|
ChatMainWindow();
|
|
|
|
|
2023-02-21 15:23:57 +00:00
|
|
|
private:
|
|
|
|
void displayMessage(const QString &message);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void message(const QString &nickname, const QString &text);
|
|
|
|
void action(const QString &nickname, const QString &text);
|
|
|
|
|
|
|
|
private slots:
|
2023-02-21 14:19:47 +00:00
|
|
|
bool changeNickname(bool initial = false);
|
2011-04-27 10:05:43 +00:00
|
|
|
};
|
|
|
|
|
2012-11-23 13:27:50 +00:00
|
|
|
#endif // CHAT_H
|