| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <ctime> |
| 7 |
|
| 8 |
#include <QDialog> |
| 9 |
|
| 10 |
class QGridLayout; |
| 11 |
class QPixmap; |
| 12 |
|
| 13 |
class DiscordJoinRequestDialog : public QDialog |
| 14 |
{ |
| 15 |
Q_OBJECT |
| 16 |
public: |
| 17 |
explicit DiscordJoinRequestDialog(QWidget* parent, const std::string& id, |
| 18 |
const std::string& discord_tag, const std::string& avatar); |
| 19 |
std::time_t GetCloseTimestamp() const; |
| 20 |
|
| 21 |
static constexpr std::time_t s_max_lifetime_seconds = 30; |
| 22 |
|
| 23 |
private: |
| 24 |
void CreateLayout(const std::string& discord_tag, const QPixmap& avatar); |
| 25 |
void ConnectWidgets(); |
| 26 |
void Reply(int reply); |
| 27 |
|
| 28 |
QGridLayout* m_main_layout; |
| 29 |
QPushButton* m_invite_button; |
| 30 |
QPushButton* m_decline_button; |
| 31 |
QPushButton* m_ignore_button; |
| 32 |
|
| 33 |
const std::string m_user_id; |
| 34 |
const std::time_t m_close_timestamp; |
| 35 |
}; |