mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-25 07:57:54 -05:00
configure_profile_manager: Use a custom dialog for deletion
A hopefully more informative dialog that most importantly notifies the user that their saves will be deleted with the user profile. cpm: Only keep track of UI elements that we need cpm: Remove unused forward declarations cpm: Add missing include
This commit is contained in:
@ -3,16 +3,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include <QDialog>
|
||||
#include <QList>
|
||||
#include <QWidget>
|
||||
|
||||
#include "common/uuid.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
class QGraphicsScene;
|
||||
class QDialogButtonBox;
|
||||
class QLabel;
|
||||
class QStandardItem;
|
||||
class QStandardItemModel;
|
||||
class QTreeView;
|
||||
@ -26,6 +32,20 @@ namespace Ui {
|
||||
class ConfigureProfileManager;
|
||||
}
|
||||
|
||||
class ConfigureProfileManagerDeleteDialog : public QDialog {
|
||||
public:
|
||||
explicit ConfigureProfileManagerDeleteDialog(QWidget* parent);
|
||||
~ConfigureProfileManagerDeleteDialog();
|
||||
|
||||
void SetInfo(const QString username, const Common::UUID uuid,
|
||||
std::function<void()> accept_callback);
|
||||
|
||||
private:
|
||||
QDialogButtonBox* dialog_button_box;
|
||||
QGraphicsScene* icon_scene;
|
||||
QLabel* label_info;
|
||||
};
|
||||
|
||||
class ConfigureProfileManager : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
@ -47,7 +67,8 @@ private:
|
||||
void SelectUser(const QModelIndex& index);
|
||||
void AddUser();
|
||||
void RenameUser();
|
||||
void DeleteUser();
|
||||
void ConfirmDeleteUser();
|
||||
void DeleteUser(const Common::UUID uuid);
|
||||
void SetUserImage();
|
||||
|
||||
QVBoxLayout* layout;
|
||||
@ -55,6 +76,8 @@ private:
|
||||
QStandardItemModel* item_model;
|
||||
QGraphicsScene* scene;
|
||||
|
||||
std::unique_ptr<ConfigureProfileManagerDeleteDialog> confirm_dialog;
|
||||
|
||||
std::vector<QList<QStandardItem*>> list_items;
|
||||
|
||||
std::unique_ptr<Ui::ConfigureProfileManager> ui;
|
||||
|
Reference in New Issue
Block a user