[OpenDocString] kdeconnect-kde (cpp)
devicespluginfilterproxymodel.cpp
bool DevicesPluginFilterProxyModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
{
    const QModelIndex idx = sourceModel()->index(source_row, 0, source_parent);
    auto device = qobject_cast(idx.data(DevicesModel::DeviceRole).value());
    return device->hasPlugin(m_pluginFilter);
}
Returns true if the device has a plugin for the given source row, and false otherwise.
void DevicesPluginFilterProxyModel::setPluginFilter(const QString plugin)
{
    m_pluginFilter = plugin;
}
Sets the plugin filter by storing it in the m_pluginFilter variable.
QString DevicesPluginFilterProxyModel::pluginFilter() const
{
    return m_pluginFilter;
}
Returns the plugin filter as a QString.