Changeset 77935 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 28, 2019 12:54:19 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r77932 r77935 23 23 #include <QItemDelegate> 24 24 #include <QGridLayout> 25 #include <QStackedWidget> 25 26 #include <QTextEdit> 26 27 … … 475 476 , m_pLocationComboBox(0) 476 477 , m_pWarningLabel(0) 478 , m_pNavigationWidgetWidget(0) 477 479 , m_pBreadCrumbsWidget(0) 478 480 { … … 525 527 } 526 528 527 m_pLocationComboBox = new QComboBox; 528 if (m_pLocationComboBox) 529 { 530 m_pMainLayout->addWidget(m_pLocationComboBox, 1, 1, 1, 4); 531 m_pLocationComboBox->setEditable(false); 532 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 533 this, &UIFileManagerTable::sltLocationComboCurrentChange); 534 } 535 536 m_pBreadCrumbsWidget = new UIFileManagerBreadCrumbs; 537 if (m_pBreadCrumbsWidget) 538 { 539 m_pMainLayout->addWidget(m_pBreadCrumbsWidget, 1, 1, 1, 4); 540 m_pBreadCrumbsWidget->setReadOnly(true); 541 QSizePolicy sizePolicy; 542 sizePolicy.setControlType(QSizePolicy::ComboBox); 543 m_pBreadCrumbsWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 544 connect(m_pBreadCrumbsWidget, &UIFileManagerBreadCrumbs::sigNavitatePath, 545 this, &UIFileManagerTable::sltHandleBreadCrumbsClick); 546 } 547 529 m_pNavigationWidgetWidget = new QStackedWidget; 530 if (m_pNavigationWidgetWidget) 531 { 532 m_pNavigationWidgetWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 533 534 m_pLocationComboBox = new QComboBox; 535 if (m_pLocationComboBox) 536 { 537 m_pNavigationWidgetWidget->addWidget(m_pLocationComboBox); 538 m_pLocationComboBox->setEditable(false); 539 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 540 this, &UIFileManagerTable::sltLocationComboCurrentChange); 541 } 542 543 m_pBreadCrumbsWidget = new UIFileManagerBreadCrumbs; 544 if (m_pBreadCrumbsWidget) 545 { 546 m_pNavigationWidgetWidget->addWidget(m_pBreadCrumbsWidget); 547 m_pBreadCrumbsWidget->setReadOnly(true); 548 connect(m_pBreadCrumbsWidget, &UIFileManagerBreadCrumbs::sigNavitatePath, 549 this, &UIFileManagerTable::sltHandleBreadCrumbsClick); 550 } 551 m_pMainLayout->addWidget(m_pNavigationWidgetWidget, 1, 1, 1, 4); 552 } 548 553 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); 549 554 if (pOptions) … … 1382 1387 void UIFileManagerTable::showHideBreadCrumbs(bool fShow) 1383 1388 { 1384 if (m_pLocationComboBox) 1385 m_pLocationComboBox->setVisible(!fShow); 1386 if (m_pBreadCrumbsWidget) 1387 m_pBreadCrumbsWidget->setVisible(fShow); 1389 if (!m_pNavigationWidgetWidget) 1390 return; 1391 if (fShow) 1392 m_pNavigationWidgetWidget->setCurrentIndex(0); 1393 else 1394 m_pNavigationWidgetWidget->setCurrentIndex(1); 1388 1395 } 1389 1396 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h
r77932 r77935 46 46 class QGridLayout; 47 47 class QSortFilterProxyModel; 48 class QStackedWidget; 48 49 class QTextEdit; 49 50 class QVBoxLayout; … … 295 296 QILabel *m_pWarningLabel; 296 297 298 /** Contains m_pBreadCrumbsWidget and m_pLocationComboBox. */ 299 QStackedWidget *m_pNavigationWidgetWidget; 297 300 UIFileManagerBreadCrumbs *m_pBreadCrumbsWidget; 298 301
Note:
See TracChangeset
for help on using the changeset viewer.