2017-01-01 02:30:42 +01:00
|
|
|
#ifndef CHATWIDGETHEADER_H
|
|
|
|
#define CHATWIDGETHEADER_H
|
|
|
|
|
2017-01-15 16:38:30 +01:00
|
|
|
#include "chatwidgetheaderbutton.h"
|
|
|
|
|
|
|
|
#include <QAction>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QMouseEvent>
|
|
|
|
#include <QPaintEvent>
|
|
|
|
#include <QPoint>
|
|
|
|
#include <QWidget>
|
2017-01-01 02:30:42 +01:00
|
|
|
|
|
|
|
class ChatWidget;
|
|
|
|
|
|
|
|
class ChatWidgetHeader : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-01-16 18:27:51 +01:00
|
|
|
ChatWidgetHeader(ChatWidget *parent);
|
|
|
|
|
|
|
|
ChatWidget *
|
|
|
|
chatWidget()
|
|
|
|
{
|
|
|
|
return m_chatWidget;
|
|
|
|
}
|
|
|
|
|
2017-01-15 16:38:30 +01:00
|
|
|
void updateColors();
|
2017-01-01 02:30:42 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
void mouseMoveEvent(QMouseEvent *event);
|
|
|
|
|
|
|
|
private:
|
2017-01-16 18:27:51 +01:00
|
|
|
ChatWidget *m_chatWidget;
|
|
|
|
|
2017-01-15 16:38:30 +01:00
|
|
|
QPoint m_dragStart;
|
|
|
|
bool m_dragging;
|
|
|
|
|
2017-01-16 18:27:51 +01:00
|
|
|
QHBoxLayout m_hbox;
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-01-16 18:27:51 +01:00
|
|
|
ChatWidgetHeaderButton m_leftLabel;
|
|
|
|
QLabel m_middleLabel;
|
|
|
|
ChatWidgetHeaderButton m_rightLabel;
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-01-16 18:27:51 +01:00
|
|
|
QMenu m_leftMenu;
|
|
|
|
QMenu m_rightMenu;
|
2017-01-15 16:38:30 +01:00
|
|
|
|
|
|
|
void leftButtonClicked();
|
|
|
|
void rightButtonClicked();
|
|
|
|
|
2017-01-16 18:41:17 +01:00
|
|
|
private slots:
|
2017-01-15 16:38:30 +01:00
|
|
|
void menuAddSplit();
|
|
|
|
void menuCloseSplit();
|
|
|
|
void menuMoveSplit();
|
|
|
|
void menuChangeChannel();
|
|
|
|
void menuClearChat();
|
|
|
|
void menuOpenChannel();
|
|
|
|
void menuPopupPlayer();
|
|
|
|
void menuReloadChannelEmotes();
|
|
|
|
void menuManualReconnect();
|
|
|
|
void menuShowChangelog();
|
2017-01-01 02:30:42 +01:00
|
|
|
};
|
|
|
|
|
2017-01-11 18:52:09 +01:00
|
|
|
#endif // CHATWIDGETHEADER_H
|