swift
mainkeypadareacomponent.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_MAINKEYPADAREACOMPONENT_H
7 #define SWIFT_GUI_MAINKEYPADAREACOMPONENT_H
8 
9 #include <QFrame>
10 #include <QList>
11 #include <QObject>
12 #include <QScopedPointer>
13 #include <QString>
14 
16 #include "gui/swiftguiexport.h"
17 #include "misc/identifier.h"
19 
20 class QPushButton;
21 
22 namespace swift::misc::simulation
23 {
24  class CSimulatedAircraft;
25 }
26 namespace Ui
27 {
28  class CMainKeypadAreaComponent;
29 }
30 namespace swift::gui::components
31 {
35  {
36  Q_OBJECT
37 
38  public:
40  explicit CMainKeypadAreaComponent(QWidget *parent = nullptr);
41 
43  virtual ~CMainKeypadAreaComponent() override;
44 
46  void onMainInfoAreaChanged(int currentTabIndex, const QList<int> &dockedIndexes,
47  const QList<int> &floatingIndexes);
48 
50  void focusInEntryField();
51 
52  signals:
56 
58  void changedOpacity(int opacity);
59 
61  void commandEntered(const QString &commandLine, const swift::misc::CIdentifier &originator);
62 
64  void textEntered(const QString &commandLine, const swift::misc::CIdentifier &originator);
65 
68 
70  void identPressed();
71 
73  void audioPressed();
74 
75  private:
77  void buttonSelected();
78 
80  void connectionStatusChanged(const swift::misc::network::CConnectionStatus &from,
82 
84  void ownAircraftCockpitChanged(const swift::misc::simulation::CSimulatedAircraft &aircraft,
85  const swift::misc::CIdentifier &originator);
86 
88  void outputMuteChanged(bool muted);
89 
91  CMainInfoAreaComponent::InfoArea buttonToMainInfoArea(const QObject *button) const;
92 
94  QPushButton *mainInfoAreaToButton(CMainInfoAreaComponent::InfoArea area) const;
95 
97  void unsetInfoAreaButtons();
98 
100  void update();
101 
103  void updateConnectionStatus();
104 
105  QScopedPointer<Ui::CMainKeypadAreaComponent> ui;
106  swift::misc::CIdentifier m_identifier { "MainKeypadAreaComponent", this };
107  };
108 } // namespace swift::gui::components
109 
110 #endif // SWIFT_GUI_MAINKEYPADAREACOMPONENT_H
Main keypad area as used with main info area.
void commandEntered(const QString &commandLine, const swift::misc::CIdentifier &originator)
Command was entered.
void textEntered(const QString &commandLine, const swift::misc::CIdentifier &originator)
Command was entered.
void selectedMainInfoAreaDockWidget(CMainInfoAreaComponent::InfoArea infoArea)
Button to select main info area has been pressed.
void changedOpacity(int opacity)
Change opacity 0..30.
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition: identifier.h:29
Value object encapsulating information about a connection status.
Comprehensive information of an aircraft.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.