//! Segnal is emitted when user cliks by mouse in header label of object browser
void headerMouseDblClicked(const QModelIndex&);
+ //! An signal emitted on resize of the Object Browser
+ void sizeChanged();
+
+
+protected:
+ //! redefinition of a virtual method
+ void resizeEvent(QResizeEvent* theEvent);
+
+
private slots:
/// Show context menu
/// \param theEvent a context menu event
{
QDockWidget* aObjDock = new QDockWidget(theParent);
aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea |
- Qt::RightDockWidgetArea |
- Qt::BottomDockWidgetArea);
+ Qt::RightDockWidgetArea);
aObjDock->setWindowTitle(tr("Object browser"));
aObjDock->setStyleSheet(
"::title { position: relative; padding-left: 5px; text-align: left center }");
myModule->customizeObjectBrowser(myObjectBrowser);
aObjDock->setWidget(myObjectBrowser);
+ connect(myObjectBrowser, SIGNAL(sizeChanged()), SLOT(onDockSizeChanged()));
+
myContextMenuMgr->connectObjectBrowser();
return aObjDock;
}
myPropertyPanel->setupActions(myActionsMgr);
myPropertyPanel->setAllowedAreas(Qt::LeftDockWidgetArea |
- Qt::RightDockWidgetArea |
- Qt::BottomDockWidgetArea);
+ Qt::RightDockWidgetArea);
aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel);
+
hidePanel(myPropertyPanel); ///<! Invisible by default
myFacesPanel = new XGUI_FacesPanel(aDesktop, myModuleConnector);
aDir.remove(aFile);
}
}
-}
\ No newline at end of file
+}
+
+
+void XGUI_Workshop::onDockSizeChanged()
+{
+ QDockWidget* aDockWgt = dynamic_cast<QDockWidget*>(myObjectBrowser->parentWidget());
+ int aObWidth = aDockWgt->size().width();
+ if (myPropertyPanel->width() != aObWidth) {
+ QList<QDockWidget*> aWgtList;
+ aWgtList << myPropertyPanel << aDockWgt;
+ QList<int> aSizeList;
+ aSizeList << aObWidth << aObWidth;
+ desktop()->resizeDocks(aWgtList, aSizeList, Qt::Horizontal);
+ disconnect(myObjectBrowser, SIGNAL(sizeChanged()), this, SLOT(onDockSizeChanged()));
+ }
+}