swift
distributorlistmodel.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_MODELS_DISTRIBUTORLISTMODEL_H
7 #define SWIFT_GUI_MODELS_DISTRIBUTORLISTMODEL_H
8 
9 #include <QString>
10 
12 #include "gui/swiftguiexport.h"
14 
15 namespace swift::misc::simulation
16 {
17  class CDistributor;
18 }
19 namespace swift::gui::models
20 {
23  public COrderableListModelDbObjects<swift::misc::simulation::CDistributorList, QString, true>
24  {
25  Q_OBJECT
26 
27  public:
30  {
31  NotSet,
32  Normal,
33  NormalWithOrder,
34  Minimal,
35  MinimalWithOrder
36  };
37 
39  explicit CDistributorListModel(QObject *parent = nullptr);
40 
42  virtual ~CDistributorListModel() override {}
43 
45  void setDistributorMode(DistributorMode distributorMode);
46 
48  DistributorMode getDistributorMode() const { return this->m_distributorMode; }
49 
51  virtual bool isOrderable() const override { return true; }
52 
53  private:
54  DistributorMode m_distributorMode = NotSet;
55  };
56 } // namespace swift::gui::models
57 
58 #endif // SWIFT_GUI_MODELS_DISTRIBUTORLISTMODEL_H
virtual bool isOrderable() const
Orderable, normally use a container swift::misc::IOrderableList.
DistributorMode getDistributorMode() const
Mode.
Models to be used with views, mainly QTableView.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.