Changeset 36592 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 6, 2011 3:48:47 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r36589 r36592 967 967 sharedMachine, session().GetConsole(), 968 968 strCategory, QString()); 969 pDlg-> getFrom();969 pDlg->loadData(); 970 970 971 971 /* Show VM settings dialog: */ … … 973 973 { 974 974 /* If dialog was accepted => save changed settings: */ 975 pDlg-> putBackTo();975 pDlg->saveData(); 976 976 sharedMachine.SaveSettings(); 977 977 /* If settings were failed to be saved => show the error: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSelectorWnd.cpp
r36589 r36592 596 596 597 597 UISettingsDialog *dlg = new UISettingsDialogGlobal(this, SettingsDialogType_Offline); 598 dlg-> getFrom();598 dlg->loadData(); 599 599 600 600 if (dlg->exec() == QDialog::Accepted) 601 dlg-> putBackTo();601 dlg->saveData(); 602 602 603 603 delete dlg; … … 735 735 736 736 UISettingsDialog *pDlg = new UISettingsDialogMachine(this, dialogType, machine, console, strCategory, strControl); 737 pDlg-> getFrom();737 pDlg->loadData(); 738 738 739 739 if (pDlg->exec() == QDialog::Accepted) 740 740 { 741 pDlg-> putBackTo();741 pDlg->saveData(); 742 742 743 743 machine.SaveSettings(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.h
r36589 r36592 49 49 50 50 /* Save/Load interface: */ 51 virtual void getFrom() = 0;52 virtual void putBackTo() = 0;51 virtual void loadData() = 0; 52 virtual void saveData() = 0; 53 53 54 54 protected slots: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r36589 r36592 300 300 for (int iPageIndex = GLSettingsPage_General; iPageIndex < GLSettingsPage_MAX; ++iPageIndex) 301 301 { 302 if (is Available(iPageIndex))302 if (isPageAvailable(iPageIndex)) 303 303 { 304 304 UISettingsPage *pSettingsPage = 0; … … 386 386 } 387 387 388 void UISettingsDialogGlobal:: getFrom()388 void UISettingsDialogGlobal::loadData() 389 389 { 390 390 /* Prepare global data: */ … … 403 403 } 404 404 405 void UISettingsDialogGlobal:: putBackTo()405 void UISettingsDialogGlobal::saveData() 406 406 { 407 407 /* Get properties and settings: */ … … 470 470 } 471 471 472 bool UISettingsDialogGlobal::is Available(int id)472 bool UISettingsDialogGlobal::isPageAvailable(int iPageId) 473 473 { 474 474 /* Show the host error message for particular group if present. 475 475 * We don't use the generic cannotLoadGlobalConfig() 476 476 * call here because we want this message to be suppressible: */ 477 switch (i d)477 switch (iPageId) 478 478 { 479 479 case GLSettingsPage_USB: … … 528 528 for (int iPageIndex = VMSettingsPage_General; iPageIndex < VMSettingsPage_MAX; ++iPageIndex) 529 529 { 530 if (is Available(iPageIndex))530 if (isPageAvailable(iPageIndex)) 531 531 { 532 532 UISettingsPage *pSettingsPage = 0; … … 681 681 } 682 682 683 void UISettingsDialogMachine:: getFrom()683 void UISettingsDialogMachine::loadData() 684 684 { 685 685 /* Prepare machine data: */ … … 701 701 } 702 702 703 void UISettingsDialogMachine:: putBackTo()703 void UISettingsDialogMachine::saveData() 704 704 { 705 705 /* Prepare machine data: */ … … 981 981 } 982 982 983 bool UISettingsDialogMachine::is Available(int id)983 bool UISettingsDialogMachine::isPageAvailable(int iPageId) 984 984 { 985 985 if (m_machine.isNull()) … … 989 989 * We don't use the generic cannotLoadMachineSettings() 990 990 * call here because we want this message to be suppressible. */ 991 switch (i d)991 switch (iPageId) 992 992 { 993 993 case VMSettingsPage_Serial: 994 994 { 995 995 /* Depends on ports availability: */ 996 if (!is Available(VMSettingsPage_Ports))996 if (!isPageAvailable(VMSettingsPage_Ports)) 997 997 return false; 998 998 break; … … 1001 1001 { 1002 1002 /* Depends on ports availability: */ 1003 if (!is Available(VMSettingsPage_Ports))1003 if (!isPageAvailable(VMSettingsPage_Ports)) 1004 1004 return false; 1005 1005 /* But for now this page is always disabled: */ … … 1009 1009 { 1010 1010 /* Depends on ports availability: */ 1011 if (!is Available(VMSettingsPage_Ports))1011 if (!isPageAvailable(VMSettingsPage_Ports)) 1012 1012 return false; 1013 1013 /* Get the USB controller object: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
r36589 r36592 47 47 protected: 48 48 49 void getFrom();50 void putBackTo();49 void loadData(); 50 void saveData(); 51 51 52 52 void retranslateUi(); … … 56 56 private: 57 57 58 bool is Available(int id);58 bool isPageAvailable(int iPageId); 59 59 }; 60 60 … … 88 88 protected: 89 89 90 void getFrom();91 void putBackTo();90 void loadData(); 91 void saveData(); 92 92 93 93 void retranslateUi(); … … 106 106 private: 107 107 108 bool is Available(int id);108 bool isPageAvailable(int iPageId); 109 109 110 110 CMachine m_machine;
Note:
See TracChangeset
for help on using the changeset viewer.