Merged
--HG-- branch : feature
This commit is contained in:
commit
180e1ddc90
|
@ -142,9 +142,12 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
connect(doc, &VPattern::SetEnabledGUI, this, &MainWindow::SetEnabledGUI);
|
connect(doc, &VPattern::SetEnabledGUI, this, &MainWindow::SetEnabledGUI);
|
||||||
connect(doc, &VPattern::CheckLayout, [this](){
|
connect(doc, &VPattern::CheckLayout, [this](){
|
||||||
if (pattern->DataDetails()->count() == 0)
|
if (pattern->DataDetails()->count() == 0)
|
||||||
|
{
|
||||||
|
if(not ui->actionDraw->isChecked())
|
||||||
{
|
{
|
||||||
ActionDraw(true);
|
ActionDraw(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
|
connect(doc, &VPattern::SetCurrentPP, this, &MainWindow::GlobalChangePP);
|
||||||
qApp->setCurrentDocument(doc);
|
qApp->setCurrentDocument(doc);
|
||||||
|
@ -688,6 +691,7 @@ void MainWindow::ClosedDialogWithApply(int result)
|
||||||
vtool->FullUpdateFromGuiApply();
|
vtool->FullUpdateFromGuiApply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SCASSERT(dialogTool != nullptr);
|
||||||
QGraphicsItem *tool = dynamic_cast<QGraphicsItem *>(dialogTool->GetAssociatedTool());
|
QGraphicsItem *tool = dynamic_cast<QGraphicsItem *>(dialogTool->GetAssociatedTool());
|
||||||
ui->view->itemClicked(tool);
|
ui->view->itemClicked(tool);
|
||||||
if (dialogTool->GetAssociatedTool() != nullptr)
|
if (dialogTool->GetAssociatedTool() != nullptr)
|
||||||
|
|
|
@ -85,7 +85,7 @@ DialogDetail::DialogDetail(const VContainer *data, const quint32 &toolId, QWidge
|
||||||
connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams);
|
connect(ui.checkBoxSeams, &QCheckBox::clicked, this, &DialogDetail::ClickedSeams);
|
||||||
connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed);
|
connect(ui.checkBoxClosed, &QCheckBox::clicked, this, &DialogDetail::ClickedClosed);
|
||||||
connect(ui.checkBoxReverse, &QCheckBox::clicked, this, &DialogDetail::ClickedReverse);
|
connect(ui.checkBoxReverse, &QCheckBox::clicked, this, &DialogDetail::ClickedReverse);
|
||||||
connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NamePointChanged);
|
connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NameDetailChanged);
|
||||||
|
|
||||||
connect(ui.toolButtonDelete, &QToolButton::clicked, this, &DialogDetail::DeleteItem);
|
connect(ui.toolButtonDelete, &QToolButton::clicked, this, &DialogDetail::DeleteItem);
|
||||||
connect(ui.toolButtonUp, &QToolButton::clicked, this, &DialogDetail::ScrollUp);
|
connect(ui.toolButtonUp, &QToolButton::clicked, this, &DialogDetail::ScrollUp);
|
||||||
|
@ -245,6 +245,27 @@ void DialogDetail::Remove()
|
||||||
SetAddMode();
|
SetAddMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogDetail::NameDetailChanged()
|
||||||
|
{
|
||||||
|
SCASSERT(labelEditNamePoint != nullptr);
|
||||||
|
QLineEdit* edit = qobject_cast<QLineEdit*>(sender());
|
||||||
|
if (edit)
|
||||||
|
{
|
||||||
|
if (edit->text().isEmpty())
|
||||||
|
{
|
||||||
|
flagName = false;
|
||||||
|
ChangeColor(labelEditNamePoint, Qt::red);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flagName = true;
|
||||||
|
ChangeColor(labelEditNamePoint, okColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CheckState();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief NewItem add new object (point, arc, spline or spline path) to list
|
* @brief NewItem add new object (point, arc, spline or spline path) to list
|
||||||
|
|
|
@ -70,6 +70,8 @@ protected slots:
|
||||||
void Cancel();
|
void Cancel();
|
||||||
void Remove();
|
void Remove();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void NameDetailChanged();
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/** @brief ui keeps information about user interface */
|
/** @brief ui keeps information about user interface */
|
||||||
|
|
|
@ -928,9 +928,17 @@ void DialogTool::Build(const Tool &type)
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogTool::SetAssociatedTool(VAbstractTool *tool)
|
void DialogTool::SetAssociatedTool(VAbstractTool *tool)
|
||||||
{
|
{
|
||||||
this->associatedTool=tool;
|
if (tool != nullptr)
|
||||||
|
{
|
||||||
|
associatedTool = tool;
|
||||||
SetToolId(tool->getId());
|
SetToolId(tool->getId());
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
associatedTool = nullptr;
|
||||||
|
SetToolId(NULL_ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
template <typename GObject>
|
template <typename GObject>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user