- Timestamp:
- Dec 29, 2023 4:30:17 PM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r102728 r102731 180 180 | QDialogButtonBox::Apply 181 181 #endif 182 | QDialogButtonBox::Cancel 182 183 | QDialogButtonBox::Close 183 184 | QDialogButtonBox::Help); … … 188 189 m_buttons[ButtonType_Apply] = m_pButtonBox->button(QDialogButtonBox::Apply); 189 190 #endif 191 m_buttons[ButtonType_Embed] = m_pButtonBox->button(QDialogButtonBox::Cancel); 190 192 m_buttons[ButtonType_Close] = m_pButtonBox->button(QDialogButtonBox::Close); 191 193 m_buttons[ButtonType_Help] = m_pButtonBox->button(QDialogButtonBox::Help); … … 198 200 button(ButtonType_Reset)->hide(); 199 201 button(ButtonType_Apply)->hide(); 202 button(ButtonType_Embed)->hide(); 200 203 /* Disable some of buttons initially: */ 201 204 button(ButtonType_Reset)->setEnabled(false); 202 205 button(ButtonType_Apply)->setEnabled(false); 206 button(ButtonType_Embed)->setEnabled(false); 203 207 204 208 /* Configure connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.h
r99946 r102731 66 66 ButtonType_Reset = RT_BIT(0), 67 67 ButtonType_Apply = RT_BIT(1), 68 ButtonType_Close = RT_BIT(2), 69 ButtonType_Help = RT_BIT(3) 68 ButtonType_Embed = RT_BIT(2), 69 ButtonType_Close = RT_BIT(3), 70 ButtonType_Help = RT_BIT(4), 70 71 }; 71 72 … … 103 104 signals: 104 105 106 /** Notifies listeners about dialog should be embedded. */ 107 void sigEmbed(); 105 108 /** Notifies listeners about dialog should be closed. */ 106 109 void sigClose(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r102723 r102731 1051 1051 } 1052 1052 1053 connect(m_managers[enmType], &QIManagerDialog::sigEmbed, 1054 this, &UIVirtualBoxManager::sltEmbedManagerWindowDefault); 1053 1055 connect(m_managers[enmType], &QIManagerDialog::sigClose, 1054 1056 this, &UIVirtualBoxManager::sltCloseManagerWindowDefault); … … 1057 1059 /* Expose instance: */ 1058 1060 UIDesktopWidgetWatchdog::restoreWidget(m_managers.value(enmType)); 1061 } 1062 1063 void UIVirtualBoxManager::sltEmbedManagerWindow(UIToolType enmType /* = UIToolType_Invalid */) 1064 { 1065 /* Determine actual tool type if possible: */ 1066 if (enmType == UIToolType_Invalid) 1067 { 1068 if ( sender() 1069 && sender()->inherits("QIManagerDialog")) 1070 { 1071 QIManagerDialog *pManager = qobject_cast<QIManagerDialog*>(sender()); 1072 AssertPtrReturnVoid(pManager); 1073 enmType = m_managers.key(pManager); 1074 } 1075 } 1076 1077 /* Make sure type is valid: */ 1078 AssertReturnVoid(enmType != UIToolType_Invalid); 1079 1080 /* Make sure corresponding manager window is closed (if any): */ 1081 sltCloseManagerWindow(enmType); 1082 1083 /// @todo add tools which can be embedded .. 1059 1084 } 1060 1085 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r102723 r102731 193 193 /** Handles call to open Manager window by default. */ 194 194 void sltOpenManagerWindowDefault() { sltOpenManagerWindow(); } 195 /** Handles call to embed Manager window of certain @a enmType. */ 196 void sltEmbedManagerWindow(UIToolType enmType = UIToolType_Invalid); 195 197 /** Handles call to close Manager window of certain @a enmType. */ 196 198 void sltCloseManagerWindow(UIToolType enmType = UIToolType_Invalid); 199 /** Handles call to embed Manager window by default. */ 200 void sltEmbedManagerWindowDefault() { sltEmbedManagerWindow(); } 197 201 /** Handles call to close Manager window by default. */ 198 202 void sltCloseManagerWindowDefault() { sltCloseManagerWindow(); }
Note:
See TracChangeset
for help on using the changeset viewer.