swift
aircraftpartshistory.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 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_COMPONENT_AIRCRAFTPARTSHISTORY_H
7 #define SWIFT_GUI_COMPONENT_AIRCRAFTPARTSHISTORY_H
8 
9 #include <QFrame>
10 #include <QTabWidget>
11 #include <QTextDocument>
12 #include <QTimer>
13 
15 
16 namespace Ui
17 {
18  class CAircraftPartsHistory;
19 }
20 namespace swift::gui::components
21 {
25  class CAircraftPartsHistory : public QFrame
26  {
27  Q_OBJECT
28 
29  public:
31  explicit CAircraftPartsHistory(QWidget *parent = nullptr);
32 
34  virtual ~CAircraftPartsHistory();
35 
36  private:
37  QScopedPointer<Ui::CAircraftPartsHistory> ui;
38  QTimer m_timerUpdateHistory;
39  QTextDocument m_text { this };
40  size_t m_htmlHash = 0;
41 
43  void initGui();
44 
46  bool hasContexts() const;
47 
49  bool partsHistoryEnabled() const;
50 
51  private:
53  void updatePartsHistory();
54 
56  void callsignEntered();
57 
59  void valuesChanged();
60 
62  void toggleHistoryEnabled(bool enabled);
63 
65  void connectionStatusChanged(const swift::misc::network::CConnectionStatus &from,
67  };
68 } // namespace swift::gui::components
69 
70 #endif // SWIFT_GUI_COMPONENT_AIRCRAFTPARTSHISTORY_H
History frame for received aircraft parts.
CAircraftPartsHistory(QWidget *parent=nullptr)
Constructor.
Value object encapsulating information about a connection status.
High level reusable GUI components.
Definition: aboutdialog.cpp:13