Move Qt UI to private member.
This way it is clear which variables comes from the ui component. Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
54057134cb
commit
31340919de
14 changed files with 161 additions and 108 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "loggingcategory.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QAudioOutput>
|
||||
|
||||
// Speaker
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
#ifndef AUDIO_H
|
||||
#define AUDIO_H
|
||||
|
||||
#include <QIODevice>
|
||||
#include <QAudioFormat>
|
||||
#include <QAudioOutput>
|
||||
#include <QAudio>
|
||||
#include <queue>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class QIODevice;
|
||||
class QAudioOutput;
|
||||
|
||||
class AudioGenerator {
|
||||
public:
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include <QMessageBox>
|
||||
#include <QGamepad>
|
||||
#include <QSettings>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "emulator.h"
|
||||
#include "ui_emulator.h"
|
||||
|
||||
#include <QMdiSubWindow>
|
||||
#include "StdAfx.h"
|
||||
|
@ -9,14 +10,15 @@
|
|||
#include <cmath>
|
||||
|
||||
Emulator::Emulator(QWidget *parent) :
|
||||
QFrame(parent)
|
||||
QFrame(parent),
|
||||
ui(new Ui::Emulator)
|
||||
{
|
||||
setupUi(this);
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void Emulator::updateVideo()
|
||||
{
|
||||
video->update();
|
||||
ui->video->update();
|
||||
}
|
||||
|
||||
void Emulator::redrawScreen()
|
||||
|
@ -28,17 +30,17 @@ void Emulator::redrawScreen()
|
|||
|
||||
void Emulator::refreshScreen()
|
||||
{
|
||||
video->repaint();
|
||||
ui->video->repaint();
|
||||
}
|
||||
|
||||
bool Emulator::saveScreen(const QString & filename) const
|
||||
{
|
||||
return video->getScreen().save(filename);
|
||||
return ui->video->getScreen().save(filename);
|
||||
}
|
||||
|
||||
void Emulator::displayLogo()
|
||||
{
|
||||
video->displayLogo();
|
||||
ui->video->displayLogo();
|
||||
}
|
||||
|
||||
void Emulator::setVideoSize(QMdiSubWindow * window, const QSize & size)
|
||||
|
@ -46,20 +48,20 @@ void Emulator::setVideoSize(QMdiSubWindow * window, const QSize & size)
|
|||
window->showNormal();
|
||||
|
||||
// assume the extra space between widget and border is not affected by a resize
|
||||
const QSize gap = window->size() - video->size();
|
||||
const QSize gap = window->size() - ui->video->size();
|
||||
window->resize(size + gap);
|
||||
}
|
||||
|
||||
void Emulator::setZoom(QMdiSubWindow * window, const int x)
|
||||
{
|
||||
const QSize target = video->minimumSize() * x;
|
||||
const QSize target = ui->video->minimumSize() * x;
|
||||
setVideoSize(window, target);
|
||||
}
|
||||
|
||||
void Emulator::set43AspectRatio(QMdiSubWindow * window)
|
||||
{
|
||||
// keep the same surface with 4:3 aspect ratio
|
||||
const QSize & size = video->size();
|
||||
const QSize & size = ui->video->size();
|
||||
const double area = size.height() * size.width();
|
||||
|
||||
const int numerator = 35; // 7 * 40
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
#ifndef EMULATOR_H
|
||||
#define EMULATOR_H
|
||||
|
||||
#include "ui_emulator.h"
|
||||
#include <QFrame>
|
||||
|
||||
class QMdiSubWindow;
|
||||
|
||||
class Emulator : public QFrame, private Ui::Emulator
|
||||
namespace Ui {
|
||||
class Emulator;
|
||||
}
|
||||
|
||||
class Emulator : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -25,6 +29,8 @@ public:
|
|||
private:
|
||||
void setVideoSize(QMdiSubWindow * window, const QSize & size);
|
||||
|
||||
private:
|
||||
Ui::Emulator *ui;
|
||||
};
|
||||
|
||||
#endif // EMULATOR_H
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "gamepadpaddle.h"
|
||||
|
||||
#include <QGamepad>
|
||||
|
||||
std::shared_ptr<Paddle> GamepadPaddle::fromName(const QString & name)
|
||||
{
|
||||
if (name.isEmpty())
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#ifndef GAMEPADPADDLE_H
|
||||
#define GAMEPADPADDLE_H
|
||||
|
||||
#include <QGamepad>
|
||||
|
||||
#include "linux/paddle.h"
|
||||
|
||||
class QGamepad;
|
||||
class QString;
|
||||
|
||||
class GamepadPaddle : public Paddle
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
#include "memorycontainer.h"
|
||||
#include "ui_memorycontainer.h"
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "Memory.h"
|
||||
|
||||
MemoryContainer::MemoryContainer(QWidget *parent) :
|
||||
QTabWidget(parent)
|
||||
QTabWidget(parent),
|
||||
ui(new Ui::MemoryContainer)
|
||||
{
|
||||
setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
const char * mainBase = reinterpret_cast<const char *>(MemGetMainPtr(0));
|
||||
QByteArray mainMemory = QByteArray::fromRawData(mainBase, 0x10000);
|
||||
|
||||
main->setReadOnly(true);
|
||||
main->setData(mainMemory);
|
||||
ui->main->setReadOnly(true);
|
||||
ui->main->setData(mainMemory);
|
||||
|
||||
const char * auxBase = reinterpret_cast<const char *>(MemGetAuxPtr(0));
|
||||
QByteArray auxMemory = QByteArray::fromRawData(auxBase, 0x10000);
|
||||
|
||||
aux->setReadOnly(true);
|
||||
aux->setData(auxMemory);
|
||||
ui->aux->setReadOnly(true);
|
||||
ui->aux->setData(auxMemory);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
#ifndef MEMORYCONTAINER_H
|
||||
#define MEMORYCONTAINER_H
|
||||
|
||||
#include "ui_memorycontainer.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
class MemoryContainer : public QTabWidget, private Ui::MemoryContainer
|
||||
namespace Ui {
|
||||
class MemoryContainer;
|
||||
}
|
||||
|
||||
class MemoryContainer : public QTabWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MemoryContainer(QWidget *parent = nullptr);
|
||||
|
||||
private:
|
||||
Ui::MemoryContainer *ui;
|
||||
};
|
||||
|
||||
#endif // MEMORYCONTAINER_H
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
#include "preferences.h"
|
||||
#include "ui_preferences.h"
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "Common.h"
|
||||
#include "Memory.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QtGamepad/QGamepad>
|
||||
#include <QGamepadManager>
|
||||
#include <QSettings>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -114,15 +118,16 @@ namespace
|
|||
}
|
||||
|
||||
Preferences::Preferences(QWidget *parent) :
|
||||
QDialog(parent)
|
||||
QDialog(parent),
|
||||
ui(new Ui::Preferences)
|
||||
{
|
||||
setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
// easier to handle in a vector
|
||||
myDisks.push_back(disk1);
|
||||
myDisks.push_back(disk2);
|
||||
myHDs.push_back(hd1);
|
||||
myHDs.push_back(hd2);
|
||||
myDisks.push_back(ui->disk1);
|
||||
myDisks.push_back(ui->disk2);
|
||||
myHDs.push_back(ui->hd1);
|
||||
myHDs.push_back(ui->hd2);
|
||||
}
|
||||
|
||||
void Preferences::setup(const Data & data, QSettings & settings)
|
||||
|
@ -134,8 +139,8 @@ void Preferences::setup(const Data & data, QSettings & settings)
|
|||
|
||||
void Preferences::populateJoysticks()
|
||||
{
|
||||
joystick->clear();
|
||||
joystick->addItem("None"); // index = 0
|
||||
ui->joystick->clear();
|
||||
ui->joystick->addItem("None"); // index = 0
|
||||
|
||||
QGamepadManager * manager = QGamepadManager::instance();
|
||||
const QList<int> gamepads = manager->connectedGamepads();
|
||||
|
@ -143,23 +148,23 @@ void Preferences::populateJoysticks()
|
|||
for (int id : gamepads)
|
||||
{
|
||||
const QString name = manager->gamepadName(id);
|
||||
joystick->addItem(name);
|
||||
ui->joystick->addItem(name);
|
||||
}
|
||||
}
|
||||
|
||||
void Preferences::setSettings(QSettings & settings)
|
||||
{
|
||||
registryTree->clear();
|
||||
ui->registryTree->clear();
|
||||
|
||||
QStringList columns;
|
||||
columns.append(QString::fromUtf8("Registry")); // the name
|
||||
columns.append(settings.fileName()); // the value
|
||||
|
||||
QTreeWidgetItem * newItem = new QTreeWidgetItem(registryTree, columns);
|
||||
QTreeWidgetItem * newItem = new QTreeWidgetItem(ui->registryTree, columns);
|
||||
processSettingsGroup(settings, newItem);
|
||||
|
||||
registryTree->addTopLevelItem(newItem);
|
||||
registryTree->expandAll();
|
||||
ui->registryTree->addTopLevelItem(newItem);
|
||||
ui->registryTree->expandAll();
|
||||
}
|
||||
|
||||
void Preferences::setData(const Data & data)
|
||||
|
@ -167,31 +172,31 @@ void Preferences::setData(const Data & data)
|
|||
initialiseDisks(myDisks, data.disks);
|
||||
initialiseDisks(myHDs, data.hds);
|
||||
|
||||
enhanced_speed->setChecked(data.enhancedSpeed);
|
||||
apple2Type->setCurrentIndex(data.apple2Type);
|
||||
lc_0->setCurrentIndex(data.cardInSlot0);
|
||||
mouse_4->setChecked(data.mouseInSlot4);
|
||||
cpm_5->setChecked(data.cpmInSlot5);
|
||||
hd_7->setChecked(data.hdInSlot7);
|
||||
ui->enhanced_speed->setChecked(data.enhancedSpeed);
|
||||
ui->apple2Type->setCurrentIndex(data.apple2Type);
|
||||
ui->lc_0->setCurrentIndex(data.cardInSlot0);
|
||||
ui->mouse_4->setChecked(data.mouseInSlot4);
|
||||
ui->cpm_5->setChecked(data.cpmInSlot5);
|
||||
ui->hd_7->setChecked(data.hdInSlot7);
|
||||
|
||||
rw_size->setMaximum(kMaxExMemoryBanks);
|
||||
rw_size->setValue(data.ramWorksSize);
|
||||
ui->rw_size->setMaximum(kMaxExMemoryBanks);
|
||||
ui->rw_size->setValue(data.ramWorksSize);
|
||||
|
||||
// synchronise
|
||||
on_hd_7_clicked(data.hdInSlot7);
|
||||
|
||||
joystick->setCurrentText(data.joystick);
|
||||
ui->joystick->setCurrentText(data.joystick);
|
||||
|
||||
save_state->setText(data.saveState);
|
||||
screenshot->setText(data.screenshotTemplate);
|
||||
ui->save_state->setText(data.saveState);
|
||||
ui->screenshot->setText(data.screenshotTemplate);
|
||||
|
||||
audio_latency->setValue(data.audioLatency);
|
||||
silence_delay->setValue(data.silenceDelay);
|
||||
volume->setValue(data.volume);
|
||||
ui->audio_latency->setValue(data.audioLatency);
|
||||
ui->silence_delay->setValue(data.silenceDelay);
|
||||
ui->volume->setValue(data.volume);
|
||||
|
||||
video_type->setCurrentIndex(data.videoType);
|
||||
scan_lines->setChecked(data.scanLines);
|
||||
vertical_blend->setChecked(data.verticalBlend);
|
||||
ui->video_type->setCurrentIndex(data.videoType);
|
||||
ui->scan_lines->setChecked(data.scanLines);
|
||||
ui->vertical_blend->setChecked(data.verticalBlend);
|
||||
}
|
||||
|
||||
Preferences::Data Preferences::getData() const
|
||||
|
@ -201,30 +206,30 @@ Preferences::Data Preferences::getData() const
|
|||
fillData(myDisks, data.disks);
|
||||
fillData(myHDs, data.hds);
|
||||
|
||||
data.enhancedSpeed = enhanced_speed->isChecked();
|
||||
data.apple2Type = apple2Type->currentIndex();
|
||||
data.cardInSlot0 = lc_0->currentIndex();
|
||||
data.mouseInSlot4 = mouse_4->isChecked();
|
||||
data.cpmInSlot5 = cpm_5->isChecked();
|
||||
data.hdInSlot7 = hd_7->isChecked();
|
||||
data.ramWorksSize = rw_size->value();
|
||||
data.enhancedSpeed = ui->enhanced_speed->isChecked();
|
||||
data.apple2Type = ui->apple2Type->currentIndex();
|
||||
data.cardInSlot0 = ui->lc_0->currentIndex();
|
||||
data.mouseInSlot4 = ui->mouse_4->isChecked();
|
||||
data.cpmInSlot5 = ui->cpm_5->isChecked();
|
||||
data.hdInSlot7 = ui->hd_7->isChecked();
|
||||
data.ramWorksSize = ui->rw_size->value();
|
||||
|
||||
// because index = 0 is None
|
||||
if (joystick->currentIndex() >= 1)
|
||||
if (ui->joystick->currentIndex() >= 1)
|
||||
{
|
||||
data.joystick = joystick->currentText();
|
||||
data.joystick = ui->joystick->currentText();
|
||||
}
|
||||
|
||||
data.saveState = save_state->text();
|
||||
data.screenshotTemplate = screenshot->text();
|
||||
data.saveState = ui->save_state->text();
|
||||
data.screenshotTemplate = ui->screenshot->text();
|
||||
|
||||
data.audioLatency = audio_latency->value();
|
||||
data.silenceDelay = silence_delay->value();
|
||||
data.volume = volume->value();
|
||||
data.audioLatency = ui->audio_latency->value();
|
||||
data.silenceDelay = ui->silence_delay->value();
|
||||
data.volume = ui->volume->value();
|
||||
|
||||
data.videoType = video_type->currentIndex();
|
||||
data.scanLines = scan_lines->isChecked();
|
||||
data.verticalBlend = vertical_blend->isChecked();
|
||||
data.videoType = ui->video_type->currentIndex();
|
||||
data.scanLines = ui->scan_lines->isChecked();
|
||||
data.verticalBlend = ui->vertical_blend->isChecked();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
@ -295,17 +300,17 @@ void Preferences::on_browse_hd2_clicked()
|
|||
|
||||
void Preferences::on_hd_7_clicked(bool checked)
|
||||
{
|
||||
hd1->setEnabled(checked);
|
||||
hd2->setEnabled(checked);
|
||||
browse_hd1->setEnabled(checked);
|
||||
browse_hd2->setEnabled(checked);
|
||||
ui->hd1->setEnabled(checked);
|
||||
ui->hd2->setEnabled(checked);
|
||||
ui->browse_hd1->setEnabled(checked);
|
||||
ui->browse_hd2->setEnabled(checked);
|
||||
}
|
||||
|
||||
void Preferences::on_browse_ss_clicked()
|
||||
{
|
||||
const QString name = QFileDialog::getSaveFileName(this, QString(), save_state->text());
|
||||
const QString name = QFileDialog::getSaveFileName(this, QString(), ui->save_state->text());
|
||||
if (!name.isEmpty())
|
||||
{
|
||||
save_state->setText(name);
|
||||
ui->save_state->setText(name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
#ifndef PREFERENCES_H
|
||||
#define PREFERENCES_H
|
||||
|
||||
#include "ui_preferences.h"
|
||||
#include <QDialog>
|
||||
|
||||
#include <vector>
|
||||
#include <QSettings>
|
||||
|
||||
class Preferences : public QDialog, private Ui::Preferences
|
||||
class QComboBox;
|
||||
class QSettings;
|
||||
|
||||
namespace Ui {
|
||||
class Preferences;
|
||||
}
|
||||
|
||||
class Preferences : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -70,6 +76,8 @@ private:
|
|||
void populateJoysticks();
|
||||
void browseDisk(const std::vector<QComboBox *> & vdisks, const size_t id);
|
||||
|
||||
private:
|
||||
Ui::Preferences *ui;
|
||||
};
|
||||
|
||||
#endif // PREFERENCES_H
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "qapple.h"
|
||||
#include "ui_qapple.h"
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "Common.h"
|
||||
|
@ -26,10 +27,14 @@
|
|||
#include "configuration.h"
|
||||
#include "audiogenerator.h"
|
||||
#include "gamepadpaddle.h"
|
||||
#include "preferences.h"
|
||||
|
||||
#include <QMdiSubWindow>
|
||||
#include <QMessageBox>
|
||||
#include <QFileDialog>
|
||||
#include <QStyle>
|
||||
#include <QSettings>
|
||||
#include <QAudioOutput>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -171,10 +176,10 @@ int MessageBox(HWND, const char * text, const char * caption, UINT type)
|
|||
|
||||
QApple::PauseEmulator::PauseEmulator(QApple * qapple) : myQApple(qapple)
|
||||
{
|
||||
myWasRunning = myQApple->actionPause->isEnabled();
|
||||
myWasRunning = myQApple->ui->actionPause->isEnabled();
|
||||
if (myWasRunning)
|
||||
{
|
||||
myQApple->actionPause->trigger();
|
||||
myQApple->ui->actionPause->trigger();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -182,24 +187,28 @@ QApple::PauseEmulator::~PauseEmulator()
|
|||
{
|
||||
if (myWasRunning)
|
||||
{
|
||||
myQApple->actionStart->trigger();
|
||||
myQApple->ui->actionStart->trigger();
|
||||
}
|
||||
}
|
||||
|
||||
QApple::QApple(QWidget *parent) :
|
||||
QMainWindow(parent), myTimerID(0), myPreferences(this)
|
||||
QMainWindow(parent),
|
||||
myTimerID(0),
|
||||
ui(new Ui::QApple)
|
||||
{
|
||||
setupUi(this);
|
||||
ui->setupUi(this);
|
||||
|
||||
actionStart->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
||||
actionPause->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
|
||||
actionReboot->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward));
|
||||
ui->actionStart->setIcon(style()->standardIcon(QStyle::SP_MediaPlay));
|
||||
ui->actionPause->setIcon(style()->standardIcon(QStyle::SP_MediaPause));
|
||||
ui->actionReboot->setIcon(style()->standardIcon(QStyle::SP_MediaSkipBackward));
|
||||
|
||||
actionSave_state->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
|
||||
actionLoad_state->setIcon(style()->standardIcon(QStyle::SP_DialogOpenButton));
|
||||
ui->actionSave_state->setIcon(style()->standardIcon(QStyle::SP_DialogSaveButton));
|
||||
ui->actionLoad_state->setIcon(style()->standardIcon(QStyle::SP_DialogOpenButton));
|
||||
|
||||
myEmulator = new Emulator(mdiArea);
|
||||
myEmulatorWindow = mdiArea->addSubWindow(myEmulator, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint);
|
||||
myPreferences = new Preferences(this);
|
||||
|
||||
myEmulator = new Emulator(ui->mdiArea);
|
||||
myEmulatorWindow = ui->mdiArea->addSubWindow(myEmulator, Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint);
|
||||
|
||||
connect(AudioGenerator::instance().getAudioOutput(), SIGNAL(stateChanged(QAudio::State)), this, SLOT(on_stateChanged(QAudio::State)));
|
||||
|
||||
|
@ -304,16 +313,16 @@ void QApple::on_actionStart_triggered()
|
|||
{
|
||||
// always restart with the same timer gap that was last used
|
||||
myTimerID = startTimer(myOptions->msGap, Qt::PreciseTimer);
|
||||
actionPause->setEnabled(true);
|
||||
actionStart->setEnabled(false);
|
||||
ui->actionPause->setEnabled(true);
|
||||
ui->actionStart->setEnabled(false);
|
||||
restartTimeCounters();
|
||||
}
|
||||
|
||||
void QApple::on_actionPause_triggered()
|
||||
{
|
||||
stopTimer();
|
||||
actionPause->setEnabled(false);
|
||||
actionStart->setEnabled(true);
|
||||
ui->actionPause->setEnabled(false);
|
||||
ui->actionStart->setEnabled(true);
|
||||
}
|
||||
|
||||
void QApple::on_actionX1_triggered()
|
||||
|
@ -357,8 +366,8 @@ void QApple::timerEvent(QTimerEvent *)
|
|||
|
||||
void QApple::on_actionMemory_triggered()
|
||||
{
|
||||
MemoryContainer * container = new MemoryContainer(mdiArea);
|
||||
QMdiSubWindow * window = mdiArea->addSubWindow(container);
|
||||
MemoryContainer * container = new MemoryContainer(ui->mdiArea);
|
||||
QMdiSubWindow * window = ui->mdiArea->addSubWindow(container);
|
||||
|
||||
// need to close as it points to old memory
|
||||
connect(this, SIGNAL(endEmulator()), window, SLOT(close()));
|
||||
|
@ -380,11 +389,11 @@ void QApple::on_actionOptions_triggered()
|
|||
myOptions->getData(currentData);
|
||||
|
||||
QSettings settings; // the function will "modify" it
|
||||
myPreferences.setup(currentData, settings);
|
||||
myPreferences->setup(currentData, settings);
|
||||
|
||||
if (myPreferences.exec())
|
||||
if (myPreferences->exec())
|
||||
{
|
||||
const Preferences::Data newData = myPreferences.getData();
|
||||
const Preferences::Data newData = myPreferences->getData();
|
||||
setAppleWinPreferences(currentData, newData);
|
||||
myOptions->setData(newData);
|
||||
reloadOptions();
|
||||
|
@ -492,7 +501,7 @@ void QApple::on_actionLoad_state_from_triggered()
|
|||
SetCurrentImageDir(path.toStdString().c_str());
|
||||
|
||||
Snapshot_SetFilename(filename.toStdString().c_str());
|
||||
actionLoad_state->trigger();
|
||||
ui->actionLoad_state->trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
#ifndef QAPPLE_H
|
||||
#define QAPPLE_H
|
||||
|
||||
#include "ui_qapple.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QElapsedTimer>
|
||||
#include <QAudio>
|
||||
|
||||
#include <memory>
|
||||
#include "preferences.h"
|
||||
|
||||
|
||||
class QMdiSubWindow;
|
||||
class Emulator;
|
||||
class Preferences;
|
||||
class GlobalOptions;
|
||||
|
||||
class QApple : public QMainWindow, private Ui::QApple
|
||||
namespace Ui {
|
||||
class QApple;
|
||||
}
|
||||
|
||||
class QApple : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -86,7 +92,7 @@ private:
|
|||
void reloadOptions();
|
||||
|
||||
int myTimerID;
|
||||
Preferences myPreferences;
|
||||
Preferences * myPreferences;
|
||||
|
||||
QElapsedTimer myElapsedTimer;
|
||||
QMdiSubWindow * myEmulatorWindow;
|
||||
|
@ -94,6 +100,9 @@ private:
|
|||
qint64 myCpuTimeReference;
|
||||
|
||||
std::shared_ptr<GlobalOptions> myOptions;
|
||||
|
||||
private:
|
||||
Ui::QApple *ui;
|
||||
};
|
||||
|
||||
#endif // QAPPLE_H
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define VIDEO_BASECLASS QOpenGLWidget
|
||||
//#define VIDEO_BASECLASS QWidget
|
||||
|
||||
|
||||
class Video : public VIDEO_BASECLASS
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -28,7 +27,6 @@ protected:
|
|||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
|
||||
private:
|
||||
|
||||
QImage myLogo;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue