Changeset 78026 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 5, 2019 11:21:07 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129803
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r78024 r78026 84 84 UIFileManagerBreadCrumbs(QWidget *pParent = 0); 85 85 void setPath(const QString &strPath); 86 87 protected: 88 89 virtual void resizeEvent(QResizeEvent *pEvent) /* override */; 90 91 private: 92 93 QString m_strPath; 86 94 }; 87 95 … … 106 114 void reset(); 107 115 108 protected:109 110 virtual void resizeEvent(QResizeEvent *pEvent) /* override */;111 112 116 private slots: 113 117 … … 124 128 UIFileManagerHistoryComboBox *m_pHistoryComboBox; 125 129 QToolButton *m_pSwitchButton; 126 QString m_strPath;127 130 }; 128 131 … … 253 256 void UIFileManagerNavigationWidget::setPath(const QString &strLocation) 254 257 { 255 m_strPath = strLocation;256 257 258 if (m_pBreadCrumbs) 258 259 m_pBreadCrumbs->setPath(strLocation); … … 286 287 } 287 288 288 void UIFileManagerNavigationWidget::resizeEvent(QResizeEvent *pEvent)289 {290 if (m_pBreadCrumbs)291 m_pBreadCrumbs->setPath(m_strPath);292 293 QWidget::resizeEvent(pEvent);294 }295 296 289 void UIFileManagerNavigationWidget::prepare() 297 290 { … … 388 381 389 382 setPalette(newPalette); 383 /* Allow the labe become smaller than the current text. calling setpath in resizeEvent truncated the text anyway: */ 384 setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); 390 385 } 391 386 392 387 void UIFileManagerBreadCrumbs::setPath(const QString &strPath) 393 388 { 389 m_strPath = strPath; 390 394 391 const QChar separator('/'); 395 392 clear(); … … 430 427 } 431 428 setText(strLabelText); 429 } 430 431 void UIFileManagerBreadCrumbs::resizeEvent(QResizeEvent *pEvent) 432 { 433 /* Truncate the text the way we want: */ 434 setPath(m_strPath); 435 QLabel::resizeEvent(pEvent); 432 436 } 433 437
Note:
See TracChangeset
for help on using the changeset viewer.