rpcsx/rpcs3/rpcs3qt/save_manager_dialog.h

63 lines
1.8 KiB
C
Raw Normal View History

2020-12-05 13:08:24 +01:00
#pragma once
2017-08-14 02:17:45 +02:00
#include "Emu/Cell/Modules/cellSaveData.h"
#include <QDialog>
2022-02-02 15:36:15 +01:00
#include <QLabel>
#include <QPushButton>
2017-08-14 02:17:45 +02:00
#include <QTableWidget>
2020-02-22 20:42:49 +01:00
class gui_settings;
class persistent_settings;
2020-02-22 20:42:49 +01:00
2017-08-14 02:17:45 +02:00
class save_manager_dialog : public QDialog
{
Q_OBJECT
public:
/**
* Class which will handle the managing of saves from all games.
* You may think I should just modify save_data_list_dialog. But, that wouldn't be ideal long term since that class will be refactored into an overlay.
* Plus, there's the added complexity of an additional way in which the dialog will spawn differently.
* There'll be some duplicated code. But, in the future, there'll be no duplicated code. So, I don't care.
*/
explicit save_manager_dialog(std::shared_ptr<gui_settings> gui_settings, std::shared_ptr<persistent_settings> persistent_settings, std::string dir = "", QWidget* parent = nullptr);
public Q_SLOTS:
void HandleRepaintUiRequest();
2017-08-14 02:17:45 +02:00
private Q_SLOTS:
void OnEntryRemove();
void OnEntriesRemove();
void OnSort(int logicalIndex);
2022-02-02 15:36:15 +01:00
void SetIconSize(int size);
void UpdateDetails();
2017-08-14 02:17:45 +02:00
private:
2021-04-07 23:05:18 +02:00
void Init();
2017-08-14 02:17:45 +02:00
void UpdateList();
2021-04-07 23:05:18 +02:00
QPixmap GetResizedIcon(int i) const;
2022-02-02 15:36:15 +01:00
void UpdateIcons();
2017-08-14 02:17:45 +02:00
void ShowContextMenu(const QPoint &pos);
void closeEvent(QCloseEvent* event) override;
2019-05-24 23:54:14 +02:00
QTableWidget* m_list = nullptr;
2017-08-14 02:17:45 +02:00
std::string m_dir;
std::vector<SaveDataEntry> m_save_entries;
std::shared_ptr<gui_settings> m_gui_settings;
std::shared_ptr<persistent_settings> m_persistent_settings;
int m_sort_column = 1;
bool m_sort_ascending = true;
2022-02-02 15:36:15 +01:00
QSize m_icon_size;
QColor m_icon_color;
2022-02-02 15:36:15 +01:00
QLabel* m_details_icon = nullptr;
QLabel* m_details_title = nullptr;
QLabel* m_details_subtitle = nullptr;
QLabel* m_details_modified = nullptr;
QLabel* m_details_details = nullptr;
QLabel* m_details_note = nullptr;
QPushButton* m_button_delete = nullptr;
QPushButton* m_button_folder = nullptr;
2017-08-14 02:17:45 +02:00
};