File: DiscordJoinRequestDialog.h

package info (click to toggle)
dolphin-emu 5.0-17995-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 68,196 kB
  • sloc: cpp: 528,500; ansic: 74,478; sh: 2,477; javascript: 1,773; python: 1,116; makefile: 773; asm: 726; pascal: 257; perl: 97; objc: 75; xml: 4
file content (35 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <ctime>

#include <QDialog>

class QGridLayout;
class QPixmap;

class DiscordJoinRequestDialog : public QDialog
{
  Q_OBJECT
public:
  explicit DiscordJoinRequestDialog(QWidget* parent, const std::string& id,
                                    const std::string& discord_tag, const std::string& avatar);
  std::time_t GetCloseTimestamp() const;

  static constexpr std::time_t s_max_lifetime_seconds = 30;

private:
  void CreateLayout(const std::string& discord_tag, const QPixmap& avatar);
  void ConnectWidgets();
  void Reply(int reply);

  QGridLayout* m_main_layout;
  QPushButton* m_invite_button;
  QPushButton* m_decline_button;
  QPushButton* m_ignore_button;

  const std::string m_user_id;
  const std::time_t m_close_timestamp;
};