2014-01-08 15:05:32 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file dialogcutarc.h
|
2014-04-30 07:38:52 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2014-01-08 15:05:32 +01:00
|
|
|
** @date 7 1, 2014
|
|
|
|
**
|
|
|
|
** @brief
|
|
|
|
** @copyright
|
|
|
|
** This source code is part of the Valentine project, a pattern making
|
|
|
|
** program, whose allow create and modeling patterns of clothing.
|
|
|
|
** Copyright (C) 2013 Valentina project
|
|
|
|
** <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 DIALOGCUTARC_H
|
|
|
|
#define DIALOGCUTARC_H
|
|
|
|
|
|
|
|
#include "dialogtool.h"
|
|
|
|
|
2014-01-27 17:01:24 +01:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class DialogCutArc;
|
2014-01-08 15:05:32 +01:00
|
|
|
}
|
|
|
|
|
2014-08-15 16:37:22 +02:00
|
|
|
class VisToolCutArc;
|
|
|
|
|
2014-01-20 19:52:54 +01:00
|
|
|
/**
|
|
|
|
* @brief The DialogCutArc class dialog for ToolCutArc.
|
|
|
|
*/
|
2014-01-08 15:05:32 +01:00
|
|
|
class DialogCutArc : public DialogTool
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-05-30 10:32:40 +02:00
|
|
|
|
2014-07-29 14:19:11 +02:00
|
|
|
DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
|
2014-01-08 15:05:32 +01:00
|
|
|
~DialogCutArc();
|
2014-06-02 16:28:02 +02:00
|
|
|
|
2014-05-30 10:32:40 +02:00
|
|
|
QString getPointName() const;
|
2014-01-08 15:05:32 +01:00
|
|
|
void setPointName(const QString &value);
|
2014-06-02 16:28:02 +02:00
|
|
|
|
2014-05-30 10:32:40 +02:00
|
|
|
QString getFormula() const;
|
2014-01-08 15:05:32 +01:00
|
|
|
void setFormula(const QString &value);
|
2014-06-02 16:28:02 +02:00
|
|
|
|
2014-05-30 10:32:40 +02:00
|
|
|
quint32 getArcId() const;
|
2014-07-29 15:08:38 +02:00
|
|
|
void setArcId(const quint32 &value);
|
2014-01-08 15:05:32 +01:00
|
|
|
public slots:
|
2014-07-15 16:42:41 +02:00
|
|
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
2014-06-09 18:37:11 +02:00
|
|
|
/**
|
|
|
|
* @brief DeployFormulaTextEdit grow or shrink formula input
|
|
|
|
*/
|
2014-08-13 12:20:30 +02:00
|
|
|
void DeployFormulaTextEdit();
|
2014-06-09 18:37:11 +02:00
|
|
|
/**
|
|
|
|
* @brief FormulaTextChanged when formula text changes for validation and calc
|
|
|
|
*/
|
2014-08-13 12:20:30 +02:00
|
|
|
void FormulaTextChanged();
|
|
|
|
protected:
|
2014-08-15 16:37:22 +02:00
|
|
|
virtual void ShowVisualization();
|
2014-08-13 12:20:30 +02:00
|
|
|
/**
|
|
|
|
* @brief SaveData Put dialog data in local variables
|
|
|
|
*/
|
|
|
|
virtual void SaveData();
|
2014-01-08 15:05:32 +01:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(DialogCutArc)
|
2014-06-02 16:28:02 +02:00
|
|
|
/** @brief ui keeps information about user interface */
|
2014-01-08 15:05:32 +01:00
|
|
|
Ui::DialogCutArc *ui;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief formula string with formula */
|
2014-01-08 15:05:32 +01:00
|
|
|
QString formula;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief arcId keep id of arc */
|
2014-08-15 16:37:22 +02:00
|
|
|
quint32 arcId;
|
2014-06-10 11:05:21 +02:00
|
|
|
|
|
|
|
/** @brief formulaBaseHeight base height defined by dialogui */
|
2014-08-15 16:37:22 +02:00
|
|
|
int formulaBaseHeight;
|
2014-08-13 12:20:30 +02:00
|
|
|
|
2014-08-15 16:37:22 +02:00
|
|
|
VisToolCutArc *path;
|
2014-01-08 15:05:32 +01:00
|
|
|
};
|
|
|
|
|
2014-05-30 10:32:40 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getPointName return name point on arc
|
|
|
|
* @return name
|
|
|
|
*/
|
|
|
|
inline QString DialogCutArc::getPointName() const
|
|
|
|
{
|
|
|
|
return pointName;
|
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getArcId return id of arc
|
|
|
|
* @return id
|
|
|
|
*/
|
|
|
|
inline quint32 DialogCutArc::getArcId() const
|
|
|
|
{
|
|
|
|
return arcId;
|
|
|
|
}
|
|
|
|
|
2014-01-08 15:05:32 +01:00
|
|
|
#endif // DIALOGCUTARC_H
|