2013-12-23 18:23:50 +01:00
|
|
|
/************************************************************************
|
|
|
|
**
|
|
|
|
** @file dialoguniondetails.h
|
2014-04-30 07:38:52 +02:00
|
|
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
2013-12-23 18:23:50 +01:00
|
|
|
** @date 23 12, 2013
|
|
|
|
**
|
|
|
|
** @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
|
2013-12-23 18:23:50 +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 DIALOGUNIONDETAILS_H
|
|
|
|
#define DIALOGUNIONDETAILS_H
|
|
|
|
|
2016-08-08 13:44:49 +02:00
|
|
|
#include <qcompilerdetection.h>
|
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
#include "../vmisc/def.h"
|
2013-12-23 18:23:50 +01:00
|
|
|
#include "dialogtool.h"
|
|
|
|
|
2013-12-31 09:44:54 +01:00
|
|
|
namespace Ui
|
|
|
|
{
|
|
|
|
class DialogUnionDetails;
|
2013-12-23 18:23:50 +01:00
|
|
|
}
|
|
|
|
|
2014-01-20 19:52:54 +01:00
|
|
|
/**
|
|
|
|
* @brief The DialogUnionDetails class dialog for ToolUnionDetails.
|
|
|
|
*/
|
2013-12-23 18:23:50 +01:00
|
|
|
class DialogUnionDetails : public DialogTool
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-07-29 14:19:11 +02:00
|
|
|
DialogUnionDetails(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr);
|
2015-07-03 15:36:54 +02:00
|
|
|
virtual ~DialogUnionDetails() Q_DECL_OVERRIDE;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
2014-02-26 09:18:59 +01:00
|
|
|
quint32 getD1() const;
|
|
|
|
quint32 getD2() const;
|
2014-10-05 22:25:07 +02:00
|
|
|
int getIndexD1() const;
|
|
|
|
int getIndexD2() const;
|
2016-06-30 18:48:46 +02:00
|
|
|
|
|
|
|
bool RetainPieces() const;
|
2013-12-23 18:23:50 +01:00
|
|
|
public slots:
|
2016-05-03 18:50:37 +02:00
|
|
|
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
|
2013-12-23 18:23:50 +01:00
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(DialogUnionDetails)
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief ui keeps information about user interface */
|
2013-12-23 18:23:50 +01:00
|
|
|
Ui::DialogUnionDetails *ui;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief indexD1 index edge first detail */
|
2014-10-05 22:25:07 +02:00
|
|
|
int indexD1;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief indexD2 index edge second detail */
|
2014-10-05 22:25:07 +02:00
|
|
|
int indexD2;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief d1 id first detail */
|
2014-02-25 15:40:24 +01:00
|
|
|
quint32 d1;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief d2 id second detail */
|
2014-02-25 15:40:24 +01:00
|
|
|
quint32 d2;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief numberD number of detail, what we already have */
|
2014-01-20 19:52:54 +01:00
|
|
|
qint32 numberD;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief numberP number of points, what we already have */
|
2014-01-20 19:52:54 +01:00
|
|
|
qint32 numberP;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief p1 id first point of detail */
|
2014-02-25 15:40:24 +01:00
|
|
|
quint32 p1;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
|
|
|
/** @brief p2 id second point of detail */
|
2014-02-25 15:40:24 +01:00
|
|
|
quint32 p2;
|
2014-06-02 16:28:02 +02:00
|
|
|
|
2014-02-25 15:40:24 +01:00
|
|
|
bool CheckObject(const quint32 &id, const quint32 &idDetail) const;
|
2015-03-30 16:27:45 +02:00
|
|
|
bool CheckDetail(const quint32 &idDetail) const;
|
|
|
|
|
2014-06-12 09:22:29 +02:00
|
|
|
void ChoosedDetail(const quint32 &id, const SceneObject &type, quint32 &idDetail,
|
2014-10-05 22:25:07 +02:00
|
|
|
int &index);
|
2013-12-23 18:23:50 +01:00
|
|
|
};
|
|
|
|
|
2014-06-02 16:28:02 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getD1 return id first detail
|
|
|
|
* @return id
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline quint32 DialogUnionDetails::getD1() const
|
|
|
|
{
|
|
|
|
return d1;
|
|
|
|
}
|
|
|
|
|
2014-06-02 16:28:02 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getD2 return id second detail
|
|
|
|
* @return id
|
|
|
|
*/
|
2014-02-26 09:18:59 +01:00
|
|
|
inline quint32 DialogUnionDetails::getD2() const
|
|
|
|
{
|
|
|
|
return d2;
|
|
|
|
}
|
|
|
|
|
2014-06-02 16:28:02 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getIndexD1 return index edge first detail
|
|
|
|
* @return index
|
|
|
|
*/
|
2014-10-05 22:25:07 +02:00
|
|
|
inline int DialogUnionDetails::getIndexD1() const
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
|
|
|
return indexD1;
|
|
|
|
}
|
|
|
|
|
2014-06-02 16:28:02 +02:00
|
|
|
//---------------------------------------------------------------------------------------------------------------------
|
|
|
|
/**
|
|
|
|
* @brief getIndexD2 return index edge second detail
|
|
|
|
* @return index
|
|
|
|
*/
|
2014-10-05 22:25:07 +02:00
|
|
|
inline int DialogUnionDetails::getIndexD2() const
|
2014-02-26 09:18:59 +01:00
|
|
|
{
|
|
|
|
return indexD2;
|
|
|
|
}
|
|
|
|
|
2013-12-23 18:23:50 +01:00
|
|
|
#endif // DIALOGUNIONDETAILS_H
|