rpcsx/rpcs3/rpcs3qt/save_data_list_dialog.h
Megamouse fb52cbb8b2 Trophy: Save dialog state (#3729)
* Trophy: Save dialog state and add show type settings

* SaveDataManager: Save Dialog State

* SaveDataList: Minor Optimization

* Qt: Save icon size on mouseevent resizes

it's a bit slower than using the slider because it saves every single resize. But better than not saving at all for now

* SaveData: Optimize saving to settings a bit

No Saving needed there

* Qt: get rid of all-uppercase enums and namespaces

* Qt/Linux: adjust remaining DX12 tooltip

* Qt: prevent dockwidget contextmenu
2017-11-22 15:11:59 +04:00

48 lines
1,018 B
C++

#pragma once
// I just want the struct for the save data.
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/Memory/Memory.h"
#include "Emu/Cell/Modules/cellSaveData.h"
#include "gui_settings.h"
#include <QTableWidget>
#include <QDialog>
#include <QLabel>
//Display a list of SaveData. Would need to be initialized.
//Can also be used as a Save Data Chooser.
class save_data_list_dialog : public QDialog
{
Q_OBJECT
enum selection_code
{
new_save = -1,
canceled = -2
};
public:
explicit save_data_list_dialog(const std::vector<SaveDataEntry>& entries, s32 focusedEntry, u32 op, vm::ptr<CellSaveDataListSet>, QWidget* parent = nullptr);
s32 GetSelection();
private Q_SLOTS:
void OnEntryInfo();
void OnSort(int logicalIndex);
private:
void UpdateSelectionLabel(void);
void UpdateList(void);
s32 m_entry;
QLabel* m_entry_label;
QTableWidget* m_list;
std::vector<SaveDataEntry> m_save_entries;
std::shared_ptr<gui_settings> m_gui_settings;
int m_sort_column;
bool m_sort_ascending;
};