swift
Public Types | Public Slots | Public Member Functions | Protected Member Functions | List of all members
swift::gui::components::CDataInfoAreaComponent Class Reference

Info area containing the DB data (models, liveries ...) More...

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

Public Types

enum  InfoArea {
  InfoAreaModels = 0 , InfoAreaLiveries = 1 , InfoAreaDistributors = 2 , InfoAreaAircraftIcao = 3 ,
  InfoAreaAirlineIcao = 4 , InfoAreaCountries = 5 , InfoAreaAircraftCategories = 6 , InfoAreaNone = -1
}
 Info areas.
 

Public Slots

bool writeDbDataToResourceDir () const
 Write to resource dir.
 
bool readDbDataFromResourceDir ()
 Load from resource dir.
 
void requestUpdateOfAllDbData ()
 Request update of all DB data.
 
void requestUpdatedData (swift::misc::network::CEntityFlags::Entity entity)
 Load new data (based on timestamp, incremental)
 

Public Member Functions

 CDataInfoAreaComponent (QWidget *parent=nullptr)
 Constructor.
 
virtual ~CDataInfoAreaComponent ()
 Destructor.
 
CDbModelComponentgetModelComponent () const
 DB model component.
 
CDbLiveryComponentgetLiveryComponent () const
 DB livery component.
 
CDbDistributorComponentgetDistributorComponent () const
 DB distributor component.
 
CDbAircraftIcaoComponentgetAircraftComponent () const
 DB aircraft ICAO component.
 
CDbAirlineIcaoComponentgetAirlineComponent () const
 DB airline ICAO component.
 
CDbCountryComponentgetCountryComponent () const
 DB country component.
 
CDbAircraftCategoryComponentgetAircraftCategoryComponent () const
 DB aircraft category componentxs.
 
- Public Member Functions inherited from swift::gui::CInfoArea
virtual ~CInfoArea ()
 Destructor.
 
void addToContextMenu (QMenu *menu) const
 Add items to context menu.
 
bool isFloating () const
 Is the area floating?
 
bool isSelectedDockWidgetInfoArea (const CDockWidgetInfoArea *infoArea) const
 Is given widget selected. Means it is not floating, and the one selected.
 
const CDockWidgetInfoAreagetSelectedDockInfoArea () const
 Get the selected info area (non floating, selected in tabbar)
 
int getSelectedDockInfoAreaIndex () const
 Get the selected info area (non floating, selected in tabbar)
 
QList< const CDockWidgetInfoArea * > getDockWidgetInfoAreas () const
 Own dockable widgets.
 
QList< QAction * > getInfoAreaSelectActions (bool withShortcut, QWidget *parent) const
 Create a list of actions to select the info areas. This could be used in a menu or somewhere else. More...
 
QList< QAction * > getInfoAreaToggleFloatingActions (QWidget *parent) const
 Create a list of actions to select the info areas and toogle its floating state. This could be used in a menu or somewhere else. More...
 
QList< QAction * > getInfoAreaRestoreActions (QWidget *parent) const
 Create a list of actions to restore the info areas. This could be used in a menu or somewhere else. More...
 
QList< QAction * > getInfoAreaResetPositionActions (QWidget *parent) const
 Create a list of actions to reset the position the info areas. This could be used in a menu or somewhere else. More...
 
QList< int > getAreaIndexesDockedOrFloating (bool floating) const
 Docked area indexes.
 
void dockAllWidgets ()
 Dock all widgets.
 
void adjustSizeForAllDockWidgets ()
 Adjust size for all dock widgets.
 
void floatAllWidgets ()
 All widgets floating.
 
void allFloatingOnTop ()
 All floating info areas on top.
 
void resetAllFloatingWidgetSettings ()
 Reset all floating widget settings.
 
void resetAllWidgetSettings ()
 Reset all widget settings.
 
virtual void toggleFloatingWholeInfoArea ()
 Toggle dock / floating of the whole info area.
 
void toggleFloatingByIndex (int areaIndex)
 Toggle floating of index.
 
void toggleVisibility (int areaIndex)
 Toggle visibilty.
 
void selectArea (int areaIndex)
 Select area.
 
void resetPosition (int areaIndex)
 Reset position.
 
void selectArea (const CDockWidgetInfoArea *dockWidgetInfoArea)
 Set current tab bar index by given widget.
 
void selectAreaByAction ()
 Select area (sender is QAction)
 
void resetPositionByAction ()
 Reset window position of area (sender is QAction)
 
void toggleAreaFloatingByAction ()
 Toggle area floating (sender is QAction)
 
void restoreDockWidgetInfoArea ()
 Restore dock widget`s state (from settings)
 
void restoreDockWidgetInfoAreaByIndex (int areaIndex)
 Restore dock widget`s state (from settings)
 
void selectLeftTab ()
 Select next left tab.
 
void selectRightTab ()
 Select next right tab.
 
void displayStatusMessage (const swift::misc::CStatusMessage &statusMessage)
 Display status message in all info areas (according their state)
 
void displayStatusMessages (const swift::misc::CStatusMessageList &statusMessages)
 Display status messages in all info areas (according their state)
 

Protected Member Functions

virtual QSize getPreferredSizeWhenFloating (int areaIndex) const
 Preferred size when floating (size hint) More...
 
virtual const QPixmap & indexToPixmap (int areaIndex) const
 Info area (index) to icon. More...
 
- Protected Member Functions inherited from swift::gui::CInfoArea
 CInfoArea (QWidget *parent=nullptr)
 Constructor.
 
virtual void closeEvent (QCloseEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
void initInfoArea ()
 Init area after(!) GUI is initialized.
 
void setTabBarPosition (QTabWidget::TabPosition position)
 Tab position for docked widgets tab. More...
 
void toggleTabBarLocked (bool locked)
 Toogle lock tabbar.
 

Additional Inherited Members

- Signals inherited from swift::gui::CInfoArea
void changedInfoAreaTabBarIndex (int index)
 Tab bar changed.
 
void changedInfoAreaStatus (int currentTabIndex, QList< int > dockedAreas, QList< int > floatingAreas)
 Status of info area changed.
 
void changedWholeInfoAreaFloating (bool floating)
 Whole info area floating.
 

Detailed Description

Info area containing the DB data (models, liveries ...)

Definition at line 37 of file datainfoareacomponent.h.

Member Function Documentation

◆ getPreferredSizeWhenFloating()

QSize swift::gui::components::CDataInfoAreaComponent::getPreferredSizeWhenFloating ( int  areaIndex) const
protectedvirtual

Preferred size when floating (size hint)

Implements swift::gui::CInfoArea.

Definition at line 102 of file datainfoareacomponent.cpp.

◆ indexToPixmap()

const QPixmap & swift::gui::components::CDataInfoAreaComponent::indexToPixmap ( int  areaIndex) const
protectedvirtual

Info area (index) to icon.

Implements swift::gui::CInfoArea.

Definition at line 117 of file datainfoareacomponent.cpp.


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