Used Lambda expressions for slots in TMainWindow and DialogIncrements.

--HG--
branch : develop
This commit is contained in:
Valentina Zhuravska 2016-06-11 19:50:20 +03:00
parent 43cba1b10f
commit 45f9737fba
4 changed files with 7 additions and 49 deletions

View File

@ -459,24 +459,6 @@ void TMainWindow::CreateFromExisting()
}
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::Find(const QString &term)
{
search->Find(term);
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::FindPrevious()
{
search->FindPrevious();
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::FindNext()
{
search->FindNext();
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::closeEvent(QCloseEvent *event)
{
@ -2018,9 +2000,9 @@ void TMainWindow::InitWindow()
connect(ui->comboBoxPMSystem, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
&TMainWindow::SavePMSystem);
connect(ui->lineEditFind, &QLineEdit::textEdited, this, &TMainWindow::Find);
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, this, &TMainWindow::FindPrevious);
connect(ui->toolButtonFindNext, &QToolButton::clicked, this, &TMainWindow::FindNext);
connect(ui->lineEditFind, &QLineEdit::textEdited, [=] (const QString &term){search->Find(term);});
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [=] (){search->FindPrevious();});
connect(ui->toolButtonFindNext, &QToolButton::clicked, [=] (){search->FindNext();});
ui->plainTextEditNotes->setPlainText(m->Notes());
connect(ui->plainTextEditNotes, &QPlainTextEdit::textChanged, this, &TMainWindow::SaveNotes);

View File

@ -35,7 +35,7 @@
#include "../vmisc/def.h"
#include "../vmisc/vlockguard.h"
#include "../vformat/vmeasurements.h"
#include "vtablesearch.h"
#include "../vmisc/vtablesearch.h"
namespace Ui
{
@ -129,9 +129,6 @@ private slots:
void NewWindow();
void Preferences();
void PatternUnitChanged(int index);
void Find(const QString &term);
void FindPrevious();
void FindNext();
private:
Q_DISABLE_COPY(TMainWindow)

View File

@ -106,9 +106,9 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
connect(ui->lineEditName, &QLineEdit::editingFinished, this, &DialogIncrements::SaveIncrName);
connect(ui->plainTextEditDescription, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrDescription);
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogIncrements::SaveIncrFormula);
connect(ui->lineEditFind, &QLineEdit::textEdited, this, &DialogIncrements::Find);
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, this, &DialogIncrements::FindPrevious);
connect(ui->toolButtonFindNext, &QToolButton::clicked, this, &DialogIncrements::FindNext);
connect(ui->lineEditFind, &QLineEdit::textEdited, [=](const QString &term){search->Find(term);});
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, [=](){search->FindPrevious();});
connect(ui->toolButtonFindNext, &QToolButton::clicked, [=](){search->FindNext();});
if (ui->tableWidgetIncrement->rowCount() > 0)
{
@ -784,24 +784,6 @@ void DialogIncrements::ShowIncrementDetails()
}
}
//---------------------------------------------------------------------------------------------------------------------
void DialogIncrements::Find(const QString &term)
{
search->Find(term);
}
//---------------------------------------------------------------------------------------------------------------------
void DialogIncrements::FindPrevious()
{
search->FindPrevious();
}
//---------------------------------------------------------------------------------------------------------------------
void DialogIncrements::FindNext()
{
search->FindNext();
}
//---------------------------------------------------------------------------------------------------------------------
DialogIncrements::~DialogIncrements()
{

View File

@ -73,9 +73,6 @@ private slots:
void DeployFormula();
void Fx();
void FullUpdateFromFile();
void Find(const QString &term);
void FindPrevious();
void FindNext();
private:
Q_DISABLE_COPY(DialogIncrements)