Changeset 100496 in vbox for trunk/src/VBox
- Timestamp:
- Jul 11, 2023 6:55:31 AM (17 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r100348 r100496 2617 2617 }; 2618 2618 2619 class UIActionMenuVISOCreatorSaveAs : public UIActionSimple 2620 { 2621 Q_OBJECT; 2622 2623 public: 2624 /** Constructs action passing @a pParent to the base-class. */ 2625 UIActionMenuVISOCreatorSaveAs(UIActionPool *pParent) 2626 : UIActionSimple(pParent, 2627 ":/cd_remove_16px.png", ":/cd_remove_32px.png") 2628 { 2629 setShortcutContext(Qt::WidgetWithChildrenShortcut); 2630 } 2631 2632 protected: 2633 2634 /** Returns shortcut extra-data ID. */ 2635 virtual QString shortcutExtraDataID() const RT_OVERRIDE 2636 { 2637 return QString("VISOSaveAs"); 2638 } 2639 2640 /** Handles translation event. */ 2641 virtual void retranslateUi() RT_OVERRIDE 2642 { 2643 setName(QApplication::translate("UIActionPool", "SaveAs")); 2644 setShortcutScope(QApplication::translate("UIActionPool", "VISO Creator")); 2645 setStatusTip(QApplication::translate("UIActionPool", "Select a file to save the VISO content.")); 2646 setToolTip(QApplication::translate("UIActionPool", "Select a file to save the VISO content.") 2647 + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString()))); 2648 } 2649 }; 2619 2650 2620 2651 class UIActionMenuVISOCreatorImportISO : public UIActionSimple … … 3497 3528 m_pool[UIActionIndex_M_VISOCreator_Reset] = new UIActionMenuVISOCreatorReset(this); 3498 3529 m_pool[UIActionIndex_M_VISOCreator_Open] = new UIActionMenuVISOCreatorOpen(this); 3530 m_pool[UIActionIndex_M_VISOCreator_SaveAs] = new UIActionMenuVISOCreatorSaveAs(this); 3499 3531 m_pool[UIActionIndex_M_VISOCreator_ImportISO] = new UIActionMenuVISOCreatorImportISO(this); 3500 3532 m_pool[UIActionIndex_M_VISOCreator_RemoveISO] = new UIActionMenuVISOCreatorRemoveISO(this); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r100348 r100496 162 162 UIActionIndex_M_VISOCreator_Reset, 163 163 UIActionIndex_M_VISOCreator_Open, 164 UIActionIndex_M_VISOCreator_SaveAs, 164 165 UIActionIndex_M_VISOCreator_ImportISO, 165 166 UIActionIndex_M_VISOCreator_RemoveISO, -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100479 r100496 260 260 , m_pAddAction(0) 261 261 , m_pOpenAction(0) 262 , m_pSaveAsAction(0) 262 263 , m_pImportISOAction(0) 263 264 , m_pRemoveISOAction(0) … … 416 417 } 417 418 419 void UIVisoCreatorWidget::sltSaveAsAction() 420 { 421 // QString strSaveFileName = getSaveFileName(visoFileFullPath(), "VISO files (*.viso)", this, 422 // UIVisoCreatorWidget::tr("Select a file to save Viso content to")); 423 } 424 418 425 void UIVisoCreatorWidget::sltISOImportAction() 419 426 { … … 548 555 connect(m_pOpenAction, &QAction::triggered, 549 556 this, &UIVisoCreatorWidget::sltOpenAction); 557 if (m_pSaveAsAction) 558 connect(m_pSaveAsAction, &QAction::triggered, 559 this, &UIVisoCreatorWidget::sltSaveAsAction); 550 560 if (m_pImportISOAction) 551 561 connect(m_pImportISOAction, &QAction::triggered, … … 567 577 m_pAddAction->setEnabled(m_pHostBrowser->tableViewHasSelection()); 568 578 m_pOpenAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Open); 579 m_pSaveAsAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_SaveAs); 569 580 m_pImportISOAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_ImportISO); 570 581 if (m_pImportISOAction) … … 590 601 if (m_pOpenAction) 591 602 m_pMainMenu->addAction(m_pOpenAction); 603 if (m_pSaveAsAction) 604 m_pMainMenu->addAction(m_pSaveAsAction); 592 605 if (m_pAddAction) 593 606 m_pMainMenu->addAction(m_pAddAction); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r100479 r100496 117 117 void sltContentBrowserTableSelectionChanged(bool fIsSelectionEmpty); 118 118 void sltOpenAction(); 119 void sltSaveAsAction(); 119 120 void sltISOImportAction(); 120 121 void sltISORemoveAction(); … … 143 144 QAction *m_pAddAction; 144 145 QAction *m_pOpenAction; 146 QAction *m_pSaveAsAction; 145 147 QAction *m_pImportISOAction; 146 148 QAction *m_pRemoveISOAction;
Note:
See TracChangeset
for help on using the changeset viewer.