mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
adf3ff3075
cstdint) Make MessageElement to a class to fit better with the derived classes. Make MessageLayoutElement to a class to fit better with the derived classes. Remove virtual from override functions Replace all instances of boost::signals2 with pajlada::Signals. This lets us properly use clang code model to check for issues. Add missing virtual destructor to AbstractIrcServer Add missing virtual destructor to MessageLayoutElement Remove unused "connectedConnection" connection in TwitchChannel Fix typo in TrimChannelName function Fix typo in MessageParseArgs Replace some raw pointers with unique pointers where it made more sense. This allowed us to remove some manually written destructors whose only purpose was to delete that raw pointer. Reformat: Add namespace comments Reformat: Add empty empty lines between main namespace beginning and end Reformat: Re-order includes Reformat: Fix some includes that used quotes where they should use angle brackets Reformat: Replace some typedef's with using's Filter out more useless warnings
78 lines
1.7 KiB
C++
78 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include "widgets/basewidget.hpp"
|
|
#include "widgets/helper/label.hpp"
|
|
#include "widgets/helper/rippleeffectlabel.hpp"
|
|
#include "widgets/helper/signallabel.hpp"
|
|
|
|
#include <QAction>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QMenu>
|
|
#include <QMouseEvent>
|
|
#include <QPaintEvent>
|
|
#include <QPoint>
|
|
#include <QWidget>
|
|
#include <pajlada/settings/setting.hpp>
|
|
|
|
namespace chatterino {
|
|
namespace widgets {
|
|
|
|
class Split;
|
|
|
|
class SplitHeader : public BaseWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SplitHeader(Split *_chatWidget);
|
|
~SplitHeader();
|
|
|
|
// Update channel text from chat widget
|
|
void updateChannelText();
|
|
void updateModerationModeIcon();
|
|
|
|
protected:
|
|
virtual void scaleChangedEvent(float) override;
|
|
virtual void themeRefreshEvent() override;
|
|
|
|
virtual void paintEvent(QPaintEvent *) override;
|
|
virtual void mousePressEvent(QMouseEvent *event) override;
|
|
virtual void mouseMoveEvent(QMouseEvent *event) override;
|
|
virtual void leaveEvent(QEvent *event) override;
|
|
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
|
|
|
|
private:
|
|
Split *const split;
|
|
|
|
QPoint dragStart;
|
|
bool dragging = false;
|
|
|
|
pajlada::Signals::Connection onlineStatusChangedConnection;
|
|
|
|
RippleEffectButton *dropdownButton;
|
|
// Label *titleLabel;
|
|
SignalLabel *titleLabel;
|
|
RippleEffectButton *moderationButton;
|
|
|
|
QMenu dropdownMenu;
|
|
|
|
void rightButtonClicked();
|
|
|
|
void initializeChannelSignals();
|
|
|
|
QString tooltip;
|
|
bool isLive;
|
|
|
|
public slots:
|
|
void addDropdownItems(RippleEffectButton *label);
|
|
|
|
void menuMoveSplit();
|
|
void menuReloadChannelEmotes();
|
|
void menuManualReconnect();
|
|
void menuShowChangelog();
|
|
};
|
|
|
|
} // namespace widgets
|
|
} // namespace chatterino
|