Moved online status checking logic from ChatWidgetHeader to TwitchChannel

- Channel now needs to be initialized with a name. Special cases like the emote window just sends an empty string.
 - ChatWidget now has a signal which is called whenever the widgets channel is changed
 - Changed roomID from an std::string to a QString
This commit is contained in:
Rasmus Karlsson
2017-11-04 14:57:29 +01:00
parent 064daaa77a
commit 7b2e3a94a6
14 changed files with 132 additions and 105 deletions
+5 -1
View File
@@ -12,6 +12,7 @@
#include <QPaintEvent>
#include <QPoint>
#include <QWidget>
#include <boost/signals2/connection.hpp>
namespace chatterino {
@@ -29,7 +30,6 @@ public:
explicit ChatWidgetHeader(ChatWidget *_chatWidget);
// Update channel text from chat widget
void updateChannelText();
void checkLive();
protected:
virtual void paintEvent(QPaintEvent *) override;
@@ -44,6 +44,8 @@ private:
QPoint dragStart;
bool dragging = false;
boost::signals2::connection onlineStatusChangedConnection;
QHBoxLayout hbox;
// top left
@@ -62,6 +64,8 @@ private:
virtual void refreshTheme() override;
void initializeChannelSignals();
public slots:
void menuMoveSplit();
void menuReloadChannelEmotes();