src/libraries.cpp

changeset 218
63125c36de73
parent 205
1a4342d80de7
child 230
a1f3f7d9078b
--- a/src/libraries.cpp	Tue Jun 14 17:55:50 2022 +0300
+++ b/src/libraries.cpp	Tue Jun 14 19:50:31 2022 +0300
@@ -18,7 +18,7 @@
 
 #include <QSettings>
 #include "libraries.h"
-#include "configuration.h"
+#include "settings.h"
 
 /**
  * @brief Constructs a new library manager
@@ -30,17 +30,6 @@
 }
 
 /**
- * @brief Constructs a library manager from settings
- * @param settings Settings to construct from
- * @param parent Parent object
- */
-LibraryManager::LibraryManager(Configuration* settings, QObject* parent) :
-	QAbstractTableModel{parent}
-{
-	this->restoreFromSettings(settings);
-}
-
-/**
  * @brief Yields a begin-terator for the libraries
  * @return iterator
  */
@@ -161,18 +150,18 @@
  * changes are lost.
  * @param settings Settings object to restore from.
  */
-void LibraryManager::restoreFromSettings(Configuration* settings)
+void LibraryManager::restoreFromSettings()
 {
-	this->libraries = settings->libraries();
+	this->libraries = setting<Setting::Libraries>();
 }
 
 /**
  * @brief Saves the libraries to the specified settings object.
  * @param settings Settings object to modify.
  */
-void LibraryManager::storeToSettings(Configuration* settings)
+void LibraryManager::storeToSettings()
 {
-	settings->setLibraries(this->libraries);
+	setSetting<Setting::Libraries>(this->libraries);
 }
 
 /**

mercurial