Changeset 100905 in vbox for trunk/src/VBox
- Timestamp:
- Aug 18, 2023 11:23:20 AM (19 months ago)
- svn:sync-xref-src-repo-rev:
- 158841
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r100893 r100905 243 243 244 244 m_pVerticalSplitter->addWidget(pTopWidget); 245 /* Prepare operations and log panels and insert them into splitter: */246 prepareOperationsAndLogPanels(m_pVerticalSplitter);247 245 248 246 for (int i = 0; i < m_pVerticalSplitter->count(); ++i) … … 255 253 m_pPanel = new UIFileManagerPanel(this, UIFileManagerOptions::instance()); 256 254 AssertReturnVoid(m_pPanel); 255 256 m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)); 257 m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)); 258 m_panelActions.insert(m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)); 259 260 m_pActionPool->action(UIActionIndex_M_FileManager_T_Preferences)->setData(static_cast<int>(UIFileManagerPanel::Page_Preferences)); 261 m_pActionPool->action(UIActionIndex_M_FileManager_T_Log)->setData(static_cast<int>(UIFileManagerPanel::Page_Log)); 262 m_pActionPool->action(UIActionIndex_M_FileManager_T_Operations)->setData(static_cast<int>(UIFileManagerPanel::Page_Operations)); 263 257 264 m_pVerticalSplitter->addWidget(m_pPanel); 265 m_pPanel->hide(); 258 266 } 259 267 … … 388 396 if (!pSenderAction) 389 397 return; 390 UIDialogPanel* pPanel = 0; 391 /* Look for the sender() within the m_panelActionMap's values: */ 392 for (QMap<UIDialogPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin(); 393 iterator != m_panelActionMap.end(); ++iterator) 394 { 395 if (iterator.value() == pSenderAction) 396 pPanel = iterator.key(); 397 } 398 if (!pPanel) 399 return; 398 399 m_pPanel->setVisible(fChecked); 400 400 401 if (fChecked) 401 showPanel(pPanel); 402 else 403 hidePanel(pPanel); 402 { 403 /* Make sure only pSenderAction is toggled on. */ 404 for(QSet<QAction*>::iterator iter = m_panelActions.begin(); iter != m_panelActions.end(); ++iter) 405 { 406 QAction *pAction = *iter; 407 if (!pAction || pAction == pSenderAction) 408 continue; 409 pAction->blockSignals(true); 410 pAction->setChecked(false); 411 pAction->blockSignals(false); 412 } 413 m_pPanel->setCurrentIndex(pSenderAction->data().toInt()); 414 } 415 416 // UIDialogPanel* pPanel = 0; 417 // /* Look for the sender() within the m_panelActionMap's values: */ 418 // for (QMap<UIDialogPanel*, QAction*>::const_iterator iterator = m_panelActionMap.begin(); 419 // iterator != m_panelActionMap.end(); ++iterator) 420 // { 421 // if (iterator.value() == pSenderAction) 422 // pPanel = iterator.key(); 423 // } 424 // if (!pPanel) 425 // return; 426 // if (fChecked) 427 // showPanel(pPanel); 428 // else 429 // hidePanel(pPanel); 404 430 } 405 431 … … 555 581 } 556 582 } 557 558 void UIFileManager::prepareOperationsAndLogPanels(QSplitter *pSplitter)559 {560 Q_UNUSED(pSplitter);561 // if (!pSplitter)562 // return;563 // m_pPanel = new UIFileManagerOperationsPanel;564 // if (m_pPanel)565 // {566 // m_pPanel->hide();567 // connect(m_pPanel, &UIFileManagerOperationsPanel::sigFileOperationComplete,568 // this, &UIFileManager::sltFileOperationComplete);569 // connect(m_pPanel, &UIFileManagerOperationsPanel::sigFileOperationFail,570 // this, &UIFileManager::sltReceieveLogOutput);571 // }572 }573 574 583 575 584 template<typename T> -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r100887 r100905 136 136 void prepareVerticalToolBar(QHBoxLayout *layout); 137 137 void prepareToolBar(); 138 void prepareOperationsAndLogPanels(QSplitter *pSplitter);139 138 140 139 /** Saves list of panels and file manager options to the extra data. */ … … 179 178 QPointer<UIActionPool> m_pActionPool; 180 179 const bool m_fShowToolbar; 181 Q Map<UIDialogPanel*, QAction*> m_panelActionMap;180 QSet<QAction*> m_panelActions; 182 181 QList<UIDialogPanel*> m_visiblePanelsList; 183 182 UIFileManagerLogPanel *m_pLogPanel; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.cpp
r100901 r100905 627 627 connect(pOperationsWidget, &UIFileOperationProgressWidget::sigFocusOut, 628 628 this, &UIFileManagerPanel::sltHandleWidgetFocusOut); 629 //sigShowPanel(this); 629 } 630 631 void UIFileManagerPanel::setCurrentIndex(int iIndex) 632 { 633 if (!m_pTabWidget || iIndex >= m_pTabWidget->count() || iIndex < 0) 634 return; 635 m_pTabWidget->setCurrentIndex(iIndex); 630 636 } 631 637 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerPanel.h
r100901 r100905 70 70 void appendLog(const QString &strLog, const QString &strMachineName, FileManagerLogType eLogType); 71 71 void addNewProgress(const CProgress &comProgress, const QString &strSourceTableName); 72 72 void setCurrentIndex(int iIndex); 73 73 enum Page 74 74 {
Note:
See TracChangeset
for help on using the changeset viewer.