6#ifndef SWIFT_GUI_COMPONENTS_DBSTASHCOMPONENT_H
7#define SWIFT_GUI_COMPONENTS_DBSTASHCOMPONENT_H
15#include <QScopedPointer>
44 class CDbStashComponent;
76 bool allowReplace)
const;
133 bool replace =
false,
bool consolidateWithDbData =
true,
134 bool clearHighlighting =
true);
138 bool replace =
false,
bool consolidateWithDbData =
true,
139 bool clearHighlighting =
true);
155 this, &CDbStashComponent::onUserChanged
159 void onUnstashPressed();
162 void onValidatePressed();
165 void onRemoveInvalidPressed();
168 void onPublishPressed();
177 void copyOverValuesToSelectedModels();
180 void modifyModelDialog();
183 void onRowCountChanged(
int number,
bool filter);
186 void onUserChanged();
190 bool appendOldMessages =
false,
191 std::chrono::milliseconds timeout = std::chrono::milliseconds(0));
195 bool appendOldMessages,
const QString &confirmation,
196 std::function<
void()> okLambda,
198 std::chrono::milliseconds timeout = std::chrono::milliseconds(0));
202 std::chrono::milliseconds timeout = std::chrono::milliseconds(0));
205 void clearOverlayMessages();
214 bool displayInfo =
false);
217 void enableButtonRow();
CDbMappingComponentAware(QObject *parent)
Constructor.
static constexpr int MaxModelPublished
Number of models which can be published at once.
void stashedModelsChanged()
Stashed models have been changed.
void showChangedAttributes()
Show changed attributes of selected models.
int unstashModels(const QSet< int > &keys)
Unstash given models with keys.
int getStashedModelsCount() const
Number of models.
swift::misc::simulation::CAircraftModel getStashedModel(const QString &modelString) const
Model for model string.
~CDbStashComponent()
Destructor.
swift::gui::views::CAircraftModelView * view() const
The embedded view.
void applyToSelected(const swift::misc::aviation::CLivery &livery, bool acceptWarnings=true)
Apply livery to selected objects.
bool hasStashedModels() const
Has stashed models.
swift::misc::CStatusMessage stashModel(const swift::misc::simulation::CAircraftModel &model, bool replace=false, bool consolidateWithDbData=true, bool clearHighlighting=true)
Stash given model (includes validation and consolidation with DB data).
swift::misc::CStatusMessage validateStashModel(const swift::misc::simulation::CAircraftModel &model, bool allowReplace) const
Test the given model if it can be stashed.
swift::misc::simulation::CAircraftModel consolidateModel(const swift::misc::simulation::CAircraftModel &model) const
Consolidate with other available data.
const swift::misc::simulation::CAircraftModelList & getStashedModels() const
The stashed models.
void modelsSuccessfullyPublished(const swift::misc::simulation::CAircraftModelList &publishedModels, bool directWrite)
Models succesfully published.
swift::misc::CStatusMessageList stashModels(const swift::misc::simulation::CAircraftModelList &models, bool replace=false, bool consolidateWithDbData=true, bool clearHighlighting=true)
Stash given models (includes validation and consolidation with DB data).
void clearValidationHighlighting()
Clear highlighting set by validations.
void replaceModelsUnvalidated(const swift::misc::simulation::CAircraftModelList &models)
Replace models, no validation.
CDbStashComponent(QWidget *parent=nullptr)
Constructor.
QStringList getStashedModelStrings() const
Stashed model strings.
Class template for read-only access to a specific value in the CDataCache.
A sequence of log categories.
Specialized value object compliant map for variants, based on indexes.
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
Value object for ICAO classification.
Value object for ICAO classification.
Value object encapsulating information about an airpot.
Value object encapsulating information of an authentiated user.
Aircraft model (used by another pilot, my models on disk).
Value object encapsulating a list of aircraft models.
Value object encapsulating information of software distributor.
High level reusable GUI components.
Models to be used with views, mainly QTableView.
Views, mainly QTableView.
Free functions in swift::misc.
QFrame(QWidget *parent, Qt::WindowFlags f)
QObject * parent() const const
#define SWIFT_GUI_EXPORT
Export a class or function from the library.