src/libraries.h

changeset 218
63125c36de73
parent 206
654661eab7f3
child 230
a1f3f7d9078b
equal deleted inserted replaced
217:6d95c1a41e6e 218:63125c36de73
53 class LibraryManager : public QAbstractTableModel 53 class LibraryManager : public QAbstractTableModel
54 { 54 {
55 Q_OBJECT 55 Q_OBJECT
56 public: 56 public:
57 LibraryManager(QObject* parent = nullptr); 57 LibraryManager(QObject* parent = nullptr);
58 LibraryManager(Configuration* settings, QObject* parent = nullptr);
59 QVector<Library>::const_iterator begin() const; 58 QVector<Library>::const_iterator begin() const;
60 QVector<Library>::const_iterator end() const; 59 QVector<Library>::const_iterator end() const;
61 QString findFile(QString fileName) const; 60 QString findFile(QString fileName) const;
62 void addLibrary(const Library& library); 61 void addLibrary(const Library& library);
63 void removeLibrary(const int libraryIndex); 62 void removeLibrary(const int libraryIndex);
64 const Library& library(int libraryIndex) const; 63 const Library& library(int libraryIndex) const;
65 void setLibraryPath(int libraryIndex, const QDir& path); 64 void setLibraryPath(int libraryIndex, const QDir& path);
66 void setLibraryRole(int libraryIndex, const Library::Role role); 65 void setLibraryRole(int libraryIndex, const Library::Role role);
67 void restoreFromSettings(Configuration* settings); 66 void restoreFromSettings();
68 void storeToSettings(Configuration* settings); 67 void storeToSettings();
69 int count() const; 68 int count() const;
70 void moveLibrary(const int libraryFromIndex, const int libraryToIndex); 69 void moveLibrary(const int libraryFromIndex, const int libraryToIndex);
71 // Definitions for QAbstractTableModel 70 // Definitions for QAbstractTableModel
72 Qt::ItemFlags flags(const QModelIndex& index) const override; 71 Qt::ItemFlags flags(const QModelIndex& index) const override;
73 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; 72 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;

mercurial