Merge branch '2.3' into 3djc/T-Lite
# Conflicts: # companion/src/firmwares/boards.h # companion/src/firmwares/opentx/opentxeeprom.h # radio/src/gui/common/stdlcd/radio_hardware.cpp # radio/src/targets/common/arm/stm32/adc_driver.cpp # radio/src/targets/common/arm/stm32/bootloader/CMakeLists.txt # radio/src/targets/taranis/board.h # radio/src/targets/taranis/hal.h # radio/src/targets/taranis/keys_driver.cpp # radio/src/targets/taranis/lcd_driver_spi.cpp
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "hardware.h"
|
||||
#include "../modeledit/customfunctions.h"
|
||||
#include "verticalscrollarea.h"
|
||||
#include "rawitemdatamodels.h"
|
||||
#include "compounditemmodels.h"
|
||||
|
||||
GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * firmware) :
|
||||
QDialog(parent),
|
||||
@@ -56,10 +56,14 @@ GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * fir
|
||||
}
|
||||
}
|
||||
|
||||
commonItemModels = new CommonItemModels(&generalSettings, nullptr, this);
|
||||
sharedItemModels = new CompoundItemModelFactory(&generalSettings, nullptr);
|
||||
sharedItemModels->addItemModel(AbstractItemModel::IMID_RawSource);
|
||||
sharedItemModels->addItemModel(AbstractItemModel::IMID_RawSwitch);
|
||||
sharedItemModels->addItemModel(AbstractItemModel::IMID_CustomFuncAction);
|
||||
sharedItemModels->addItemModel(AbstractItemModel::IMID_CustomFuncResetParam);
|
||||
|
||||
addTab(new GeneralSetupPanel(this, generalSettings, firmware), tr("Setup"));
|
||||
addTab(new CustomFunctionsPanel(this, nullptr, generalSettings, firmware, commonItemModels), tr("Global Functions"));
|
||||
addTab(new CustomFunctionsPanel(this, nullptr, generalSettings, firmware, sharedItemModels), tr("Global Functions"));
|
||||
addTab(new TrainerPanel(this, generalSettings, firmware), tr("Trainer"));
|
||||
addTab(new HardwarePanel(this, generalSettings, firmware), tr("Hardware"));
|
||||
addTab(new CalibrationPanel(this, generalSettings, firmware), tr("Calibration"));
|
||||
@@ -70,6 +74,7 @@ GeneralEdit::GeneralEdit(QWidget * parent, RadioData & radioData, Firmware * fir
|
||||
GeneralEdit::~GeneralEdit()
|
||||
{
|
||||
delete ui;
|
||||
delete sharedItemModels;
|
||||
}
|
||||
|
||||
void GeneralEdit::closeEvent(QCloseEvent *event)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "eeprominterface.h"
|
||||
#include "genericpanel.h"
|
||||
|
||||
class CommonItemModels;
|
||||
class CompoundItemModelFactory;
|
||||
|
||||
namespace Ui {
|
||||
class GeneralEdit;
|
||||
@@ -73,7 +73,7 @@ class GeneralEdit : public QDialog
|
||||
QVector<GenericPanel *> panels;
|
||||
void addTab(GenericPanel *panel, QString text);
|
||||
void closeEvent(QCloseEvent *event);
|
||||
CommonItemModels *commonItemModels;
|
||||
CompoundItemModelFactory *sharedItemModels;
|
||||
};
|
||||
|
||||
#endif // _GENERALEDIT_H_
|
||||
|
||||
Reference in New Issue
Block a user