Changeset 43990 in vbox
- Timestamp:
- Nov 28, 2012 4:49:12 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp
r43983 r43990 91 91 { 92 92 /* Setup details-model connections: */ 93 connect(m_pDetailsModel, SIGNAL(sigRoot ItemResized(const QSizeF&, int)),94 m_pDetailsView, SLOT(sltHandleRootItem Resized(const QSizeF&, int)));93 connect(m_pDetailsModel, SIGNAL(sigRootMinimumSizeHintChanged(const QSizeF&)), 94 m_pDetailsView, SLOT(sltHandleRootItemMinimumSizeHintChanged(const QSizeF&))); 95 95 connect(m_pDetailsModel, SIGNAL(sigLinkClicked(const QString&, const QString&, const QString&)), 96 96 this, SIGNAL(sigLinkClicked(const QString&, const QString&, const QString&))); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
r43983 r43990 87 87 m_pRoot->updateLayout(); 88 88 89 /* Notify listener about root-item relayouted: */90 emit sigRoot ItemResized(m_pRoot->geometry().size(), m_pRoot->minimumSizeHint().toSize().width());89 /* Notify view about root minimum-size-hint changed: */ 90 emit sigRootMinimumSizeHintChanged(m_pRoot->minimumSizeHint()); 91 91 } 92 92 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
r43983 r43990 50 50 51 51 /* Notifier: Root-item stuff: */ 52 void sigRoot ItemResized(const QSizeF &size, int iMinimumWidth);52 void sigRootMinimumSizeHintChanged(const QSizeF &minimumSizeHint); 53 53 54 54 /* Notifier: Link processing stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp
r43936 r43990 35 35 setFrameShape(QFrame::NoFrame); 36 36 setFrameShadow(QFrame::Plain); 37 setAlignment(Qt::AlignLeft | Qt::AlignTop); 37 38 38 39 /* Setup scroll-bars policy: */ … … 43 44 } 44 45 45 void UIGDetailsView::sltHandleRootItem Resized(const QSizeF &size, int iMinimumWidth)46 void UIGDetailsView::sltHandleRootItemMinimumSizeHintChanged(const QSizeF &minimumSizeHint) 46 47 { 47 48 /* Update scene-rect: */ 48 updateSceneRect( size);49 updateSceneRect(minimumSizeHint); 49 50 50 /* Set minimum width: */ 51 setMinimumWidth(2 * frameWidth() + iMinimumWidth + 51 /* Set minimum-width: */ 52 setMinimumWidth(2 * frameWidth() + 53 minimumSizeHint.width() + 52 54 verticalScrollBar()->sizeHint().width()); 53 55 } … … 69 71 } 70 72 71 void UIGDetailsView::updateSceneRect(const QSizeF & sizeHint /* = QSizeF() */)73 void UIGDetailsView::updateSceneRect(const QSizeF &minimumSizeHint /* = QSizeF() */) 72 74 { 73 75 QPointF topLeft = QPointF(0, 0); 74 76 QSizeF rectSize = viewport()->size(); 75 if (! sizeHint.isNull())76 rectSize = rectSize.expandedTo(sizeHint);77 if (!minimumSizeHint.isNull()) 78 rectSize.setHeight(minimumSizeHint.height()); 77 79 setSceneRect(QRectF(topLeft, rectSize)); 78 80 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h
r43982 r43990 41 41 42 42 /* Handler: Root-item stuff: */ 43 void sltHandleRootItem Resized(const QSizeF &size, int iMinimumWidth);43 void sltHandleRootItemMinimumSizeHintChanged(const QSizeF &minimumSizeHint); 44 44 45 45 private: … … 52 52 53 53 /* Helper: Update stuff: */ 54 void updateSceneRect(const QSizeF & sizeHint = QSizeF());54 void updateSceneRect(const QSizeF &minimumSizeHint = QSizeF()); 55 55 }; 56 56
Note:
See TracChangeset
for help on using the changeset viewer.