2020-05-20 13:26:24 +00:00
|
|
|
#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 QtHostInterface;
|
2020-08-15 10:38:54 +00:00
|
|
|
class SettingsDialog;
|
2020-05-20 13:26:24 +00:00
|
|
|
|
|
|
|
class MemoryCardSettingsWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-08-15 10:38:54 +00:00
|
|
|
MemoryCardSettingsWidget(QtHostInterface* host_interface, QWidget* parent, SettingsDialog* dialog);
|
2020-05-20 13:26:24 +00:00
|
|
|
~MemoryCardSettingsWidget();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QtHostInterface* m_host_interface;
|
|
|
|
|
|
|
|
struct PortSettingsUI
|
|
|
|
{
|
|
|
|
QGroupBox* container;
|
|
|
|
QVBoxLayout* layout;
|
|
|
|
QComboBox* memory_card_type;
|
|
|
|
QLineEdit* memory_card_path;
|
|
|
|
};
|
|
|
|
|
2020-08-15 10:38:54 +00:00
|
|
|
void createUi(SettingsDialog* dialog);
|
|
|
|
void createPortSettingsUi(SettingsDialog* dialog, int index, PortSettingsUI* ui);
|
2020-05-20 13:26:24 +00:00
|
|
|
void onBrowseMemoryCardPathClicked(int index);
|
|
|
|
void onOpenMemCardsDirectoryClicked();
|
|
|
|
|
|
|
|
std::array<PortSettingsUI, 2> m_port_ui = {};
|
|
|
|
};
|