- Timestamp:
- Apr 4, 2019 7:27:13 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r77932 r78010 207 207 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerShowHumanReadableSizes = "ShowHumanReadableSizes"; 208 208 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerShowHiddenObjects = "ShowHiddenObjects"; 209 const char *UIExtraDataDefs::GUI_GuestControl_FileManagerShowBreadCrumbs = "ShowBreadCrumbs";210 209 211 210 /* Virtual Machine: Close dialog: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r77932 r78010 383 383 extern const char *GUI_GuestControl_FileManagerShowHumanReadableSizes; 384 384 extern const char *GUI_GuestControl_FileManagerShowHiddenObjects; 385 extern const char *GUI_GuestControl_FileManagerShowBreadCrumbs;386 385 /** @} */ 387 386 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r77932 r78010 4274 4274 bool fShowDeleteConfirmation, 4275 4275 bool fShowHumanReadableSizes, 4276 bool fShowHiddenObjects, 4277 bool fShowBreadCrumbs) 4276 bool fShowHiddenObjects) 4278 4277 { 4279 4278 /* Serialize passed values: */ … … 4288 4287 if (fShowHiddenObjects) 4289 4288 data << GUI_GuestControl_FileManagerShowHiddenObjects; 4290 if (fShowBreadCrumbs)4291 data << GUI_GuestControl_FileManagerShowBreadCrumbs;4292 4289 4293 4290 /* Re-cache corresponding extra-data: */ … … 4334 4331 { 4335 4332 if (data[i] == GUI_GuestControl_FileManagerShowHiddenObjects) 4336 return true;4337 }4338 return false;4339 }4340 4341 bool UIExtraDataManager::fileManagerShowBreadCrumbs()4342 {4343 const QStringList data = extraDataStringList(GUI_GuestControl_FileManagerOptions);4344 for (int i = 0; i < data.size(); ++i)4345 {4346 if (data[i] == GUI_GuestControl_FileManagerShowBreadCrumbs)4347 4333 return true; 4348 4334 } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r77932 r78010 670 670 bool fShowDeleteConfirmation, 671 671 bool fshowHumanReadableSizes, 672 bool fShowHiddenObjects, 673 bool fShowBreadCrumbs); 672 bool fShowHiddenObjects); 674 673 bool fileManagerListDirectoriesFirst(); 675 674 bool fileManagerShowDeleteConfirmation(); 676 675 bool fileManagerShowHumanReadableSizes(); 677 676 bool fileManagerShowHiddenObjects(); 678 bool fileManagerShowBreadCrumbs();679 677 /** @} */ 680 678 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r77932 r78010 94 94 , fShowHumanReadableSizes(true) 95 95 , fShowHiddenObjects(true) 96 , fShowBreadCrumbs(false)97 96 { 98 97 } … … 691 690 pOptions->fAskDeleteConfirmation, 692 691 pOptions->fShowHumanReadableSizes, 693 pOptions->fShowHiddenObjects, 694 pOptions->fShowBreadCrumbs); 692 pOptions->fShowHiddenObjects); 695 693 } 696 694 } … … 735 733 pOptions->fShowHumanReadableSizes = gEDataManager->fileManagerShowHumanReadableSizes(); 736 734 pOptions->fShowHiddenObjects = gEDataManager->fileManagerShowHiddenObjects(); 737 pOptions->fShowBreadCrumbs = gEDataManager->fileManagerShowBreadCrumbs();738 735 } 739 736 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r77932 r78010 68 68 bool fShowHumanReadableSizes; 69 69 bool fShowHiddenObjects; 70 bool fShowBreadCrumbs;71 70 72 71 private: -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.cpp
r77932 r78010 31 31 , m_pHumanReabableSizesCheckBox(0) 32 32 , m_pShowHiddenObjectsCheckBox(0) 33 , m_pShowBreadCrumbsCheckBox(0)34 33 , m_pFileManagerOptions(pFileManagerOptions) 35 34 { … … 97 96 mainLayout()->addWidget(m_pShowHiddenObjectsCheckBox, 0, Qt::AlignLeft); 98 97 99 m_pShowBreadCrumbsCheckBox = new QCheckBox;100 if (m_pShowBreadCrumbsCheckBox)101 mainLayout()->addWidget(m_pShowBreadCrumbsCheckBox, 0, Qt::AlignLeft);102 103 98 /* Set initial checkbox status wrt. options: */ 104 99 if (m_pFileManagerOptions) … … 112 107 if (m_pShowHiddenObjectsCheckBox) 113 108 m_pShowHiddenObjectsCheckBox->setChecked(m_pFileManagerOptions->fShowHiddenObjects); 114 if (m_pShowBreadCrumbsCheckBox)115 m_pShowBreadCrumbsCheckBox->setChecked(m_pFileManagerOptions->fShowBreadCrumbs);116 109 117 110 } … … 152 145 } 153 146 154 void UIFileManagerOptionsPanel::sltShowBreadCrumbsCheckBoxToggled(bool bChecked)155 {156 if (!m_pFileManagerOptions)157 return;158 m_pFileManagerOptions->fShowBreadCrumbs = bChecked;159 emit sigOptionsChanged();160 }161 162 147 void UIFileManagerOptionsPanel::prepareConnections() 163 148 { … … 175 160 connect(m_pShowHiddenObjectsCheckBox, &QCheckBox::toggled, 176 161 this, &UIFileManagerOptionsPanel::sltShowHiddenObjectsCheckBoxToggled); 177 178 if (m_pShowBreadCrumbsCheckBox)179 connect(m_pShowBreadCrumbsCheckBox, &QCheckBox::toggled,180 this, &UIFileManagerOptionsPanel::sltShowBreadCrumbsCheckBoxToggled);181 162 } 182 163 … … 209 190 m_pShowHiddenObjectsCheckBox->setToolTip(UIFileManager::tr("Show hidden files/directories")); 210 191 } 211 212 if (m_pShowBreadCrumbsCheckBox)213 {214 m_pShowBreadCrumbsCheckBox->setText(UIFileManager::tr("Bread crumbs instead of location widget"));215 m_pShowBreadCrumbsCheckBox->setToolTip(UIFileManager::tr("Bread crumbs instead of location widget"));216 }217 192 } -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerOptionsPanel.h
r77932 r78010 63 63 void sltHumanReabableSizesCheckBoxToogled(bool bChecked); 64 64 void sltShowHiddenObjectsCheckBoxToggled(bool bChecked); 65 void sltShowBreadCrumbsCheckBoxToggled(bool bChecked);66 65 67 66 private: … … 71 70 QCheckBox *m_pHumanReabableSizesCheckBox; 72 71 QCheckBox *m_pShowHiddenObjectsCheckBox; 73 QCheckBox *m_pShowBreadCrumbsCheckBox;74 72 UIFileManagerOptions *m_pFileManagerOptions; 75 73 }; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp
r78002 r78010 51 51 52 52 /********************************************************************************************************************************* 53 * UIFileManagerHistoryComboBox definition. * 54 *********************************************************************************************************************************/ 55 /** A QCombo extension used as location history list in the UIFileManagerNavigationWidget. */ 56 class UIFileManagerHistoryComboBox : public QComboBox 57 { 58 Q_OBJECT; 59 60 signals: 61 62 void sigHidePopup(); 63 64 public: 65 66 UIFileManagerHistoryComboBox(QWidget *pParent = 0); 67 /** Emit sigHidePopup as the popup is hidded. */ 68 virtual void hidePopup() /* override */; 69 }; 70 71 72 /********************************************************************************************************************************* 53 73 * UIFileManagerBreadCrumbs definition. * 54 74 *********************************************************************************************************************************/ 55 /** A QL ineEditextension. It shows the current path as text and hightligts the folder name75 /** A QLabel extension. It shows the current path as text and hightligts the folder name 56 76 * as the mouse hovers over it. Clicking on the highlighted folder name make the file table tp 57 77 * navigate to that folder. */ 58 class UIFileManagerBreadCrumbs : public QL ineEdit78 class UIFileManagerBreadCrumbs : public QLabel 59 79 { 60 80 Q_OBJECT; 61 81 82 public: 83 84 UIFileManagerBreadCrumbs(QWidget *pParent = 0); 85 void setPath(const QString &strPath, bool fUnderlineLast = false); 86 }; 87 88 89 /********************************************************************************************************************************* 90 * UIFileManagerNavigationWidget definition. * 91 *********************************************************************************************************************************/ 92 93 class UIFileManagerNavigationWidget : public QWidget 94 { 95 Q_OBJECT; 96 62 97 signals: 63 98 64 void sig NavitatePath(const QString &strPath);99 void sigPathChanged(const QString &strPath); 65 100 66 101 public: 67 102 68 UIFileManagerBreadCrumbs(QWidget *pParent = 0); 69 void setPath(const QString &strPath); 70 71 protected: 72 73 virtual void mouseMoveEvent(QMouseEvent *pEvent) /* override */; 74 virtual void mousePressEvent(QMouseEvent *pEvent) /* override */; 75 virtual bool event(QEvent *pEvent) /* override */; 103 UIFileManagerNavigationWidget(QWidget *pParent = 0); 104 void setPath(const QString &strLocation); 105 void reset(); 106 107 private slots: 108 109 void sltHandleSwitch(); 110 /* Makes sure that we switch to breadcrumbs widget as soon as the combo box popup is hidden. */ 111 void sltHandleHidePopup(); 76 112 77 113 private: 114 115 void prepare(); 116 117 QStackedWidget *m_pContainer; 118 UIFileManagerBreadCrumbs *m_pBreadCrumbs; 119 UIFileManagerHistoryComboBox *m_pHistoryComboBox; 120 QToolButton *m_pSwitchButton; 78 121 }; 79 122 … … 172 215 173 216 /********************************************************************************************************************************* 217 * UIFileManagerHistoryComboBox implementation. * 218 *********************************************************************************************************************************/ 219 220 UIFileManagerHistoryComboBox::UIFileManagerHistoryComboBox(QWidget *pParent /* = 0 */) 221 :QComboBox(pParent) 222 { 223 224 } 225 226 void UIFileManagerHistoryComboBox::hidePopup() 227 { 228 QComboBox::hidePopup(); 229 emit sigHidePopup(); 230 } 231 232 233 /********************************************************************************************************************************* 234 * UIFileManagerNavigationWidget implementation. * 235 *********************************************************************************************************************************/ 236 237 UIFileManagerNavigationWidget::UIFileManagerNavigationWidget(QWidget *pParent /* = 0 */) 238 :QWidget(pParent) 239 , m_pContainer(0) 240 , m_pSwitchButton(0) 241 { 242 prepare(); 243 } 244 245 void UIFileManagerNavigationWidget::setPath(const QString &strLocation) 246 { 247 if (m_pBreadCrumbs) 248 m_pBreadCrumbs->setPath(strLocation); 249 250 if (m_pHistoryComboBox) 251 { 252 int itemIndex = m_pHistoryComboBox->findText(strLocation, 253 Qt::MatchExactly | Qt::MatchCaseSensitive); 254 if (itemIndex == -1) 255 { 256 m_pHistoryComboBox->insertItem(m_pHistoryComboBox->count(), strLocation); 257 itemIndex = m_pHistoryComboBox->count() - 1; 258 } 259 m_pHistoryComboBox->setCurrentIndex(itemIndex); 260 } 261 } 262 263 void UIFileManagerNavigationWidget::reset() 264 { 265 if (m_pHistoryComboBox) 266 { 267 /** @todo disconnect here. */ 268 m_pHistoryComboBox->clear(); 269 } 270 } 271 272 void UIFileManagerNavigationWidget::prepare() 273 { 274 QHBoxLayout *pLayout = new QHBoxLayout; 275 if (!pLayout) 276 return; 277 pLayout->setSpacing(0); 278 pLayout->setContentsMargins(0, 0, 0, 0); 279 280 m_pContainer = new QStackedWidget; 281 282 if (m_pContainer) 283 { 284 m_pBreadCrumbs = new UIFileManagerBreadCrumbs; 285 m_pHistoryComboBox = new UIFileManagerHistoryComboBox; 286 287 connect(m_pBreadCrumbs, &UIFileManagerBreadCrumbs::linkActivated, 288 this, &UIFileManagerNavigationWidget::sigPathChanged); 289 290 connect(m_pHistoryComboBox, &UIFileManagerHistoryComboBox::sigHidePopup, 291 this, &UIFileManagerNavigationWidget::sltHandleHidePopup); 292 293 connect(m_pHistoryComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 294 this, &UIFileManagerNavigationWidget::sigPathChanged); 295 296 m_pContainer->addWidget(m_pBreadCrumbs); 297 m_pContainer->addWidget(m_pHistoryComboBox); 298 m_pContainer->setCurrentIndex(0); 299 300 pLayout->addWidget(m_pContainer); 301 } 302 303 m_pSwitchButton = new QToolButton; 304 305 if (m_pSwitchButton) 306 { 307 308 QStyle *pStyle = QApplication::style(); 309 QIcon buttonIcon; 310 if (pStyle) 311 { 312 buttonIcon = pStyle->standardIcon(QStyle::SP_TitleBarUnshadeButton); 313 m_pSwitchButton->setIcon(buttonIcon); 314 } 315 316 pLayout->addWidget(m_pSwitchButton); 317 connect(m_pSwitchButton, &QToolButton::clicked, 318 this, &UIFileManagerNavigationWidget::sltHandleSwitch); 319 } 320 321 setLayout(pLayout); 322 } 323 324 void UIFileManagerNavigationWidget::sltHandleHidePopup() 325 { 326 m_pContainer->setCurrentIndex(0); 327 } 328 329 void UIFileManagerNavigationWidget::sltHandleSwitch() 330 { 331 if (m_pContainer->currentIndex() == 0) 332 { 333 m_pContainer->setCurrentIndex(1); 334 m_pHistoryComboBox->showPopup(); 335 } 336 else 337 { 338 m_pContainer->setCurrentIndex(0); 339 m_pHistoryComboBox->hidePopup(); 340 } 341 } 342 343 344 /********************************************************************************************************************************* 174 345 * UIFileManagerBreadCrumbs implementation. * 175 346 *********************************************************************************************************************************/ 176 347 177 348 UIFileManagerBreadCrumbs::UIFileManagerBreadCrumbs(QWidget *pParent /* = 0 */) 178 :QLineEdit(pParent) 179 { 180 181 } 182 183 void UIFileManagerBreadCrumbs::setPath(const QString &strPath) 184 { 349 :QLabel(pParent) 350 { 351 float fFontMult = 1.2f; 352 QFont mFont = font(); 353 if (mFont.pixelSize() == -1) 354 mFont.setPointSize(fFontMult * mFont.pointSize()); 355 else 356 mFont.setPixelSize(fFontMult * mFont.pixelSize()); 357 setFont(mFont); 358 359 } 360 361 void UIFileManagerBreadCrumbs::setPath(const QString &strPath, bool fUnderlineLast /* = false */) 362 { 363 const QChar separator('/'); 185 364 clear(); 186 setText(strPath); 187 } 188 189 void UIFileManagerBreadCrumbs::mouseMoveEvent(QMouseEvent *pEvent) 190 { 191 QChar cSeparator('/'); 192 int iCharPos = this->cursorPositionAt(pEvent->pos()); 193 QString strLeft = text().left(iCharPos); 194 int iLeftSeparator = strLeft.lastIndexOf(cSeparator); 195 int iRightSeparator = text().indexOf(cSeparator, iLeftSeparator + 1); 196 if (iRightSeparator == -1) 197 iRightSeparator = text().length(); 198 /* A special case for leading sperator aka. root folder: */ 199 if (iRightSeparator == 0) 200 setSelection(iLeftSeparator + 1, 1); 201 else 202 setSelection(iLeftSeparator + 1, iRightSeparator - iLeftSeparator - 1); 203 } 204 205 void UIFileManagerBreadCrumbs::mousePressEvent(QMouseEvent *pEvent) 206 { 207 QChar cSeparator('/'); 208 int iCharPos = this->cursorPositionAt(pEvent->pos()); 209 // QString strLeft = text().left(iCharPos); 210 // int iLeftSeparator = strLeft.lastIndexOf(cSeparator); 211 int iRightSeparator = text().indexOf(cSeparator, iCharPos); 212 QString strPath; 213 if (iRightSeparator == 0) 214 strPath = cSeparator; 215 else 216 strPath = text().left(iRightSeparator); 217 emit sigNavitatePath(strPath); 218 } 219 220 bool UIFileManagerBreadCrumbs::event(QEvent *pEvent) 221 { 222 if (!pEvent) 223 return false; 224 if (pEvent->type() == QEvent::Leave) 225 deselect(); 226 return QLineEdit::event(pEvent); 365 QStringList folderList = UIPathOperations::pathTrail(strPath); 366 folderList.push_front(separator); 367 QString strLabelText; 368 QString strPathUpto; 369 for (int i = 0; i < folderList.size(); ++i) 370 { 371 QString strFolder = UIPathOperations::removeTrailingDelimiters(folderList.at(i)); 372 if (i == 0 || i == folderList.size() - 1) 373 strPathUpto.append(QString("%1").arg(strFolder)); 374 else 375 strPathUpto.append(QString("%1%2").arg(strFolder).arg(separator)); 376 if (fUnderlineLast && i == folderList.size() - 1) 377 strLabelText.append(QString("<a href=\"%1\" style=\"color:black;text-decoration:underline;\">%2</a>").arg(strPathUpto).arg(strFolder)); 378 else 379 strLabelText.append(QString("<a href=\"%1\" style=\"color:black;text-decoration:none;\">%2</a>").arg(strPathUpto).arg(strFolder)); 380 if (i < folderList.size() - 1) 381 strLabelText.append("<b> > </b>"); 382 } 383 setText(strLabelText); 384 227 385 } 228 386 … … 343 501 if (m_pInfoEdit) 344 502 { 345 m_pInfoEdit->setReadOnly(true);503 //m_pInfoEdit->setReadOnly(true); 346 504 m_pInfoEdit->setFrameStyle(QFrame::NoFrame); 347 505 } … … 465 623 , m_pProxyModel(0) 466 624 , m_pMainLayout(0) 467 , m_pLocationComboBox(0)468 625 , m_pWarningLabel(0) 469 , m_pNavigationWidgetWidget(0) 470 , m_pBreadCrumbsWidget(0) 626 , m_pNavigationWidget(0) 471 627 { 472 628 prepareObjects(); … … 482 638 m_pModel->reset(); 483 639 484 if (m_pLocationComboBox) 485 { 486 disconnect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 487 this, &UIFileManagerTable::sltLocationComboCurrentChange); 488 m_pLocationComboBox->clear(); 489 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 490 this, &UIFileManagerTable::sltLocationComboCurrentChange); 491 } 640 if (m_pNavigationWidget) 641 m_pNavigationWidget->reset(); 492 642 } 493 643 … … 518 668 } 519 669 520 m_pNavigationWidgetWidget = new QStackedWidget; 521 if (m_pNavigationWidgetWidget) 522 { 523 m_pNavigationWidgetWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 524 525 m_pLocationComboBox = new QComboBox; 526 if (m_pLocationComboBox) 527 { 528 m_pNavigationWidgetWidget->addWidget(m_pLocationComboBox); 529 m_pLocationComboBox->setEditable(false); 530 connect(m_pLocationComboBox, static_cast<void(QComboBox::*)(const QString&)>(&QComboBox::currentIndexChanged), 531 this, &UIFileManagerTable::sltLocationComboCurrentChange); 532 } 533 534 m_pBreadCrumbsWidget = new UIFileManagerBreadCrumbs; 535 if (m_pBreadCrumbsWidget) 536 { 537 m_pNavigationWidgetWidget->addWidget(m_pBreadCrumbsWidget); 538 m_pBreadCrumbsWidget->setReadOnly(true); 539 connect(m_pBreadCrumbsWidget, &UIFileManagerBreadCrumbs::sigNavitatePath, 540 this, &UIFileManagerTable::sltHandleBreadCrumbsClick); 541 } 542 m_pMainLayout->addWidget(m_pNavigationWidgetWidget, 1, 1, 1, 4); 543 } 544 UIFileManagerOptions *pOptions = UIFileManagerOptions::instance(); 545 if (pOptions) 546 showHideBreadCrumbs(pOptions->fShowBreadCrumbs); 547 else 548 showHideBreadCrumbs(false); 670 m_pNavigationWidget = new UIFileManagerNavigationWidget; 671 if (m_pNavigationWidget) 672 { 673 m_pNavigationWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 674 connect(m_pNavigationWidget, &UIFileManagerNavigationWidget::sigPathChanged, 675 this, &UIFileManagerTable::sltHandleNavigationWidgetPathChange); 676 m_pMainLayout->addWidget(m_pNavigationWidget, 1, 1, 1, 4); 677 } 678 549 679 m_pModel = new UICustomFileSystemModel(this); 550 680 if (!m_pModel) … … 618 748 void UIFileManagerTable::updateCurrentLocationEdit(const QString& strLocation) 619 749 { 620 if (!m_pLocationComboBox) 621 return; 622 int itemIndex = m_pLocationComboBox->findText(strLocation, 623 Qt::MatchExactly | Qt::MatchCaseSensitive); 624 if (itemIndex == -1) 625 { 626 m_pLocationComboBox->insertItem(m_pLocationComboBox->count(), strLocation); 627 itemIndex = m_pLocationComboBox->count() - 1; 628 } 629 m_pLocationComboBox->setCurrentIndex(itemIndex); 630 631 if (m_pBreadCrumbsWidget) 632 { 633 m_pBreadCrumbsWidget->setPath(strLocation); 750 if (m_pNavigationWidget) 751 { 752 m_pNavigationWidget->setPath(strLocation); 634 753 } 635 754 } … … 970 1089 } 971 1090 972 void UIFileManagerTable::sltLocationComboCurrentChange(const QString &strLocation)973 {974 QString comboLocation(UIPathOperations::sanitize(strLocation));975 if (comboLocation == currentDirectoryPath())976 return;977 goIntoDirectory(UIPathOperations::pathTrail(comboLocation));978 }979 980 1091 void UIFileManagerTable::sltSelectAll() 981 1092 { … … 1011 1122 } 1012 1123 1013 void UIFileManagerTable::sltHandleBreadCrumbsClick(const QString& strPath)1014 {1015 goIntoDirectory(UIPathOperations::pathTrail(strPath));1016 }1017 1018 1124 void UIFileManagerTable::sltCreateFileViewContextMenu(const QPoint &point) 1019 1125 { … … 1022 1128 return; 1023 1129 createFileViewContextMenu(pSender, point); 1130 } 1131 1132 void UIFileManagerTable::sltHandleNavigationWidgetPathChange(const QString& strPath) 1133 { 1134 goIntoDirectory(UIPathOperations::pathTrail(strPath)); 1024 1135 } 1025 1136 … … 1293 1404 if (m_pModel) 1294 1405 m_pModel->setShowHumanReadableSizes(pOptions->fShowHumanReadableSizes); 1295 showHideBreadCrumbs(pOptions->fShowBreadCrumbs);1296 1406 } 1297 1407 relist(); 1298 1408 } 1299 1300 1409 1301 1410 void UIFileManagerTable::sltReceiveDirectoryStatistics(UIDirectoryStatistics statistics) … … 1380 1489 } 1381 1490 1382 void UIFileManagerTable::showHideBreadCrumbs(bool fShow)1383 {1384 if (!m_pNavigationWidgetWidget)1385 return;1386 if (!fShow)1387 m_pNavigationWidgetWidget->setCurrentIndex(0);1388 else1389 m_pNavigationWidgetWidget->setCurrentIndex(1);1390 }1391 1392 1491 #include "UIFileManagerTable.moc" -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h
r77935 r78010 53 53 class UICustomFileSystemModel; 54 54 class UICustomFileSystemProxyModel; 55 class UIFileManager BreadCrumbs;55 class UIFileManagerNavigationWidget; 56 56 class UIGuestControlFileView; 57 57 class UIToolBar; … … 254 254 void sltCreateFileViewContextMenu(const QPoint &point); 255 255 void sltSelectionChanged(const QItemSelection & selected, const QItemSelection & deselected); 256 void sltLocationComboCurrentChange(const QString &strLocation);257 256 void sltSearchTextChanged(const QString &strText); 258 257 /** m_pModel signals when an tree item is renamed. we try to apply this rename to the file system. … … 260 259 * sltRename() for more details. */ 261 260 void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldName, QString strNewName); 262 void sltHandle BreadCrumbsClick(const QString& strPath);261 void sltHandleNavigationWidgetPathChange(const QString& strPath); 263 262 264 263 private: … … 285 284 * if deletion can continue */ 286 285 bool checkIfDeleteOK(); 287 void showHideBreadCrumbs(bool fShow);288 286 289 287 UICustomFileSystemModel *m_pModel; … … 292 290 293 291 QGridLayout *m_pMainLayout; 294 QComboBox *m_pLocationComboBox;295 292 QILineEdit *m_pSearchLineEdit; 296 293 QILabel *m_pWarningLabel; 297 294 298 295 /** Contains m_pBreadCrumbsWidget and m_pLocationComboBox. */ 299 QStackedWidget *m_pNavigationWidgetWidget;300 UIFileManagerBreadCrumbs *m_pBreadCrumbsWidget;296 UIFileManagerNavigationWidget *m_pNavigationWidget; 297 //UIFileManagerBreadCrumbs *m_pBreadCrumbsWidget; 301 298 302 299 friend class UICustomFileSystemModel;
Note:
See TracChangeset
for help on using the changeset viewer.