| 1256 | } |
| 1257 | |
| 1258 | FloatingWidget* |
| 1259 | DockablePanel::floatPanel() |
| 1260 | { |
| 1261 | _imp->_floating = !_imp->_floating; |
| 1262 | { |
| 1263 | QMutexLocker k(&_imp->_isClosedMutex); |
| 1264 | _imp->_isClosed = false; |
| 1265 | } |
| 1266 | if (_imp->_floating) { |
| 1267 | assert(!_imp->_floatingWidget); |
| 1268 | |
| 1269 | QSize curSize = sizeHint(); |
| 1270 | |
| 1271 | |
| 1272 | _imp->_floatingWidget = new FloatingWidget(_imp->_gui, _imp->_gui); |
| 1273 | QObject::connect( _imp->_floatingWidget, SIGNAL(closed()), this, SLOT(closePanel()) ); |
| 1274 | _imp->_container->removeWidget(this); |
| 1275 | _imp->_floatingWidget->setWidget(this); |
| 1276 | _imp->_floatingWidget->resize(curSize); |
| 1277 | _imp->_gui->registerFloatingWindow(_imp->_floatingWidget); |
| 1278 | } else { |
| 1279 | assert(_imp->_floatingWidget); |
| 1280 | _imp->_gui->unregisterFloatingWindow(_imp->_floatingWidget); |
| 1281 | _imp->_floatingWidget->removeEmbeddedWidget(); |
| 1282 | //setParent( _imp->_container->parentWidget() ); |
| 1283 | //_imp->_container->insertWidget(0, this); |
| 1284 | _imp->_gui->addVisibleDockablePanel(this); |
| 1285 | _imp->_floatingWidget->deleteLater(); |
| 1286 | _imp->_floatingWidget = 0; |
| 1287 | } |
| 1288 | Gui* gui = getGui(); |
| 1289 | if (gui) { |
| 1290 | gui->buildTabFocusOrderPropertiesBin(); |
| 1291 | } |
| 1292 | return _imp->_floatingWidget; |
| 1293 | } |
| 1294 | |
| 1295 | void |
| 1296 | DockablePanel::setName(const QString & str) |
no test coverage detected