2016-12-29 17:31:07 +01:00
|
|
|
#ifndef CHATWIDGET_H
|
|
|
|
#define CHATWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include "QFont"
|
2017-01-11 18:52:09 +01:00
|
|
|
#include "QVBoxLayout"
|
|
|
|
#include "channel.h"
|
2017-01-01 02:30:42 +01:00
|
|
|
#include "chatwidgetheader.h"
|
|
|
|
#include "chatwidgetinput.h"
|
2017-01-11 18:52:09 +01:00
|
|
|
#include "chatwidgetview.h"
|
2017-01-01 02:30:42 +01:00
|
|
|
|
2016-12-29 17:31:07 +01:00
|
|
|
class ChatWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ChatWidget(QWidget *parent = 0);
|
2017-01-01 02:30:42 +01:00
|
|
|
~ChatWidget();
|
2016-12-29 17:31:07 +01:00
|
|
|
|
2017-01-16 03:15:07 +01:00
|
|
|
ChatWidgetView &
|
|
|
|
view()
|
|
|
|
{
|
|
|
|
return m_view;
|
|
|
|
}
|
|
|
|
|
2017-01-16 15:06:12 +01:00
|
|
|
Channel *
|
|
|
|
channel() const
|
|
|
|
{
|
|
|
|
return m_channel;
|
|
|
|
}
|
|
|
|
|
2017-01-17 00:15:44 +01:00
|
|
|
const QString &
|
|
|
|
channelName() const
|
|
|
|
{
|
|
|
|
return m_channelName;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setChannelName(const QString &name);
|
|
|
|
|
|
|
|
void showChangeChannelPopup();
|
|
|
|
|
2016-12-29 17:31:07 +01:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
2017-01-17 00:15:44 +01:00
|
|
|
Channel *m_channel;
|
|
|
|
QString m_channelName;
|
|
|
|
|
2017-01-16 03:15:07 +01:00
|
|
|
QFont m_font;
|
|
|
|
QVBoxLayout m_vbox;
|
|
|
|
ChatWidgetHeader m_header;
|
|
|
|
ChatWidgetView m_view;
|
|
|
|
ChatWidgetInput m_input;
|
2016-12-29 17:31:07 +01:00
|
|
|
};
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
#endif // CHATWIDGET_H
|