swift
datamaininfoareacomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2014 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_DATAMAININFOAREACOMPONENT_H
7 #define SWIFT_GUI_DATAMAININFOAREACOMPONENT_H
8 
9 #include <QObject>
10 #include <QScopedPointer>
11 #include <QSize>
12 
13 #include "gui/infoarea.h"
14 #include "gui/swiftguiexport.h"
15 
16 class QPixmap;
17 class QWidget;
18 
19 namespace Ui
20 {
21  class CDataMainInfoAreaComponent;
22 }
23 namespace swift::gui::components
24 {
25  class CDataInfoAreaComponent;
26  class CDbMappingComponent;
27  class CLogComponent;
28  class CDataSettingsComponent;
29 
34  {
35  Q_OBJECT
36 
37  public:
39  enum InfoArea
40  {
41  // index must match tab index!
42  InfoAreaMapping = 0,
43  InfoAreaData = 1,
44  InfoAreaSettings = 2,
45  InfoAreaLog = 3,
46  InfoAreaNone = -1
47  };
48 
50  explicit CDataMainInfoAreaComponent(QWidget *parent = nullptr);
51 
53  virtual ~CDataMainInfoAreaComponent() override;
54 
56  CLogComponent *getLogComponent() const;
57 
59  CDbMappingComponent *getMappingComponent() const;
60 
62  CDataInfoAreaComponent *getDataInfoAreaComponent() const;
63 
65  swift::gui::components::CDataSettingsComponent *getDataSettingsComponent() const;
66 
68  void displayLog();
69 
70  public slots:
72  void selectLog();
73 
74  protected:
76  virtual QSize getPreferredSizeWhenFloating(int areaIndex) const override;
77 
79  virtual const QPixmap &indexToPixmap(int areaIndex) const override;
80 
81  private:
82  QScopedPointer<Ui::CDataMainInfoAreaComponent> ui;
83  };
84 } // namespace swift::gui::components
85 
86 #endif // SWIFT_GUI_DATAMAININFOAREACOMPONENT_H
Info area, hosting dockable widgets.
Definition: infoarea.h:41
Info area containing the DB data (models, liveries ...)
GUI displaying log and status messages.
Definition: logcomponent.h:45
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.