2014-11-22 17:15:47 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file vsettings.h
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 22 11, 2014
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentine project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2015-02-27 11:27:48 +01:00
|
|
|
** Copyright (C) 2013-2015 Valentina project
|
2014-11-22 17:15:47 +01:00
|
|
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
|
|
|
**
|
|
|
|
** 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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef VSETTINGS_H
|
|
|
|
#define VSETTINGS_H
|
|
|
|
|
|
|
|
#include <QSettings>
|
2015-05-08 16:24:20 +02:00
|
|
|
#include "../../libs/vlayout/vbank.h"
|
2014-11-22 17:15:47 +01:00
|
|
|
|
|
|
|
class VSettings : public QSettings
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
VSettings(Format format, Scope scope, const QString &organization, const QString &application = QString(),
|
|
|
|
QObject *parent = 0);
|
|
|
|
|
2015-01-28 15:46:41 +01:00
|
|
|
static QString StandardTablesPath();
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetOsSeparator() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetOsSeparator(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetAutosaveState() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetAutosaveState(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
int GetAutosaveTime() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetAutosaveTime(const int &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetSendReportState() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetSendReportState(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetLocale() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetLocale(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetUnit() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetUnit(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetLabelLanguage() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetLabelLanguage(const QString &value);
|
|
|
|
|
2015-02-25 23:27:09 +01:00
|
|
|
bool GetConfirmItemDelete() const;
|
|
|
|
void SetConfirmItemDelete(const bool &value);
|
|
|
|
|
2015-04-11 20:20:37 +02:00
|
|
|
bool GetToolBarStyle() const;
|
|
|
|
void SetToolBarStyle(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetPathIndividualMeasurements() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetPathIndividualMeasurements(const QString &value);
|
|
|
|
|
2015-01-28 15:46:41 +01:00
|
|
|
QString GetPathStandardMeasurements() const;
|
|
|
|
void SetPathStandardMeasurements(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetPathPattern() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetPathPattern(const QString &value);
|
|
|
|
|
2015-01-26 15:08:09 +01:00
|
|
|
QString GetPathLayout() const;
|
|
|
|
void SetPathLayout(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetUser() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetUser(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetGraphicalOutput() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetGraphicalOutput(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
int GetUndoCount() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetUndoCount(const int &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QStringList GetRecentFileList() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetRecentFileList(const QStringList &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QStringList GetRestoreFileList() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetRestoreFileList(const QStringList &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QByteArray GetGeometry() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetGeometry(const QByteArray &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QByteArray GetWindowState() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetWindowState(const QByteArray &value);
|
|
|
|
|
2015-04-22 16:22:47 +02:00
|
|
|
QByteArray GetToolbarsState() const;
|
|
|
|
void SetToolbarsState(const QByteArray &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetServer() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetServer(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetServerSecure() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetServerSecure(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetProxy() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetProxy(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetProxyAddress() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetProxyAddress(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetProxyPort() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetProxyPort(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetProxyUser() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetProxyUser(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetProxyPass() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetProxyPass(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetUsername() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetUsername(const QString &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
bool GetSavePassword() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetSavePassword(const bool &value);
|
|
|
|
|
2014-11-28 19:41:46 +01:00
|
|
|
QString GetUserPassword() const;
|
2014-11-22 17:15:47 +01:00
|
|
|
void SetUserPassword(const QString &value);
|
|
|
|
|
2015-05-08 16:24:20 +02:00
|
|
|
int GetLayoutPaperHeight() const;
|
|
|
|
void SetLayoutPaperHeight(int value);
|
|
|
|
|
|
|
|
int GetLayoutPaperWidth() const;
|
|
|
|
void SetLayoutPaperWidth(int value);
|
|
|
|
|
|
|
|
unsigned int GetLayoutShift() const;
|
|
|
|
static unsigned int GetDefLayoutShift();
|
|
|
|
void SetLayoutShift(unsigned int value);
|
|
|
|
|
|
|
|
unsigned int GetLayoutWidth() const;
|
|
|
|
static unsigned int GetDefLayoutWidth();
|
|
|
|
void SetLayoutWidth(unsigned int value);
|
|
|
|
|
|
|
|
Cases GetLayoutGroup() const;
|
|
|
|
static Cases GetDefLayoutGroup();
|
|
|
|
void SetLayoutGroup(const Cases &value);
|
|
|
|
|
|
|
|
bool GetLayoutRotate() const;
|
|
|
|
static bool GetDefLayoutRotate();
|
|
|
|
void SetLayoutRotate(bool value);
|
|
|
|
|
|
|
|
int GetLayoutRotationIncrease() const;
|
|
|
|
static int GetDefLayoutRotationIncrease();
|
|
|
|
void SetLayoutRotationIncrease(int value);
|
|
|
|
|
|
|
|
bool GetLayoutAutoCrop() const;
|
|
|
|
void SetLayoutAutoCrop(bool value);
|
|
|
|
|
|
|
|
bool GetLayoutSaveLength() const;
|
|
|
|
void SetLayoutSaveLength(bool value);
|
|
|
|
|
2015-05-18 13:26:37 +02:00
|
|
|
bool GetLayoutUnitePages() const;
|
|
|
|
void SetLayoutUnitePages(bool value);
|
|
|
|
|
2014-11-22 17:15:47 +01:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(VSettings)
|
|
|
|
static const QString SettingConfigurationOsSeparator;
|
|
|
|
static const QString SettingConfigurationAutosaveState;
|
|
|
|
static const QString SettingConfigurationAutosaveTime;
|
|
|
|
static const QString SettingConfigurationSendReportState;
|
|
|
|
static const QString SettingConfigurationLocale;
|
|
|
|
static const QString SettingConfigurationUnit;
|
|
|
|
static const QString SettingConfigurationLabelLanguage;
|
2015-02-25 23:27:09 +01:00
|
|
|
static const QString SettingConfigurationConfirmItemDeletion;
|
2015-04-11 20:20:37 +02:00
|
|
|
static const QString SettingConfigurationToolBarStyle;
|
2014-11-22 17:15:47 +01:00
|
|
|
|
|
|
|
static const QString SettingPathsIndividualMeasurements;
|
2015-01-28 15:46:41 +01:00
|
|
|
static const QString SettingPathsStandardMeasurements;
|
2014-11-22 17:15:47 +01:00
|
|
|
static const QString SettingPathsPattern;
|
2015-01-26 15:08:09 +01:00
|
|
|
static const QString SettingPathsLayout;
|
2014-11-22 17:15:47 +01:00
|
|
|
|
|
|
|
static const QString SettingPatternUser;
|
|
|
|
static const QString SettingPatternGraphicalOutput;
|
|
|
|
static const QString SettingPatternUndo;
|
|
|
|
|
|
|
|
static const QString SettingGeneralRecentFileList;
|
|
|
|
static const QString SettingGeneralRestoreFileList;
|
|
|
|
static const QString SettingGeneralGeometry;
|
|
|
|
static const QString SettingGeneralWindowState;
|
2015-04-22 16:22:47 +02:00
|
|
|
static const QString SettingGeneralToolbarsState;
|
2014-11-22 17:15:47 +01:00
|
|
|
|
|
|
|
static const QString SettingCommunityServer;
|
|
|
|
static const QString SettingCommunityServerSecure;
|
|
|
|
static const QString SettingCommunityUseProxy;
|
|
|
|
static const QString SettingCommunityProxyAddress;
|
|
|
|
static const QString SettingCommunityProxyPort;
|
|
|
|
static const QString SettingCommunityProxyUser;
|
|
|
|
static const QString SettingCommunityProxyPass;
|
|
|
|
static const QString SettingCommunityUsername;
|
|
|
|
static const QString SettingCommunitySavePassword;
|
|
|
|
static const QString SettingCommunityUserPassword;
|
2015-05-08 16:24:20 +02:00
|
|
|
|
|
|
|
static const QString SettingLayoutWidth;
|
|
|
|
static const QString SettingLayoutSorting;
|
|
|
|
static const QString SettingLayoutPaperHeight;
|
|
|
|
static const QString SettingLayoutPaperWidth;
|
|
|
|
static const QString SettingLayoutShift;
|
|
|
|
static const QString SettingLayoutRotate;
|
|
|
|
static const QString SettingLayoutRotationIncrease;
|
|
|
|
static const QString SettingLayoutAutoCrop;
|
|
|
|
static const QString SettingLayoutSaveLength;
|
2015-05-18 13:26:37 +02:00
|
|
|
static const QString SettingLayoutUnitePages;
|
2014-11-22 17:15:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VSETTINGS_H
|