Major refactoring
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
#include "modeledit.h"
|
||||
#include "eeprominterface.h"
|
||||
|
||||
class CommonItemModels;
|
||||
class RawItemFilteredModel;
|
||||
class ItemModelsFactory;
|
||||
class FilteredItemModel;
|
||||
|
||||
constexpr char MIMETYPE_FLIGHTMODE[] = "application/x-companion-flightmode";
|
||||
constexpr char MIMETYPE_GVAR_PARAMS[] = "application/x-companion-gvar-params";
|
||||
@@ -41,7 +41,8 @@ class FlightModePanel : public ModelPanel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, Firmware * firmware, RawItemFilteredModel * rawSwitchFilteredModel);
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, Firmware * firmware,
|
||||
FilteredItemModel * rawSwitchFilteredModel);
|
||||
virtual ~FlightModePanel();
|
||||
|
||||
virtual void update();
|
||||
@@ -90,8 +91,8 @@ class FlightModePanel : public ModelPanel
|
||||
void gvCmPaste();
|
||||
void gvCmMoveDown();
|
||||
void gvCmMoveUp();
|
||||
void onModelDataAboutToBeUpdated();
|
||||
void onModelDataUpdateComplete();
|
||||
void onItemModelAboutToBeUpdated();
|
||||
void onItemModelUpdateComplete();
|
||||
|
||||
private:
|
||||
Ui::FlightMode *ui;
|
||||
@@ -145,7 +146,7 @@ class FlightModesPanel : public ModelPanel
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware, CommonItemModels * commonItemModels);
|
||||
FlightModesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware, ItemModelsFactory * sharedItemModels);
|
||||
virtual ~FlightModesPanel();
|
||||
|
||||
public slots:
|
||||
@@ -157,14 +158,16 @@ class FlightModesPanel : public ModelPanel
|
||||
private slots:
|
||||
void onPhaseNameChanged();
|
||||
void onTabIndexChanged(int index);
|
||||
void onItemModelAboutToBeUpdated();
|
||||
void onItemModelUpdateComplete();
|
||||
|
||||
private:
|
||||
QString getTabName(int index);
|
||||
|
||||
int modesCount;
|
||||
QTabWidget *tabWidget;
|
||||
CommonItemModels *commonItemModels;
|
||||
RawItemFilteredModel *rawSwitchFilteredModel;
|
||||
ItemModelsFactory *sharedItemModels;
|
||||
FilteredItemModel *rawSwitchFilteredModel;
|
||||
QVector<GenericPanel *> panels;
|
||||
void updateItemModels();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user