swift
dbdistributorcomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2015 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_DBDISTRIBUTORCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_DBDISTRIBUTORCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QObject>
11 #include <QScopedPointer>
12 
15 #include "gui/swiftguiexport.h"
18 
19 namespace Ui
20 {
21  class CDbDistributorComponent;
22 }
23 namespace swift::misc::simulation
24 {
25  class CSimulatorInfo;
26 }
27 namespace swift::gui
28 {
29  namespace views
30  {
31  class CDistributorView;
32  }
33  namespace components
34  {
39  public QFrame,
42  {
43  Q_OBJECT
44 
45  public:
47  explicit CDbDistributorComponent(QWidget *parent = nullptr);
48 
50  virtual ~CDbDistributorComponent() override;
51 
54 
56  void filterBySimulator(const swift::misc::simulation::CSimulatorInfo &simulator);
57 
59  swift::misc::simulation::CDistributorList getSelectedDistributors() const;
60 
62  bool selectDistributor(const swift::misc::simulation::CDistributor &distributor);
63 
65  bool hasSelectedDistributors() const;
66 
67  private:
68  QScopedPointer<Ui::CDbDistributorComponent> ui;
69 
71  void onDistributorsRead(swift::misc::network::CEntityFlags::Entity entity,
73 
75  void selectStandardModels();
76 
78  void reload();
79  };
80  } // namespace components
81 } // namespace swift::gui
82 
83 #endif // SWIFT_GUI_COMPONENTS_DBDISTRIBUTORCOMPONENT_H
Helper class: If a component is residing in an dockable widget. This class provides access to its inf...
Hand over indication task to an embedded view.
Value object encapsulating information of software distributor.
Definition: distributor.h:33
Value object encapsulating a list of distributors.
Simple hardcoded info about the corresponding simulator.
Definition: simulatorinfo.h:41
GUI related classes.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.