#pragma once

#include <QObject>
#include <QScopedPointer>

#include <DSingleton>

#include "softwarefilter.h"

class FilterManagerPrivate;
class FilterManager : public QObject, public Dtk::Core::DSingleton<FilterManager>
{
    Q_OBJECT
public:
    explicit FilterManager(QObject *parent = Q_NULLPTR);
    ~FilterManager();

    void setPlatform(const QString& platform);
    QList<SoftwareFilter> filterList();

Q_SIGNALS:
    void filterListUpdated(QList<SoftwareFilter> filterList);

public Q_SLOTS:
    void update();

private:
    friend class Dtk::Core::DSingleton<FilterManager>;
    QScopedPointer<FilterManagerPrivate> dd_ptr;
    Q_DECLARE_PRIVATE_D(qGetPtrHelper(dd_ptr), FilterManager)
};

