Changeset 16703 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 12, 2009 10:44:07 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportAppliance.cpp
r16668 r16703 956 956 { 957 957 CVirtualBox vbox = vboxGlobal().virtualBox(); 958 /* Open the appliance*/958 /* Create a appliance object */ 959 959 CAppliance appliance = vbox.CreateAppliance(); 960 if (appliance.isOk()) 960 bool fResult = appliance.isOk(); 961 if (fResult) 961 962 { 962 appliance.Read(file); // @todo error handling963 /* Now we have to interpret that stuff */964 appliance.Interpret();965 if ( appliance.isOk())966 { 967 /* Let the user do some tuning*/968 VBoxImportApplianceDlg settingsDlg (&appliance, aParent);969 if (settingsDlg.exec() == QDialog::Accepted)970 {971 /* Start the import asynchronously */972 CProgress progress;973 progress = appliance.ImportMachines();974 if ( !appliance.isOk())963 /* Read the appliance */ 964 appliance.Read (file); 965 fResult = appliance.isOk(); 966 if (fResult) 967 { 968 /* Now we have to interpret that stuff */ 969 appliance.Interpret(); 970 fResult = appliance.isOk(); 971 if (fResult) 972 { 973 /* Let the user do some tuning */ 974 VBoxImportApplianceDlg settingsDlg (&appliance, aParent); 975 if (settingsDlg.exec() == QDialog::Accepted) 975 976 { 976 vboxProblem().cannotImportAppliance (appliance); 977 return; 977 /* Start the import asynchronously */ 978 CProgress progress; 979 progress = appliance.ImportMachines(); 980 fResult = appliance.isOk(); 981 if (fResult) 982 { 983 /* Show some progress, so the user know whats going on */ 984 vboxProblem().showModalProgressDialog (progress, VBoxImportApplianceDlg::tr ("Importing Appliance ..."), aParent); 985 if (!progress.isOk() || progress.GetResultCode() != 0) 986 { 987 vboxProblem().cannotImportAppliance (progress, appliance); 988 return; 989 } 990 } 978 991 } 979 /* Show some progress, so the user know whats going on */ 980 vboxProblem().showModalProgressDialog (progress, VBoxImportApplianceDlg::tr ("Importing Appliance ..."), aParent); 981 if (!progress.isOk() || progress.GetResultCode() != 0) 982 { 983 vboxProblem().cannotImportAppliance (progress, appliance); 984 return; 985 } 986 } 987 } 988 else 989 { 990 vboxProblem().cannotImportAppliance (appliance); 991 return; 992 } 992 993 } 993 994 } 994 else 995 { 995 if (!fResult) 996 996 vboxProblem().cannotImportAppliance (appliance); 997 return;998 }999 997 } 1000 998 } -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceDlg.ui
r16617 r16703 6 6 <x>0</x> 7 7 <y>0</y> 8 <width> 627</width>9 <height>4 01</height>8 <width>573</width> 9 <height>476</height> 10 10 </rect> 11 11 </property> … … 21 21 <layout class="QGridLayout" name="gridLayout" > 22 22 <item row="0" column="0" > 23 <widget class="QLabel" name="mInfoText" > 24 <property name="text" > 25 <string>These are the Virtual Machines as described in the Appliance. VirtualBox has done some initial mapping of the various values. You can change most of the shown properties by double clicking on the items. To disable some of them use the check box near the values.</string> 26 </property> 27 <property name="alignment" > 28 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> 29 </property> 30 <property name="wordWrap" > 31 <bool>true</bool> 32 </property> 33 </widget> 34 </item> 35 <item row="1" column="0" > 23 36 <widget class="QTreeView" name="mTvSettings" > 24 37 <property name="sizePolicy" > … … 30 43 </widget> 31 44 </item> 32 <item row=" 1" column="0" >45 <item row="2" column="0" > 33 46 <widget class="QWidget" native="1" name="mWarningWidget" > 34 47 <property name="sizePolicy" > … … 71 84 </widget> 72 85 </item> 73 <item row=" 2" column="0" >86 <item row="3" column="0" > 74 87 <widget class="QIDialogButtonBox" name="mButtonBox" > 75 88 <property name="orientation" > … … 88 101 <extends>QDialog</extends> 89 102 <header>QIDialog.h</header> 103 <container>1</container> 90 104 </customwidget> 91 105 <customwidget>
Note:
See TracChangeset
for help on using the changeset viewer.