swift
cockpitcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2013 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_COMPONENTS_COCKPITCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_COCKPITCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QScopedPointer>
12 #include <QSize>
13 
15 #include "gui/swiftguiexport.h"
16 
17 namespace Ui
18 {
19  class CCockpitComponent;
20 }
21 namespace swift::gui
22 {
23  class CDockWidgetInfoArea;
24 
25  namespace components
26  {
29  {
30  Q_OBJECT
31 
32  public:
34  explicit CCockpitComponent(QWidget *parent = nullptr);
35 
37  virtual ~CCockpitComponent() override;
38 
40  virtual bool setParentDockWidgetInfoArea(swift::gui::CDockWidgetInfoArea *parentDockableWidget) override;
41 
43  bool isInfoAreaShown() const;
44 
46  void setSelectedTransponderModeStateIdent();
47 
49  void showAudio();
50 
51  protected:
53  virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
54 
55  private:
57  void onToggleShowHideDetails(bool show);
58 
60  void onToggleFloating(bool floating);
61 
63  void toggleShowHideDetails(bool show, bool considerCurrentSize);
64 
67  void onRequestTextMessageCom1();
68  void onRequestTextMessageCom2();
70 
72  void onATCStationsChanged();
73 
74  QScopedPointer<Ui::CCockpitComponent> ui;
75  QSize m_sizeFloatingShown;
76  QSize m_sizeFloatingHidden;
77  int m_minHeightInfoArea = -1;
78  };
79  } // namespace components
80 } // namespace swift::gui
81 
82 #endif // SWIFT_GUI_COMPONENTS_COCKPITCOMPONENT_H
Specialized class for dock widgets serving as info area.
Using this class provides a QFrame with the overlay and dock widget functionality already integrated.
Cockpit component: COM unit, show / hide bar, voice rooms.
GUI related classes.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.