swift
usercomponent.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_USERCOMPONENT_H
7 #define SWIFT_GUI_USERCOMPONENT_H
8 
9 #include <QObject>
10 #include <QScopedPointer>
11 #include <QTabWidget>
12 #include <QTimer>
13 #include <QtGlobal>
14 
17 #include "gui/swiftguiexport.h"
18 #include "misc/aviation/callsign.h"
20 
21 namespace Ui
22 {
23  class CUserComponent;
24 }
25 namespace swift::gui::components
26 {
29  {
30  Q_OBJECT
31 
32  public:
34  explicit CUserComponent(QWidget *parent = nullptr);
35 
37  virtual ~CUserComponent() override;
38 
40  int countClients() const;
41 
43  int countUsers() const;
44 
46  void update();
47 
48  signals:
51 
52  private:
54  void onCountChanged(int count, bool withFilter);
55 
57  void onConnectionStatusChanged(const swift::misc::network::CConnectionStatus &from,
59 
61  void onSettingsChanged();
62 
63  QScopedPointer<Ui::CUserComponent> ui;
64  QTimer m_updateTimer;
66  this, &CUserComponent::onSettingsChanged
67  };
68  };
69 } // namespace swift::gui::components
70 #endif // SWIFT_GUI_USERCOMPONENT_H
Helper class: If a component is residing in an dockable widget. This class provides access to its inf...
User componenet (users, clients)
Definition: usercomponent.h:29
void requestTextMessageWidget(const swift::misc::aviation::CCallsign &callsign)
Request a text message.
Value object encapsulating information of a callsign.
Definition: callsign.h:30
Value object encapsulating information about a connection status.
High level reusable GUI components.
Definition: aboutdialog.cpp:13
#define SWIFT_GUI_EXPORT
Export a class or function from the library.