valentina/src/app/tape/dialogs/dialogsetupmultisize.h

100 lines
3.7 KiB
C
Raw Normal View History

2020-09-28 15:38:32 +02:00
/************************************************************************
**
** @file dialogsetupmultisize.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 26 9, 2020
**
** @brief
** @copyright
** This source code is part of the Valentina project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2020 Valentina project
** <https://gitlab.com/smart-pattern/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 DIALOGSETUPMULTISIZE_H
#define DIALOGSETUPMULTISIZE_H
#include <QDialog>
#include "../vformat/vdimensions.h"
#include "../vmisc/def.h"
class QSpinBox;
namespace Ui
{
class DialogSetupMultisize;
}
class DialogSetupMultisize : public QDialog
{
Q_OBJECT
public:
explicit DialogSetupMultisize(Unit unit, QWidget *parent = nullptr);
~DialogSetupMultisize();
2020-10-01 12:32:02 +02:00
QVector<MeasurementDimension_p> Dimensions() const;
2020-09-28 15:38:32 +02:00
protected:
virtual void changeEvent(QEvent* event) override;
virtual void showEvent(QShowEvent *event) override;
private slots:
void ShowFullCircumference();
void YDimensionCircumferenceChanged();
private:
Q_DISABLE_COPY(DialogSetupMultisize)
Ui::DialogSetupMultisize *ui;
bool m_isInitialized{false};
QSharedPointer<VXMeasurementDimension> m_xDimension;
QSharedPointer<VYMeasurementDimension> m_yDimension;
QSharedPointer<VWMeasurementDimension> m_wDimension;
QSharedPointer<VZMeasurementDimension> m_zDimension;
void CheckState();
void InitDimensionMinMax(QSpinBox *spinboxMinValue, QSpinBox *spinboxMaxValue,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
void InitDimensionStep(QComboBox *comboBoxStep,const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
void InitDimension(QSpinBox *spinboxMinValue, QSpinBox *spinboxMaxValue, QComboBox *comboBoxStep,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
void InitXDimension();
void InitYDimension();
void InitWDimension();
void InitZDimension();
void DimensionMinValueChanged(int value, QSpinBox *spinboxMaxValue, QComboBox *comboBoxStep,
QComboBox *comboBoxBase,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
void DimensionMaxValueChanged(int value, QSpinBox *spinboxMinValue, QComboBox *comboBoxStep,
QComboBox *comboBoxBase,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
void DimensionStepChanged(int index, QComboBox *comboBoxStep, QComboBox *comboBoxBase,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
void DimensionBaseChanged(int index, QComboBox *comboBoxBase,
2020-10-01 12:32:02 +02:00
const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
2020-10-01 12:32:02 +02:00
void UpdateSteps(QComboBox *comboBoxStep, const MeasurementDimension_p &dimension);
void UpdateBase(QComboBox *comboBoxBase, const MeasurementDimension_p &dimension);
2020-09-28 15:38:32 +02:00
};
#endif // DIALOGSETUPMULTISIZE_H