/**************************************************************************** ** Copyright (c) 2021, Fougue Ltd. ** All rights reserved. ** See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt ****************************************************************************/ #pragma once #include "application_item.h" #include "signal.h" #include "span.h" namespace Mayo { // Keeps track of the items selected in an Application object class ApplicationItemSelectionModel { public: Span selectedItems() const; bool isSelected(const ApplicationItem& item); void add(const ApplicationItem& item); void add(Span vecItem); void remove(const ApplicationItem& item); void remove(Span vecItem); // void toggle(const ApplicationItem& item); // void toggle(Span item); void clear(); Signal, Span> signalChanged; private: std::vector m_vecSelectedItem; }; } // namespace Mayo