// This file Copyright © 2023-2023 Mnemosyne LLC. // It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only), // or any future license endorsed by Mnemosyne LLC. // License text can be found in the licenses/ folder. #pragma once #include "GtkCompat.h" #include #if GTKMM_CHECK_VERSION(4, 0, 0) #include #else #include #include #endif template class SorterBase; template class SortListModel : public IF_GTKMM4(Gtk::SortListModel, Gtk::TreeModelSort) { public: using SorterType = SorterBase; public: SortListModel(Glib::RefPtr const& model, Glib::RefPtr const& sorter); #if !GTKMM_CHECK_VERSION(4, 0, 0) SortListModel(Glib::RefPtr const& model, Glib::RefPtr const& sorter); ~SortListModel() override; #endif template static Glib::RefPtr> create(Glib::RefPtr const& model, Glib::RefPtr const& sorter); private: #if !GTKMM_CHECK_VERSION(4, 0, 0) sigc::connection signal_changed_tag_; #endif };