Changeset 7442 in vbox for trunk/src/VBox/Frontends/VirtualBox4/ui
- Timestamp:
- Mar 13, 2008 2:33:18 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28880
- Location:
- trunk/src/VBox/Frontends/VirtualBox4/ui
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxDiskImageManagerDlg.ui.h
r7250 r7442 2205 2205 if (hda.GetHardDisk().GetId() == aItemId) 2206 2206 { 2207 machine.DetachHardDisk (hda.GetController(), 2208 hda.GetDeviceNumber()); 2207 machine.DetachHardDisk (hda.GetBus(), 2208 hda.GetChannel(), 2209 hda.GetDevice()); 2209 2210 if (!machine.isOk()) 2210 2211 vboxProblem().cannotDetachHardDisk (this, 2211 machine, hda.Get Controller(), hda.GetDeviceNumber());2212 machine, hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 2212 2213 break; 2213 2214 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewVMWzd.ui.h
r7282 r7442 369 369 { 370 370 CMachine m = session.GetMachine(); 371 m.AttachHardDisk (uuidHD, K DiskControllerType_IDE0, 0);371 m.AttachHardDisk (uuidHD, KStorageBus_IDE, 0, 0); 372 372 if (m.isOk()) 373 373 { … … 380 380 else 381 381 vboxProblem().cannotAttachHardDisk (this, m, uuidHD, 382 K DiskControllerType_IDE0, 0);382 KStorageBus_IDE, 0, 0); 383 383 session.Close(); 384 384 } -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui
r7207 r7442 160 160 <function returnType="QString" access="pritave">parseStatistics( const QString & )</function> 161 161 <function access="private">refreshStatistics()</function> 162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, K DiskControllerType, LONG, int, int )</function>162 <function returnType="QString" access="pritave">formatHardDisk( const QString &, KStorageBus, LONG, LONG, int, int )</function> 163 163 <function returnType="QString" access="pritave">formatAdapter( const QString &, ULONG, int, int )</function> 164 164 <function returnType="QString" access="pritave">composeArticle( const QString &, int, int )</function> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMInformationDlg.ui.h
r7250 r7442 485 485 486 486 /* Hard Disk Statistics. */ 487 QString primaryMaster = QString ("%1 %2") 488 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 489 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 0)); 490 QString primarySlave = QString ("%1 %2") 491 .arg (vboxGlobal().toString (KStorageBus_IDE, 0)) 492 .arg (vboxGlobal().toString (KStorageBus_IDE, 0, 1)); 493 QString secondarySlave = QString ("%1 %2") 494 .arg (vboxGlobal().toString (KStorageBus_IDE, 1)) 495 .arg (vboxGlobal().toString (KStorageBus_IDE, 1, 1)); 496 487 497 result += hdrRow.arg (":/hd_16px.png").arg (tr ("IDE Hard Disk Statistics")); 488 result += formatHardDisk ( tr ("Primary Master"), KDiskControllerType_IDE0, 0, 0, 1);498 result += formatHardDisk (primaryMaster, KStorageBus_IDE, 0, 0, 0, 1); 489 499 result += interline; 490 result += formatHardDisk ( tr ("Primary Slave"), KDiskControllerType_IDE0, 1, 4, 5);500 result += formatHardDisk (primarySlave, KStorageBus_IDE, 0, 1, 4, 5); 491 501 result += interline; 492 result += formatHardDisk ( tr ("Secondary Slave"), KDiskControllerType_IDE1, 1, 12, 13);502 result += formatHardDisk (secondarySlave, KStorageBus_IDE, 1, 1, 12, 13); 493 503 result += paragraph; 494 504 495 505 /* CD/DVD-ROM Statistics. */ 496 506 result += hdrRow.arg (":/cd_16px.png").arg (tr ("CD/DVD-ROM Statistics")); 497 result += formatHardDisk (QString::null /* tr ("Secondary Master") */,498 K DiskControllerType_IDE1, 0, 8, 9);507 result += formatHardDisk (QString::null, 508 KStorageBus_IDE, 1, 0, 8, 9); 499 509 result += paragraph; 500 510 … … 515 525 516 526 QString VBoxVMInformationDlg::formatHardDisk (const QString &aName, 517 K DiskControllerType aType,518 LONG a Slot, int aStart, int aFinish)527 KStorageBus aBus, LONG aChannel, 528 LONG aDevice, int aStart, int aFinish) 519 529 { 520 530 if (mSession.isNull()) … … 525 535 526 536 QString result = aName.isNull() ? QString::null : header.arg (aName); 527 CHardDisk hd = machine.GetHardDisk (a Type, aSlot);528 if (!hd.isNull() || (a Type == KDiskControllerType_IDE1 && aSlot== 0))537 CHardDisk hd = machine.GetHardDisk (aBus, aChannel, aDevice); 538 if (!hd.isNull() || (aBus == KStorageBus_IDE && aChannel == 1 && aDevice == 0)) 529 539 { 530 540 result += composeArticle (QString::null, aStart, aFinish); -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsDlg.ui.h
r7250 r7442 1718 1718 struct 1719 1719 { 1720 KDiskControllerType ctl; 1720 KStorageBus bus; 1721 LONG channel; 1721 1722 LONG dev; 1722 1723 struct { … … 1729 1730 diskSet[] = 1730 1731 { 1731 { K DiskControllerType_IDE0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} },1732 { K DiskControllerType_IDE0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} },1733 { K DiskControllerType_IDE1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} },1732 { KStorageBus_IDE, 0, 0, {grbHDA, cbHDA, txHDA, &uuidHDA} }, 1733 { KStorageBus_IDE, 0, 1, {grbHDB, cbHDB, txHDB, &uuidHDB} }, 1734 { KStorageBus_IDE, 1, 1, {grbHDD, cbHDD, txHDD, &uuidHDD} }, 1734 1735 }; 1735 1736 … … 1745 1746 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 1746 1747 { 1747 if (diskSet [i].ctl == hda.GetController() && 1748 diskSet [i].dev == hda.GetDeviceNumber()) 1748 if (diskSet [i].bus == hda.GetBus() && 1749 diskSet [i].channel == hda.GetChannel() && 1750 diskSet [i].dev == hda.GetDevice()) 1749 1751 { 1750 1752 CHardDisk hd = hda.GetHardDisk(); … … 2101 2103 struct 2102 2104 { 2103 KDiskControllerType ctl; 2105 KStorageBus bus; 2106 LONG channel; 2104 2107 LONG dev; 2105 2108 struct { … … 2110 2113 diskSet[] = 2111 2114 { 2112 { K DiskControllerType_IDE0, 0, {grbHDA, &uuidHDA} },2113 { K DiskControllerType_IDE0, 1, {grbHDB, &uuidHDB} },2114 { K DiskControllerType_IDE1, 1, {grbHDD, &uuidHDD} }2115 { KStorageBus_IDE, 0, 0, {grbHDA, &uuidHDA} }, 2116 { KStorageBus_IDE, 0, 1, {grbHDB, &uuidHDB} }, 2117 { KStorageBus_IDE, 1, 1, {grbHDD, &uuidHDD} } 2115 2118 }; 2116 2119 … … 2126 2129 for (uint i = 0; i < SIZEOF_ARRAY (diskSet); i++) 2127 2130 { 2128 if (diskSet [i].ctl == hda.GetController() && 2129 diskSet [i].dev == hda.GetDeviceNumber()) 2131 if (diskSet [i].bus == hda.GetBus() && 2132 diskSet [i].channel == hda.GetChannel() && 2133 diskSet [i].dev == hda.GetDevice()) 2130 2134 { 2131 cmachine.DetachHardDisk (diskSet [i]. ctl, diskSet [i].dev);2135 cmachine.DetachHardDisk (diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2132 2136 if (!cmachine.isOk()) 2133 2137 vboxProblem().cannotDetachHardDisk ( 2134 this, cmachine, diskSet [i]. ctl, diskSet [i].dev);2138 this, cmachine, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2135 2139 } 2136 2140 } … … 2143 2147 if (diskSet [i].data.grb->isChecked() && !(*newId).isNull()) 2144 2148 { 2145 cmachine.AttachHardDisk (*newId, diskSet [i]. ctl, diskSet [i].dev);2149 cmachine.AttachHardDisk (*newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2146 2150 if (!cmachine.isOk()) 2147 2151 vboxProblem().cannotAttachHardDisk ( 2148 this, cmachine, *newId, diskSet [i]. ctl, diskSet [i].dev);2152 this, cmachine, *newId, diskSet [i].bus, diskSet [i].channel, diskSet [i].dev); 2149 2153 } 2150 2154 }
Note:
See TracChangeset
for help on using the changeset viewer.