Changeset 79855 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 18, 2019 9:56:56 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/details
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsView.cpp
r79842 r79855 18 18 /* Qt includes: */ 19 19 #include <QAccessibleWidget> 20 #include <QApplication>21 20 #include <QScrollBar> 22 21 … … 111 110 , m_iMinimumWidthHint(0) 112 111 { 113 /* Install Details-view accessibility interface factory: */ 114 QAccessible::installFactory(UIAccessibilityInterfaceForUIDetailsView::pFactory); 115 116 /* Setup frame: */ 117 setFrameShape(QFrame::NoFrame); 118 setFrameShadow(QFrame::Plain); 119 setAlignment(Qt::AlignLeft | Qt::AlignTop); 120 121 /* Setup scroll-bars policy: */ 122 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 123 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 124 125 /* Update scene-rect: */ 126 updateSceneRect(); 127 128 /* Translate finally: */ 129 retranslateUi(); 112 prepare(); 130 113 } 131 114 132 void UIDetailsView::sltMinimumWidthHintChanged(int i MinimumWidthHint)115 void UIDetailsView::sltMinimumWidthHintChanged(int iHint) 133 116 { 134 117 /* Is there something changed? */ 135 if (m_iMinimumWidthHint == i MinimumWidthHint)118 if (m_iMinimumWidthHint == iHint) 136 119 return; 137 120 138 121 /* Remember new value: */ 139 m_iMinimumWidthHint = i MinimumWidthHint;122 m_iMinimumWidthHint = iHint; 140 123 if (m_iMinimumWidthHint <= 0) 141 124 m_iMinimumWidthHint = 1; 142 125 143 126 /* Set minimum view width according passed width-hint: */ 144 setMinimumWidth(2 * frameWidth() + iMinimumWidthHint + verticalScrollBar()->sizeHint().width());127 setMinimumWidth(2 * frameWidth() + m_iMinimumWidthHint + verticalScrollBar()->sizeHint().width()); 145 128 146 129 /* Update scene-rect: */ … … 167 150 } 168 151 152 void UIDetailsView::prepare() 153 { 154 /* Install Details-view accessibility interface factory: */ 155 QAccessible::installFactory(UIAccessibilityInterfaceForUIDetailsView::pFactory); 156 157 /* Setup frame: */ 158 setFrameShape(QFrame::NoFrame); 159 setFrameShadow(QFrame::Plain); 160 setAlignment(Qt::AlignLeft | Qt::AlignTop); 161 162 /* Setup scroll-bars policy: */ 163 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 164 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 165 166 /* Update scene-rect: */ 167 updateSceneRect(); 168 169 /* Translate finally: */ 170 retranslateUi(); 171 } 172 169 173 void UIDetailsView::updateSceneRect() 170 174 { 171 175 setSceneRect(0, 0, m_iMinimumWidthHint, height()); 172 176 } 173 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsView.h
r79842 r79855 36 36 signals: 37 37 38 /* Notifier: Resize stuff:*/38 /** Notifies listeners about resize. */ 39 39 void sigResized(); 40 40 … … 50 50 public slots: 51 51 52 /* Handlers: Size-hint stuff:*/53 void sltMinimumWidthHintChanged(int i MinimumWidthHint);52 /** Handles minimum width @a iHint change. */ 53 void sltMinimumWidthHintChanged(int iHint); 54 54 55 pr ivate:55 protected: 56 56 57 57 /** Handles translation event. */ 58 58 virtual void retranslateUi() /* override */; 59 59 60 /* Handler: Resize-event stuff:*/61 v oid resizeEvent(QResizeEvent *pEvent);60 /** Handles resize @a pEvent. */ 61 virtual void resizeEvent(QResizeEvent *pEvent) /* override */; 62 62 63 /* Helper: Update stuff: */ 63 private: 64 65 /** Prepares all. */ 66 void prepare(); 67 68 /** Updates scene rectangle. */ 64 69 void updateSceneRect(); 65 70 … … 67 72 UIDetails *m_pDetails; 68 73 69 /* Variables:*/74 /** Updates scene rectangle. */ 70 75 int m_iMinimumWidthHint; 71 76 }; 72 77 73 78 #endif /* !FEQT_INCLUDED_SRC_manager_details_UIDetailsView_h */ 74
Note:
See TracChangeset
for help on using the changeset viewer.