Modeledit added
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QCheckBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
|
||||
RepeatComboBox::RepeatComboBox(QWidget *parent, int & repeatParam):
|
||||
QComboBox(parent),
|
||||
@@ -74,8 +75,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
|
||||
}
|
||||
}
|
||||
|
||||
QSettings settings;
|
||||
QString path = settings.value("sdPath", ".").toString();
|
||||
QString path = glob.pro[glob.profileId()].sdPath();
|
||||
path.append("/SOUNDS/");
|
||||
QString lang = generalSettings.ttsLanguage;
|
||||
if (lang.isEmpty())
|
||||
@@ -225,8 +225,7 @@ void CustomFunctionsPanel::playMusic()
|
||||
QPushButton *playButton = qobject_cast<QPushButton*>(sender());
|
||||
int index=playButton->objectName().mid(5,2).toInt();
|
||||
QString function=playButton->objectName().left(4);
|
||||
QSettings settings;
|
||||
QString path = settings.value("sdPath", ".").toString();
|
||||
QString path = glob.pro[glob.profileId()].sdPath();
|
||||
QDir qd(path);
|
||||
QString track;
|
||||
if (qd.exists()) {
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "customswitches.h"
|
||||
#include "customfunctions.h"
|
||||
#include "telemetry.h"
|
||||
#include "appdata.h"
|
||||
#include <QScrollArea>
|
||||
|
||||
ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool isNew, QWidget *parent) :
|
||||
@@ -21,8 +22,7 @@ ModelEdit::ModelEdit(RadioData & radioData, int modelId, bool openWizard, bool i
|
||||
generalSettings(radioData.generalSettings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QSettings settings;
|
||||
restoreGeometry(settings.value("modelEditGeometry").toByteArray());
|
||||
restoreGeometry(glob.modelEditGeometry());
|
||||
ui->pushButton->setIcon(CompanionIcon("simulate.png"));
|
||||
addTab(new Setup(this, model), tr("Setup"));
|
||||
addTab(new HeliPanel(this, model), tr("Heli"));
|
||||
@@ -45,8 +45,7 @@ ModelEdit::~ModelEdit()
|
||||
|
||||
void ModelEdit::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QSettings settings;
|
||||
settings.setValue("modelEditGeometry", saveGeometry());
|
||||
glob.modelEditGeometry( saveGeometry() );
|
||||
}
|
||||
|
||||
class VerticalScrollArea : public QScrollArea
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ui_setup_timer.h"
|
||||
#include "ui_setup_module.h"
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
|
||||
TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer):
|
||||
ModelPanel(parent, model),
|
||||
@@ -347,8 +348,7 @@ Setup::Setup(QWidget *parent, ModelData & model):
|
||||
if (GetEepromInterface()->getCapability(ModelImage)) {
|
||||
QStringList items;
|
||||
items.append("");
|
||||
QSettings settings;
|
||||
QString path = settings.value("sdPath", ".").toString();
|
||||
QString path = glob.pro[glob.profileId()].sdPath();
|
||||
path.append("/BMP/");
|
||||
QDir qd(path);
|
||||
int vml = GetEepromInterface()->getCapability(VoicesMaxLength)+4;
|
||||
@@ -515,8 +515,7 @@ void Setup::on_image_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
strncpy(model.bitmap, ui->image->currentText().toAscii(), GetEepromInterface()->getCapability(VoicesMaxLength));
|
||||
QSettings settings;
|
||||
QString path=settings.value("sdPath", ".").toString();
|
||||
QString path=glob.pro[glob.profileId()].sdPath();
|
||||
path.append("/BMP/");
|
||||
QDir qd(path);
|
||||
if (qd.exists()) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "ui_telemetry_analog.h"
|
||||
#include "ui_telemetry_customscreen.h"
|
||||
#include "helpers.h"
|
||||
#include "appdata.h"
|
||||
|
||||
TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
|
||||
QWidget(parent),
|
||||
@@ -456,8 +457,7 @@ TelemetryPanel::~TelemetryPanel()
|
||||
|
||||
void TelemetryPanel::setup()
|
||||
{
|
||||
QSettings settings;
|
||||
QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString();
|
||||
QString firmware_id = glob.pro[glob.profileId()].firmware();
|
||||
|
||||
lock=true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user