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