Changeset 101717 in vbox
- Timestamp:
- Nov 2, 2023 12:22:25 PM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp
r101693 r101717 1087 1087 1088 1088 /* Reapply mode: */ 1089 slt HandleModeOrFilterChanged();1090 } 1091 1092 void UIAdvancedSettingsDialog::slt HandleModeOrFilterChanged()1089 sltApplyFilteringRules(); 1090 } 1091 1092 void UIAdvancedSettingsDialog::sltApplyFilteringRules() 1093 1093 { 1094 1094 /* Filter-out page contents: */ 1095 1095 foreach (UISettingsPageFrame *pFrame, m_frames.values()) 1096 pFrame->filterOut(m_pCheckBoxMode->isChecked(), m_pEditorFilter->text()); 1096 pFrame->filterOut(m_pCheckBoxMode->isChecked(), 1097 m_pEditorFilter->text()); 1097 1098 } 1098 1099 … … 1183 1184 { 1184 1185 connect(m_pEditorFilter, &UIFilterEditor::sigTextChanged, 1185 this, &UIAdvancedSettingsDialog::slt HandleModeOrFilterChanged);1186 this, &UIAdvancedSettingsDialog::sltApplyFilteringRules); 1186 1187 m_pLayoutMain->addWidget(m_pEditorFilter, 0, 2); 1187 1188 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.h
r101693 r101717 198 198 void sltHandleExperienceModeChanged(); 199 199 200 /** Handles changes done to mode checkbox or filter editor. */ 201 void sltHandleModeOrFilterChanged(); 200 /** Applies filtering rules, which can be changed as 201 * a result of changes in experience mode and filter editor. */ 202 void sltApplyFilteringRules(); 202 203 /** Handles frame visivility changes. */ 203 204 void sltHandleFrameVisibilityChange(bool fVisible); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioSettingsEditor.cpp
r101511 r101717 133 133 } 134 134 135 void UIAudioSettingsEditor::filterOut(bool fExpertMode, const QString &strFilter)136 {137 /* Call to base-class: */138 UIEditor::filterOut(fExpertMode, strFilter);139 140 updateMinimumLayoutHint();141 }142 143 135 void UIAudioSettingsEditor::retranslateUi() 144 136 { … … 150 142 } 151 143 144 updateMinimumLayoutHint(); 145 } 146 147 void UIAudioSettingsEditor::handleFilterChange() 148 { 152 149 updateMinimumLayoutHint(); 153 150 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioSettingsEditor.h
r101511 r101717 106 106 protected: 107 107 108 /** Filters out contents.109 * @param fExpertMode Brings whether settings expert mode is requested.110 * @param strFilter Brings the filter description should correspond to. */111 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;112 113 108 /** Handles translation event. */ 114 109 virtual void retranslateUi() RT_OVERRIDE; 110 111 /** Handles filter change. */ 112 virtual void handleFilterChange() RT_OVERRIDE; 115 113 116 114 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIEditor.cpp
r101693 r101717 116 116 foreach (QLayout *pLayout, findChildren<QLayout*>()) 117 117 pLayout->activate(); 118 119 /* Call for filter change handler finally: */ 120 handleFilterChange(); 118 121 } 119 122 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIEditor.h
r101693 r101717 72 72 virtual QStringList description() const; 73 73 74 /** Holds whether widget should be shown in basic mode. */ 74 /** Handles filter change. 75 * Reimplement this in subclass to handle various filter changes, 76 * like experience mode change or manual filter editor change. */ 77 virtual void handleFilterChange() {} 78 79 /** Holds whether editor should be shown in basic mode. */ 75 80 bool m_fShowInBasicMode; 76 81 /** Holds whether editor is in expert mode. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp
r101637 r101717 198 198 #endif /* VBOX_WITH_VMNET */ 199 199 200 void UINetworkAttachmentEditor::filterOut(bool fExpertMode, const QString &strFilter) 201 { 202 /* Call to base-class: */ 203 UIEditor::filterOut(fExpertMode, strFilter); 204 200 void UINetworkAttachmentEditor::retranslateUi() 201 { 202 /* Translate type label: */ 203 if (m_pLabelType) 204 m_pLabelType->setText(tr("&Attached to:")); 205 206 /* Translate name label: */ 207 if (m_pLabelName) 208 m_pLabelName->setText(tr("&Name:")); 209 210 /* Translate type combo: */ 211 if (m_pComboType) 212 { 213 for (int i = 0; i < m_pComboType->count(); ++i) 214 { 215 const KNetworkAttachmentType enmType = m_pComboType->itemData(i).value<KNetworkAttachmentType>(); 216 m_pComboType->setItemText(i, gpConverter->toString(enmType)); 217 } 218 m_pComboType->setToolTip(tr("Holds how this virtual adapter is attached to the real network of the Host OS.")); 219 } 220 221 /* Translate name combo: */ 222 retranslateNameDescription(); 223 } 224 225 void UINetworkAttachmentEditor::handleFilterChange() 226 { 205 227 /* Repopulate type combo to make 206 228 * sure excessive types removed: */ 207 229 populateTypeCombo(); 208 }209 210 void UINetworkAttachmentEditor::retranslateUi()211 {212 /* Translate type label: */213 if (m_pLabelType)214 m_pLabelType->setText(tr("&Attached to:"));215 216 /* Translate name label: */217 if (m_pLabelName)218 m_pLabelName->setText(tr("&Name:"));219 220 /* Translate type combo: */221 if (m_pComboType)222 {223 for (int i = 0; i < m_pComboType->count(); ++i)224 {225 const KNetworkAttachmentType enmType = m_pComboType->itemData(i).value<KNetworkAttachmentType>();226 m_pComboType->setItemText(i, gpConverter->toString(enmType));227 }228 m_pComboType->setToolTip(tr("Holds how this virtual adapter is attached to the real network of the Host OS."));229 }230 231 /* Translate name combo: */232 retranslateNameDescription();233 230 } 234 231 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h
r101637 r101717 102 102 protected: 103 103 104 /** Filters out contents.105 * @param fExpertMode Brings whether settings expert mode is requested.106 * @param strFilter Brings the filter description should correspond to. */107 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;108 109 104 /** Handles translation event. */ 110 105 virtual void retranslateUi() RT_OVERRIDE; 106 107 /** Handles filter change. */ 108 virtual void handleFilterChange() RT_OVERRIDE; 111 109 112 110 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkSettingsEditor.cpp
r101529 r101717 205 205 } 206 206 207 void UINetworkSettingsEditor::filterOut(bool fExpertMode, const QString &strFilter)208 {209 /* Call to base-class: */210 UIEditor::filterOut(fExpertMode, strFilter);211 212 updateMinimumLayoutHint();213 }214 215 207 void UINetworkSettingsEditor::retranslateUi() 216 208 { … … 221 213 } 222 214 215 updateMinimumLayoutHint(); 216 } 217 218 void UINetworkSettingsEditor::handleFilterChange() 219 { 223 220 updateMinimumLayoutHint(); 224 221 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkSettingsEditor.h
r101529 r101717 149 149 protected: 150 150 151 /** Filters out contents.152 * @param fExpertMode Brings whether settings expert mode is requested.153 * @param strFilter Brings the filter description should correspond to. */154 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;155 156 151 /** Handles translation event. */ 157 152 virtual void retranslateUi() RT_OVERRIDE; 153 154 /** Handles filter change. */ 155 virtual void handleFilterChange() RT_OVERRIDE; 158 156 159 157 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.cpp
r101563 r101717 67 67 } 68 68 69 void UIUpdateSettingsEditor::filterOut(bool fExpertMode, const QString &strFilter)70 {71 /* Call to base-class: */72 UIEditor::filterOut(fExpertMode, strFilter);73 fetchValue();74 }75 76 69 void UIUpdateSettingsEditor::retranslateUi() 77 70 { … … 129 122 "VirtualBox.")); 130 123 } 124 } 125 126 void UIUpdateSettingsEditor::handleFilterChange() 127 { 128 fetchValue(); 131 129 } 132 130 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.h
r101454 r101717 63 63 protected: 64 64 65 /** Filters out contents.66 * @param fExpertMode Brings whether settings expert mode is requested.67 * @param strFilter Brings the filter description should correspond to. */68 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;69 70 65 /** Handles translation event. */ 71 66 virtual void retranslateUi() RT_OVERRIDE; 67 68 /** Handles filter change. */ 69 virtual void handleFilterChange() RT_OVERRIDE; 72 70 73 71 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r101511 r101717 190 190 } 191 191 192 void UIGlobalSettingsDisplay::filterOut(bool fExpertMode, const QString &strFilter) 193 { 194 /* Call to base-class: */ 195 UIEditor::filterOut(fExpertMode, strFilter); 196 192 void UIGlobalSettingsDisplay::retranslateUi() 193 { 197 194 updateMinimumLayoutHint(); 198 195 } 199 196 200 void UIGlobalSettingsDisplay:: retranslateUi()197 void UIGlobalSettingsDisplay::handleFilterChange() 201 198 { 202 199 updateMinimumLayoutHint(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h
r101511 r101717 74 74 virtual void saveFromCacheTo(QVariant &data) RT_OVERRIDE; 75 75 76 /** Filters out contents.77 * @param fExpertMode Brings whether settings expert mode is requested.78 * @param strFilter Brings the filter description should correspond to. */79 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;80 81 76 /** Handles translation event. */ 82 77 virtual void retranslateUi() RT_OVERRIDE; 78 79 /** Handles filter change. */ 80 virtual void handleFilterChange() RT_OVERRIDE; 83 81 84 82 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
r101511 r101717 154 154 } 155 155 156 void UIGlobalSettingsGeneral::filterOut(bool fExpertMode, const QString &strFilter) 157 { 158 /* Call to base-class: */ 159 UIEditor::filterOut(fExpertMode, strFilter); 160 156 void UIGlobalSettingsGeneral::retranslateUi() 157 { 161 158 updateMinimumLayoutHint(); 162 159 } 163 160 164 void UIGlobalSettingsGeneral:: retranslateUi()161 void UIGlobalSettingsGeneral::handleFilterChange() 165 162 { 166 163 updateMinimumLayoutHint(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h
r101511 r101717 72 72 virtual void saveFromCacheTo(QVariant &data) RT_OVERRIDE; 73 73 74 /** Filters out contents.75 * @param fExpertMode Brings whether settings expert mode is requested.76 * @param strFilter Brings the filter description should correspond to. */77 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;78 79 74 /** Handles translation event. */ 80 75 virtual void retranslateUi() RT_OVERRIDE; 76 77 /** Handles filter change. */ 78 virtual void handleFilterChange() RT_OVERRIDE; 81 79 82 80 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r101520 r101717 751 751 } 752 752 753 void UIMachineSettingsDisplay::filterOut(bool fExpertMode, const QString &strFilter)754 {755 /* Call to base-class: */756 UIEditor::filterOut(fExpertMode, strFilter);757 758 updateMinimumLayoutHint();759 }760 761 753 void UIMachineSettingsDisplay::retranslateUi() 762 754 { … … 766 758 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabRecording), tr("Re&cording")); 767 759 760 updateMinimumLayoutHint(); 761 } 762 763 void UIMachineSettingsDisplay::handleFilterChange() 764 { 768 765 updateMinimumLayoutHint(); 769 766 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r101511 r101717 99 99 virtual void setOrderAfter(QWidget *pWidget) RT_OVERRIDE; 100 100 101 /** Filters out contents.102 * @param fExpertMode Brings whether settings expert mode is requested.103 * @param strFilter Brings the filter description should correspond to. */104 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;105 106 101 /** Handles translation event. */ 107 102 virtual void retranslateUi() RT_OVERRIDE; 103 104 /** Handles filter change. */ 105 virtual void handleFilterChange() RT_OVERRIDE; 108 106 109 107 /** Performs final page polishing. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101511 r101717 463 463 } 464 464 465 void UIMachineSettingsGeneral::filterOut(bool fExpertMode, const QString &strFilter)466 {467 /* Call to base-class: */468 UIEditor::filterOut(fExpertMode, strFilter);469 470 updateMinimumLayoutHint();471 }472 473 465 void UIMachineSettingsGeneral::retranslateUi() 474 466 { … … 478 470 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabEncryption), tr("Disk Enc&ryption")); 479 471 472 updateMinimumLayoutHint(); 473 } 474 475 void UIMachineSettingsGeneral::handleFilterChange() 476 { 480 477 updateMinimumLayoutHint(); 481 478 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r101511 r101717 86 86 virtual void setOrderAfter(QWidget *pWidget) RT_OVERRIDE; 87 87 88 /** Filters out contents.89 * @param fExpertMode Brings whether settings expert mode is requested.90 * @param strFilter Brings the filter description should correspond to. */91 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;92 93 88 /** Handles translation event. */ 94 89 virtual void retranslateUi() RT_OVERRIDE; 90 91 /** Handles filter change. */ 92 virtual void handleFilterChange() RT_OVERRIDE; 95 93 96 94 /** Performs final page polishing. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
r101511 r101717 333 333 } 334 334 335 void UIMachineSettingsInterface::filterOut(bool fExpertMode, const QString &strFilter) 336 { 337 /* Call to base-class: */ 338 UIEditor::filterOut(fExpertMode, strFilter); 339 335 void UIMachineSettingsInterface::retranslateUi() 336 { 340 337 updateMinimumLayoutHint(); 341 338 } 342 339 343 void UIMachineSettingsInterface:: retranslateUi()340 void UIMachineSettingsInterface::handleFilterChange() 344 341 { 345 342 updateMinimumLayoutHint(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h
r101511 r101717 76 76 virtual void saveFromCacheTo(QVariant &data) RT_OVERRIDE; 77 77 78 /** Filters out contents.79 * @param fExpertMode Brings whether settings expert mode is requested.80 * @param strFilter Brings the filter description should correspond to. */81 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;82 83 78 /** Handles translation event. */ 84 79 virtual void retranslateUi() RT_OVERRIDE; 80 81 /** Handles filter change. */ 82 virtual void handleFilterChange() RT_OVERRIDE; 85 83 86 84 /** Performs final page polishing. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r101605 r101717 348 348 } 349 349 350 void UIMachineSettingsNetwork::handleFilterChange() 351 { 352 /* Show tabs from 2nd to 4th in expert mode only: */ 353 if (m_pTabWidget) 354 for (int i = 1; i < m_pTabWidget->count(); ++i) 355 m_pTabWidget->setTabVisible(i, m_fInExpertMode); 356 } 357 350 358 void UIMachineSettingsNetwork::polishPage() 351 359 { … … 364 372 polishTab(iSlot); 365 373 } 366 }367 368 void UIMachineSettingsNetwork::filterOut(bool fExpertMode, const QString &strFilter)369 {370 /* Call to base class: */371 UISettingsPageMachine::filterOut(fExpertMode, strFilter);372 373 /* Show tabs from 2nd to 4th in expert mode only: */374 if (m_pTabWidget)375 for (int i = 1; i < m_pTabWidget->count(); ++i)376 m_pTabWidget->setTabVisible(i, m_fInExpertMode);377 374 } 378 375 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.h
r101596 r101717 101 101 virtual void retranslateUi() RT_OVERRIDE; 102 102 103 /** Handles filter change. */ 104 virtual void handleFilterChange() RT_OVERRIDE; 105 103 106 /** Performs final page polishing. */ 104 107 virtual void polishPage() RT_OVERRIDE; 105 106 /** Filters out contents.107 * @param fExpertMode Brings whether settings expert mode is requested.108 * @param strFilter Brings the filter description should correspond to. */109 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;110 108 111 109 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r101511 r101717 610 610 } 611 611 612 void UIMachineSettingsSystem::filterOut(bool fExpertMode, const QString &strFilter)613 {614 /* Call to base-class: */615 UIEditor::filterOut(fExpertMode, strFilter);616 617 updateMinimumLayoutHint();618 }619 620 612 void UIMachineSettingsSystem::retranslateUi() 621 613 { … … 624 616 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabAcceleration), tr("Acce&leration")); 625 617 618 updateMinimumLayoutHint(); 619 } 620 621 void UIMachineSettingsSystem::handleFilterChange() 622 { 626 623 updateMinimumLayoutHint(); 627 624 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r101511 r101717 110 110 virtual void setOrderAfter(QWidget *pWidget) RT_OVERRIDE; 111 111 112 /** Filters out contents.113 * @param fExpertMode Brings whether settings expert mode is requested.114 * @param strFilter Brings the filter description should correspond to. */115 virtual void filterOut(bool fExpertMode, const QString &strFilter) RT_OVERRIDE;116 117 112 /** Handles translation event. */ 118 113 virtual void retranslateUi() RT_OVERRIDE; 114 115 /** Handles filter change. */ 116 virtual void handleFilterChange() RT_OVERRIDE; 119 117 120 118 /** Performs final page polishing. */
Note:
See TracChangeset
for help on using the changeset viewer.