2016-05-12 21:11:21 +02:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file dialogrotation.h
|
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
|
|
|
** @date 10 4, 2016
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
2017-10-05 11:20:01 +02:00
|
|
|
** This source code is part of the Valentina project, a pattern making
|
2016-05-12 21:11:21 +02:00
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2016 Valentina project
|
2020-01-31 07:00:05 +01:00
|
|
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
2016-05-12 21:11:21 +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/>.
|
|
|
|
**
|
|
|
|
*************************************************************************/
|
|
|
|
|
|
|
|
#ifndef DIALOGROTATION_H
|
|
|
|
#define DIALOGROTATION_H
|
|
|
|
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <qcompilerdetection.h>
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
#include "../vmisc/def.h"
|
2016-05-12 21:11:21 +02:00
|
|
|
#include "dialogtool.h"
|
2020-11-07 14:02:30 +01:00
|
|
|
#include "../../tools/toolsdef.h"
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class DialogRotation;
|
|
|
|
}
|
|
|
|
|
|
|
|
class DialogRotation : public DialogTool
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-02-11 12:25:27 +01:00
|
|
|
explicit DialogRotation(const VContainer *data, quint32 toolId, QWidget *parent = nullptr);
|
2016-05-12 21:11:21 +02:00
|
|
|
virtual ~DialogRotation();
|
|
|
|
|
|
|
|
quint32 GetOrigPointId() const;
|
2019-02-11 12:25:27 +01:00
|
|
|
void SetOrigPointId(quint32 value);
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
QString GetAngle() const;
|
|
|
|
void SetAngle(const QString &value);
|
|
|
|
|
|
|
|
QString GetSuffix() const;
|
|
|
|
void SetSuffix(const QString &value);
|
|
|
|
|
2020-03-18 13:45:47 +01:00
|
|
|
QString GetVisibilityGroupName() const;
|
|
|
|
void SetVisibilityGroupName(const QString &name);
|
|
|
|
|
|
|
|
bool HasLinkedVisibilityGroup() const;
|
|
|
|
void SetHasLinkedVisibilityGroup(bool linked);
|
|
|
|
|
2020-03-24 16:31:32 +01:00
|
|
|
void SetVisibilityGroupTags(const QStringList &tags);
|
|
|
|
QStringList GetVisibilityGroupTags() const;
|
|
|
|
|
2020-10-28 13:09:56 +01:00
|
|
|
void SetNotes(const QString ¬es);
|
|
|
|
QString GetNotes() const;
|
|
|
|
|
2020-03-24 16:31:32 +01:00
|
|
|
virtual void SetGroupCategories(const QStringList &categories) override;
|
|
|
|
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual void ShowDialog(bool click) override;
|
2016-05-12 21:11:21 +02:00
|
|
|
|
2020-11-07 14:02:30 +01:00
|
|
|
QVector<SourceItem> GetSourceObjects() const;
|
|
|
|
void SetSourceObjects(const QVector<SourceItem> &value);
|
|
|
|
|
2016-05-12 21:11:21 +02:00
|
|
|
public slots:
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual void ChosenObject(quint32 id, const SceneObject &type) override;
|
|
|
|
virtual void SelectedObject(bool selected, quint32 object, quint32 tool) override;
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
/** @brief DeployAngleTextEdit grow or shrink formula input */
|
|
|
|
void DeployAngleTextEdit();
|
|
|
|
void FXAngle();
|
|
|
|
void SuffixChanged();
|
2020-03-18 13:45:47 +01:00
|
|
|
void GroupNameChanged();
|
2019-02-11 12:25:27 +01:00
|
|
|
void EvalAngle();
|
2020-11-07 14:02:30 +01:00
|
|
|
void ShowSourceDetails(int row);
|
|
|
|
void AliasChanged(const QString &text);
|
2020-11-10 11:40:37 +01:00
|
|
|
void PenStyleChanged();
|
|
|
|
void ColorChanged();
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
protected:
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual void ShowVisualization() override;
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
/** @brief SaveData Put dialog data in local variables */
|
2018-06-26 14:53:48 +02:00
|
|
|
virtual void SaveData() override;
|
|
|
|
virtual void closeEvent(QCloseEvent *event) override;
|
2019-02-11 12:25:27 +01:00
|
|
|
virtual bool IsValid() const final;
|
2016-05-12 21:11:21 +02:00
|
|
|
|
2016-05-18 15:57:17 +02:00
|
|
|
private slots:
|
|
|
|
void PointChanged();
|
|
|
|
|
2016-05-12 21:11:21 +02:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(DialogRotation)
|
|
|
|
Ui::DialogRotation *ui;
|
|
|
|
|
|
|
|
/** @brief timerAngle timer of check formula of angle */
|
|
|
|
QTimer *timerAngle;
|
|
|
|
|
|
|
|
/** @brief angle formula of angle */
|
|
|
|
QString formulaAngle;
|
|
|
|
|
|
|
|
/** @brief formulaBaseHeightAngle base height defined by dialogui */
|
|
|
|
int formulaBaseHeightAngle;
|
|
|
|
|
2020-11-07 14:02:30 +01:00
|
|
|
QVector<SourceItem> sourceObjects{};
|
2016-05-12 21:11:21 +02:00
|
|
|
|
|
|
|
bool stage1;
|
|
|
|
|
2016-05-24 12:29:13 +02:00
|
|
|
QString m_suffix;
|
|
|
|
|
2017-03-29 12:09:49 +02:00
|
|
|
bool m_firstRelease;
|
|
|
|
|
2019-02-11 12:25:27 +01:00
|
|
|
/** @brief flagAngle true if value of angle is correct */
|
|
|
|
bool flagAngle;
|
|
|
|
bool flagName;
|
2020-03-18 13:45:47 +01:00
|
|
|
bool flagGroupName;
|
2019-02-11 12:25:27 +01:00
|
|
|
bool flagError;
|
2020-11-07 14:02:30 +01:00
|
|
|
bool flagAlias{true};
|
2020-03-24 16:31:32 +01:00
|
|
|
|
|
|
|
QStringList m_groupTags{};
|
2016-05-12 21:11:21 +02:00
|
|
|
|
2020-11-07 14:02:30 +01:00
|
|
|
void FillSourceList();
|
|
|
|
|
|
|
|
void ValidateSourceAliases();
|
|
|
|
void SetAliasValid(quint32 id, bool valid);
|
|
|
|
};
|
2019-02-11 12:25:27 +01:00
|
|
|
|
2016-05-12 21:11:21 +02:00
|
|
|
#endif // DIALOGROTATION_H
|