swift
Loading...
Searching...
No Matches
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
15namespace swift::misc::simulation
16{
17 class CDistributor;
18}
19namespace swift::gui::models
20{
23 public COrderableListModelDbObjects<swift::misc::simulation::CDistributorList, QString, true>
24 {
26
27 public:
30 {
31 NotSet,
32 Normal,
33 NormalWithOrder,
34 Minimal,
35 MinimalWithOrder
36 };
37
39 explicit CDistributorListModel(QObject *parent = nullptr);
40
42 ~CDistributorListModel() override = default;
43
45 void setDistributorMode(DistributorMode distributorMode);
46
48 DistributorMode getDistributorMode() const { return this->m_distributorMode; }
49
51 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
void setDistributorMode(DistributorMode distributorMode)
Set mode.
bool isOrderable() const
Orderable, normally use a container swift::misc::IOrderableList.
CDistributorListModel(QObject *parent=nullptr)
Constructor.
DistributorMode getDistributorMode() const
Mode.
Value object encapsulating information of software distributor.
Definition distributor.h:33
Models to be used with views, mainly QTableView.
Q_OBJECTQ_OBJECT
#define SWIFT_GUI_EXPORT
Export a class or function from the library.