parent
ee6ffab480
commit
3b4007a40c
|
@ -86,7 +86,7 @@ void DialogHistory::DialogAccepted()
|
|||
QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0);
|
||||
quint32 id = qvariant_cast<quint32>(item->data(Qt::UserRole));
|
||||
emit ShowHistoryTool(id, false);
|
||||
accept();
|
||||
emit DialogClosed(QDialog::Accepted);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1321,7 +1321,7 @@ void DialogIncrements::closeEvent(QCloseEvent *event)
|
|||
ui->plainTextEditDescription->blockSignals(true);
|
||||
|
||||
emit UpdateProperties();
|
||||
accept();
|
||||
emit DialogClosed(QDialog::Accepted);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
|
|
@ -661,7 +661,7 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
|
|||
|
||||
connect(scene, &VMainGraphicsScene::ChoosedObject, dialogTool.data(), &DialogTool::ChosenObject);
|
||||
connect(scene, &VMainGraphicsScene::SelectedObject, dialogTool.data(), &DialogTool::SelectedObject);
|
||||
connect(dialogTool.data(), &DialogTool::finished, this, closeDialogSlot);
|
||||
connect(dialogTool.data(), &DialogTool::DialogClosed, this, closeDialogSlot);
|
||||
connect(dialogTool.data(), &DialogTool::ToolTip, this, &MainWindow::ShowToolTip);
|
||||
emit ui->view->itemClicked(nullptr);
|
||||
}
|
||||
|
@ -4205,7 +4205,7 @@ void MainWindow::CreateActions()
|
|||
dialogHistory = new DialogHistory(pattern, doc, this);
|
||||
dialogHistory->setWindowFlags(Qt::Window);
|
||||
connect(this, &MainWindow::RefreshHistory, dialogHistory.data(), &DialogHistory::UpdateHistory);
|
||||
connect(dialogHistory.data(), &DialogHistory::finished, this, [this]()
|
||||
connect(dialogHistory.data(), &DialogHistory::DialogClosed, this, [this]()
|
||||
{
|
||||
ui->actionHistory->setChecked(false);
|
||||
delete dialogHistory;
|
||||
|
@ -4253,7 +4253,7 @@ void MainWindow::CreateActions()
|
|||
dialogTable = new DialogIncrements(pattern, doc, this);
|
||||
connect(dialogTable.data(), &DialogIncrements::UpdateProperties, toolOptions,
|
||||
&VToolOptionsPropertyBrowser::RefreshOptions);
|
||||
connect(dialogTable.data(), &DialogIncrements::finished, this, [this]()
|
||||
connect(dialogTable.data(), &DialogIncrements::DialogClosed, this, [this]()
|
||||
{
|
||||
ui->actionTable->setChecked(false);
|
||||
delete dialogTable;
|
||||
|
|
|
@ -133,7 +133,15 @@ DialogEditWrongFormula::~DialogEditWrongFormula()
|
|||
void DialogEditWrongFormula::DialogAccepted()
|
||||
{
|
||||
formula = ui->plainTextEditFormula->toPlainText();
|
||||
accept();
|
||||
emit DialogClosed(QDialog::Accepted);
|
||||
emit accepted();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogEditWrongFormula::DialogRejected()
|
||||
{
|
||||
emit DialogClosed(QDialog::Rejected);
|
||||
emit rejected();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -72,6 +72,7 @@ public:
|
|||
void SetPreviewCalculationsMode();
|
||||
public slots:
|
||||
virtual void DialogAccepted() Q_DECL_OVERRIDE;
|
||||
virtual void DialogRejected() Q_DECL_OVERRIDE;
|
||||
virtual void EvalFormula() Q_DECL_OVERRIDE;
|
||||
void ValChanged(int row);
|
||||
void PutHere();
|
||||
|
|
|
@ -183,7 +183,7 @@ DialogTool::~DialogTool()
|
|||
*/
|
||||
void DialogTool::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
reject();
|
||||
DialogRejected();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ void DialogTool::ChangeColor(QWidget *widget, const QColor &color)
|
|||
void DialogTool::DialogAccepted()
|
||||
{
|
||||
SaveData();
|
||||
accept();
|
||||
emit DialogClosed(QDialog::Accepted);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -1191,6 +1191,15 @@ void DialogTool::DialogApply()
|
|||
emit DialogApplied();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief DialogRejected emit signal dialog rejected
|
||||
*/
|
||||
void DialogTool::DialogRejected()
|
||||
{
|
||||
emit DialogClosed(QDialog::Rejected);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief formula check formula
|
||||
|
|
|
@ -97,6 +97,11 @@ public:
|
|||
static void MoveListRowDown(QListWidget *list);
|
||||
static void MoveListRowBottom(QListWidget *list);
|
||||
signals:
|
||||
/**
|
||||
* @brief DialogClosed signal dialog closed
|
||||
* @param result keep result
|
||||
*/
|
||||
void DialogClosed(int result);
|
||||
/**
|
||||
* @brief DialogApplied emit signal dialog apply changes
|
||||
*/
|
||||
|
@ -115,6 +120,7 @@ public slots:
|
|||
* @brief DialogApply save data and emit signal DialogApplied.
|
||||
*/
|
||||
virtual void DialogApply();
|
||||
virtual void DialogRejected();
|
||||
void FormulaChanged();
|
||||
/**
|
||||
* @brief FormulaChangedPlainText check formula (plain text editor editor)
|
||||
|
@ -361,7 +367,7 @@ inline void DialogTool::InitOkCancel(T *ui)
|
|||
|
||||
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||
SCASSERT(bCancel != nullptr)
|
||||
connect(bCancel, &QPushButton::clicked, this, &DialogTool::reject);
|
||||
connect(bCancel, &QPushButton::clicked, this, &DialogTool::DialogRejected);
|
||||
|
||||
qApp->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
|
||||
}
|
||||
|
|
|
@ -713,7 +713,7 @@ void DialogSeamAllowance::ShowCustomSAContextMenu(const QPoint &pos)
|
|||
dialog->EnbleShowMode(true);
|
||||
m_dialog = dialog;
|
||||
m_dialog->setModal(true);
|
||||
connect(m_dialog.data(), &DialogTool::finished, this, &DialogSeamAllowance::PathDialogClosed);
|
||||
connect(m_dialog.data(), &DialogTool::DialogClosed, this, &DialogSeamAllowance::PathDialogClosed);
|
||||
m_dialog->show();
|
||||
}
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ void DialogSeamAllowance::ShowInternalPathsContextMenu(const QPoint &pos)
|
|||
dialog->EnbleShowMode(true);
|
||||
m_dialog = dialog;
|
||||
m_dialog->setModal(true);
|
||||
connect(m_dialog.data(), &DialogTool::finished, this, &DialogSeamAllowance::PathDialogClosed);
|
||||
connect(m_dialog.data(), &DialogTool::DialogClosed, this, &DialogSeamAllowance::PathDialogClosed);
|
||||
m_dialog->show();
|
||||
}
|
||||
}
|
||||
|
@ -846,7 +846,7 @@ void DialogSeamAllowance::ShowPlaceLabelsContextMenu(const QPoint &pos)
|
|||
dialog->EnbleShowMode(true);
|
||||
m_dialog = dialog;
|
||||
m_dialog->setModal(true);
|
||||
connect(m_dialog.data(), &DialogTool::finished, this, &DialogSeamAllowance::PlaceLabelDialogClosed);
|
||||
connect(m_dialog.data(), &DialogTool::DialogClosed, this, &DialogSeamAllowance::PlaceLabelDialogClosed);
|
||||
m_dialog->show();
|
||||
}
|
||||
else if (selectedAction == actionSegment)
|
||||
|
|
|
@ -263,7 +263,7 @@ void VDrawTool::ContextMenu(QGraphicsSceneContextMenuEvent *event, quint32 itemI
|
|||
m_dialog = QSharedPointer<Dialog>(new Dialog(getData(), m_id, qApp->getMainWindow()));
|
||||
m_dialog->setModal(true);
|
||||
|
||||
connect(m_dialog.data(), &DialogTool::finished, this, &VDrawTool::FullUpdateFromGuiOk);
|
||||
connect(m_dialog.data(), &DialogTool::DialogClosed, this, &VDrawTool::FullUpdateFromGuiOk);
|
||||
connect(m_dialog.data(), &DialogTool::DialogApplied, this, &VDrawTool::FullUpdateFromGuiApply);
|
||||
|
||||
this->setDialog();
|
||||
|
|
|
@ -1470,7 +1470,7 @@ void VToolSeamAllowance::ShowOptions()
|
|||
dialog->EnableApply(true);
|
||||
m_dialog = dialog;
|
||||
m_dialog->setModal(true);
|
||||
connect(m_dialog.data(), &DialogTool::finished, this, &VToolSeamAllowance::FullUpdateFromGuiOk);
|
||||
connect(m_dialog.data(), &DialogTool::DialogClosed, this, &VToolSeamAllowance::FullUpdateFromGuiOk);
|
||||
connect(m_dialog.data(), &DialogTool::DialogApplied, this, &VToolSeamAllowance::FullUpdateFromGuiApply);
|
||||
SetDialog();
|
||||
m_dialog->show();
|
||||
|
|
Loading…
Reference in New Issue
Block a user