mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-21 07:45:38 +00:00
8c7a192128
Should've did this in the beginning.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin <stenzek@gmail.com>
|
|
// SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
|
|
|
|
#pragma once
|
|
#include "core/types.h"
|
|
#include <QtWidgets/QComboBox>
|
|
#include <QtWidgets/QGroupBox>
|
|
#include <QtWidgets/QLineEdit>
|
|
#include <QtWidgets/QVBoxLayout>
|
|
#include <QtWidgets/QWidget>
|
|
#include <array>
|
|
#include <vector>
|
|
|
|
class SettingsDialog;
|
|
|
|
class MemoryCardSettingsWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MemoryCardSettingsWidget(SettingsDialog* dialog, QWidget* parent);
|
|
~MemoryCardSettingsWidget();
|
|
|
|
private:
|
|
SettingsDialog* m_dialog;
|
|
|
|
struct PortSettingsUI
|
|
{
|
|
QGroupBox* container;
|
|
QVBoxLayout* layout;
|
|
QComboBox* memory_card_type;
|
|
QLineEdit* memory_card_path;
|
|
};
|
|
|
|
void createUi(SettingsDialog* dialog);
|
|
void createPortSettingsUi(SettingsDialog* dialog, int index, PortSettingsUI* ui);
|
|
void onBrowseMemoryCardPathClicked(int index);
|
|
void onResetMemoryCardPathClicked(int index);
|
|
void onMemoryCardPathChanged(int index);
|
|
void updateMemoryCardPath(int index);
|
|
|
|
std::array<PortSettingsUI, 2> m_port_ui = {};
|
|
QLineEdit* m_memory_card_directory = nullptr;
|
|
};
|