mirror of
https://github.com/TomHarte/CLK.git
synced 2025-12-19 14:18:05 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33362298ec | ||
|
|
74f4b5e1a5 | ||
|
|
f6066ddbc8 | ||
|
|
1f960bc864 | ||
|
|
df80ad77c5 | ||
|
|
67443f9287 | ||
|
|
f0394976cc | ||
|
|
69fd0b9dab | ||
|
|
959f26c195 | ||
|
|
e4aea4781f | ||
|
|
3e37ef22ba | ||
|
|
89295b7b64 | ||
|
|
acf8dba51b |
@@ -47,6 +47,7 @@ struct Machine {
|
||||
DeclareField(automatic_tape_motor_control);
|
||||
declare_display_option();
|
||||
declare_quickload_option();
|
||||
limit_enum(&output, Configurable::Display::RGB, Configurable::Display::CompositeColour, -1);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -253,6 +253,7 @@ std::map<std::string, std::unique_ptr<Reflection::Struct>> Machine::AllOptionsBy
|
||||
Emplace(AppleII, Apple::II::Machine);
|
||||
Emplace(Archimedes, Archimedes::Machine);
|
||||
Emplace(AtariST, Atari::ST::Machine);
|
||||
Emplace(BBCMicro, BBCMicro::Machine);
|
||||
Emplace(ColecoVision, Coleco::Vision::Machine);
|
||||
Emplace(Electron, Electron::Machine);
|
||||
Emplace(Enterprise, Enterprise::Machine);
|
||||
|
||||
@@ -5714,7 +5714,7 @@
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 0700;
|
||||
LastUpgradeCheck = 2610;
|
||||
LastUpgradeCheck = 2620;
|
||||
ORGANIZATIONNAME = "Thomas Harte";
|
||||
TargetAttributes = {
|
||||
4B055A691FAE763F0060FFFF = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "2610"
|
||||
LastUpgradeVersion = "2620"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -74,7 +74,7 @@
|
||||
</CommandLineArgument>
|
||||
<CommandLineArgument
|
||||
argument = "--help"
|
||||
isEnabled = "NO">
|
||||
isEnabled = "YES">
|
||||
</CommandLineArgument>
|
||||
</CommandLineArguments>
|
||||
</LaunchAction>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "2610"
|
||||
LastUpgradeVersion = "2620"
|
||||
version = "1.8">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "2610"
|
||||
LastUpgradeVersion = "2620"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <QtWidgets>
|
||||
|
||||
#include <cstdio>
|
||||
#include <memory>
|
||||
|
||||
#include "../../Numeric/CRC.hpp"
|
||||
#include "../../Configurable/StandardOptions.hpp"
|
||||
@@ -401,11 +402,74 @@ void MainWindow::launchMachine() {
|
||||
|
||||
// Add machine-specific UI.
|
||||
const std::string settingsPrefix = Machine::ShortNameForTargetMachine(machineType);
|
||||
switch(machineType) {
|
||||
case Analyser::Machine::AmstradCPC:
|
||||
addDisplayMenu(settingsPrefix, "Television", "", "", "Monitor");
|
||||
break;
|
||||
auto configurableMachine = machine->configurable_device();
|
||||
if(configurableMachine) {
|
||||
auto options = configurableMachine->get_options();
|
||||
const auto allKeys = options->all_keys();
|
||||
const auto allDisplayValues = options->values_for(Configurable::Options::DisplayOptionName);
|
||||
const auto hasDynamicCrop = std::find(allKeys.begin(), allKeys.end(), Configurable::Options::DynamicCropOptionName) != allKeys.end();
|
||||
if(hasDynamicCrop || allDisplayValues.size() > 1) {
|
||||
const auto contains = [&](const Configurable::Display option) {
|
||||
const auto name = Reflection::Enum::to_string<Configurable::Display>(option);
|
||||
return std::find(allDisplayValues.begin(), allDisplayValues.end(), name) != allDisplayValues.end();
|
||||
};
|
||||
|
||||
|
||||
const bool hasCompositeColour = contains(Configurable::Display::CompositeColour);
|
||||
const bool hasCompositeMonochrome = contains(Configurable::Display::CompositeMonochrome);
|
||||
const bool hasSVideo = contains(Configurable::Display::SVideo);
|
||||
const bool hasRGB = contains(Configurable::Display::RGB);
|
||||
|
||||
const bool differentiateComposite = hasCompositeColour && hasCompositeMonochrome;
|
||||
const bool hasMultipleTelevisionConnections = hasSVideo && (hasCompositeColour || hasCompositeMonochrome);
|
||||
const bool hasNonCompositeConnections = hasSVideo || hasRGB;
|
||||
|
||||
const auto compositeColourName = [&]() {
|
||||
if(!hasNonCompositeConnections) {
|
||||
return "Colour";
|
||||
}
|
||||
if(hasMultipleTelevisionConnections) {
|
||||
return differentiateComposite ? "Colour Composite" : "Composite";
|
||||
} else {
|
||||
return differentiateComposite ? "Colour Television" : "Television";
|
||||
}
|
||||
};
|
||||
|
||||
const auto compositeMonochromeName = [&]() {
|
||||
if(!hasNonCompositeConnections) {
|
||||
return "Monochrome";
|
||||
}
|
||||
if(hasMultipleTelevisionConnections) {
|
||||
return differentiateComposite ? "Monochrome Composite" : "Composite";
|
||||
} else {
|
||||
return differentiateComposite ? "Black and White Television" : "Television";
|
||||
}
|
||||
};
|
||||
|
||||
const auto rgbName = [&]() {
|
||||
return hasMultipleTelevisionConnections ? "RGB" : "Monitor";
|
||||
};
|
||||
|
||||
addDisplayMenu(
|
||||
settingsPrefix,
|
||||
hasCompositeColour ? compositeColourName() : "",
|
||||
hasCompositeMonochrome ? compositeMonochromeName() : "",
|
||||
hasSVideo ? "S-Video" : "",
|
||||
hasRGB ? rgbName() : "",
|
||||
hasDynamicCrop
|
||||
);
|
||||
}
|
||||
|
||||
// The ZX80 and ZX81 have a specialised version of this.
|
||||
// It might become general later if I generalite automatic tape motor control, which I probably should.
|
||||
if(machineType != Analyser::Machine::ZX8081) {
|
||||
const auto hasQuickLoad = std::find(allKeys.begin(), allKeys.end(), Configurable::Options::QuickLoadOptionName) != allKeys.end();
|
||||
const auto hasQuickBoot = std::find(allKeys.begin(), allKeys.end(), Configurable::Options::QuickBootOptionName) != allKeys.end();
|
||||
addEnhancementsMenu(settingsPrefix, hasQuickLoad, hasQuickBoot);
|
||||
}
|
||||
}
|
||||
|
||||
switch(machineType) {
|
||||
case Analyser::Machine::AppleII:
|
||||
addAppleIIMenu();
|
||||
break;
|
||||
@@ -414,58 +478,10 @@ void MainWindow::launchMachine() {
|
||||
addAtari2600Menu();
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Archimedes:
|
||||
addEnhancementsMenu(settingsPrefix, true, false);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::AtariST:
|
||||
addDisplayMenu(settingsPrefix, "Television", "", "", "Monitor");
|
||||
break;
|
||||
|
||||
case Analyser::Machine::ColecoVision:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "");
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Electron:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "RGB");
|
||||
addEnhancementsMenu(settingsPrefix, true, false);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Enterprise:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "", "RGB");
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Macintosh:
|
||||
addEnhancementsMenu(settingsPrefix, false, true);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::MasterSystem:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "SCART");
|
||||
break;
|
||||
|
||||
case Analyser::Machine::MSX:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "SCART");
|
||||
addEnhancementsMenu(settingsPrefix, true, false);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Oric:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "", "SCART");
|
||||
break;
|
||||
|
||||
case Analyser::Machine::Vic20:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "");
|
||||
addEnhancementsMenu(settingsPrefix, true, false);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::ZX8081:
|
||||
addZX8081Menu(settingsPrefix);
|
||||
break;
|
||||
|
||||
case Analyser::Machine::ZXSpectrum:
|
||||
addDisplayMenu(settingsPrefix, "Composite", "", "S-Video", "SCART");
|
||||
addEnhancementsMenu(settingsPrefix, true, false);
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
@@ -476,7 +492,14 @@ void MainWindow::launchMachine() {
|
||||
addActivityObserver();
|
||||
}
|
||||
|
||||
void MainWindow::addDisplayMenu(const std::string &machinePrefix, const std::string &compositeColour, const std::string &compositeMono, const std::string &svideo, const std::string &rgb) {
|
||||
void MainWindow::addDisplayMenu(
|
||||
const std::string &machinePrefix,
|
||||
const std::string &compositeColour,
|
||||
const std::string &compositeMono,
|
||||
const std::string &svideo,
|
||||
const std::string &rgb,
|
||||
const bool offerDynamicCrop
|
||||
) {
|
||||
// Create a display menu.
|
||||
displayMenu = menuBar()->addMenu(tr("&Display"));
|
||||
|
||||
@@ -543,9 +566,37 @@ void MainWindow::addDisplayMenu(const std::string &machinePrefix, const std::str
|
||||
machine->configurable_device()->set_options(options);
|
||||
});
|
||||
}
|
||||
|
||||
// Possibly add a dynamic crop selector.
|
||||
if(offerDynamicCrop) {
|
||||
displayMenu->addSeparator();
|
||||
|
||||
QAction *const action = new QAction(tr("Crop Dynamically"), this);
|
||||
action->setCheckable(true);
|
||||
displayMenu->addAction(action);
|
||||
|
||||
const auto dynamicCropSettingName = QString::fromStdString(machinePrefix + ".dynamicCrop");
|
||||
if(settings.contains(dynamicCropSettingName)) {
|
||||
const auto useDynamicCrop = settings.value(settingName).toBool();
|
||||
action->setChecked(useDynamicCrop);
|
||||
Reflection::set(*options, Configurable::Options::DynamicCropOptionName, useDynamicCrop);
|
||||
}
|
||||
connect(action, &QAction::toggled, this, [=, this] (const bool ticked) {
|
||||
Settings settings;
|
||||
settings.setValue(dynamicCropSettingName, ticked);
|
||||
|
||||
std::lock_guard lock_guard(machineMutex);
|
||||
auto options = machine->configurable_device()->get_options();
|
||||
Reflection::set(*options, Configurable::Options::DynamicCropOptionName, ticked);
|
||||
machine->configurable_device()->set_options(options);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::addEnhancementsMenu(const std::string &machinePrefix, const bool offerQuickLoad, const bool offerQuickBoot) {
|
||||
if(!offerQuickLoad && !offerQuickBoot) {
|
||||
return;
|
||||
}
|
||||
enhancementsMenu = menuBar()->addMenu(tr("&Enhancements"));
|
||||
addEnhancementsItems(machinePrefix, enhancementsMenu, offerQuickLoad, offerQuickBoot, false);
|
||||
}
|
||||
@@ -681,9 +732,6 @@ void MainWindow::toggleAtari2600Switch(const Atari2600Switch toggleSwitch) {
|
||||
}
|
||||
|
||||
void MainWindow::addAppleIIMenu() {
|
||||
// Add the standard display settings.
|
||||
addDisplayMenu("appleII", "Colour", "Monochrome", "", "");
|
||||
|
||||
// Add an additional tick box, for square pixels.
|
||||
QAction *const squarePixelsAction = new QAction(tr("Square Pixels"));
|
||||
squarePixelsAction->setCheckable(true);
|
||||
|
||||
@@ -127,7 +127,7 @@ class MainWindow : public QMainWindow, public Outputs::Speaker::Speaker::Delegat
|
||||
void deleteMachine();
|
||||
|
||||
QMenu *displayMenu = nullptr;
|
||||
void addDisplayMenu(const std::string &machinePrefix, const std::string &compositeColour, const std::string &compositeMono, const std::string &svideo, const std::string &rgb);
|
||||
void addDisplayMenu(const std::string &machinePrefix, const std::string &compositeColour, const std::string &compositeMono, const std::string &svideo, const std::string &rgb, bool allowDynamicCrop);
|
||||
|
||||
QMenu *enhancementsMenu = nullptr;
|
||||
QAction *automaticTapeControlAction = nullptr;
|
||||
|
||||
@@ -27,16 +27,12 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="machineSelectionTabs">
|
||||
<property name="currentIndex">
|
||||
<number>6</number>
|
||||
<number>16</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="amigaTab">
|
||||
<attribute name="title">
|
||||
<string>Amiga</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -101,31 +97,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="appleIITab">
|
||||
<attribute name="title">
|
||||
<string>Apple II</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -187,21 +164,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="appleIIMockingboardCheckBox">
|
||||
<property name="text">
|
||||
@@ -209,16 +171,25 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="appleIIgsTab">
|
||||
<attribute name="title">
|
||||
<string>Apple IIgs</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -273,32 +244,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="amstradCPCTab">
|
||||
<attribute name="title">
|
||||
<string>Amstrad CPC</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -327,32 +277,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="archimedesTab">
|
||||
<attribute name="title">
|
||||
<string>Archimedes</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -362,19 +291,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="atariSTTab">
|
||||
<attribute name="title">
|
||||
<string>Atari ST</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -403,23 +324,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="bbcTab">
|
||||
<attribute name="title">
|
||||
@@ -491,8 +395,8 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@@ -539,8 +443,8 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@@ -551,10 +455,6 @@
|
||||
<attribute name="title">
|
||||
<string>Enterprise</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -682,32 +582,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="macintoshTab">
|
||||
<attribute name="title">
|
||||
<string>Macintosh</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -741,41 +620,22 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="msxTab">
|
||||
<attribute name="title">
|
||||
<string>MSX</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel">
|
||||
<property name="text">
|
||||
<string>Model</string>
|
||||
<string>Model:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="msxModelComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -789,35 +649,14 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel">
|
||||
<property name="text">
|
||||
<string>Region</string>
|
||||
<string>Region:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="msxRegionComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
@@ -838,21 +677,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="msxDiskDriveCheckBox">
|
||||
<property name="text">
|
||||
@@ -874,8 +698,8 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@@ -886,10 +710,6 @@
|
||||
<attribute name="title">
|
||||
<string>Oric</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -954,23 +774,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="plus4Tab">
|
||||
<attribute name="title">
|
||||
@@ -1003,10 +806,6 @@
|
||||
<attribute name="title">
|
||||
<string>PC Compatible</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -1051,31 +850,12 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="vic20Tab">
|
||||
<attribute name="title">
|
||||
<string>Vic-20</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -1142,21 +922,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="vic20C1540CheckBox">
|
||||
<property name="text">
|
||||
@@ -1184,8 +949,6 @@
|
||||
<string>ZX80</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
@@ -1211,21 +974,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="zx80UseZX81ROMCheckBox">
|
||||
<property name="text">
|
||||
@@ -1240,8 +988,8 @@
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@@ -1252,10 +1000,6 @@
|
||||
<attribute name="title">
|
||||
<string>ZX81</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -1279,32 +1023,11 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="spectrumTab">
|
||||
<attribute name="title">
|
||||
<string>ZX Spectrum</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<layout class="QFormLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel">
|
||||
@@ -1348,23 +1071,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifdef TARGET_QT
|
||||
#include <QDebug>
|
||||
namespace {
|
||||
QDebug stream(const bool is_info) {
|
||||
[[maybe_unused]] QDebug stream(const bool is_info) {
|
||||
return (is_info ? qInfo() : qWarning()).noquote().nospace();
|
||||
}
|
||||
static constexpr char EndLine = 0;
|
||||
@@ -24,7 +24,7 @@ static constexpr char EndLine = 0;
|
||||
#else
|
||||
#include <iostream>
|
||||
namespace {
|
||||
std::ostream &stream(const bool is_info) {
|
||||
[[maybe_unused]] std::ostream &stream(const bool is_info) {
|
||||
return is_info ? std::cout : std::cerr;
|
||||
}
|
||||
static constexpr char EndLine = '\n';
|
||||
@@ -202,8 +202,7 @@ struct AccumulatingLog {
|
||||
template <Source source>
|
||||
struct LogLine<source, true>: private AccumulatingLog {
|
||||
public:
|
||||
explicit LogLine(bool is_info) noexcept :
|
||||
is_info_(is_info) {}
|
||||
explicit LogLine(const bool is_info) noexcept : is_info_(is_info) {}
|
||||
|
||||
~LogLine() {
|
||||
if(output_ == accumulator_.last && source == accumulator_.source && is_info_ == accumulator_.is_info) {
|
||||
@@ -262,7 +261,7 @@ private:
|
||||
|
||||
template <Source source>
|
||||
struct LogLine<source, false> {
|
||||
explicit LogLine(FILE *) noexcept {}
|
||||
explicit LogLine(bool) noexcept {}
|
||||
|
||||
template <size_t size, typename... Args>
|
||||
auto &append(const char (&)[size], Args...) { return *this; }
|
||||
@@ -279,8 +278,8 @@ public:
|
||||
static constexpr bool InfoEnabled = enabled_level(source) == EnabledLevel::ErrorsAndInfo;
|
||||
static constexpr bool ErrorsEnabled = enabled_level(source) >= EnabledLevel::Errors;
|
||||
|
||||
static auto info() { return LogLine<source, InfoEnabled>(stdout); }
|
||||
static auto error() { return LogLine<source, ErrorsEnabled>(stderr); }
|
||||
static auto info() { return LogLine<source, InfoEnabled>(true); }
|
||||
static auto error() { return LogLine<source, ErrorsEnabled>(false); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user