swift
Classes | Public Types | Public Slots | Signals | Public Member Functions | List of all members
swift::gui::components::CDbMappingComponent Class Reference

Mapping component. More...

Inheritance diagram for swift::gui::components::CDbMappingComponent:
[legend]

Public Types

enum  TabIndex {
  NoValidTab = -1 , TabOwnModelSet = 0 , TabOwnModels = 1 , TabWorkbench = 2 ,
  TabStash = 3 , TabModelMatcher = 4 , TabVPilot = 5
}
 Tab index. More...
 

Public Slots

swift::misc::CStatusMessage stashModel (const swift::misc::simulation::CAircraftModel &model, bool replace=false)
 Stash given model (includes validation and consolidation with DB data) More...
 
swift::misc::CStatusMessageList stashModels (const swift::misc::simulation::CAircraftModelList &models)
 Stash given models (includes validation and consolidation with DB data) More...
 
swift::misc::CStatusMessage addToOwnModelSet (const swift::misc::simulation::CAircraftModelList &models, const swift::misc::simulation::CSimulatorInfo &simulator)
 Add to model set. More...
 
swift::misc::simulation::CAircraftModel consolidateModel (const swift::misc::simulation::CAircraftModel &model) const
 Consolidate with other available data. More...
 
void replaceStashedModelsUnvalidated (const swift::misc::simulation::CAircraftModelList &models) const
 Replace models, no validation. More...
 
swift::misc::CStatusMessageList validateCurrentModel (bool withNestedForms) const
 Validate, empty list means OK.
 
void resizeForSelect ()
 Resize so that selection is easy (larger table view)
 
void resizeForMapping ()
 Resize so that mapping is easier.
 
void maxTableView ()
 Max. space for table view.
 
void stashSelectedModels ()
 Stash models.
 
void modifyModelDialog ()
 Open model modify dialog.
 

Signals

void filterByLivery (const swift::misc::aviation::CLivery &livery)
 Request to filter by livery.
 
void filterByAircraftIcao (const swift::misc::aviation::CAircraftIcaoCode &icao)
 Request to filter by aircraft ICAO.
 
void filterByDistributor (const swift::misc::simulation::CDistributor &distributor)
 Request to filter by distributor.
 
void requestUpdatedData (swift::misc::network::CEntityFlags::Entity entities)
 Request latest (incremental) data from backend.
 
void tabIndexChanged (int index)
 Tab index has been changed.
 
- Signals inherited from swift::gui::COverlayMessagesFrame
void requestTextMessageEntryTab (components::TextMessageTab tab)
 Request an text message entry.
 
void requestTextMessageEntryCallsign (const swift::misc::aviation::CCallsign &callsign)
 Request an text message entry.
 
void requestTextMessageWidget (const swift::misc::aviation::CCallsign &callsign)
 Request a text message widget.
 

Public Member Functions

 CDbMappingComponent (QWidget *parent=nullptr)
 Constructor. More...
 
virtual ~CDbMappingComponent ()
 Destructor.
 
void gracefulShutdown ()
 Graceful shutdown.
 
bool withVPilot () const
 With vPilot rules?
 
bool hasSelectedModelsToStash () const
 Any models which can be stashed?
 
swift::misc::simulation::CAircraftModelList getSelectedModelsToStash () const
 Models to be stashed from currently activated tab (table view)
 
TabIndex currentTabIndex () const
 Current tab index.
 
bool isStashTab () const
 Is stashed view?
 
bool isWorkbenchTab () const
 Is workbench tab?
 
bool canAddToModelSetTab () const
 Tab can contribute to model set.
 
views::CAircraftModelViewcurrentModelView () const
 Current model view.
 
views::CAircraftModelViewmodelView (TabIndex tab) const
 Current model view.
 
swift::misc::simulation::CAircraftModel getEditorAircraftModel () const
 Unvalidated consolidated aircraft model from the editor subparts (icao, distributor) More...
 
void setOwnModelSetSimulator (const swift::misc::simulation::CSimulatorInfo &simulator)
 Set simulator for own models.
 
swift::misc::simulation::CAircraftModelList getOwnModelSet () const
 Own model set.
 
Models from swift::gui::components::CDbStashComponent

Stashed models

const swift::misc::simulation::CAircraftModelListgetStashedModels () const
 Any stashed models?
 
bool hasStashedModels () const
 Any stashed models?
 
QStringList getStashedModelStrings () const
 Stashed model strings.
 
Own models from swift::gui::components::CDbOwnModelsComponent

Own models

swift::misc::simulation::CAircraftModelList getOwnModels () const
 Own cached models.
 
swift::misc::simulation::CAircraftModelList getOwnCachedModels (const swift::misc::simulation::CSimulatorInfo &simulator) const
 Own cached models.
 
swift::misc::simulation::CAircraftModelList getOwnSelectedModels () const
 Own selected models.
 
swift::misc::simulation::CAircraftModel getOwnModelForModelString (const QString &modelString) const
 Own (installed) model for given model string.
 
swift::misc::simulation::CSimulatorInfo getOwnModelsSimulator () const
 Own models for simulator.
 
void setOwnModelsSimulator (const swift::misc::simulation::CSimulatorInfo &simulator)
 Set simulator for own models.
 
int getOwnModelsCount () const
 Number of own models.
 
QString getOwnModelsInfoString () const
 Info string about models in cache. More...
 
QString getOwnModelsInfoStringFsFamily () const
 Info string without XPlane (FSX,P3D, FS9) More...
 
- Public Member Functions inherited from swift::gui::COverlayMessagesFrame
 COverlayMessagesFrame (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 Constructor.
 
- Public Member Functions inherited from swift::gui::COverlayMessagesBase< QFrame >
virtual ~COverlayMessagesBase ()
 Destructor.
 
void initOverlayMessages (QSize inner={})
 Init, normally we use lazy init, but by calling init explicitly we can force initalization. More...
 
void activateTextMessages (bool activate)
 Active send/receive of text messages. More...
 
void showStatusMessagesFrame ()
 Show the inner frame.
 
void setOverlaySizeFactors (double widthFactor, double heightFactor, double middleFactor=2)
 Set the size factors.
 
void setForceSmall (bool force)
 Force small (smaller layout) More...
 
void setReducedInfo (bool reduced)
 Display reduced information. More...
 
void showOverlayMessagesWithConfirmation (const swift::misc::CStatusMessageList &messages, bool appendOldMessages, const QString &confirmationMessage, std::function< void()> okLambda, QMessageBox::StandardButton defaultButton=QMessageBox::Cancel, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages with confirmation bar. More...
 
void clearOverlayMessages ()
 Clear the overlay messages. More...
 
void closeOverlay ()
 Close button clicked. More...
 
void showOverlayMessages (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages. More...
 
void showOverlayMessagesOrSingleMessage (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages or a single message. More...
 
void showOverlayMessagesOrHTMLMessage (const swift::misc::CStatusMessageList &messages, bool appendOldMessages=false, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show multiple messages or a single message (HTML) More...
 
void sortOverlayMessages (const swift::misc::CPropertyIndex &property, Qt::SortOrder order)
 Sort of overlay messages. More...
 
void setOverlayMessagesSorting (const swift::misc::CPropertyIndex &property, Qt::SortOrder order)
 Set sorting of overlay messages. More...
 
bool showOverlayMessage (const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show single message. More...
 
bool showOverlayTextMessage (const swift::misc::network::CTextMessage &textMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Info message, based on text message. More...
 
void showOverlayVariant (const swift::misc::CVariant &variant, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Display one of the supported types. More...
 
void showOverlayImage (const swift::misc::CPixmap &pixmap, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Image. More...
 
bool showOverlayHTMLMessage (const QString &htmlMessage, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 HTML message. More...
 
bool showOverlayHTMLMessage (const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 HTML message. More...
 
void showDownloadProgress (int progress, qint64 current, qint64 max, const QUrl &url, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Download progress. More...
 
void showOverlayInlineTextMessage (components::TextMessageTab tab)
 Image. More...
 
void showOverlayInlineTextMessage (const swift::misc::aviation::CCallsign &callsign)
 Image. More...
 
- Public Member Functions inherited from swift::gui::CEnableForDockWidgetInfoArea
CDockWidgetInfoAreagetDockWidgetInfoArea () const
 Corresponding dockable widget in info area.
 
bool hasDockWidgetArea () const
 Has dock area?
 
virtual bool setParentDockWidgetInfoArea (CDockWidgetInfoArea *parentDockableWidget)
 Corresponding dockable widget in info area. More...
 
CInfoAreagetParentInfoArea () const
 The parent info area.
 
bool isParentDockWidgetFloating () const
 Is the parent dockable widget floating?
 
bool isVisibleWidget () const
 Visible widget. More...
 
CEnableForFramelessWindowmainApplicationWindow () const
 Main application window if any.
 
QWidget * mainApplicationWindowWidget () const
 Main application window widget if any.
 
void displayMyself ()
 Display myself.
 
- Public Member Functions inherited from swift::gui::CEnableForViewBasedIndicator
void enableLoadIndicator (bool enable)
 Enable loading indicator.
 
bool isShowingLoadIndicator () const
 Showing load indicator?
 
int showLoadIndicator (std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
 Show loading indicator.
 
void hideLoadIndicator ()
 Hide loading indicator.
 

Additional Inherited Members

- Protected Member Functions inherited from swift::gui::COverlayMessagesBase< QFrame >
 COverlayMessagesBase (QWidget *parent, Qt::WindowFlags f=Qt::WindowFlags())
 Constructor.
 
void initInnerFrame (double widthFactor=-1, double heightFactor=-1)
 Init the inner frame (if not yet initialized)
 
void initMinimalFrame (int lines=4)
 Init a minimal frame (smaller as the normal one)
 
bool hasMinimumSize (int w, int h) const
 Check minimum height/width.
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
- Protected Member Functions inherited from swift::gui::CEnableForDockWidgetInfoArea
 CEnableForDockWidgetInfoArea (CDockWidgetInfoArea *parentInfoArea=nullptr)
 Constructor. More...
 
virtual ~CEnableForDockWidgetInfoArea ()
 Destructor.
 
- Protected Member Functions inherited from swift::gui::CEnableForViewBasedIndicator
 CEnableForViewBasedIndicator (views::CViewBaseNonTemplate *viewWithIndicator=nullptr)
 Constructor.
 
void setViewWithIndicator (swift::gui::views::CViewBaseNonTemplate *viewWithIndicator)
 Set the corresponding view.
 
- Protected Attributes inherited from swift::gui::COverlayMessagesBase< QFrame >
COverlayMessagesm_overlayMessages
 embedded QFrame with status messages
 
- Protected Attributes inherited from swift::gui::CEnableForDockWidgetInfoArea
CDockWidgetInfoAream_parentDockableInfoArea = nullptr
 my parent dockable widget
 
swift::misc::CConnectionGuard m_connections
 connections
 

Detailed Description

Mapping component.

Definition at line 65 of file dbmappingcomponent.h.

Member Enumeration Documentation

◆ TabIndex

Tab index.

Remarks
Must match real tab index

Definition at line 75 of file dbmappingcomponent.h.

Constructor & Destructor Documentation

◆ CDbMappingComponent()

swift::gui::components::CDbMappingComponent::CDbMappingComponent ( QWidget *  parent = nullptr)
explicit

Constructor.

Fixme:
vPilot merging will be most likely removed in the future

Definition at line 66 of file dbmappingcomponent.cpp.

Member Function Documentation

◆ addToOwnModelSet

CStatusMessage swift::gui::components::CDbMappingComponent::addToOwnModelSet ( const swift::misc::simulation::CAircraftModelList models,
const swift::misc::simulation::CSimulatorInfo simulator 
)
slot

Add to model set.

Definition at line 835 of file dbmappingcomponent.cpp.

◆ consolidateModel

CAircraftModel swift::gui::components::CDbMappingComponent::consolidateModel ( const swift::misc::simulation::CAircraftModel model) const
slot

Consolidate with other available data.

Definition at line 841 of file dbmappingcomponent.cpp.

◆ getEditorAircraftModel()

CAircraftModel swift::gui::components::CDbMappingComponent::getEditorAircraftModel ( ) const

Unvalidated consolidated aircraft model from the editor subparts (icao, distributor)

Note
not guaranteed to be valid, just a snapshot of its current editor state

Definition at line 769 of file dbmappingcomponent.cpp.

◆ getOwnModelsInfoString()

QString swift::gui::components::CDbMappingComponent::getOwnModelsInfoString ( ) const

Info string about models in cache.

Remarks
This function is thread safe.

Definition at line 807 of file dbmappingcomponent.cpp.

◆ getOwnModelsInfoStringFsFamily()

QString swift::gui::components::CDbMappingComponent::getOwnModelsInfoStringFsFamily ( ) const

Info string without XPlane (FSX,P3D, FS9)

Remarks
This function is thread safe.

Definition at line 809 of file dbmappingcomponent.cpp.

◆ replaceStashedModelsUnvalidated

void swift::gui::components::CDbMappingComponent::replaceStashedModelsUnvalidated ( const swift::misc::simulation::CAircraftModelList models) const
slot

Replace models, no validation.

Definition at line 846 of file dbmappingcomponent.cpp.

◆ stashModel

CStatusMessage swift::gui::components::CDbMappingComponent::stashModel ( const swift::misc::simulation::CAircraftModel model,
bool  replace = false 
)
slot

Stash given model (includes validation and consolidation with DB data)

Definition at line 825 of file dbmappingcomponent.cpp.

◆ stashModels

CStatusMessageList swift::gui::components::CDbMappingComponent::stashModels ( const swift::misc::simulation::CAircraftModelList models)
slot

Stash given models (includes validation and consolidation with DB data)

Definition at line 830 of file dbmappingcomponent.cpp.


The documentation for this class was generated from the following files: