* Fix possible confusion/data corruption when deleting radio profile (closes #4734, ref: #4686); * Add Delete Profile action to Radio Profiles menu (closes #4736) (but remove from from app prefs. panel); * Add confirmation prompt before deleting profile; * Open profile settings dialog when creating/copying a profile (closes #4735); * Make sure current (global) firmware flavor is properly updated when changing fw type/options in profile; * Append "-Copy" to name of copied profile; * Factor out Firmware global vars/functions in favor of static members.
85 lines
2.1 KiB
C++
85 lines
2.1 KiB
C++
/*
|
|
* Copyright (C) OpenTX
|
|
*
|
|
* Based on code named
|
|
* th9x - http://code.google.com/p/th9x
|
|
* er9x - http://code.google.com/p/er9x
|
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
|
*
|
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef _APPPREFERENCESDIALOG_H_
|
|
#define _APPPREFERENCESDIALOG_H_
|
|
|
|
#include <QDialog>
|
|
#include <QCheckBox>
|
|
#include "eeprominterface.h"
|
|
|
|
namespace Ui {
|
|
class AppPreferencesDialog;
|
|
}
|
|
|
|
class Joystick;
|
|
|
|
class AppPreferencesDialog : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AppPreferencesDialog(QWidget * parent = 0);
|
|
~AppPreferencesDialog();
|
|
Joystick * joystick;
|
|
|
|
signals:
|
|
void firmwareProfileChanged(int profId);
|
|
|
|
private:
|
|
QList<QCheckBox *> optionsCheckBoxes;
|
|
bool updateLock;
|
|
void showVoice(bool);
|
|
void showVoice();
|
|
void hideVoice();
|
|
void populateLocale();
|
|
void populateFirmwareOptions(const Firmware *);
|
|
Firmware * getFirmwareVariant();
|
|
QCheckBox * voice;
|
|
|
|
Ui::AppPreferencesDialog *ui;
|
|
void initSettings();
|
|
bool displayImage(const QString & fileName);
|
|
|
|
protected slots:
|
|
void shrink();
|
|
void baseFirmwareChanged();
|
|
void firmwareOptionChanged(bool state);
|
|
|
|
void writeValues();
|
|
void on_libraryPathButton_clicked();
|
|
void on_snapshotPathButton_clicked();
|
|
void on_snapshotClipboardCKB_clicked();
|
|
void on_backupPathButton_clicked();
|
|
void on_ProfilebackupPathButton_clicked();
|
|
void on_ge_pathButton_clicked();
|
|
|
|
void on_sdPathButton_clicked();
|
|
void on_SplashSelect_clicked();
|
|
void on_clearImageButton_clicked();
|
|
|
|
#if defined(JOYSTICKS)
|
|
void on_joystickChkB_clicked();
|
|
void on_joystickcalButton_clicked();
|
|
#endif
|
|
};
|
|
|
|
#endif // _APPPREFERENCESDIALOG_H_
|