vvave.h 992 Bytes
Newer Older
Camilo higuita's avatar
Camilo higuita committed
1 2 3 4
#ifndef VVAVE_H
#define VVAVE_H

#include <QObject>
5 6
#include "utils/bae.h"
#include <functional>
Camilo higuita's avatar
Camilo higuita committed
7

8
class CollectionDB;
Camilo higuita's avatar
Camilo higuita committed
9 10 11
class vvave : public QObject
{
    Q_OBJECT
12 13 14 15
private:
    CollectionDB *db;
    void checkCollection(const QStringList &paths = BAE::defaultSources, std::function<void (uint)> cb = nullptr);

Camilo higuita's avatar
Camilo higuita committed
16 17
public:
    explicit vvave(QObject *parent = nullptr);
18
    ~vvave();
Camilo higuita's avatar
Camilo higuita committed
19 20

signals:
21 22 23 24
    void refreshTables(uint size);
    void refreshTracks();
    void refreshAlbums();
    void refreshArtists();
Camilo higuita's avatar
Camilo higuita committed
25
    void openFiles(QVariantList tracks);
Camilo higuita's avatar
Camilo higuita committed
26 27

public slots:
28 29
    ///DB Interfaces
    /// useful functions for non modeled views and actions with not direct access to a tracksmodel or its own model
Camilo higuita's avatar
Camilo higuita committed
30
    QVariantList sourceFolders();
31
    bool removeSource(const QString &source);
32
    static QString moodColor(const int &index);
Camilo higuita's avatar
Camilo higuita committed
33
    void scanDir(const QStringList &paths = BAE::defaultSources);
34 35

    QStringList getSourceFolders();
Camilo higuita's avatar
Camilo higuita committed
36
    void openUrls(const QStringList &urls);
Camilo higuita's avatar
Camilo higuita committed
37 38 39
};

#endif // VVAVE_H