6 #ifndef SWIFT_GUI_COMPONENTS_CDBOWNMODELSETCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_CDBOWNMODELSETCOMPONENT_H
12 #include <QScopedPointer>
16 #include "gui/menus/menudelegate.h"
29 class CDbOwnModelSetComponent;
31 namespace swift::misc::simulation
43 class CAircraftModelView;
44 class CAircraftModelStatisticsDialog;
48 class CDbMappingComponent;
49 class CDbOwnModelSetFormDialog;
50 class CDbReduceModelDuplicates;
51 class CCopyModelsFromOtherSwiftVersionsDialog;
52 class CFirstModelSetDialog;
155 void tabIndexChanged(
int index);
158 void buttonClicked();
161 void onRowCountChanged(
int count,
bool withFilter);
167 void viewModelChanged();
170 void distributorPreferencesChanged();
176 void removeExcludedModels();
179 void removeNonDBModels();
185 void updateViewToCurrentModels();
194 void copyFromAnotherSwift();
197 void showModelStatistics();
205 QScopedPointer<Ui::CDbOwnModelSetComponent> ui;
206 QScopedPointer<CDbOwnModelSetFormDialog> m_modelSetFormDialog;
207 QScopedPointer<CFirstModelSetDialog> m_firstModelSetDialog;
208 QScopedPointer<CDbReduceModelDuplicates> m_reduceModelsDialog;
209 QScopedPointer<CCopyModelsFromOtherSwiftVersionsDialog> m_copyFromAnotherSwiftDialog;
210 QScopedPointer<views::CAircraftModelStatisticsDialog> m_modelStatisticsDialog;
214 m_distributorPreferences {
215 this, &CDbOwnModelSetComponent::distributorPreferencesChanged
229 class CLoadModelSetMenu :
public menus::IMenuDelegate
234 : menus::IMenuDelegate(ownModelSetComponent)
241 QList<QAction *> m_setActions;
242 QList<QAction *> m_setNewActions;
Allows subcomponents to gain access to model component.
Handling of the own model set.
const swift::misc::simulation::CAircraftModelList & getModelSetFromView() const
Current model set for simulator CDbOwnModelSetComponent::getModelSetSimulator.
swift::misc::simulation::CAircraftModelList getModelSet() const
Cached models for current simulator.
int getModelSetCountFromView() const
Current sount of model set for simulator CDbOwnModelSetComponent::getModelSetSimulator.
int replaceOrAddModelSet(const swift::misc::simulation::CAircraftModelList &models, const swift::misc::simulation::CSimulatorInfo &simulator)
Replace or add models provided for a given simulator.
void setSimulator(const swift::misc::simulation::CSimulatorInfo &simulator)
Simulator.
swift::misc::CStatusMessage addToModelSet(const swift::misc::simulation::CAircraftModelList &models, const swift::misc::simulation::CSimulatorInfo &simulator)
Add to model set.
virtual ~CDbOwnModelSetComponent()
Destructor.
views::CAircraftModelView * view() const
Corresponding view.
void setSimulatorSelectorMode(CSimulatorSelector::Mode mode)
How to display.
swift::misc::simulation::CSimulatorInfo getModelSetSimulator() const
Model set is for simulator.
virtual void setMappingComponent(CDbMappingComponent *component)
Set the corresponding component.
void triggerSetSimulatorDeferred(const swift::misc::simulation::CSimulatorInfo &simulator)
Deferred init of simulator.
CDbOwnModelSetComponent(QWidget *parent=nullptr)
Constructor.
void setModelSet(const swift::misc::simulation::CAircraftModelList &models, const swift::misc::simulation::CSimulatorInfo &simulator)
Set the model set for a given simulator.
virtual swift::misc::simulation::CSimulatorInfo getSelectedSimulator() const
Simulator.
QString getModelCacheCountAndTimestamp() const
Count and cache timestamp.
virtual int updateModels(const swift::misc::simulation::CAircraftModelList &models)
Update models.
int getModelSetCount() const
Cached models count for current simulator.
void enableButtons(bool firstSet, bool newSet)
Enable buttons.
virtual void setModels(const swift::misc::simulation::CAircraftModelList &models)
Set models.
Streamable status message, e.g.
Aircraft model (used by another pilot, my models on disk)
Value object encapsulating a list of aircraft models.
Simple hardcoded info about the corresponding simulator.
Interface to "something" backing models, which can be set.
Interface to "something" backing models, which can be modified (updated)
Interface to "something" backing models, which can be set.
Interface to "something" backing models, which can be modified (updated)
Interface to "something" allowing a simulator selection.
Basically a QObject free (delegate based) version of CCentralMultiSimulatorModelSetCachesProvider.
CAircraftModelList getCachedModels(const CSimulatorInfo &simulator) const
Look like IMultiSimulatorModelCaches interface.
int getCachedModelsCount(const CSimulatorInfo &simulator) const
Look like IMultiSimulatorModelCaches interface.
Bundle of settings for all simulators.