swift
selectionmodel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 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_SELECTIONMODEL_H
7 #define SWIFT_GUI_MODELS_SELECTIONMODEL_H
8 
9 namespace swift::gui::models
10 {
12  template <typename ContainerType>
14  {
15  public:
17  virtual ~ISelectionModel() {}
18 
20  virtual ContainerType selectedObjects() const = 0;
21 
24  virtual ContainerType unselectedObjects() const = 0;
25 
27  virtual void selectObjects(const ContainerType &selectedObjects) = 0;
28  };
29 } // namespace swift::gui::models
30 #endif // SWIFT_GUI_MODELS_SELECTIONMODEL_H
Allow to get and select objects.
virtual ContainerType selectedObjects() const =0
Selected objects.
virtual ~ISelectionModel()
Destructor.
virtual void selectObjects(const ContainerType &selectedObjects)=0
Select.
virtual ContainerType unselectedObjects() const =0
Unselected objects.
Models to be used with views, mainly QTableView.