===========================================================================
| 195 | |
| 196 | //=========================================================================== |
| 197 | void 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 | //=========================================================================== |
no test coverage detected