2024-07-30 11:42:36 +00:00
|
|
|
// SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team
|
|
|
|
// SPDX-License-Identifier: GPL-3.0+
|
2022-04-18 13:35:14 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "ui_AchievementLoginDialog.h"
|
|
|
|
#include <QtWidgets/QDialog>
|
|
|
|
#include <QtWidgets/QPushButton>
|
|
|
|
|
2023-07-27 09:24:55 +00:00
|
|
|
namespace Achievements
|
|
|
|
{
|
|
|
|
enum class LoginRequestReason;
|
|
|
|
}
|
|
|
|
|
2022-04-18 13:35:14 +00:00
|
|
|
class AchievementLoginDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-07-27 09:24:55 +00:00
|
|
|
AchievementLoginDialog(QWidget* parent, Achievements::LoginRequestReason reason);
|
2022-04-18 13:35:14 +00:00
|
|
|
~AchievementLoginDialog();
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void loginClicked();
|
|
|
|
void cancelClicked();
|
2023-09-17 10:19:51 +00:00
|
|
|
void processLoginResult(bool result, const QString& message);
|
2022-04-18 13:35:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void connectUi();
|
|
|
|
void enableUI(bool enabled);
|
|
|
|
bool canEnableLoginButton() const;
|
|
|
|
|
|
|
|
Ui::AchievementLoginDialog m_ui;
|
|
|
|
QPushButton* m_login;
|
2023-07-27 09:24:55 +00:00
|
|
|
Achievements::LoginRequestReason m_reason;
|
2022-04-18 13:35:14 +00:00
|
|
|
};
|