Added some functionality to the accountPopup (#117)
* Added some buttons. * Added some more functionality. * Finished adding button functionality. * Implemented @fourtf's suggestions.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include "concurrentmap.hpp"
|
||||
#include "twitch/twitchchannel.hpp"
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
|
||||
#include <memory>
|
||||
@@ -24,6 +26,8 @@ public:
|
||||
void setName(const QString &name);
|
||||
void setChannel(std::shared_ptr<Channel> channel);
|
||||
|
||||
void updatePermissions();
|
||||
|
||||
private:
|
||||
Ui::AccountPopup *_ui;
|
||||
|
||||
@@ -31,6 +35,13 @@ private:
|
||||
void getUserData();
|
||||
void loadAvatar(const QUrl &avatarUrl);
|
||||
|
||||
void updateButtons(QWidget* layout, bool state);
|
||||
void timeout(QPushButton* button, int time);
|
||||
void sendCommand(QPushButton* button, QString command);
|
||||
|
||||
enum class permissions { User, Mod, Owner };
|
||||
permissions permission;
|
||||
|
||||
std::shared_ptr<Channel> _channel;
|
||||
|
||||
QString userID;
|
||||
@@ -40,6 +51,7 @@ private:
|
||||
|
||||
protected:
|
||||
virtual void focusOutEvent(QFocusEvent *event) override;
|
||||
virtual void showEvent(QShowEvent *event) override;
|
||||
};
|
||||
|
||||
} // namespace widgets
|
||||
|
||||
Reference in New Issue
Block a user