17class PluginDescriptorList :
public QAbstractListModel
25 class KnownPluginListChangeListener final :
public juce::ChangeListener
28 using CallbackFunc = std::function<void (juce::ChangeBroadcaster *)>;
30 KnownPluginListChangeListener (CallbackFunc callback);
33 void changeListenerCallback (juce::ChangeBroadcaster * source)
override
39 CallbackFunc callback_;
43 explicit PluginDescriptorList (
44 std::shared_ptr<juce::KnownPluginList> known_plugin_list,
45 QObject * parent =
nullptr);
47 enum PluginDescriptorRole
49 DescriptorRole = Qt::UserRole + 1,
53 QHash<int, QByteArray> roleNames ()
const override;
56 index (
int row,
int column,
const QModelIndex &parent = QModelIndex ())
59 QModelIndex parent (
const QModelIndex &child)
const override;
61 int rowCount (
const QModelIndex &parent = QModelIndex ())
const override;
63 int columnCount (
const QModelIndex &parent = QModelIndex ())
const override;
66 data (
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
76 void schedule_update_cache ();
79 KnownPluginListChangeListener known_plugin_list_change_listener_;
80 std::shared_ptr<juce::KnownPluginList> known_plugin_list_;
81 std::vector<utils::QObjectUniquePtr<PluginDescriptor>> cached_descriptors_;