2017-09-19 20:47:15 +01:00
|
|
|
#ifndef PREFERENCES_H
|
|
|
|
#define PREFERENCES_H
|
|
|
|
|
|
|
|
#include "ui_preferences.h"
|
|
|
|
|
|
|
|
#include <vector>
|
2017-10-10 14:26:40 +01:00
|
|
|
#include <QSettings>
|
2017-09-19 20:47:15 +01:00
|
|
|
|
|
|
|
class Preferences : public QDialog, private Ui::Preferences
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
struct Data
|
|
|
|
{
|
2017-09-26 18:03:02 +01:00
|
|
|
int apple2Type;
|
2019-04-20 20:51:19 +01:00
|
|
|
int cardInSlot0;
|
2017-09-26 18:03:02 +01:00
|
|
|
bool mouseInSlot4;
|
|
|
|
bool cpmInSlot5;
|
|
|
|
bool hdInSlot7;
|
2017-10-06 20:48:14 +01:00
|
|
|
|
2019-04-22 16:02:06 +01:00
|
|
|
int ramWorksSize;
|
|
|
|
|
2017-10-06 20:48:14 +01:00
|
|
|
QString joystick;
|
|
|
|
|
2019-04-20 16:43:47 +01:00
|
|
|
bool enhancedSpeed;
|
|
|
|
|
2019-11-10 18:44:28 +00:00
|
|
|
int audioLatency;
|
|
|
|
int silenceDelay;
|
2019-11-10 19:05:46 +00:00
|
|
|
int volume;
|
2019-11-10 18:44:28 +00:00
|
|
|
|
2019-11-24 21:06:55 +00:00
|
|
|
int videoType;
|
|
|
|
bool scanLines;
|
|
|
|
bool verticalBlend;
|
|
|
|
|
2017-09-19 20:47:15 +01:00
|
|
|
std::vector<QString> disks;
|
|
|
|
std::vector<QString> hds;
|
2017-10-15 18:20:25 +01:00
|
|
|
|
|
|
|
QString saveState;
|
2017-10-17 21:14:36 +01:00
|
|
|
QString screenshotTemplate;
|
2017-09-19 20:47:15 +01:00
|
|
|
};
|
|
|
|
|
2017-09-21 20:31:52 +01:00
|
|
|
explicit Preferences(QWidget *parent);
|
2017-09-19 20:47:15 +01:00
|
|
|
|
2017-10-10 14:26:40 +01:00
|
|
|
void setup(const Data & data, QSettings & settings);
|
2017-09-19 20:47:15 +01:00
|
|
|
Data getData() const;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void on_disk1_activated(int index);
|
|
|
|
void on_disk2_activated(int index);
|
|
|
|
void on_hd1_activated(int index);
|
|
|
|
void on_hd2_activated(int index);
|
|
|
|
|
2017-09-26 18:03:02 +01:00
|
|
|
void on_browse_disk1_clicked();
|
|
|
|
void on_browse_disk2_clicked();
|
|
|
|
void on_browse_hd1_clicked();
|
|
|
|
void on_browse_hd2_clicked();
|
2017-09-19 20:47:15 +01:00
|
|
|
|
2017-09-26 18:03:02 +01:00
|
|
|
void on_hd_7_clicked(bool checked);
|
2017-09-19 20:47:15 +01:00
|
|
|
|
2017-10-15 18:20:25 +01:00
|
|
|
void on_browse_ss_clicked();
|
|
|
|
|
2017-09-19 20:47:15 +01:00
|
|
|
private:
|
|
|
|
std::vector<QComboBox *> myDisks;
|
|
|
|
std::vector<QComboBox *> myHDs;
|
|
|
|
|
2017-10-10 14:26:40 +01:00
|
|
|
void setSettings(QSettings & settings);
|
2017-10-06 20:48:14 +01:00
|
|
|
void setData(const Data & data);
|
|
|
|
void populateJoysticks();
|
2019-11-06 22:41:19 +00:00
|
|
|
void browseDisk(const std::vector<QComboBox *> & vdisks, const size_t id);
|
2017-09-19 20:47:15 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PREFERENCES_H
|