Changeset 84439 in vbox
- Timestamp:
- May 21, 2020 6:09:40 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 138144
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r84437 r84439 600 600 } 601 601 602 void UIVirtualBoxManager::sltOpenGroupNameEditor() 603 { 604 m_pWidget->openGroupNameEditor(); 605 } 606 602 607 void UIVirtualBoxManager::sltOpenMachineSettingsDialog(QString strCategory /* = QString() */, 603 608 QString strControl /* = QString() */, … … 1503 1508 connect(actionPool()->action(UIActionIndexST_M_Group_S_Add), &UIAction::triggered, 1504 1509 this, &UIVirtualBoxManager::sltOpenAddMachineDialog); 1510 connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), &UIAction::triggered, 1511 this, &UIVirtualBoxManager::sltOpenGroupNameEditor); 1505 1512 connect(actionPool()->action(UIActionIndexST_M_Group_M_StartOrShow), &UIAction::triggered, 1506 1513 this, &UIVirtualBoxManager::sltPerformStartOrShowMachine); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r83855 r84439 187 187 /** Handles call to open add machine dialog. */ 188 188 void sltOpenAddMachineDialog(); 189 190 /** Handles call to open group name editor. */ 191 void sltOpenGroupNameEditor(); 189 192 190 193 /** Handles call to open Machine Settings dialog. -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r84438 r84439 109 109 { 110 110 return m_pPaneChooser->isGroupSavingInProgress(); 111 } 112 113 void UIVirtualBoxManagerWidget::openGroupNameEditor() 114 { 115 m_pPaneChooser->openGroupNameEditor(); 111 116 } 112 117 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r84438 r84439 134 134 /** Returns whether group saving is in progress. */ 135 135 bool isGroupSavingInProgress() const; 136 137 /** Opens group name editor. */ 138 void openGroupNameEditor(); 136 139 /** @} */ 137 140 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp
r84437 r84439 105 105 AssertPtrReturn(model(), false); 106 106 return model()->isGroupSavingInProgress(); 107 } 108 109 void UIChooser::openGroupNameEditor() 110 { 111 AssertPtrReturnVoid(model()); 112 model()->startEditingSelectedGroupItemName(); 107 113 } 108 114 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h
r84438 r84439 127 127 /** @} */ 128 128 129 /** @name Action handling stuff. 130 * @{ */ 131 /** Opens group name editor. */ 132 void openGroupNameEditor(); 133 /** @} */ 134 129 135 public slots: 130 136 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserHandlerKeyboard.cpp
r84437 r84439 253 253 if (model()->currentItem()->type() == UIChooserNodeType_Group) 254 254 { 255 /* Start e mbedded editing of current-item: */256 model()->startEditing GroupItemName();255 /* Start editing selected group item name: */ 256 model()->startEditingSelectedGroupItemName(); 257 257 /* Filter that event out: */ 258 258 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r84437 r84439 555 555 } 556 556 557 void UIChooserModel::startEditingGroupItemName() 558 { 559 sltEditGroupName(); 557 void UIChooserModel::startEditingSelectedGroupItemName() 558 { 559 /* Only for single selected group: */ 560 if (!isSingleGroupSelected()) 561 return; 562 563 /* Start editing first selected item name: */ 564 firstSelectedItem()->startEditing(); 560 565 } 561 566 … … 789 794 { 790 795 AssertMsgFailed(("Current-item destroyed!")); 791 }792 793 void UIChooserModel::sltEditGroupName()794 {795 /* Check if action is enabled: */796 if (!actionPool()->action(UIActionIndexST_M_Group_S_Rename)->isEnabled())797 return;798 /* Only for single selected group: */799 if (!isSingleGroupSelected())800 return;801 802 /* Start editing group name: */803 firstSelectedItem()->startEditing();804 796 } 805 797 … … 1389 1381 connect(actionPool()->action(UIActionIndexST_M_Machine_S_New), &UIAction::triggered, 1390 1382 this, &UIChooserModel::sltCreateNewMachine); 1391 connect(actionPool()->action(UIActionIndexST_M_Group_S_Rename), &UIAction::triggered,1392 this, &UIChooserModel::sltEditGroupName);1393 1383 connect(actionPool()->action(UIActionIndexST_M_Group_S_Remove), &UIAction::triggered, 1394 1384 this, &UIChooserModel::sltUngroupSelectedGroup); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h
r84437 r84439 213 213 UIChooserItem *root() const; 214 214 215 /** Starts editing groupname. */216 void startEditing GroupItemName();215 /** Starts editing selected group item name. */ 216 void startEditingSelectedGroupItemName(); 217 217 218 218 /** Starts or shows selected items. */ … … 289 289 /** @name Children stuff. 290 290 * @{ */ 291 /** Handles group rename request. */292 void sltEditGroupName();293 291 /** Handles group sort request. */ 294 292 void sltSortGroup();
Note:
See TracChangeset
for help on using the changeset viewer.