mirror-chatterino2/src/widgets/userinfopopup.hpp

65 lines
1.3 KiB
C++
Raw Normal View History

2018-06-06 13:35:06 +02:00
#pragma once
#include "channel.hpp"
#include "widgets/basewindow.hpp"
#include <pajlada/signals/signal.hpp>
class QLabel;
class QCheckBox;
namespace chatterino {
namespace widgets {
class UserInfoPopup final : public BaseWindow
{
Q_OBJECT
2018-06-06 13:35:06 +02:00
public:
UserInfoPopup();
void setData(const QString &name, const ChannelPtr &channel);
private:
bool isMod_;
bool isBroadcaster_;
QString userName_;
QString userId_;
2018-06-06 13:35:06 +02:00
ChannelPtr channel_;
pajlada::Signals::NoArgSignal userStateChanged;
void installEvents();
2018-06-06 13:35:06 +02:00
void updateUserData();
void loadAvatar(const QUrl &url);
std::shared_ptr<bool> hack_;
2018-06-06 13:35:06 +02:00
struct {
RippleEffectButton *avatarButton = nullptr;
QLabel *nameLabel = nullptr;
QLabel *viewCountLabel = nullptr;
QLabel *followerCountLabel = nullptr;
QLabel *createdDateLabel = nullptr;
QCheckBox *follow = nullptr;
2018-06-06 13:35:06 +02:00
QCheckBox *ignore = nullptr;
QCheckBox *ignoreHighlights = nullptr;
} ui_;
class TimeoutWidget : public BaseWidget
{
public:
TimeoutWidget();
protected:
void paintEvent(QPaintEvent *event) override;
};
};
} // namespace widgets
} // namespace chatterino