swift
userlistmodel.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_MODELS_USERLISTMODEL_H
7 #define SWIFT_GUI_MODELS_USERLISTMODEL_H
8 
10 #include "gui/swiftguiexport.h"
11 #include "misc/network/userlist.h"
12 
13 namespace swift::gui::models
14 {
18  class SWIFT_GUI_EXPORT CUserListModel : public CListModelBase<swift::misc::network::CUserList, true>
19  {
20  Q_OBJECT
21 
22  public:
24  enum UserMode
25  {
26  NotSet,
27  UserDetailed,
28  UserShort
29  };
30 
32  explicit CUserListModel(UserMode userMode, QObject *parent = nullptr);
33 
35  virtual ~CUserListModel() {}
36 
38  void setUserMode(UserMode userMode);
39 
40  private:
41  UserMode m_userMode = NotSet;
42  };
43 } // namespace swift::gui::models
44 #endif // SWIFT_GUI_MODELS_USERLISTMODEL_H
virtual ~CUserListModel()
Destructor.
Definition: userlistmodel.h:35
Models to be used with views, mainly QTableView.
#define SWIFT_GUI_EXPORT
Export a class or function from the library.