Some changes for dockwidget tab close button, some refactorings to make insertion of widgets into dock widget easier, added createDefaultToolBar function for creation of toolbar and removed layout flags from CDockWidget

This commit is contained in:
Uwe Kindler
2018-11-08 10:04:29 +01:00
parent 316e5324ad
commit b3a272110a
15 changed files with 187 additions and 93 deletions

View File

@@ -288,6 +288,7 @@ void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab)
{
d->TabsLayout->insertWidget(Index, Tab);
connect(Tab, SIGNAL(clicked()), this, SLOT(onTabClicked()));
connect(Tab, SIGNAL(closeButtonClicked()), this, SLOT(onTabCloseButtonClicked()));
connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&)));
Tab->installEventFilter(this);
emit tabInserted(Index);
@@ -400,6 +401,13 @@ void CDockAreaTabBar::onTabClicked()
}
//===========================================================================
void CDockAreaTabBar::onTabCloseButtonClicked()
{
closeTab(currentIndex());
}
//===========================================================================
CDockWidgetTab* CDockAreaTabBar::tab(int Index) const
{