#pragma once #include "widgets/basewidget.hpp" #include "widgets/helper/rippleeffectlabel.hpp" #include "widgets/helper/signallabel.hpp" #include #include #include #include #include #include #include #include #include namespace chatterino { class ColorScheme; namespace widgets { class Split; class SplitHeader : public BaseWidget { Q_OBJECT public: explicit SplitHeader(Split *_chatWidget); // Update channel text from chat widget void updateChannelText(); protected: virtual void paintEvent(QPaintEvent *) override; virtual void mousePressEvent(QMouseEvent *event) override; virtual void mouseMoveEvent(QMouseEvent *event) override; virtual void mouseDoubleClickEvent(QMouseEvent *event) override; virtual void resizeEvent(QResizeEvent *event) override; private: Split *const chatWidget; QPoint dragStart; bool dragging = false; boost::signals2::connection onlineStatusChangedConnection; QHBoxLayout hbox; // top left RippleEffectLabel leftLabel; QMenu leftMenu; // center SignalLabel channelNameLabel; // top right RippleEffectLabel rightLabel; QMenu rightMenu; void leftButtonClicked(); void rightButtonClicked(); virtual void refreshTheme() override; void initializeChannelSignals(); public slots: void menuMoveSplit(); void menuReloadChannelEmotes(); void menuManualReconnect(); void menuShowChangelog(); }; } // namespace widgets } // namespace chatterino