mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
74 lines
1.4 KiB
C++
74 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "signallabel.h"
|
|
#include "widgets/chatwidgetheaderbutton.h"
|
|
|
|
#include <QAction>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QMenu>
|
|
#include <QMouseEvent>
|
|
#include <QPaintEvent>
|
|
#include <QPoint>
|
|
#include <QWidget>
|
|
|
|
namespace chatterino {
|
|
namespace widgets {
|
|
class ChatWidget;
|
|
|
|
class ChatWidgetHeader : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ChatWidgetHeader(ChatWidget *parent);
|
|
|
|
ChatWidget *getChatWidget() const
|
|
{
|
|
return _chatWidget;
|
|
}
|
|
|
|
void updateColors();
|
|
void updateChannelText();
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *);
|
|
void mousePressEvent(QMouseEvent *event);
|
|
void mouseMoveEvent(QMouseEvent *event);
|
|
void mouseDoubleClickEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
ChatWidget *const _chatWidget;
|
|
|
|
QPoint _dragStart;
|
|
bool _dragging;
|
|
|
|
QHBoxLayout _hbox;
|
|
|
|
ChatWidgetHeaderButton _leftLabel;
|
|
SignalLabel _middleLabel;
|
|
ChatWidgetHeaderButton _rightLabel;
|
|
|
|
QMenu _leftMenu;
|
|
QMenu _rightMenu;
|
|
|
|
void leftButtonClicked();
|
|
void rightButtonClicked();
|
|
|
|
private slots:
|
|
void menuAddSplit();
|
|
void menuCloseSplit();
|
|
void menuMoveSplit();
|
|
void menuPopup();
|
|
void menuChangeChannel();
|
|
void menuClearChat();
|
|
void menuOpenChannel();
|
|
void menuPopupPlayer();
|
|
void menuReloadChannelEmotes();
|
|
void menuManualReconnect();
|
|
void menuShowChangelog();
|
|
};
|
|
|
|
} // namespace widgets
|
|
} // namespace chatterino
|