Changeset 100123 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 8, 2023 1:45:18 PM (20 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r100064 r100123 871 871 src/medium/viso/UIVisoCreator.h \ 872 872 src/medium/viso/UIVisoConfigurationPanel.h \ 873 src/medium/viso/UIVisoCreatorOptionsPanel.h \874 873 src/medium/viso/UIVisoHostBrowser.h \ 875 874 src/notificationcenter/UINotificationCenter.h \ … … 1454 1453 src/medium/viso/UIVisoCreator.cpp \ 1455 1454 src/medium/viso/UIVisoConfigurationPanel.cpp \ 1456 src/medium/viso/UIVisoCreatorOptionsPanel.cpp \1457 1455 src/medium/viso/UIVisoHostBrowser.cpp \ 1458 1456 src/notificationcenter/UINotificationCenter.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r100071 r100123 2289 2289 { 2290 2290 setName(QApplication::translate("UIActionPool", "VISO Creator")); 2291 }2292 };2293 2294 /** Toggle action extension, used to toggle 'VISO Creator configuration' panel in file manager. */2295 class UIActionMenuVISOCreatorToggleConfigPanel : public UIActionToggle2296 {2297 Q_OBJECT;2298 2299 public:2300 2301 /** Constructs action passing @a pParent to the base-class. */2302 UIActionMenuVISOCreatorToggleConfigPanel(UIActionPool *pParent)2303 : UIActionToggle(pParent)2304 {2305 setShortcutContext(Qt::WidgetWithChildrenShortcut);2306 setIcon(UIIconPool::iconSetFull(":/file_manager_options_32px.png",2307 ":/%file_manager_options_16px.png",2308 ":/file_manager_options_disabled_32px.png",2309 ":/file_manager_options_disabled_16px.png"));2310 }2311 2312 protected:2313 2314 /** Returns shortcut extra-data ID. */2315 virtual QString shortcutExtraDataID() const RT_OVERRIDE2316 {2317 return QString("ToggleVISOCreatorConfigurationPanel");2318 }2319 2320 /** Returns default shortcut. */2321 virtual QKeySequence defaultShortcut(UIActionPoolType) const RT_OVERRIDE2322 {2323 return QKeySequence();2324 }2325 2326 /** Handles translation event. */2327 virtual void retranslateUi() RT_OVERRIDE2328 {2329 setName(QApplication::translate("UIActionPool", "Configuration"));2330 setShortcutScope(QApplication::translate("UIActionPool", "VISO Creator"));2331 setStatusTip(QApplication::translate("UIActionPool", "Open panel for VISO Creator configuration"));2332 setToolTip(QApplication::translate("UIActionPool", "Open Configuration Panel")2333 + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));2334 2291 } 2335 2292 }; … … 3229 3186 /* Create VISO Creator actions: */ 3230 3187 m_pool[UIActionIndex_M_VISOCreator] = new UIActionMenuVISOCreator(this); 3231 m_pool[UIActionIndex_M_VISOCreator_ToggleConfigPanel] = new UIActionMenuVISOCreatorToggleConfigPanel(this);3232 3188 m_pool[UIActionIndex_M_VISOCreator_ToggleOptionsPanel] = new UIActionMenuVISOCreatorToggleOptionsPanel(this); 3233 3189 m_pool[UIActionIndex_M_VISOCreator_Add] = new UIActionMenuVISOCreatorAdd(this); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r100071 r100123 151 151 /* VISO Creator actions: */ 152 152 UIActionIndex_M_VISOCreator, 153 UIActionIndex_M_VISOCreator_ToggleConfigPanel,154 153 UIActionIndex_M_VISOCreator_ToggleOptionsPanel, 155 154 UIActionIndex_M_VISOCreator_Add, -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.cpp
r100107 r100123 27 27 28 28 /* Qt includes: */ 29 #include <QCheckBox> 29 30 #include <QComboBox> 30 31 #include <QGridLayout> … … 43 44 , m_pVisoNameLineEdit(0) 44 45 , m_pCustomOptionsLineEdit(0) 46 , m_pShowHiddenObjectsCheckBox(0) 47 , m_pShowHiddenObjectsLabel(0) 45 48 { 46 49 prepareObjects(); … … 69 72 m_pCustomOptionsLineEdit->clear(); 70 73 m_pCustomOptionsLineEdit->setText(visoCustomOptions.join(";")); 74 } 75 76 void UIVisoConfigurationPanel::setShowHiddenbjects(bool fShow) 77 { 78 if (m_pShowHiddenObjectsCheckBox) 79 m_pShowHiddenObjectsCheckBox->setChecked(fShow); 71 80 } 72 81 … … 99 108 mainLayout()->addWidget(m_pCustomOptionsLineEdit, Qt::AlignLeft); 100 109 } 110 111 112 m_pShowHiddenObjectsCheckBox = new QCheckBox; 113 m_pShowHiddenObjectsLabel = new QILabel(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects")); 114 m_pShowHiddenObjectsLabel->setBuddy(m_pShowHiddenObjectsCheckBox); 115 mainLayout()->addWidget(m_pShowHiddenObjectsCheckBox, 0, Qt::AlignLeft); 116 mainLayout()->addWidget(m_pShowHiddenObjectsLabel, 0, Qt::AlignLeft); 117 mainLayout()->addStretch(6); 118 119 101 120 retranslateUi(); 102 121 } … … 108 127 if (m_pCustomOptionsLabel) 109 128 connect(m_pCustomOptionsLineEdit, &QILineEdit::editingFinished, this, &UIVisoConfigurationPanel::sltCustomOptionsEdited); 129 if (m_pShowHiddenObjectsCheckBox) 130 connect(m_pShowHiddenObjectsCheckBox, &QCheckBox::stateChanged, 131 this, &UIVisoConfigurationPanel::sltShowHiddenObjectsChange); 110 132 } 111 133 … … 121 143 if (m_pCustomOptionsLineEdit) 122 144 m_pCustomOptionsLineEdit->setToolTip(QApplication::translate("UIVisoCreatorWidget", "The list of suctom options delimited with ';'.")); 145 if (m_pShowHiddenObjectsLabel) 146 m_pShowHiddenObjectsLabel->setText(QApplication::translate("UIVisoCreatorWidget", "Show Hidden Objects")); 147 if (m_pShowHiddenObjectsCheckBox) 148 m_pShowHiddenObjectsCheckBox->setToolTip(QApplication::translate("UIVisoCreatorWidget", "When checked, " 149 "multiple hidden objects are shown in the file browser")); 123 150 } 124 151 … … 137 164 emit sigVisoNameChanged(m_pVisoNameLineEdit->text()); 138 165 } 166 167 void UIVisoConfigurationPanel::sltShowHiddenObjectsChange(int iState) 168 { 169 if (iState == static_cast<int>(Qt::Checked)) 170 sigShowHiddenObjects(true); 171 else 172 sigShowHiddenObjects(false); 173 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoConfigurationPanel.h
r100107 r100123 36 36 37 37 /* Forward declarations: */ 38 class QCheckBox; 38 39 class QComboBox; 39 40 class QILabel; … … 49 50 void sigVisoNameChanged(const QString &strVisoName); 50 51 void sigCustomVisoOptionsChanged(const QStringList &customVisoOptions); 52 void sigShowHiddenObjects(bool fShow); 51 53 52 54 public: 55 53 56 UIVisoConfigurationPanel(QWidget *pParent = 0); 54 57 ~UIVisoConfigurationPanel(); … … 56 59 void setVisoName(const QString& strVisoName); 57 60 void setVisoCustomOptions(const QStringList& visoCustomOptions); 61 void setShowHiddenbjects(bool fShow); 58 62 59 63 protected: … … 65 69 void sltVisoNameChanged(); 66 70 void sltCustomOptionsEdited(); 71 void sltShowHiddenObjectsChange(int iState); 67 72 68 73 private: … … 75 80 QILineEdit *m_pVisoNameLineEdit; 76 81 QILineEdit *m_pCustomOptionsLineEdit; 82 QCheckBox *m_pShowHiddenObjectsCheckBox; 83 QILabel *m_pShowHiddenObjectsLabel; 77 84 }; 78 85 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r100122 r100123 48 48 #include "UIVisoCreator.h" 49 49 #include "UIVisoConfigurationPanel.h" 50 #include "UIVisoCreatorOptionsPanel.h"51 50 #include "UIVisoContentBrowser.h" 52 51 #ifdef VBOX_WS_MAC … … 66 65 bool fShowToolBar, const QString& strMachineName /* = QString() */) 67 66 : QIWithRetranslateUI<QWidget>(pParent) 68 , m_pActionConfiguration(0)69 67 , m_pActionOptions(0) 70 68 , m_pAddAction(0) … … 308 306 } 309 307 310 m_pCreatorOptionsPanel = new UIVisoC reatorOptionsPanel;308 m_pCreatorOptionsPanel = new UIVisoConfigurationPanel; 311 309 if (m_pCreatorOptionsPanel) 312 310 { … … 339 337 } 340 338 341 if (m_pActionConfiguration)342 connect(m_pActionConfiguration, &QAction::triggered, this, &UIVisoCreatorWidget::sltPanelActionToggled);343 339 if (m_pActionOptions) 344 340 connect(m_pActionOptions, &QAction::triggered, this, &UIVisoCreatorWidget::sltPanelActionToggled); … … 352 348 connect(m_pConfigurationPanel, &UIVisoConfigurationPanel::sigHidePanel, 353 349 this, &UIVisoCreatorWidget::sltHandleHidePanel); 354 m_panelActionMap.insert(m_pConfigurationPanel, m_pActionConfiguration);355 350 } 356 351 357 352 if (m_pCreatorOptionsPanel) 358 353 { 359 connect(m_pCreatorOptionsPanel, &UIVisoC reatorOptionsPanel::sigShowHiddenObjects,354 connect(m_pCreatorOptionsPanel, &UIVisoConfigurationPanel::sigShowHiddenObjects, 360 355 this, &UIVisoCreatorWidget::sltHandleShowHiddenObjectsChange); 361 connect(m_pCreatorOptionsPanel, &UIVisoC reatorOptionsPanel::sigHidePanel,356 connect(m_pCreatorOptionsPanel, &UIVisoConfigurationPanel::sigHidePanel, 362 357 this, &UIVisoCreatorWidget::sltHandleHidePanel); 363 358 m_panelActionMap.insert(m_pCreatorOptionsPanel, m_pActionOptions); … … 390 385 return; 391 386 392 m_pActionConfiguration = m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleConfigPanel);393 387 m_pActionOptions = m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleOptionsPanel); 394 388 395 m_pOpenAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Open);396 389 m_pAddAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Add); 397 390 if (m_pAddAction && m_pHostBrowser) … … 412 405 if (m_pToolBar) 413 406 { 414 if (m_pActionConfiguration)415 m_pToolBar->addAction(m_pActionConfiguration);416 407 if (m_pActionOptions) 417 408 m_pToolBar->addAction(m_pActionOptions); … … 419 410 if (m_pMainMenu) 420 411 { 421 m_pMainMenu->addAction(m_pActionConfiguration);422 412 m_pMainMenu->addAction(m_pActionOptions); 423 413 m_pMainMenu->addSeparator(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r100114 r100123 53 53 class UIVisoHostBrowser; 54 54 class UIVisoContentBrowser; 55 class UIVisoCreatorOptionsPanel;56 55 class UIVisoConfigurationPanel; 57 56 … … 147 146 /** @name Main toolbar (and main menu) actions 148 147 * @{ */ 149 QAction *m_pActionConfiguration;150 148 QAction *m_pActionOptions; 151 149 /** @} */ … … 170 168 BrowserOptions m_browserOptions; 171 169 QMenu *m_pMainMenu; 172 UIVisoC reatorOptionsPanel*m_pCreatorOptionsPanel;170 UIVisoConfigurationPanel *m_pCreatorOptionsPanel; 173 171 UIVisoConfigurationPanel *m_pConfigurationPanel; 174 172 QMap<UIDialogPanel*, QAction*> m_panelActionMap;
Note:
See TracChangeset
for help on using the changeset viewer.