2014-06-21 09:59:43 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
2017-04-12 12:31:11 +02:00
|
|
|
** @file preferencespatternpage.h
|
2014-06-21 09:59:43 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2017-04-12 12:31:11 +02:00
|
|
|
** @date 12 4, 2017
|
2014-06-21 09:59:43 +02:00
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2014-06-21 09:59:43 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
2017-04-12 12:31:11 +02:00
|
|
|
** Copyright (C) 2017 Valentina project
|
2014-06-21 09:59:43 +02: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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
2017-04-12 12:31:11 +02:00
|
|
|
#ifndef PREFERENCESPATTERNPAGE_H
|
|
|
|
#define PREFERENCESPATTERNPAGE_H
|
2014-06-21 09:59:43 +02:00
|
|
|
|
2017-04-12 12:31:11 +02:00
|
|
|
#include <QWidget>
|
2018-02-06 18:30:27 +01:00
|
|
|
#include "../vmisc/def.h"
|
2014-06-21 09:59:43 +02:00
|
|
|
|
2017-04-12 12:31:11 +02:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class PreferencesPatternPage;
|
|
|
|
}
|
|
|
|
|
2017-08-19 18:10:57 +02:00
|
|
|
class QComboBox;
|
|
|
|
|
2017-04-12 12:31:11 +02:00
|
|
|
class PreferencesPatternPage : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit PreferencesPatternPage(QWidget *parent = nullptr);
|
|
|
|
virtual ~PreferencesPatternPage();
|
|
|
|
|
2018-03-12 10:56:47 +01:00
|
|
|
QStringList Apply();
|
2017-07-03 10:23:34 +02:00
|
|
|
void InitDefaultSeamAllowance();
|
2017-04-12 12:31:11 +02:00
|
|
|
|
2018-05-18 12:51:35 +02:00
|
|
|
protected:
|
|
|
|
virtual void changeEvent(QEvent* event) Q_DECL_OVERRIDE;
|
|
|
|
|
2017-08-19 18:10:57 +02:00
|
|
|
private slots:
|
|
|
|
void EditDateTimeFormats();
|
2017-08-30 06:26:18 +02:00
|
|
|
void ManageKnownMaterials();
|
2017-08-19 18:10:57 +02:00
|
|
|
|
2017-04-12 12:31:11 +02:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(PreferencesPatternPage)
|
|
|
|
Ui::PreferencesPatternPage *ui;
|
2017-08-30 06:26:18 +02:00
|
|
|
QStringList m_knownMaterials;
|
2018-02-06 18:30:27 +01:00
|
|
|
Unit m_oldLineUnit;
|
2017-08-19 18:10:57 +02:00
|
|
|
|
|
|
|
void InitLabelDateTimeFormats();
|
|
|
|
void InitComboBoxFormats(QComboBox *box, const QStringList &items, const QString ¤tFormat);
|
2018-02-06 18:30:27 +01:00
|
|
|
void InitUnits();
|
2018-05-18 12:51:35 +02:00
|
|
|
void RetranslateUi();
|
2017-08-19 18:10:57 +02:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
void CallDateTimeFormatEditor(const T &type, const QStringList &predefinedFormats,
|
|
|
|
const QStringList &userDefinedFormats, QComboBox *box);
|
2017-04-12 12:31:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PREFERENCESPATTERNPAGE_H
|