儲存庫 vbox 的更動 17049
- 時間撮記:
- 2009-2-24 上午09:53:17 (16 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox
- 檔案:
-
- 新增 3 筆資料
- 修改 5 筆資料
- 移動 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r16738 r17049 285 285 include/VBoxSettingsPage.h \ 286 286 include/VBoxSettingsSelector.h \ 287 include/VBoxImportAppliance.h 287 include/VBoxImportApplianceWgt.h \ 288 include/VBoxImportApplianceWzd.h \ 289 include/VBoxChangeLogWgt.h 288 290 289 291 # Sources containing local definitions of classes that use the Q_OBJECT macro. … … 362 364 src/VBoxSettingsSelector.cpp \ 363 365 src/VBoxMediaManagerDlg.cpp \ 364 src/VBoxImportAppliance.cpp 366 src/VBoxImportApplianceWgt.cpp \ 367 src/VBoxImportApplianceWzd.cpp \ 368 src/VBoxChangeLogWgt.cpp 365 369 366 370 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(KBUILD_TARGET)),) # X11 -
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r16617 r17049 56 56 ui/VBoxGLSettingsUpdate.ui \ 57 57 ui/VBoxGLSettingsLanguage.ui \ 58 ui/VBoxImportApplianceDlg.ui 58 ui/VBoxImportApplianceWgt.ui \ 59 ui/VBoxImportApplianceWzd.ui 59 60 60 61 TRANSLATIONS = \ -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxImportApplianceWgt.h
r16994 r17049 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * VBoxImportAppliance class declaration4 * VBoxImportApplianceWgt class declaration 5 5 */ 6 6 … … 21 21 */ 22 22 23 #ifndef __VBoxImportAppliance _h__24 #define __VBoxImportAppliance _h__23 #ifndef __VBoxImportApplianceWgt_h__ 24 #define __VBoxImportApplianceWgt_h__ 25 25 26 #include "VBoxImportAppliance Dlg.gen.h"26 #include "VBoxImportApplianceWgt.gen.h" 27 27 #include "QIWithRetranslateUI.h" 28 #include "QIDialog.h"29 28 30 29 class CAppliance; 31 class CVirtualSystemDescription;32 30 class VirtualSystemModel; 33 31 34 class VBoxImportAppliance 35 { 36 public: 37 static void import (QWidget *aParent = NULL); 38 39 static int minGuestRAM() { return mMinGuestRAM; } 40 static int maxGuestRAM() { return mMaxGuestRAM; } 41 static int minGuestCPUCount() { return mMinGuestCPUCount; } 42 static int maxGuestCPUCount() { return mMaxGuestCPUCount; } 43 44 private: 45 /* Private member vars */ 46 static void initSystemSettings(); 47 48 static int mMinGuestRAM; 49 static int mMaxGuestRAM; 50 static int mMinGuestCPUCount; 51 static int mMaxGuestCPUCount; 52 }; 53 54 class VBoxImportApplianceDlg : public QIWithRetranslateUI<QIDialog>, 55 public Ui::VBoxImportApplianceDlg 32 class VBoxImportApplianceWgt : public QIWithRetranslateUI<QWidget>, 33 public Ui::VBoxImportApplianceWgt 56 34 { 57 35 Q_OBJECT; 58 36 59 37 public: 60 VBoxImportApplianceDlg (CAppliance *aAppliance, QWidget *aParent); 38 VBoxImportApplianceWgt (QWidget *aParent); 39 40 bool setFile (const QString& aFile); 41 bool import(); 42 43 bool isValid() const { return mAppliance != NULL; } 61 44 62 45 public slots: 63 void accept();46 void restoreDefaults(); 64 47 65 48 protected: 66 49 void retranslateUi(); 67 68 private slots:69 void restoreDefaults();70 50 71 51 private: … … 75 55 }; 76 56 77 #endif /* __VBoxImportAppliance _h__ */57 #endif /* __VBoxImportApplianceWgt_h__ */ 78 58 -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r16867 r17049 372 372 void cannotRunInSelectorMode(); 373 373 374 void cannotImportAppliance ( const CAppliance &aAppliance);375 void cannotImportAppliance (const CProgress &aProgress, const CAppliance &aAppliance);374 void cannotImportAppliance (CAppliance *aAppliance, QWidget *aParent = NULL); 375 void cannotImportAppliance (const CProgress &aProgress, CAppliance *aAppliance, QWidget *aParent = NULL); 376 376 377 377 void showRuntimeError (const CConsole &console, bool fatal, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxImportApplianceWgt.cpp
r16994 r17049 2 2 * 3 3 * VBox frontends: Qt4 GUI ("VirtualBox"): 4 * VBoxImportAppliance class implementation4 * VBoxImportApplianceWgt class implementation 5 5 */ 6 6 … … 21 21 */ 22 22 23 #include "VBoxImportAppliance.h" 23 #include "VBoxImportApplianceWgt.h" 24 #include "VBoxImportApplianceWzd.h" 24 25 #include "VBoxGlobal.h" 25 26 #include "VBoxProblemReporter.h" … … 159 160 if (aColumn == DescriptionSection && 160 161 aRole == Qt::DisplayRole) 161 v = VBoxImportAppliance Dlg::tr ("Virtual System %1").arg (mNumber + 1);162 v = VBoxImportApplianceWgt::tr ("Virtual System %1").arg (mNumber + 1); 162 163 return v; 163 164 } … … 247 248 switch (mType) 248 249 { 249 case KVirtualSystemDescriptionType_Name: v = VBoxImportAppliance Dlg::tr ("Name"); break;250 case KVirtualSystemDescriptionType_OS: v = VBoxImportAppliance Dlg::tr ("Guest OS Type"); break;251 case KVirtualSystemDescriptionType_CPU: v = VBoxImportAppliance Dlg::tr ("CPU"); break;252 case KVirtualSystemDescriptionType_Memory: v = VBoxImportAppliance Dlg::tr ("RAM"); break;253 case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = VBoxImportAppliance Dlg::tr ("Hard Disk Controller IDE"); break;254 case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = VBoxImportAppliance Dlg::tr ("Hard Disk Controller SATA"); break;255 case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = VBoxImportAppliance Dlg::tr ("Hard Disk Controller SCSI"); break;256 case KVirtualSystemDescriptionType_CDROM: v = VBoxImportAppliance Dlg::tr ("DVD"); break;257 case KVirtualSystemDescriptionType_Floppy: v = VBoxImportAppliance Dlg::tr ("Floppy"); break;258 case KVirtualSystemDescriptionType_NetworkAdapter: v = VBoxImportAppliance Dlg::tr ("Network Adapter"); break;259 case KVirtualSystemDescriptionType_USBController: v = VBoxImportAppliance Dlg::tr ("USB Controller"); break;260 case KVirtualSystemDescriptionType_SoundCard: v = VBoxImportAppliance Dlg::tr ("Sound Card"); break;261 case KVirtualSystemDescriptionType_HardDiskImage: v = VBoxImportAppliance Dlg::tr ("Virtual Disk Image"); break;262 default: v = VBoxImportAppliance Dlg::tr ("Unknown Hardware Item"); break;250 case KVirtualSystemDescriptionType_Name: v = VBoxImportApplianceWgt::tr ("Name"); break; 251 case KVirtualSystemDescriptionType_OS: v = VBoxImportApplianceWgt::tr ("Guest OS Type"); break; 252 case KVirtualSystemDescriptionType_CPU: v = VBoxImportApplianceWgt::tr ("CPU"); break; 253 case KVirtualSystemDescriptionType_Memory: v = VBoxImportApplianceWgt::tr ("RAM"); break; 254 case KVirtualSystemDescriptionType_HardDiskControllerIDE: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller IDE"); break; 255 case KVirtualSystemDescriptionType_HardDiskControllerSATA: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller SATA"); break; 256 case KVirtualSystemDescriptionType_HardDiskControllerSCSI: v = VBoxImportApplianceWgt::tr ("Hard Disk Controller SCSI"); break; 257 case KVirtualSystemDescriptionType_CDROM: v = VBoxImportApplianceWgt::tr ("DVD"); break; 258 case KVirtualSystemDescriptionType_Floppy: v = VBoxImportApplianceWgt::tr ("Floppy"); break; 259 case KVirtualSystemDescriptionType_NetworkAdapter: v = VBoxImportApplianceWgt::tr ("Network Adapter"); break; 260 case KVirtualSystemDescriptionType_USBController: v = VBoxImportApplianceWgt::tr ("USB Controller"); break; 261 case KVirtualSystemDescriptionType_SoundCard: v = VBoxImportApplianceWgt::tr ("Sound Card"); break; 262 case KVirtualSystemDescriptionType_HardDiskImage: v = VBoxImportApplianceWgt::tr ("Virtual Disk Image"); break; 263 default: v = VBoxImportApplianceWgt::tr ("Unknown Hardware Item"); break; 263 264 } 264 265 } … … 270 271 { 271 272 case KVirtualSystemDescriptionType_OS: v = vboxGlobal().vmGuestOSTypeDescription (mConfigValue); break; 272 case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxImportAppliance Dlg::tr ("MB"); break;273 case KVirtualSystemDescriptionType_Memory: v = mConfigValue + " " + VBoxImportApplianceWgt::tr ("MB"); break; 273 274 case KVirtualSystemDescriptionType_SoundCard: v = vboxGlobal().toString (static_cast<KAudioControllerType> (mConfigValue.toInt())); break; 274 275 case KVirtualSystemDescriptionType_NetworkAdapter: v = vboxGlobal().toString (static_cast<KNetworkAdapterType> (mConfigValue.toInt())); break; … … 283 284 { 284 285 if (!mOrigValue.isEmpty()) 285 v = VBoxImportAppliance Dlg::tr ("<b>Original Value:</b> %1").arg (mOrigValue);286 v = VBoxImportApplianceWgt::tr ("<b>Original Value:</b> %1").arg (mOrigValue); 286 287 } 287 288 break; … … 415 416 QSpinBox *e = new QSpinBox (aParent); 416 417 e->setRange (VBoxImportAppliance::minGuestRAM(), VBoxImportAppliance::maxGuestRAM()); 417 e->setSuffix (" " + VBoxImportAppliance Dlg::tr ("MB"));418 e->setSuffix (" " + VBoxImportApplianceWgt::tr ("MB")); 418 419 editor = e; 419 420 break; … … 926 927 switch (aSection) 927 928 { 928 case DescriptionSection: title = VBoxImportAppliance Dlg::tr ("Description"); break;929 case ConfigValueSection: title = VBoxImportAppliance Dlg::tr ("Configuration"); break;929 case DescriptionSection: title = VBoxImportApplianceWgt::tr ("Description"); break; 930 case ConfigValueSection: title = VBoxImportApplianceWgt::tr ("Configuration"); break; 930 931 } 931 932 return title; … … 958 959 959 960 //////////////////////////////////////////////////////////////////////////////// 960 // VBoxImportAppliance 961 962 int VBoxImportAppliance::mMinGuestRAM = -1; 963 int VBoxImportAppliance::mMaxGuestRAM = -1; 964 int VBoxImportAppliance::mMinGuestCPUCount = -1; 965 int VBoxImportAppliance::mMaxGuestCPUCount = -1; 966 967 /* static */ 968 void VBoxImportAppliance::import (QWidget *aParent /* = NULL */) 969 { 970 initSystemSettings(); 971 972 /* We need a file to import; request one from the user */ 973 QString file = VBoxGlobal::getOpenFileName ("", 974 VBoxGlobal::tr ("Open Virtualization Format (%1)").arg ("*.ovf"), 975 aParent, 976 VBoxGlobal::tr ("Select an appliance to import")); 977 if (!file.isEmpty()) 978 { 979 CVirtualBox vbox = vboxGlobal().virtualBox(); 980 /* Create a appliance object */ 981 CAppliance appliance = vbox.CreateAppliance(); 982 bool fResult = appliance.isOk(); 983 if (fResult) 984 { 985 /* Read the appliance */ 986 appliance.Read (file); 987 fResult = appliance.isOk(); 988 if (fResult) 989 { 990 /* Now we have to interpret that stuff */ 991 appliance.Interpret(); 992 fResult = appliance.isOk(); 993 if (fResult) 994 { 995 /* Let the user do some tuning */ 996 VBoxImportApplianceDlg settingsDlg (&appliance, aParent); 997 if (settingsDlg.exec() == QDialog::Accepted) 998 { 999 /* Start the import asynchronously */ 1000 CProgress progress; 1001 progress = appliance.ImportMachines(); 1002 fResult = appliance.isOk(); 1003 if (fResult) 1004 { 1005 /* Show some progress, so the user know whats going on */ 1006 vboxProblem().showModalProgressDialog (progress, VBoxImportApplianceDlg::tr ("Importing Appliance ..."), aParent); 1007 if (!progress.isOk() || progress.GetResultCode() != 0) 1008 { 1009 vboxProblem().cannotImportAppliance (progress, appliance); 1010 return; 1011 } 1012 } 1013 } 1014 } 1015 } 1016 } 1017 if (!fResult) 1018 vboxProblem().cannotImportAppliance (appliance); 1019 } 1020 } 1021 1022 /* static */ 1023 void VBoxImportAppliance::initSystemSettings() 1024 { 1025 if (mMinGuestRAM == -1) 1026 { 1027 /* We need some global defaults from the current VirtualBox 1028 installation */ 1029 CSystemProperties sp = vboxGlobal().virtualBox().GetSystemProperties(); 1030 mMinGuestRAM = sp.GetMinGuestRAM(); 1031 mMaxGuestRAM = sp.GetMaxGuestRAM(); 1032 mMinGuestCPUCount = sp.GetMinGuestCPUCount(); 1033 mMaxGuestCPUCount = sp.GetMaxGuestCPUCount(); 1034 } 1035 } 1036 1037 //////////////////////////////////////////////////////////////////////////////// 1038 // VBoxImportApplianceDlg 1039 1040 VBoxImportApplianceDlg::VBoxImportApplianceDlg (CAppliance *aAppliance, QWidget *aParent) 1041 : QIWithRetranslateUI<QIDialog> (aParent) 1042 , mAppliance (aAppliance) 1043 { 1044 AssertPtr (aAppliance); 1045 961 // VBoxImportApplianceWgt 962 963 VBoxImportApplianceWgt::VBoxImportApplianceWgt (QWidget *aParent) 964 : QIWithRetranslateUI<QWidget> (aParent) 965 , mAppliance (NULL) 966 , mModel (NULL) 967 { 1046 968 /* Apply UI decorations */ 1047 Ui::VBoxImportApplianceDlg::setupUi (this); 1048 1049 QVector<CVirtualSystemDescription> vsds = aAppliance->GetVirtualSystemDescriptions(); 1050 1051 mModel = new VirtualSystemModel (vsds, this); 1052 1053 VirtualSystemSortProxyModel *proxy = new VirtualSystemSortProxyModel (this); 1054 proxy->setSourceModel (mModel); 1055 proxy->sort (DescriptionSection, Qt::DescendingOrder); 1056 1057 VirtualSystemDelegate *delegate = new VirtualSystemDelegate (proxy, this); 1058 1059 /* Set our own model */ 1060 mTvSettings->setModel (proxy); 1061 /* Set our own delegate */ 1062 mTvSettings->setItemDelegate (delegate); 1063 /* For now we hide the original column. This data is displayed as tooltip 1064 also. */ 1065 mTvSettings->setColumnHidden (OriginalValueSection, true); 969 Ui::VBoxImportApplianceWgt::setupUi (this); 970 1066 971 /* Make the tree looking nicer */ 1067 972 mTvSettings->setRootIsDecorated (false); 1068 973 mTvSettings->setAlternatingRowColors (true); 1069 mTvSettings->expandAll();1070 974 mTvSettings->header()->setStretchLastSection (true); 1071 975 mTvSettings->header()->setResizeMode (QHeaderView::ResizeToContents); 1072 976 1073 /* Check for warnings & if there are one display them. */1074 bool fWarningsEnabled = false;1075 for (int i = 0; i < vsds.size(); ++i)1076 {1077 QVector<QString> warnings = vsds[i].GetWarnings();1078 if (warnings.size() > 0)1079 {1080 mWarningTextEdit->append (tr("Virtual System %1:").arg (i+1));1081 foreach (const QString& text, warnings)1082 mWarningTextEdit->append ("- " + text);1083 fWarningsEnabled = true;1084 }1085 }1086 mWarningWidget->setShown (fWarningsEnabled);1087 1088 connect (mButtonBox->button (QDialogButtonBox::RestoreDefaults), SIGNAL (clicked ()),1089 this, SLOT (restoreDefaults ()));1090 1091 977 /* Applying language settings */ 1092 978 retranslateUi(); 1093 979 } 1094 980 1095 void VBoxImportApplianceDlg::accept() 1096 { 1097 mModel->putBack(); 1098 QIDialog::accept(); 1099 } 1100 1101 void VBoxImportApplianceDlg::retranslateUi() 981 bool VBoxImportApplianceWgt::setFile (const QString& aFile) 982 { 983 bool fResult = false; 984 if (!aFile.isEmpty()) 985 { 986 CVirtualBox vbox = vboxGlobal().virtualBox(); 987 /* Create a appliance object */ 988 mAppliance = new CAppliance(vbox.CreateAppliance()); 989 fResult = mAppliance->isOk(); 990 if (fResult) 991 { 992 /* Read the appliance */ 993 mAppliance->Read (aFile); 994 fResult = mAppliance->isOk(); 995 if (fResult) 996 { 997 /* Now we have to interpret that stuff */ 998 mAppliance->Interpret(); 999 fResult = mAppliance->isOk(); 1000 if (fResult) 1001 { 1002 if (mModel) 1003 delete mModel; 1004 1005 QVector<CVirtualSystemDescription> vsds = mAppliance->GetVirtualSystemDescriptions(); 1006 1007 mModel = new VirtualSystemModel (vsds, this); 1008 1009 VirtualSystemSortProxyModel *proxy = new VirtualSystemSortProxyModel (this); 1010 proxy->setSourceModel (mModel); 1011 proxy->sort (DescriptionSection, Qt::DescendingOrder); 1012 1013 VirtualSystemDelegate *delegate = new VirtualSystemDelegate (proxy, this); 1014 1015 /* Set our own model */ 1016 mTvSettings->setModel (proxy); 1017 /* Set our own delegate */ 1018 mTvSettings->setItemDelegate (delegate); 1019 /* For now we hide the original column. This data is displayed as tooltip 1020 also. */ 1021 mTvSettings->setColumnHidden (OriginalValueSection, true); 1022 mTvSettings->expandAll(); 1023 1024 /* Check for warnings & if there are one display them. */ 1025 bool fWarningsEnabled = false; 1026 for (int i = 0; i < vsds.size(); ++i) 1027 { 1028 QVector<QString> warnings = vsds[i].GetWarnings(); 1029 if (warnings.size() > 0) 1030 { 1031 mWarningTextEdit->append (tr("Virtual System %1:").arg (i+1)); 1032 foreach (const QString& text, warnings) 1033 mWarningTextEdit->append ("- " + text); 1034 fWarningsEnabled = true; 1035 } 1036 } 1037 mWarningWidget->setShown (fWarningsEnabled); 1038 } 1039 } 1040 } 1041 if (!fResult) 1042 { 1043 vboxProblem().cannotImportAppliance (mAppliance, this); 1044 /* Delete the appliance in a case of an error */ 1045 delete mAppliance; 1046 mAppliance = NULL; 1047 } 1048 } 1049 return fResult; 1050 } 1051 1052 bool VBoxImportApplianceWgt::import() 1053 { 1054 if (mAppliance) 1055 { 1056 mModel->putBack(); 1057 /* Start the import asynchronously */ 1058 CProgress progress; 1059 progress = mAppliance->ImportMachines(); 1060 bool fResult = mAppliance->isOk(); 1061 if (fResult) 1062 { 1063 /* Show some progress, so the user know whats going on */ 1064 vboxProblem().showModalProgressDialog (progress, tr ("Importing Appliance ..."), this); 1065 if (!progress.isOk() || progress.GetResultCode() != 0) 1066 { 1067 vboxProblem().cannotImportAppliance (progress, mAppliance, this); 1068 return false; 1069 } 1070 else 1071 return true; 1072 } 1073 if (!fResult) 1074 vboxProblem().cannotImportAppliance (mAppliance, this); 1075 } 1076 return false; 1077 } 1078 1079 void VBoxImportApplianceWgt::restoreDefaults() 1080 { 1081 mModel->restoreDefaults(); 1082 } 1083 1084 void VBoxImportApplianceWgt::retranslateUi() 1102 1085 { 1103 1086 /* Translate uic generated strings */ 1104 Ui::VBoxImportApplianceDlg::retranslateUi (this); 1105 1106 mButtonBox->button (QDialogButtonBox::Ok)->setText (tr ("&Import")); 1107 } 1108 1109 void VBoxImportApplianceDlg::restoreDefaults() 1110 { 1111 mModel->restoreDefaults(); 1112 } 1113 1087 Ui::VBoxImportApplianceWgt::retranslateUi (this); 1088 } 1089 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r16885 r17049 2088 2088 } 2089 2089 2090 void VBoxProblemReporter::cannotImportAppliance ( const CAppliance &aAppliance)2091 { 2092 if (aAppliance .isNull())2093 { 2094 message ( mainWindowShown(),2090 void VBoxProblemReporter::cannotImportAppliance (CAppliance *aAppliance, QWidget *aParent /* = NULL */) 2091 { 2092 if (aAppliance->isNull()) 2093 { 2094 message (aParent ? aParent : mainWindowShown(), 2095 2095 Error, 2096 2096 tr ("Failed to open appliance.")); … … 2098 2098 { 2099 2099 /* Preserve the current error info before calling the object again */ 2100 COMResult res ( aAppliance);2101 2102 message ( mainWindowShown(),2100 COMResult res (*aAppliance); 2101 2102 message (aParent ? aParent : mainWindowShown(), 2103 2103 Error, 2104 tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance .GetPath()),2104 tr ("Failed to open/interpret appliance <b>%1</b>.").arg (aAppliance->GetPath()), 2105 2105 formatErrorInfo (res)); 2106 2106 } 2107 2107 } 2108 2108 2109 void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, const CAppliance& aAppliance)2109 void VBoxProblemReporter::cannotImportAppliance (const CProgress &aProgress, CAppliance* aAppliance, QWidget *aParent /* = NULL */) 2110 2110 { 2111 2111 AssertWrapperOk (aProgress); 2112 2112 2113 message ( mainWindowShown(),2113 message (aParent ? aParent : mainWindowShown(), 2114 2114 Error, 2115 tr ("Failed to import appliance <b>%1</b>.").arg (aAppliance .GetPath()),2115 tr ("Failed to import appliance <b>%1</b>.").arg (aAppliance->GetPath()), 2116 2116 formatErrorInfo (aProgress.GetErrorInfo())); 2117 2117 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r16867 r17049 30 30 #include "VBoxNewVMWzd.h" 31 31 #include "VBoxMediaManagerDlg.h" 32 #include "VBoxImportAppliance .h"32 #include "VBoxImportApplianceWzd.h" 33 33 #include "VBoxSettingsDialogSpecific.h" 34 34 #include "VBoxVMLogViewer.h" 35 35 #include "VBoxGlobal.h" 36 36 #include "VBoxUtils.h" 37 #include "VBoxChangeLogWgt.h" 37 38 38 39 #ifdef Q_WS_X11 … … 48 49 #include <QDesktopWidget> 49 50 #include <QToolButton> 51 #include <QFile> 50 52 51 53 // VBoxVMDetailsView class … … 699 701 /* bring the VM list to the focus */ 700 702 mVMListView->setFocus(); 703 704 // VBoxChangeLogWgt *cl = new VBoxChangeLogWgt (this); 705 // cl->exec(); 706 707 // QIMessageBox *mb = new QIMessageBox ("Changlog", "sdfsds", QIMessageBox::Information, 1, 0, 0); 708 // QFile file ("/mnt/data/projects/innotek/vbox/out/linux.amd64/debug/bin/ChangeLog.html"); 709 // file.open(QIODevice::ReadOnly); 710 // QString bla (file.readAll()); 711 // mb->setDetailsText (bla); 712 // mb->setDetailsShown (true); 713 // mb->exec(); 701 714 } 702 715 -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxImportApplianceWgt.ui
r16994 r17049 1 <ui version="4.0" > 2 <class>VBoxImportApplianceDlg</class> 3 <widget class="QIDialog" name="VBoxImportApplianceDlg" > 4 <property name="geometry" > 1 <?xml version="1.0" encoding="UTF-8"?> 2 <ui version="4.0"> 3 <class>VBoxImportApplianceWgt</class> 4 <widget class="QWidget" name="VBoxImportApplianceWgt"> 5 <property name="geometry"> 5 6 <rect> 6 7 <x>0</x> 7 8 <y>0</y> 8 <width> 573</width>9 <height> 476</height>9 <width>459</width> 10 <height>305</height> 10 11 </rect> 11 12 </property> 12 <property name="windowTitle" 13 <string> Appliance Import Settings</string>13 <property name="windowTitle"> 14 <string>Form</string> 14 15 </property> 15 <property name="sizeGripEnabled" > 16 <bool>true</bool> 17 </property> 18 <property name="modal" > 19 <bool>true</bool> 20 </property> 21 <layout class="QGridLayout" name="gridLayout" > 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" > 36 <widget class="QTreeView" name="mTvSettings" > 37 <property name="sizePolicy" > 38 <sizepolicy vsizetype="MinimumExpanding" hsizetype="Expanding" > 16 <layout class="QVBoxLayout" name="verticalLayout_2"> 17 <property name="margin"> 18 <number>0</number> 19 </property> 20 <item> 21 <widget class="QTreeView" name="mTvSettings"> 22 <property name="sizePolicy"> 23 <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding"> 39 24 <horstretch>0</horstretch> 40 25 <verstretch>0</verstretch> … … 43 28 </widget> 44 29 </item> 45 <item row="2" column="0">46 <widget class="QWidget" na tive="1" name="mWarningWidget">47 <property name="sizePolicy" 48 <sizepolicy vsizetype="Maximum" hsizetype="Preferred">30 <item> 31 <widget class="QWidget" name="mWarningWidget" native="true"> 32 <property name="sizePolicy"> 33 <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> 49 34 <horstretch>0</horstretch> 50 35 <verstretch>0</verstretch> 51 36 </sizepolicy> 52 37 </property> 53 <layout class="QVBoxLayout" name="verticalLayout" 54 <property name="sizeConstraint" 38 <layout class="QVBoxLayout" name="verticalLayout"> 39 <property name="sizeConstraint"> 55 40 <enum>QLayout::SetDefaultConstraint</enum> 56 41 </property> 57 <property name="margin" 42 <property name="margin"> 58 43 <number>0</number> 59 44 </property> 60 45 <item> 61 <widget class="QLabel" name="label" 62 <property name="text" 46 <widget class="QLabel" name="label"> 47 <property name="text"> 63 48 <string>Warnings:</string> 64 49 </property> … … 66 51 </item> 67 52 <item> 68 <widget class="QTextEdit" name="mWarningTextEdit" 69 <property name="maximumSize" 53 <widget class="QTextEdit" name="mWarningTextEdit"> 54 <property name="maximumSize"> 70 55 <size> 71 56 <width>16777215</width> … … 73 58 </size> 74 59 </property> 75 <property name="autoFormatting" 60 <property name="autoFormatting"> 76 61 <set>QTextEdit::AutoBulletList</set> 77 62 </property> 78 <property name="readOnly" 63 <property name="readOnly"> 79 64 <bool>true</bool> 80 65 </property> … … 84 69 </widget> 85 70 </item> 86 <item row="3" column="0" >87 <widget class="QIDialogButtonBox" name="mButtonBox" >88 <property name="orientation" >89 <enum>Qt::Horizontal</enum>90 </property>91 <property name="standardButtons" >92 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::RestoreDefaults</set>93 </property>94 </widget>95 </item>96 71 </layout> 97 72 </widget> 98 <customwidgets>99 <customwidget>100 <class>QIDialog</class>101 <extends>QDialog</extends>102 <header>QIDialog.h</header>103 <container>1</container>104 </customwidget>105 <customwidget>106 <class>QIDialogButtonBox</class>107 <extends>QDialogButtonBox</extends>108 <header>QIDialogButtonBox.h</header>109 </customwidget>110 </customwidgets>111 73 <resources/> 112 <connections> 113 <connection> 114 <sender>mButtonBox</sender> 115 <signal>accepted()</signal> 116 <receiver>VBoxImportApplianceDlg</receiver> 117 <slot>accept()</slot> 118 <hints> 119 <hint type="sourcelabel" > 120 <x>248</x> 121 <y>254</y> 122 </hint> 123 <hint type="destinationlabel" > 124 <x>157</x> 125 <y>274</y> 126 </hint> 127 </hints> 128 </connection> 129 <connection> 130 <sender>mButtonBox</sender> 131 <signal>rejected()</signal> 132 <receiver>VBoxImportApplianceDlg</receiver> 133 <slot>reject()</slot> 134 <hints> 135 <hint type="sourcelabel" > 136 <x>316</x> 137 <y>260</y> 138 </hint> 139 <hint type="destinationlabel" > 140 <x>286</x> 141 <y>274</y> 142 </hint> 143 </hints> 144 </connection> 145 </connections> 74 <connections/> 146 75 </ui>
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器