Modeledit added
This commit is contained in:
@@ -364,11 +364,11 @@ class AppData:DataObj
|
||||
QStringList _recentFileList;
|
||||
QByteArray _mainWindowGeometry;
|
||||
QByteArray _mainWindowState;
|
||||
QByteArray _modelEditGeometry;
|
||||
|
||||
QString _locale;
|
||||
QString _cpu_id;
|
||||
QString _lastFw;
|
||||
QString _modelEditGeometry;
|
||||
|
||||
QString _backupPath;
|
||||
QString _gePath;
|
||||
@@ -409,11 +409,11 @@ public:
|
||||
QStringList recentFileList() { return _recentFileList; }
|
||||
QByteArray mainWindowGeometry(){ return _mainWindowGeometry; }
|
||||
QByteArray mainWindowState() { return _mainWindowState; }
|
||||
QByteArray modelEditGeometry() { return _modelEditGeometry; }
|
||||
|
||||
QString locale() { return _locale; }
|
||||
QString cpu_id() { return _cpu_id; }
|
||||
QString lastFw() { return _lastFw; }
|
||||
QString modelEditGeometry() { return _modelEditGeometry; }
|
||||
|
||||
QString backupPath() { return _backupPath; }
|
||||
QString gePath() { return _gePath; }
|
||||
@@ -452,11 +452,11 @@ public:
|
||||
void recentFileList (const QStringList l) { store(l, _recentFileList, "recentFileList" );}
|
||||
void mainWindowGeometry (const QByteArray a) { store(a, _mainWindowGeometry, "mainWindowGeometry");}
|
||||
void mainWindowState (const QByteArray a) { store(a, _mainWindowState, "mainWindowState" );}
|
||||
void modelEditGeometry (const QByteArray a) { store(a, _modelEditGeometry, "modelEditGeometry" );}
|
||||
|
||||
void locale (const QString str) { store(str, _locale, "locale" );}
|
||||
void cpu_id (const QString str) { store(str, _cpu_id, "cpu_id" );}
|
||||
void lastFw (const QString str) { store(str, _lastFw, "lastFw" );}
|
||||
void modelEditGeometry (const QString str) { store(str, _modelEditGeometry, "modelEditGeometry" );}
|
||||
|
||||
void backupPath (const QString str) { store(str, _backupPath, "backupPath" );}
|
||||
void gePath (const QString str) { store(str, _gePath, "gePath" );}
|
||||
@@ -542,11 +542,11 @@ public:
|
||||
getset( _recentFileList, "recentFileList" ,"" );
|
||||
getset( _mainWindowGeometry, "mainWindowGeometry" ,"" );
|
||||
getset( _mainWindowState, "mainWindowState" ,"" );
|
||||
getset( _modelEditGeometry, "modelEditGeometry" ,"" );
|
||||
|
||||
getset( _locale, "locale" ,"" );
|
||||
getset( _cpu_id, "cpu_id" ,"" );
|
||||
getset( _lastFw, "lastFw" ,"" );
|
||||
getset( _modelEditGeometry, "modelEditGeometry" ,"" );
|
||||
|
||||
getset( _backupPath, "backupPath" ,"" );
|
||||
getset( _gePath, "gePath" ,"" );
|
||||
|
||||
@@ -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