* [AppDebugMessageHandler] Add ability to write debug output to any number of QIODevices. * [Simulator][DebugOutput] Use new QIODevice hook in AppDebugMessageHandler instead of signal/slot. * [AppData] Add new settings for debug logging; Refactor property creation macro to work with any data type and add varName_init() method to set default; Refactor all boolean settings to use new macro (others to be migrated later). * [AppPreferencesDialog] Add UI for appDebugLog, fwTraceLog, & appLogsDir settings; Clean up layout on application prefs. tab, move and re-label a couple items. * [Companion][Simulator] Enable optional application debug output logging. * [Simulator] Enable optional logging of firmware debug output to file. * [EEPROMInterface] Use qDebug() instead of std::cout so that now all debug output can be routed via custom message handler/logger. * [Companion][Simulator] Add missing #include.
87 lines
2.2 KiB
C++
87 lines
2.2 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 toggleAppLogSettings();
|
|
|
|
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();
|
|
void on_btn_appLogsDir_clicked();
|
|
|
|
#if defined(JOYSTICKS)
|
|
void on_joystickChkB_clicked();
|
|
void on_joystickcalButton_clicked();
|
|
#endif
|
|
};
|
|
|
|
#endif // _APPPREFERENCESDIALOG_H_
|