Changeset 37051 in vbox
- Timestamp:
- May 12, 2011 1:48:15 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDefs.h
r36915 r37051 83 83 void cacheCurrentData(const CacheData ¤tData) { m_value.second = currentData; } 84 84 85 /* Reset the current data to be empty: */86 void reset() { m_value.second = CacheData(); }87 88 85 /* Reset the initial and the current data to be both empty: */ 89 86 void clear() { m_value.first = CacheData(); m_value.second = CacheData(); } … … 141 138 } 142 139 143 /* Reset the current data to be empty.144 * Perform the same for all the children: */145 void reset()146 {147 UISettingsCache<ParentCacheData>::reset();148 for (int iChildIndex = 0; iChildIndex < childCount(); ++iChildIndex)149 child(iChildIndex).reset();150 }151 152 140 /* Reset the initial and the current data to be both empty. 153 * Perform the same forall the children: */141 * Removes all the children: */ 154 142 void clear() 155 143 { 156 144 UISettingsCache<ParentCacheData>::clear(); 157 for (int iChildIndex = 0; iChildIndex < childCount(); ++iChildIndex) 158 child(iChildIndex).clear(); 145 m_children.clear(); 159 146 } 160 147 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsPage.h
r36594 r37051 100 100 /* Settings dialog type stuff: */ 101 101 SettingsDialogType dialogType() const { return m_dialogType; } 102 virtual void setDialogType(SettingsDialogType settingsDialogType) { m_dialogType = settingsDialogType; }102 virtual void setDialogType(SettingsDialogType settingsDialogType) { m_dialogType = settingsDialogType; polishPage(); } 103 103 bool isMachineOffline() const { return dialogType() == SettingsDialogType_Offline; } 104 104 bool isMachineSaved() const { return dialogType() == SettingsDialogType_Saved; } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r36924 r37051 35 35 /* Fetch data to machine: */ 36 36 UISettingsPageMachine::fetchData(data); 37 38 /* Clear cache initially: */ 39 m_cache.clear(); 37 40 38 41 /* Prepare audio data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r36920 r37051 153 153 UISettingsPageMachine::fetchData(data); 154 154 155 /* Clear cache initially: */ 156 m_cache.clear(); 157 155 158 /* Prepare display data: */ 156 159 UIDataSettingsMachineDisplay displayData; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r36917 r37051 74 74 /* Fetch data to machine: */ 75 75 UISettingsPageMachine::fetchData(data); 76 77 /* Clear cache initially: */ 78 m_cache.clear(); 76 79 77 80 /* Prepare general data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r36928 r37051 748 748 /* Fetch data to machine: */ 749 749 UISettingsPageMachine::fetchData(data); 750 751 /* Clear cache initially: */ 752 m_cache.clear(); 750 753 751 754 /* Cache names lists: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
r36930 r37051 202 202 /* Fetch data to machine: */ 203 203 UISettingsPageMachine::fetchData(data); 204 205 /* Clear cache initially: */ 206 m_cache.clear(); 204 207 205 208 /* For each parallel port: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r36932 r37051 223 223 UISettingsPageMachine::fetchData(data); 224 224 225 /* Clear cache initially: */ 226 m_cache.clear(); 227 225 228 /* Load machine (permanent) shared folders into shared folders cache if possible: */ 226 229 if (isSharedFolderTypeSupported(MachineType)) … … 269 272 void UIMachineSettingsSF::getFromCache() 270 273 { 274 /* Clear list initially: */ 275 mTwFolders->clear(); 276 271 277 /* Update root items visibility: */ 272 278 updateRootItemsVisibility(); … … 686 692 } 687 693 694 void UIMachineSettingsSF::polishPage() 695 { 696 /* Update root items visibility: */ 697 updateRootItemsVisibility(); 698 } 699 688 700 CSharedFolderVector UIMachineSettingsSF::getSharedFolders(UISharedFolderType sharedFoldersType) 689 701 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.h
r36932 r37051 130 130 void setRootItemVisible(UISharedFolderType sharedFolderType, bool fVisible); 131 131 132 void polishPage(); 133 132 134 CSharedFolderVector getSharedFolders(UISharedFolderType sharedFoldersType); 133 135 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r36929 r37051 236 236 /* Fetch data to machine: */ 237 237 UISettingsPageMachine::fetchData(data); 238 239 /* Clear cache initially: */ 240 m_cache.clear(); 238 241 239 242 /* For each serial port: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r36923 r37051 1423 1423 { 1424 1424 m_dialogType = dialogType; 1425 } 1426 1427 void StorageModel::clear() 1428 { 1429 while (mRootItem->childCount()) 1430 { 1431 beginRemoveRows(root(), 0, 0); 1432 delete mRootItem->childByPos(0); 1433 endRemoveRows(); 1434 } 1425 1435 } 1426 1436 … … 1784 1794 UISettingsPageMachine::fetchData(data); 1785 1795 1796 /* Clear cache initially: */ 1797 m_cache.clear(); 1798 1786 1799 /* Prepare storage data: */ 1787 1800 UIDataSettingsMachineStorage storageData; … … 1849 1862 void UIMachineSettingsStorage::getFromCache() 1850 1863 { 1864 /* Clear model initially: */ 1865 mStorageModel->clear(); 1866 1851 1867 /* Get storage data from cache: */ 1852 1868 const UIDataSettingsMachineStorage &storageData = m_cache.base(); … … 3424 3440 void UIMachineSettingsStorage::setDialogType(SettingsDialogType settingsDialogType) 3425 3441 { 3442 /* Update 'settings dialog type' of base class: */ 3426 3443 UISettingsPageMachine::setDialogType(settingsDialogType); 3444 /* Update model 'settings dialog type': */ 3427 3445 mStorageModel->setDialogType(dialogType()); 3446 /* Update action states: */ 3447 updateActionsState(); 3428 3448 } 3429 3449 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r36923 r37051 503 503 void setChipsetType(KChipsetType type); 504 504 505 void setDialogType(SettingsDialogType dialogType); 505 void setDialogType(SettingsDialogType settingsDialogType); 506 507 void clear(); 506 508 507 509 QMap<KStorageBus, int> currentControllerTypes() const; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r36919 r37051 169 169 /* Fetch data to machine: */ 170 170 UISettingsPageMachine::fetchData(data); 171 172 /* Clear cache initially: */ 173 m_cache.clear(); 171 174 172 175 /* Prepare system data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r36936 r37051 152 152 /* Fetch data to properties & settings or machine: */ 153 153 fetchData(data); 154 155 /* Clear cache initially: */ 156 m_cache.clear(); 154 157 155 158 /* Depending on page type: */ … … 257 260 void UIMachineSettingsUSB::getFromCache() 258 261 { 262 /* Clear list initially: */ 263 mTwFilters->clear(); 264 m_filters.clear(); 265 259 266 /* Depending on page type: */ 260 267 switch (pageType())
Note:
See TracChangeset
for help on using the changeset viewer.