diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
|---|---|---|
| committer | Felix (xq) Queißner <git@mq32.de> | 2020-06-06 23:14:21 +0200 |
| commit | 3aed883402dc8da829fc304434c5efd0570cbb97 (patch) | |
| tree | 48c46ab087a950d80f78819ceb609e93d246b040 /favouritecollection.hpp | |
| parent | 44e85dce678e7e36f436a6d0a25c212c9a2d3657 (diff) | |
| download | kristall-3aed883402dc8da829fc304434c5efd0570cbb97.tar.gz | |
Moves source code into subdirectory.
Diffstat (limited to 'favouritecollection.hpp')
| -rw-r--r-- | favouritecollection.hpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/favouritecollection.hpp b/favouritecollection.hpp deleted file mode 100644 index 73afa1f..0000000 --- a/favouritecollection.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef FAVOURITECOLLECTION_HPP -#define FAVOURITECOLLECTION_HPP - -#include <QObject> -#include <QAbstractListModel> -#include <QUrl> -#include <QSettings> - - -class FavouriteCollection : public QAbstractListModel -{ - Q_OBJECT -public: - explicit FavouriteCollection(QObject *parent = nullptr); - - void add(QUrl const & url); - - void remove(QUrl const & url); - - bool contains(QUrl const & url); - - QUrl get(QModelIndex const & index) const ; - - bool save(QString const & fileName) const; - bool save(QSettings & settings) const; - - bool load(QString const & fileName); - bool load(QSettings & settings); - -public: - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - -signals: - -private: - QVector<QUrl> items; - -}; - -#endif // FAVOURITECOLLECTION_HPP |
