MCPcopy Create free account
hub / github.com/KDE/labplot / insertTab

Method insertTab

src/3rdparty/Qt-Advanced-Docking-System/src/DockAreaTabBar.cpp:197–217  ·  view source on GitHub ↗

===========================================================================

Source from the content-addressed store, hash-verified

195
196//===========================================================================
197void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab)
198{
199 d->TabsLayout->insertWidget(Index, Tab);
200 connect(Tab, SIGNAL(clicked()), this, SLOT(onTabClicked()));
201 connect(Tab, SIGNAL(closeRequested()), this, SLOT(onTabCloseRequested()));
202 connect(Tab, SIGNAL(closeOtherTabsRequested()), this, SLOT(onCloseOtherTabsRequested()));
203 connect(Tab, SIGNAL(moved(QPoint)), this, SLOT(onTabWidgetMoved(QPoint)));
204 connect(Tab, SIGNAL(elidedChanged(bool)), this, SIGNAL(elidedChanged(bool)));
205 Tab->installEventFilter(this);
206 Q_EMIT tabInserted(Index);
207 if (Index <= d->CurrentIndex)
208 {
209 setCurrentIndex(d->CurrentIndex + 1);
210 }
211 else if (d->CurrentIndex == -1)
212 {
213 setCurrentIndex(Index);
214 }
215
216 updateGeometry();
217}
218
219
220//===========================================================================

Callers 3

insertDockWidgetMethod · 0.45
handleAspectAddedMethod · 0.45
handleAspectAddedMethod · 0.45

Calls 1

insertWidgetMethod · 0.45

Tested by

no test coverage detected