Merge with develop
--HG-- branch : feature
This commit is contained in:
commit
8491248f02
|
@ -49,10 +49,6 @@ public:
|
||||||
DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = nullptr);
|
DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = nullptr);
|
||||||
~DialogIncrements();
|
~DialogIncrements();
|
||||||
public slots:
|
public slots:
|
||||||
/** TODO ISSUE 79 : create real function
|
|
||||||
* @brief DialogApply apply data and emit signal about applied dialog.
|
|
||||||
*/
|
|
||||||
virtual void DialogApply(){}
|
|
||||||
void clickedToolButtonAdd();
|
void clickedToolButtonAdd();
|
||||||
void clickedToolButtonRemove();
|
void clickedToolButtonRemove();
|
||||||
void IncrementChanged ( qint32 row, qint32 column );
|
void IncrementChanged ( qint32 row, qint32 column );
|
||||||
|
|
|
@ -145,6 +145,8 @@ void DialogIndividualMeasurements::CheckState()
|
||||||
bool flagPath = false;
|
bool flagPath = false;
|
||||||
if (ui->radioButtonExistM->isChecked())
|
if (ui->radioButtonExistM->isChecked())
|
||||||
{
|
{
|
||||||
|
ui->labelGivenName->setEnabled(true);
|
||||||
|
ui->labelFamilyName->setEnabled(true);
|
||||||
ui->lineEditPathExistM->setEnabled(true);
|
ui->lineEditPathExistM->setEnabled(true);
|
||||||
ui->toolButtonOpenExist->setEnabled(true);
|
ui->toolButtonOpenExist->setEnabled(true);
|
||||||
|
|
||||||
|
@ -163,6 +165,8 @@ void DialogIndividualMeasurements::CheckState()
|
||||||
ui->toolButtonOpenNew->setEnabled(true);
|
ui->toolButtonOpenNew->setEnabled(true);
|
||||||
ui->comboBoxUnits->setEnabled(true);
|
ui->comboBoxUnits->setEnabled(true);
|
||||||
|
|
||||||
|
ui->labelGivenName->setEnabled(false);
|
||||||
|
ui->labelFamilyName->setEnabled(false);
|
||||||
ui->toolButtonOpenExist->setEnabled(false);
|
ui->toolButtonOpenExist->setEnabled(false);
|
||||||
ui->lineEditPathExistM->setEnabled(false);
|
ui->lineEditPathExistM->setEnabled(false);
|
||||||
|
|
||||||
|
@ -197,6 +201,10 @@ void DialogIndividualMeasurements::OpenTable()
|
||||||
e.CriticalMessageBox(tr("File error."), this);
|
e.CriticalMessageBox(tr("File error."), this);
|
||||||
fileName.clear();
|
fileName.clear();
|
||||||
}
|
}
|
||||||
|
VIndividualMeasurements m(data);
|
||||||
|
m.setContent(fileName);
|
||||||
|
ui->labelGivenName->setText(m.GivenName());
|
||||||
|
ui->labelFamilyName->setText(m.FamilyName());
|
||||||
ui->lineEditPathExistM->setText(fileName);
|
ui->lineEditPathExistM->setText(fileName);
|
||||||
ui->lineEditPathExistM->setToolTip(fileName);
|
ui->lineEditPathExistM->setToolTip(fileName);
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
|
@ -61,11 +61,13 @@ private:
|
||||||
void InitUnits();
|
void InitUnits();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
inline QString DialogIndividualMeasurements::name() const
|
inline QString DialogIndividualMeasurements::name() const
|
||||||
{
|
{
|
||||||
return _name;
|
return _name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
inline QString DialogIndividualMeasurements::tablePath() const
|
inline QString DialogIndividualMeasurements::tablePath() const
|
||||||
{
|
{
|
||||||
return _tablePath;
|
return _tablePath;
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>397</width>
|
<width>385</width>
|
||||||
<height>280</height>
|
<height>295</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -73,6 +73,93 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>90</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Given name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelGivenName">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
|
<property name="sizeConstraint">
|
||||||
|
<enum>QLayout::SetMinimumSize</enum>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>90</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Family name:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="labelFamilyName">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -39,22 +39,7 @@ const QString VToolPoint::TagName = QStringLiteral("point");
|
||||||
VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent):VDrawTool(doc, data, id),
|
VToolPoint::VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent):VDrawTool(doc, data, id),
|
||||||
QGraphicsEllipseItem(parent), radius(DefRadius), namePoint(0), lineName(0)
|
QGraphicsEllipseItem(parent), radius(DefRadius), namePoint(0), lineName(0)
|
||||||
{
|
{
|
||||||
switch (qApp->patternUnit())
|
radius = (DefRadius/*mm*/ / 25.4) * VApplication::PrintDPI;
|
||||||
{
|
|
||||||
case Valentina::Mm:
|
|
||||||
radius = qApp->toPixel(DefRadius);
|
|
||||||
break;
|
|
||||||
case Valentina::Cm:
|
|
||||||
radius = qApp->toPixel(DefRadius/10.0);
|
|
||||||
break;
|
|
||||||
case Valentina::Inch:
|
|
||||||
radius = qApp->toPixel(DefRadius/25.4);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
radius = qApp->toPixel(DefRadius);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
namePoint = new VGraphicsSimpleTextItem(this);
|
namePoint = new VGraphicsSimpleTextItem(this);
|
||||||
connect(namePoint, &VGraphicsSimpleTextItem::ShowContextMenu, this, &VToolPoint::ShowContextMenu);
|
connect(namePoint, &VGraphicsSimpleTextItem::ShowContextMenu, this, &VToolPoint::ShowContextMenu);
|
||||||
namePoint->setBrush(Qt::black);
|
namePoint->setBrush(Qt::black);
|
||||||
|
|
|
@ -39,9 +39,10 @@ const QString VNodePoint::ToolType = QStringLiteral("modeling");
|
||||||
VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
|
VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
|
||||||
const Valentina::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
|
const Valentina::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
|
||||||
QGraphicsItem *parent)
|
QGraphicsItem *parent)
|
||||||
:VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(qApp->toPixel(1.5)),
|
:VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(0),
|
||||||
namePoint(nullptr), lineName(nullptr)
|
namePoint(nullptr), lineName(nullptr)
|
||||||
{
|
{
|
||||||
|
radius = (1.5/*mm*/ / 25.4) * VApplication::PrintDPI;
|
||||||
namePoint = new VGraphicsSimpleTextItem(this);
|
namePoint = new VGraphicsSimpleTextItem(this);
|
||||||
lineName = new QGraphicsLineItem(this);
|
lineName = new QGraphicsLineItem(this);
|
||||||
connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this,
|
connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this,
|
||||||
|
|
|
@ -168,7 +168,7 @@ QString VApplication::pathToTables() const
|
||||||
return QApplication::applicationDirPath() + QStringLiteral("/tables/standard");
|
return QApplication::applicationDirPath() + QStringLiteral("/tables/standard");
|
||||||
#else
|
#else
|
||||||
QDir dir(QApplication::applicationDirPath() + QStringLiteral("/tables/standard"));
|
QDir dir(QApplication::applicationDirPath() + QStringLiteral("/tables/standard"));
|
||||||
if (dir.exist())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ QString VApplication::translationsPath() const
|
||||||
return QApplication::applicationDirPath() + QStringLiteral("/translations");
|
return QApplication::applicationDirPath() + QStringLiteral("/translations");
|
||||||
#else
|
#else
|
||||||
QDir dir(QApplication::applicationDirPath() + QStringLiteral("/translations"));
|
QDir dir(QApplication::applicationDirPath() + QStringLiteral("/translations"));
|
||||||
if (dir.exist())
|
if (dir.exists())
|
||||||
{
|
{
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user