Refactoring. Use C++11 lambdas.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-06-25 17:16:20 +03:00
parent 31ed3d526c
commit 39c84aa2c2
2 changed files with 6 additions and 18 deletions

View File

@ -2973,18 +2973,6 @@ void MainWindow::ChangedHeight(const QString &text)
}
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::DockToolOptionsVisibilityChanged(bool visible)
{
isDockToolOptionsVisible = visible;
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::DockGropsVisibilityChanged(bool visible)
{
isDockGroupsVisible = visible;
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::SetDefaultHeight()
{
@ -3610,12 +3598,15 @@ void MainWindow::AddDocks()
//Add dock
actionDockWidgetToolOptions = ui->dockWidgetToolOptions->toggleViewAction();
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, actionDockWidgetToolOptions);
connect(ui->dockWidgetToolOptions, &QDockWidget::visibilityChanged, this,
&MainWindow::DockToolOptionsVisibilityChanged);
connect(ui->dockWidgetToolOptions, &QDockWidget::visibilityChanged, [this](bool visible){
isDockToolOptionsVisible = visible;
});
actionDockWidgetGroups = ui->dockWidgetGroups->toggleViewAction();
ui->menuPatternPiece->insertAction(ui->actionPattern_properties, actionDockWidgetGroups);
connect(ui->dockWidgetGroups, &QDockWidget::visibilityChanged, this, &MainWindow::DockGropsVisibilityChanged);
connect(ui->dockWidgetGroups, &QDockWidget::visibilityChanged, [this](bool visible){
isDockGroupsVisible = visible;
});
separatorAct = new QAction(this);
separatorAct->setSeparator(true);

View File

@ -207,9 +207,6 @@ private slots:
void ChangedSize(const QString &text);
void ChangedHeight(const QString & text);
void DockToolOptionsVisibilityChanged(bool visible);
void DockGropsVisibilityChanged(bool visible);
private:
Q_DISABLE_COPY(MainWindow)
/** @brief ui keeps information about user interface */