feat(cpn): customisable simulator button clicked colour (#7178)
This commit is contained in:
@@ -182,6 +182,8 @@ void AppPreferencesDialog::accept()
|
|||||||
profile.splashFile(ui->SplashFileName->text());
|
profile.splashFile(ui->SplashFileName->text());
|
||||||
profile.runSDSync(ui->chkPromptSDSync->isChecked());
|
profile.runSDSync(ui->chkPromptSDSync->isChecked());
|
||||||
profile.radioSimCaseColor(ui->lblRadioColorSample->palette().button().color());
|
profile.radioSimCaseColor(ui->lblRadioColorSample->palette().button().color());
|
||||||
|
profile.simBtnClickedUseOSTheme(ui->chkSimBtnClickedUseOSTheme->isChecked());
|
||||||
|
profile.simBtnClickedColor(ui->lblSimBtnClickedColorSample->palette().button().color());
|
||||||
profile.useSavedSettings(ui->chkUseSavedSettingsProfile->isChecked());
|
profile.useSavedSettings(ui->chkUseSavedSettingsProfile->isChecked());
|
||||||
|
|
||||||
// The profile name may NEVER be empty
|
// The profile name may NEVER be empty
|
||||||
@@ -380,6 +382,16 @@ void AppPreferencesDialog::initSettings()
|
|||||||
ui->lblGeneralSettings->setText(hwSettings);
|
ui->lblGeneralSettings->setText(hwSettings);
|
||||||
ui->chkPromptSDSync->setChecked(profile.runSDSync());
|
ui->chkPromptSDSync->setChecked(profile.runSDSync());
|
||||||
ui->lblRadioColorSample->setPalette(QPalette(profile.radioSimCaseColor()));
|
ui->lblRadioColorSample->setPalette(QPalette(profile.radioSimCaseColor()));
|
||||||
|
ui->chkSimBtnClickedUseOSTheme->setChecked(profile.simBtnClickedUseOSTheme());
|
||||||
|
ui->lblSimBtnClickedColorSample->setPalette(QPalette(profile.simBtnClickedColor()));
|
||||||
|
|
||||||
|
if (ui->chkSimBtnClickedUseOSTheme->isChecked()) {
|
||||||
|
ui->lblSimBtnClickedColorSample->setVisible(false);
|
||||||
|
ui->btnSimBtnClickedColor->setEnabled(false);
|
||||||
|
} else {
|
||||||
|
ui->lblSimBtnClickedColorSample->setVisible(true);
|
||||||
|
ui->btnSimBtnClickedColor->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
QString currType = QStringList(profile.fwType().split('-').mid(0, 2)).join('-');
|
QString currType = QStringList(profile.fwType().split('-').mid(0, 2)).join('-');
|
||||||
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
foreach(Firmware * firmware, Firmware::getRegisteredFirmwares()) {
|
||||||
@@ -907,3 +919,21 @@ void AppPreferencesDialog::onProfileBackupPathEditingFinished()
|
|||||||
ui->profileBackupEnable->setEnabled(false);
|
ui->profileBackupEnable->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void AppPreferencesDialog::on_chkSimBtnClickedUseOSTheme_stateChanged()
|
||||||
|
{
|
||||||
|
if (ui->chkSimBtnClickedUseOSTheme->isChecked()) {
|
||||||
|
ui->lblSimBtnClickedColorSample->setVisible(false);
|
||||||
|
ui->btnSimBtnClickedColor->setEnabled(false);
|
||||||
|
} else {
|
||||||
|
ui->lblSimBtnClickedColorSample->setVisible(true);
|
||||||
|
ui->btnSimBtnClickedColor->setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppPreferencesDialog::on_btnSimBtnClickedColor_clicked()
|
||||||
|
{
|
||||||
|
QColorDialog *dlg = new QColorDialog(this);
|
||||||
|
QColor color = dlg->getColor(g.currentProfile().simBtnClickedColor(), this);
|
||||||
|
ui->lblSimBtnClickedColorSample->setPalette(QPalette(color));
|
||||||
|
ui->lblSimBtnClickedColorSample->repaint();
|
||||||
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ class AppPreferencesDialog : public QDialog
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void on_btnRadioColor_clicked();
|
void on_btnRadioColor_clicked();
|
||||||
|
void on_chkSimBtnClickedUseOSTheme_stateChanged();
|
||||||
|
void on_btnSimBtnClickedColor_clicked();
|
||||||
void onBackupPathEditingFinished();
|
void onBackupPathEditingFinished();
|
||||||
void onProfileBackupPathEditingFinished();
|
void onProfileBackupPathEditingFinished();
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,16 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="standardButtons">
|
||||||
|
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -35,48 +45,26 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="profileTab">
|
<widget class="QWidget" name="profileTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Radio Profile</string>
|
<string>Radio Profile</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,0">
|
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,0">
|
||||||
<item row="6" column="0" colspan="5">
|
<item row="14" column="2">
|
||||||
<widget class="Line" name="splashSeparator">
|
<widget class="QLabel" name="lblGeneralSettings">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="20" column="0" colspan="5">
|
|
||||||
<widget class="Line" name="line_9">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="22" column="0">
|
|
||||||
<widget class="QLabel" name="label_25">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Updates</string>
|
<string notr="true">Radio Settings Label</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -134,8 +122,8 @@ Mode 4:
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="17" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="stickmodeLabel">
|
<widget class="QLabel" name="langLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -143,20 +131,7 @@ Mode 4:
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Default Stick Mode</string>
|
<string>Language</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0">
|
|
||||||
<widget class="QLabel" name="sdPathLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>SD Structure path</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
@@ -179,53 +154,7 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="0">
|
<item row="23" column="2">
|
||||||
<widget class="QLabel" name="label_21">
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Int. Module</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="26" column="2">
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>5</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="2">
|
|
||||||
<widget class="QLineEdit" name="profileBackupPath">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>If set it will override the application general setting</string>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="clearButtonEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="24" column="2">
|
|
||||||
<widget class="QCheckBox" name="burnFirmware">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Prompt to write firmware to radio after update</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="22" column="2">
|
|
||||||
<widget class="QCheckBox" name="profileBackupEnable">
|
<widget class="QCheckBox" name="profileBackupEnable">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@@ -241,92 +170,37 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Options</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="19" column="3">
|
|
||||||
<widget class="QPushButton" name="btnRadioColor">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select Colour</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="langLabel">
|
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
|
||||||
<string>Language</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="19" column="2">
|
|
||||||
<widget class="QLabel" name="lblRadioColorSample">
|
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLineEdit" name="profileNameLE"/>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="2">
|
|
||||||
<widget class="QLabel" name="lblGeneralSettings">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">Radio Settings Label</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="2">
|
|
||||||
<widget class="QComboBox" name="defaultInternalModuleCB"/>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Profile Name</string>
|
<string>Radio Type</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="25" column="2">
|
||||||
|
<widget class="QCheckBox" name="burnFirmware">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Prompt to write firmware to radio after update</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -466,24 +340,24 @@ Mode 4:
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="9" column="3" colspan="2">
|
||||||
<widget class="QComboBox" name="boardCB">
|
<widget class="QPushButton" name="sdPathButton">
|
||||||
<property name="enabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="19" column="0">
|
|
||||||
<widget class="QLabel" name="label_24">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Simulator Case Colour</string>
|
<string>Select Folder</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="16" column="0">
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_18">
|
||||||
|
<property name="text">
|
||||||
|
<string>External Module</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
@@ -494,10 +368,99 @@ Mode 4:
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Radio Type</string>
|
<string>Profile Name</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="3" colspan="2">
|
||||||
|
<widget class="QPushButton" name="profileBackupPathButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The profile specific folder, if set, will override general Backup folder</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="27" column="2">
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>5</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Radio Settings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="0">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="text">
|
||||||
|
<string>Simulator Button Clicked Colour</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" colspan="5">
|
||||||
|
<widget class="Line" name="line_8">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="2">
|
||||||
|
<widget class="QLineEdit" name="profileBackupPath">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>If set it will override the application general setting</string>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="26" column="2">
|
||||||
|
<widget class="QCheckBox" name="chkPromptSDSync">
|
||||||
|
<property name="text">
|
||||||
|
<string>Prompt to run SD Sync after update</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -531,22 +494,25 @@ Mode 4:
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="5">
|
<item row="15" column="2">
|
||||||
<widget class="Line" name="line_8">
|
<widget class="QComboBox" name="defaultInternalModuleCB"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0">
|
||||||
|
<widget class="QLabel" name="sdPathLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
<property name="text">
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
<string>SD Structure path</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="2">
|
|
||||||
<widget class="QComboBox" name="externalModuleSizeCB"/>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="5">
|
<item row="7" column="0" colspan="5">
|
||||||
<widget class="QWidget" name="widget_splashImage" native="true">
|
<widget class="QWidget" name="widget_splashImage" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
@@ -663,6 +629,25 @@ Mode 4:
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLineEdit" name="profileNameLE"/>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="2">
|
||||||
|
<widget class="QLineEdit" name="sdPath">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="clearButtonEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="8" column="0" colspan="5">
|
<item row="8" column="0" colspan="5">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -681,24 +666,33 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="2">
|
<item row="6" column="0" colspan="5">
|
||||||
<widget class="QLineEdit" name="sdPath">
|
<widget class="Line" name="splashSeparator">
|
||||||
<property name="enabled">
|
<property name="sizePolicy">
|
||||||
<bool>true</bool>
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="orientation">
|
||||||
<string/>
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="clearButtonEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="0">
|
<item row="23" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_25">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Updates</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="0">
|
||||||
|
<widget class="QLabel" name="stickmodeLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -706,21 +700,7 @@ Mode 4:
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Radio Settings</string>
|
<string>Default Stick Mode</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="3" colspan="2">
|
|
||||||
<widget class="QPushButton" name="sdPathButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select Folder</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="25" column="2">
|
|
||||||
<widget class="QCheckBox" name="chkPromptSDSync">
|
|
||||||
<property name="text">
|
|
||||||
<string>Prompt to run SD Sync after update</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -740,20 +720,40 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="0">
|
<item row="15" column="0">
|
||||||
<widget class="QLabel" name="label_18">
|
<widget class="QLabel" name="label_21">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>External Module</string>
|
<string>Default Int. Module</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="3" colspan="2">
|
<item row="16" column="2">
|
||||||
<widget class="QPushButton" name="profileBackupPathButton">
|
<widget class="QComboBox" name="externalModuleSizeCB"/>
|
||||||
<property name="toolTip">
|
</item>
|
||||||
<string>The profile specific folder, if set, will override general Backup folder</string>
|
<item row="21" column="0" colspan="5">
|
||||||
|
<widget class="Line" name="line_9">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="19" column="0">
|
||||||
|
<widget class="QLabel" name="label_24">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select Folder</string>
|
<string>Simulator Radio Case Colour</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="2">
|
||||||
|
<widget class="QCheckBox" name="chkUseSavedSettingsProfile">
|
||||||
|
<property name="text">
|
||||||
|
<string>Use settings backup for new models and settings files</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -767,10 +767,92 @@ Mode 4:
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QCheckBox" name="chkUseSavedSettingsProfile">
|
<widget class="QComboBox" name="boardCB">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="3">
|
||||||
|
<widget class="QPushButton" name="btnSimBtnClickedColor">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use settings backup for new models and settings files</string>
|
<string>Select Colour</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="20" column="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkSimBtnClickedUseOSTheme">
|
||||||
|
<property name="text">
|
||||||
|
<string>Operating System theme</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lblSimBtnClickedColorSample">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::Box</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_29">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="19" column="2">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lblRadioColorSample">
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::Shape::Box</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_27">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="19" column="3">
|
||||||
|
<widget class="QPushButton" name="btnRadioColor">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select Colour</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1717,16 +1799,6 @@ Mode 4:
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Orientation::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "radiouiaction.h"
|
#include "radiouiaction.h"
|
||||||
#include "radiokeywidget.h"
|
#include "radiokeywidget.h"
|
||||||
|
#include "appdata.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
@@ -69,22 +70,12 @@ class ButtonsWidget : public QWidget
|
|||||||
connect(pushbtn, &QPushButton::pressed, rkw, &RadioKeyWidget::press);
|
connect(pushbtn, &QPushButton::pressed, rkw, &RadioKeyWidget::press);
|
||||||
connect(pushbtn, &QPushButton::released, rkw, &RadioKeyWidget::release);
|
connect(pushbtn, &QPushButton::released, rkw, &RadioKeyWidget::release);
|
||||||
|
|
||||||
if (action) {
|
if (action && !g.currentProfile().simBtnClickedUseOSTheme()) {
|
||||||
// blink push button on click or matching key(s) press
|
// blink push button on click or matching key(s) press
|
||||||
connect(action, static_cast<void (RadioUiAction::*)(void)>(&RadioUiAction::pushed), [this, pushbtn] (void) {
|
pushbtn->setStyleSheet(QString(
|
||||||
// TODO: use a palette colors
|
"QPushButton:pressed {background-color: %1; border-style: inset;}")
|
||||||
// set to default -> blink -> default
|
.arg(QVariant(g.currentProfile().simBtnClickedColor()).toString())
|
||||||
QString csssave = pushbtn->styleSheet();
|
);
|
||||||
QString blnkcol = "background-color: rgb(239, 41, 41)";
|
|
||||||
// pressing the same key in rapid seccession can affect the order of the events see TODO
|
|
||||||
if (csssave != blnkcol) {
|
|
||||||
pushbtn->setStyleSheet(blnkcol);
|
|
||||||
QTimer * tim = new QTimer(this);
|
|
||||||
tim->setSingleShot(true);
|
|
||||||
connect(tim, &QTimer::timeout, [pushbtn, csssave]() { pushbtn->setStyleSheet(csssave); });
|
|
||||||
tim->start(300);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return rkw;
|
return rkw;
|
||||||
|
|||||||
@@ -504,6 +504,8 @@ class Profile: public CompStoreObj
|
|||||||
PROPERTY(bool, telemSimPauseOnHide, true)
|
PROPERTY(bool, telemSimPauseOnHide, true)
|
||||||
PROPERTY(bool, telemSimResetRssiOnStop, false)
|
PROPERTY(bool, telemSimResetRssiOnStop, false)
|
||||||
PROPERTY(QColor, radioSimCaseColor, QColor(Qt::black))
|
PROPERTY(QColor, radioSimCaseColor, QColor(Qt::black))
|
||||||
|
PROPERTY(bool, simBtnClickedUseOSTheme, true)
|
||||||
|
PROPERTY(QColor, simBtnClickedColor, QColor(Qt::red))
|
||||||
|
|
||||||
// General settings
|
// General settings
|
||||||
PROPERTYQBA(generalSettings)
|
PROPERTYQBA(generalSettings)
|
||||||
|
|||||||
Reference in New Issue
Block a user