Add ability to set user defined toggle view action (#562)
Co-authored-by: Harbinder Saggu <harbinder.saggu@safe.com>
This commit is contained in:
@@ -364,6 +364,20 @@ CDockWidget::~CDockWidget()
|
||||
delete d;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void CDockWidget::setToggleViewAction(QAction* action)
|
||||
{
|
||||
if (!action)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
d->ToggleViewAction->setParent(nullptr);
|
||||
delete d->ToggleViewAction;
|
||||
d->ToggleViewAction = action;
|
||||
d->ToggleViewAction->setParent(this);
|
||||
connect(d->ToggleViewAction, &QAction::triggered, this, &CDockWidget::toggleView);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void CDockWidget::setToggleViewActionChecked(bool Checked)
|
||||
|
||||
Reference in New Issue
Block a user