more UI work: make it explicit that some things are instance-unique

This commit is contained in:
Arisotura 2022-09-15 23:49:10 +02:00
parent 3192b9621f
commit 65f1aff453
5 changed files with 103 additions and 72 deletions

View File

@ -67,6 +67,16 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui(
bool iswav = (Config::MicInputType == 3); bool iswav = (Config::MicInputType == 3);
ui->txtMicWavPath->setEnabled(iswav); ui->txtMicWavPath->setEnabled(iswav);
ui->btnMicWavBrowse->setEnabled(iswav); ui->btnMicWavBrowse->setEnabled(iswav);
int inst = Platform::InstanceID();
if (inst > 0)
{
ui->lblInstanceNum->setText(QString("Configuring settings for instance %1").arg(inst+1));
ui->cbInterpolation->setEnabled(false);
ui->cbBitrate->setEnabled(false);
}
else
ui->lblInstanceNum->hide();
} }
AudioSettingsDialog::~AudioSettingsDialog() AudioSettingsDialog::~AudioSettingsDialog()

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>482</width> <width>482</width>
<height>256</height> <height>301</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -23,6 +23,13 @@
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum> <enum>QLayout::SetFixedSize</enum>
</property> </property>
<item>
<widget class="QLabel" name="lblInstanceNum">
<property name="text">
<string>Configuring settings for instance X</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QGroupBox" name="groupBox"> <widget class="QGroupBox" name="groupBox">
<property name="title"> <property name="title">
@ -76,7 +83,7 @@
<item row="1" column="1"> <item row="1" column="1">
<widget class="QComboBox" name="cbBitrate"> <widget class="QComboBox" name="cbBitrate">
<property name="whatsThis"> <property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The bitrate of audio playback. If set to &quot;Automatic&quot; this will be 10-bit for DS mode and 16-bit for DSi mode.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;The bitrate of audio playback. If set to &quot;Automatic&quot; this will be 10-bit for DS mode and 16-bit for DSi mode.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -18,8 +18,8 @@
#include <QMessageBox> #include <QMessageBox>
#include "Config.h"
#include "Platform.h" #include "Platform.h"
#include "Config.h"
#include "FirmwareSettingsDialog.h" #include "FirmwareSettingsDialog.h"
#include "ui_FirmwareSettingsDialog.h" #include "ui_FirmwareSettingsDialog.h"

View File

@ -24,6 +24,7 @@
#include <SDL2/SDL.h> #include <SDL2/SDL.h>
#include "types.h" #include "types.h"
#include "Platform.h"
#include "Config.h" #include "Config.h"
#include "MapButton.h" #include "MapButton.h"
@ -123,6 +124,12 @@ InputConfigDialog::InputConfigDialog(QWidget* parent) : QDialog(parent), ui(new
} }
setupKeypadPage(); setupKeypadPage();
int inst = Platform::InstanceID();
if (inst > 0)
ui->lblInstanceNum->setText(QString("Configuring mappings for instance %1").arg(inst+1));
else
ui->lblInstanceNum->hide();
} }
InputConfigDialog::~InputConfigDialog() InputConfigDialog::~InputConfigDialog()

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>770</width> <width>770</width>
<height>719</height> <height>678</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -20,7 +20,7 @@
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum> <enum>QLayout::SetFixedSize</enum>
</property> </property>
<item row="7" column="1"> <item row="8" column="1">
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -30,49 +30,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Joystick:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxJoystick">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selects which joystick will be used for joystick input, if any is present.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0" colspan="2">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>
@ -167,7 +125,7 @@
<widget class="QPushButton" name="btnKeyR"> <widget class="QPushButton" name="btnKeyR">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -258,7 +216,7 @@
<widget class="QPushButton" name="btnKeyL"> <widget class="QPushButton" name="btnKeyL">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -384,7 +342,7 @@
<widget class="QPushButton" name="btnKeyX"> <widget class="QPushButton" name="btnKeyX">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -464,7 +422,7 @@
<widget class="QPushButton" name="btnKeyY"> <widget class="QPushButton" name="btnKeyY">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -523,7 +481,7 @@
<widget class="QPushButton" name="btnKeyA"> <widget class="QPushButton" name="btnKeyA">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -615,7 +573,7 @@
<widget class="QPushButton" name="btnKeyB"> <widget class="QPushButton" name="btnKeyB">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -698,7 +656,7 @@
<widget class="QPushButton" name="btnKeySelect"> <widget class="QPushButton" name="btnKeySelect">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -757,7 +715,7 @@
<widget class="QPushButton" name="btnKeyStart"> <widget class="QPushButton" name="btnKeyStart">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -882,7 +840,7 @@
<widget class="QPushButton" name="btnKeyUp"> <widget class="QPushButton" name="btnKeyUp">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -962,7 +920,7 @@
<widget class="QPushButton" name="btnKeyLeft"> <widget class="QPushButton" name="btnKeyLeft">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1021,7 +979,7 @@
<widget class="QPushButton" name="btnKeyRight"> <widget class="QPushButton" name="btnKeyRight">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1113,7 +1071,7 @@
<widget class="QPushButton" name="btnKeyDown"> <widget class="QPushButton" name="btnKeyDown">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1289,7 +1247,7 @@
<widget class="QPushButton" name="btnJoyL"> <widget class="QPushButton" name="btnJoyL">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1441,7 +1399,7 @@
<widget class="QPushButton" name="btnJoyUp"> <widget class="QPushButton" name="btnJoyUp">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1521,7 +1479,7 @@
<widget class="QPushButton" name="btnJoyLeft"> <widget class="QPushButton" name="btnJoyLeft">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1580,7 +1538,7 @@
<widget class="QPushButton" name="btnJoyRight"> <widget class="QPushButton" name="btnJoyRight">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1672,7 +1630,7 @@
<widget class="QPushButton" name="btnJoyDown"> <widget class="QPushButton" name="btnJoyDown">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1814,7 +1772,7 @@
<widget class="QPushButton" name="btnJoyX"> <widget class="QPushButton" name="btnJoyX">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1894,7 +1852,7 @@
<widget class="QPushButton" name="btnJoyY"> <widget class="QPushButton" name="btnJoyY">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -1953,7 +1911,7 @@
<widget class="QPushButton" name="btnJoyA"> <widget class="QPushButton" name="btnJoyA">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -2045,7 +2003,7 @@
<widget class="QPushButton" name="btnJoyB"> <widget class="QPushButton" name="btnJoyB">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -2128,7 +2086,7 @@
<widget class="QPushButton" name="btnJoySelect"> <widget class="QPushButton" name="btnJoySelect">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -2187,7 +2145,7 @@
<widget class="QPushButton" name="btnJoyStart"> <widget class="QPushButton" name="btnJoyStart">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -2251,7 +2209,7 @@
<widget class="QPushButton" name="btnJoyR"> <widget class="QPushButton" name="btnJoyR">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>76</width> <width>70</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -2321,6 +2279,55 @@
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="7" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Joystick:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxJoystick">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selects which joystick will be used for joystick input, if any is present.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblInstanceNum">
<property name="text">
<string>Configuring mappings for instance X</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<resources> <resources>