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:
Cranken
2017-09-23 19:23:10 +02:00
committed by fourtf
parent 206a3518b0
commit 881e695189
16 changed files with 555 additions and 130 deletions
+12
View File
@@ -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