2015-07-15 09:16:59 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
2020-05-10 17:32:14 +02:00
|
|
|
** @file vpuzzlesettings.cpp
|
2015-07-15 09:16:59 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2020-05-10 17:32:14 +02:00
|
|
|
** @date 16 2, 2020
|
2015-07-15 09:16:59 +02:00
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2015-07-15 09:16:59 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2020-05-10 17:32:14 +02:00
|
|
|
** Copyright (C) 2020 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2015-07-15 09:16:59 +02:00
|
|
|
**
|
|
|
|
** Valentina is free software: you can redistribute it and/or modify
|
|
|
|
** it under the terms of the GNU General Public License as published by
|
|
|
|
** the Free Software Foundation, either version 3 of the License, or
|
|
|
|
** (at your option) any later version.
|
|
|
|
**
|
|
|
|
** Valentina is distributed in the hope that it will be useful,
|
|
|
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
** GNU General Public License for more details.
|
|
|
|
**
|
|
|
|
** You should have received a copy of the GNU General Public License
|
|
|
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
2020-05-10 17:32:14 +02:00
|
|
|
#include "vpuzzlesettings.h"
|
2015-07-18 14:39:33 +02:00
|
|
|
|
2018-03-14 14:39:15 +01:00
|
|
|
namespace
|
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDockWidgetPropertiesActive, (QLatin1String("dockWidget/properties")))
|
|
|
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingDockPropertiesContentsActive, (QLatin1String("dockWidget/contents")))
|
2018-03-14 14:39:15 +01:00
|
|
|
}
|
2015-12-12 12:11:39 +01:00
|
|
|
|
2015-07-15 09:16:59 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
VPuzzleSettings::VPuzzleSettings(Format format, Scope scope, const QString &organization, const QString &application,
|
|
|
|
QObject *parent)
|
|
|
|
: VCommonSettings(format, scope, organization, application, parent)
|
|
|
|
{}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
VPuzzleSettings::VPuzzleSettings(const QString &fileName, QSettings::Format format, QObject *parent)
|
|
|
|
: VCommonSettings(fileName, format, parent)
|
|
|
|
{}
|
2015-07-18 14:39:33 +02:00
|
|
|
|
2015-08-01 19:09:10 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
bool VPuzzleSettings::IsDockWidgetPropertiesActive() const
|
2015-08-01 19:09:10 +02:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
return value(*settingDockWidgetPropertiesActive, GetDefDockWidgetPropertiesActive()).toBool();
|
2015-08-01 19:09:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
bool VPuzzleSettings::GetDefDockWidgetPropertiesActive()
|
2015-08-01 19:09:10 +02:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
return true;
|
2015-08-01 19:09:10 +02:00
|
|
|
}
|
2015-12-12 12:11:39 +01:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
void VPuzzleSettings::SetDockWidgetPropertiesActive(bool value)
|
2015-12-12 12:11:39 +01:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
setValue(*settingDockWidgetPropertiesActive, value);
|
2015-12-12 12:11:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
bool VPuzzleSettings::IsDockWidgetPropertiesContentsActive() const
|
2015-12-12 12:11:39 +01:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
return value(*settingDockWidgetPropertiesActive, GetDefDockWidgetPropertiesActive()).toBool();
|
2015-12-12 12:11:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
bool VPuzzleSettings::GetDefDockWidgetPropertiesContentsActive()
|
2015-12-12 12:11:39 +01:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
return true;
|
2015-12-12 12:11:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
2020-05-10 17:32:14 +02:00
|
|
|
void VPuzzleSettings::SetDockWidgetPropertiesContentsActive(bool value)
|
2015-12-12 12:11:39 +01:00
|
|
|
{
|
2020-05-10 17:32:14 +02:00
|
|
|
setValue(*settingDockPropertiesContentsActive, value);
|
2015-12-12 12:11:39 +01:00
|
|
|
}
|