Commit fd8cbfaa authored by CABEL Tristan's avatar CABEL Tristan

delete dtkWidgetsSettings

parent 26f9a6c7
......@@ -98,8 +98,6 @@ set(${PROJECT_NAME}_HEADERS
dtkWidgetsParameterStringLineEdit.h
dtkWidgetsParameterStringListComboBox
dtkWidgetsParameterStringListComboBox.h
dtkWidgetsSettings
dtkWidgetsSettings.h
dtkWidgetsSpinBoxDouble.h
dtkWidgetsSpinBoxLong.h
dtkWidgetsWidget
......@@ -152,7 +150,6 @@ set(${PROJECT_NAME}_SOURCES
dtkWidgetsParameterScientificSpinBox.cpp
dtkWidgetsParameterStringLineEdit.cpp
dtkWidgetsParameterStringListComboBox.cpp
dtkWidgetsSettings.cpp
dtkWidgetsSpinBoxDouble.cpp
dtkWidgetsSpinBoxLong.cpp
dtkWidgetsWidget.cpp
......
......@@ -57,7 +57,6 @@
#include "dtkWidgetsParameterStringLineEdit.h"
#include "dtkWidgetsParameterStringListComboBox.h"
#include "dtkWidgetsParameterScientificSpinBox.h"
#include "dtkWidgetsSettings.h"
#include "dtkWidgetsSpinBoxDouble.h"
#include "dtkWidgetsWidget.h"
#include "dtkWidgetsWorkspace.h"
......
......@@ -16,8 +16,6 @@
#include <dtkWidgetsConfig>
#include "dtkWidgetsSettings.h"
#include "dtkWidgetsParameterBoolCheckBox.h"
#include "dtkWidgetsParameterBoolPushButton.h"
#include "dtkWidgetsParameterDirBrowse.h"
......@@ -57,7 +55,7 @@ namespace dtk {
QString realpath = path;
QStringList pathslist;
if (path.isEmpty()) {
dtkWidgetsSettings settings;
QSettings settings;
settings.beginGroup("widgets");
realpath = settings.value("plugins").toString();
settings.endGroup();
......
#include "dtkWidgetsSettings.h"
\ No newline at end of file
// Version: $Id:
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkWidgetsSettings.h"
/*!
* \brief dtkWidgetsSettings::dtkWidgetsSettings
*
* Constructs settings containing a path to plugins
*/
dtkWidgetsSettings::dtkWidgetsSettings(void) : QSettings(QSettings::IniFormat, QSettings::UserScope, "inria", "dtk-widgets")
{
this->beginGroup("widgets");
if(!this->allKeys().contains("plugins"))
this->setValue("plugins", QString());
this->sync();
this->endGroup();
}
dtkWidgetsSettings::~dtkWidgetsSettings(void)
{
}
//
// dtkWidgetsSettings.cpp ends here
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <dtkWidgetsExport>
#include <QtCore/QSettings>
class DTKWIDGETS_EXPORT dtkWidgetsSettings : public QSettings
{
public:
dtkWidgetsSettings(void);
~dtkWidgetsSettings(void);
};
//
// dtkWidgetsSettings.h ends here
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment