Merged develop into feature
--HG-- branch : feature
This commit is contained in:
commit
608b566006
|
@ -50,7 +50,8 @@ DialogAboutTape::DialogAboutTape(QWidget *parent)
|
||||||
//mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
//mApp->Settings()->GetOsSeparator() ? setLocale(QLocale::system()) : setLocale(QLocale(QLocale::C));
|
||||||
|
|
||||||
RetranslateUi();
|
RetranslateUi();
|
||||||
connect(ui->pushButton_Web_Site, &QPushButton::clicked, [this](){
|
connect(ui->pushButton_Web_Site, &QPushButton::clicked, [this]()
|
||||||
|
{
|
||||||
if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
|
if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
|
||||||
{
|
{
|
||||||
qWarning() << tr("Cannot open your default browser");
|
qWarning() << tr("Cannot open your default browser");
|
||||||
|
|
|
@ -61,7 +61,8 @@ DialogAboutApp::DialogAboutApp(QWidget *parent) :
|
||||||
|
|
||||||
|
|
||||||
ui->pushButton_Web_Site->setText(tr("Web site : %1").arg(VER_COMPANYDOMAIN_STR));
|
ui->pushButton_Web_Site->setText(tr("Web site : %1").arg(VER_COMPANYDOMAIN_STR));
|
||||||
connect(ui->pushButton_Web_Site, &QPushButton::clicked, [this](){
|
connect(ui->pushButton_Web_Site, &QPushButton::clicked, [this]()
|
||||||
|
{
|
||||||
if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
|
if ( QDesktopServices::openUrl(QUrl(VER_COMPANYDOMAIN_STR)) == false)
|
||||||
{
|
{
|
||||||
qWarning() << tr("Cannot open your default browser");
|
qWarning() << tr("Cannot open your default browser");
|
||||||
|
|
|
@ -140,7 +140,8 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternChangesWereSaved);
|
connect(doc, &VPattern::patternChanged, this, &MainWindow::PatternChangesWereSaved);
|
||||||
connect(doc, &VPattern::UndoCommand, this, &MainWindow::FullParseFile);
|
connect(doc, &VPattern::UndoCommand, this, &MainWindow::FullParseFile);
|
||||||
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())
|
if(not ui->actionDraw->isChecked())
|
||||||
|
|
|
@ -1157,6 +1157,18 @@ void VAbstractPattern::haveLiteChange()
|
||||||
emit patternChanged(false);
|
emit patternChanged(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VAbstractPattern::NeedFullParsing()
|
||||||
|
{
|
||||||
|
emit UndoCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void VAbstractPattern::ClearScene()
|
||||||
|
{
|
||||||
|
emit ClearMainWindow();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VAbstractPattern::ToolExists(const quint32 &id) const
|
void VAbstractPattern::ToolExists(const quint32 &id) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -281,6 +281,8 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
virtual void LiteParseTree(const Document &parse)=0;
|
virtual void LiteParseTree(const Document &parse)=0;
|
||||||
void haveLiteChange();
|
void haveLiteChange();
|
||||||
|
void NeedFullParsing();
|
||||||
|
void ClearScene();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** @brief nameActivDraw name current pattern peace. */
|
/** @brief nameActivDraw name current pattern peace. */
|
||||||
|
|
|
@ -143,8 +143,8 @@ void VToolBasePoint::AddToFile()
|
||||||
patternPiece.appendChild(doc->createElement(VAbstractPattern::TagDetails));
|
patternPiece.appendChild(doc->createElement(VAbstractPattern::TagDetails));
|
||||||
|
|
||||||
AddPatternPiece *addPP = new AddPatternPiece(patternPiece, doc, namePP);
|
AddPatternPiece *addPP = new AddPatternPiece(patternPiece, doc, namePP);
|
||||||
connect(addPP, &AddPatternPiece::ClearScene, [this](){emit doc->ClearMainWindow();});
|
connect(addPP, &AddPatternPiece::ClearScene, doc, &VAbstractPattern::ClearScene);
|
||||||
connect(addPP, &AddPatternPiece::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(addPP, &AddPatternPiece::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
qApp->getUndoStack()->push(addPP);
|
qApp->getUndoStack()->push(addPP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ void VToolBasePoint::DeleteTool(bool ask)
|
||||||
|
|
||||||
qCDebug(vTool, "Begin deleting.");
|
qCDebug(vTool, "Begin deleting.");
|
||||||
DeletePatternPiece *deletePP = new DeletePatternPiece(doc, nameActivDraw);
|
DeletePatternPiece *deletePP = new DeletePatternPiece(doc, nameActivDraw);
|
||||||
connect(deletePP, &DeletePatternPiece::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(deletePP, &DeletePatternPiece::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
qApp->getUndoStack()->push(deletePP);
|
qApp->getUndoStack()->push(deletePP);
|
||||||
|
|
||||||
// Throw exception, this will help prevent case when we forget to immediately quit function.
|
// Throw exception, this will help prevent case when we forget to immediately quit function.
|
||||||
|
|
|
@ -372,7 +372,7 @@ qreal VDrawTool::CheckFormula(const quint32 &toolId, QString &formula, VContaine
|
||||||
void VDrawTool::AddToCalculation(const QDomElement &domElement)
|
void VDrawTool::AddToCalculation(const QDomElement &domElement)
|
||||||
{
|
{
|
||||||
AddToCalc *addToCal = new AddToCalc(domElement, doc);
|
AddToCalc *addToCal = new AddToCalc(domElement, doc);
|
||||||
connect(addToCal, &AddToCalc::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(addToCal, &AddToCalc::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
qApp->getUndoStack()->push(addToCal);
|
qApp->getUndoStack()->push(addToCal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ void VAbstractTool::DeleteTool(bool ask)
|
||||||
|
|
||||||
qCDebug(vTool, "Begin deleting.");
|
qCDebug(vTool, "Begin deleting.");
|
||||||
DelTool *delTool = new DelTool(doc, id);
|
DelTool *delTool = new DelTool(doc, id);
|
||||||
connect(delTool, &DelTool::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(delTool, &DelTool::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
qApp->getUndoStack()->push(delTool);
|
qApp->getUndoStack()->push(delTool);
|
||||||
|
|
||||||
// Throw exception, this will help prevent case when we forget to immediately quit function.
|
// Throw exception, this will help prevent case when we forget to immediately quit function.
|
||||||
|
|
|
@ -387,7 +387,7 @@ void VToolDetail::AddToFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
AddDet *addDet = new AddDet(domElement, doc, detail, drawName);
|
AddDet *addDet = new AddDet(domElement, doc, detail, drawName);
|
||||||
connect(addDet, &AddDet::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(addDet, &AddDet::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
qApp->getUndoStack()->push(addDet);
|
qApp->getUndoStack()->push(addDet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1084,7 +1084,7 @@ void VToolDetail::DeleteTool(bool ask)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* If UnionDetails tool delete detail no need emit FullParsing.*/
|
/* If UnionDetails tool delete detail no need emit FullParsing.*/
|
||||||
connect(delDet, &DeleteDetail::NeedFullParsing, [this](){emit doc->UndoCommand();});
|
connect(delDet, &DeleteDetail::NeedFullParsing, doc, &VAbstractPattern::NeedFullParsing);
|
||||||
}
|
}
|
||||||
qApp->getUndoStack()->push(delDet);
|
qApp->getUndoStack()->push(delDet);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user