- Timestamp:
- Nov 24, 2010 3:18:40 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r34275 r34329 381 381 src/selector/UIVMDesktop.cpp \ 382 382 src/settings/UISettingsDialogSpecific.cpp \ 383 src/settings/machine/UIMachineSettingsStorage.cpp \ 383 384 src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp \ 384 385 src/runtime/UIActionsPool.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r34132 r34329 1286 1286 } 1287 1287 1288 int VBoxProblemReporter::confirmRunNewHDWzdOrOFD (KDeviceType aDeviceType) 1289 { 1290 switch (aDeviceType) 1291 { 1292 case KDeviceType_HardDisk: 1293 return message (QApplication::activeWindow(), Info, 1294 tr ("<p>There are no unused medium available for the newly " 1295 "created attachment.</p>" 1296 "<p>Press the <b>Create</b> button to start the <i>New " 1297 "Virtual Disk</i> wizard and create a new medium, " 1298 "or press the <b>Select</b> if you wish to open existing " 1299 "medium using file-open dialog.</p>"), 1300 0, /* aAutoConfirmId */ 1301 QIMessageBox::Yes, 1302 QIMessageBox::No | QIMessageBox::Default, 1303 QIMessageBox::Cancel | QIMessageBox::Escape, 1304 tr ("&Create", "medium"), 1305 tr ("&Select", "medium")); 1306 default: 1307 return message (QApplication::activeWindow(), Info, 1308 tr ("<p>There are no unused medium available for the newly " 1309 "created attachment.</p>" 1310 "<p>Press the <b>Select</b> if you wish to open existing " 1311 "medium using file-open dialog.</p>"), 1312 0, /* aAutoConfirmId */ 1313 QIMessageBox::No | QIMessageBox::Default, 1314 QIMessageBox::Cancel | QIMessageBox::Escape, 1315 0, 1316 tr ("&Select", "medium")); 1317 } 1318 return QIMessageBox::Cancel; 1288 int VBoxProblemReporter::askAboutHardDiskAttachmentCreation(QWidget *pParent, 1289 const QString &strControllerName) 1290 { 1291 return message(pParent, Question, 1292 tr("<p>You are about to add a virtual hard disk to controller <b>%1</b>.</p>" 1293 "<p>Would you like to create a new, empty disk or select an existing one? " 1294 "You will be able to change the attached disk again at a later time " 1295 "if you wish using the button on the <b>Attributes</b> pane.</p>") 1296 .arg(strControllerName), 1297 0, /* aAutoConfirmId */ 1298 QIMessageBox::Yes, 1299 QIMessageBox::No, 1300 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape, 1301 tr("Create &new disk", "add attachment routine"), 1302 tr("&Choose existing disk", "add attachment routine")); 1303 } 1304 1305 int VBoxProblemReporter::askAboutOpticalAttachmentCreation(QWidget *pParent, 1306 const QString &strControllerName) 1307 { 1308 return message(pParent, Question, 1309 tr("<p>You are about to add a new CD/DVD drive to controller <b>%1</b>.</p>" 1310 "<p>Would you like to choose a virtual CD/DVD disk to insert into the drive " 1311 "or to leave it empty for now? " 1312 "You will be able to change the disk inserted later or pass through a physical disk " 1313 "using the button on the <b>Attributes</b> pane or while the machine is running using the <b>Device</b> menu.</p>") 1314 .arg(strControllerName), 1315 0, /* aAutoConfirmId */ 1316 QIMessageBox::Yes, 1317 QIMessageBox::No, 1318 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape, 1319 tr("&Choose disk", "add attachment routine"), 1320 tr("Leave &empty", "add attachment routine")); 1321 } 1322 1323 int VBoxProblemReporter::askAboutFloppyAttachmentCreation(QWidget *pParent, 1324 const QString &strControllerName) 1325 { 1326 return message(pParent, Question, 1327 tr("<p>You are about to add a new floppy drive to controller <b>%1</b>.</p>" 1328 "<p>Would you like to choose a virtual floppy disk to insert into the drive " 1329 "or to leave it empty for now? " 1330 "You will be able to change the disk inserted later or pass through a physical disk " 1331 "using the button on the <b>Attributes</b> pane or while the machine is running using the <b>Device</b> menu.</p>") 1332 .arg(strControllerName), 1333 0, /* aAutoConfirmId */ 1334 QIMessageBox::Yes, 1335 QIMessageBox::No, 1336 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape, 1337 tr("&Choose disk", "add attachment routine"), 1338 tr("Leave &empty", "add attachment routine")); 1319 1339 } 1320 1340 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h
r34069 r34329 260 260 int confirmDetachAddControllerSlots (QWidget *aParent) const; 261 261 int confirmChangeAddControllerSlots (QWidget *aParent) const; 262 int confirmRunNewHDWzdOrOFD (KDeviceType aDeviceType); 262 263 int askAboutHardDiskAttachmentCreation(QWidget *pParent, const QString &strControllerName); 264 int askAboutOpticalAttachmentCreation(QWidget *pParent, const QString &strControllerName); 265 int askAboutFloppyAttachmentCreation(QWidget *pParent, const QString &strControllerName); 263 266 264 267 int confirmRemovingOfLastDVDDevice() const; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r33932 r34329 36 36 #include <QTimer> 37 37 #include <QCommonStyle> 38 39 /* String Tags */40 const char *firstAvailableId = "first available";41 38 42 39 /* Type converters */ … … 133 130 mPool [FDAttachmentAddDis] = QPixmap (":/fd_add_disabled_16px.png"); 134 131 135 mPool [VMMEn] = QPixmap (":/select_file_16px.png"); 136 mPool [VMMDis] = QPixmap (":/select_file_dis_16px.png"); 132 mPool [ChooseExistingEn] = QPixmap (":/select_file_16px.png"); 133 mPool [ChooseExistingDis] = QPixmap (":/select_file_dis_16px.png"); 134 mPool [HDNewEn] = QPixmap (":/hd_new_16px.png"); 135 mPool [HDNewDis] = QPixmap (":/hd_new_disabled_16px.png"); 136 mPool [CDUnmountEnabled] = QPixmap (":/cd_unmount_16px.png"); 137 mPool [CDUnmountDisabled] = QPixmap (":/cd_unmount_dis_16px.png"); 138 mPool [FDUnmountEnabled] = QPixmap (":/fd_unmount_16px.png"); 139 mPool [FDUnmountDisabled] = QPixmap (":/fd_unmount_dis_16px.png"); 137 140 } 138 141 … … 406 409 , mCtrName (aName) 407 410 , mCtrType (0) 411 , mUseIoCache (false) 408 412 { 409 413 /* Check for proper parent type */ … … 506 510 } 507 511 508 QStringList ControllerItem::ctrAllMediumIds (bool aShowDiffs) const509 {510 QStringList allMediums;511 foreach (const VBoxMedium &medium, vboxGlobal().currentMediaList())512 {513 foreach (const KDeviceType &deviceType, mCtrType->deviceTypeList())514 {515 if (medium.isNull() || medium.medium().GetDeviceType() == deviceType)516 {517 /* In 'don't show diffs' mode we should only show hard-disks which are:518 * 1. Attached to 'current state' of this VM even if these are differencing disks.519 * 2. Not attached to this VM at all only if they are not differencing disks. */520 if (!aShowDiffs && medium.type() == VBoxDefs::MediumType_HardDisk)521 {522 if (medium.isAttachedInCurStateTo (parent()->machineId()) ||523 (!medium.medium().GetMachineIds().contains (parent()->machineId()) && !medium.parent()))524 allMediums << medium.id();525 }526 else allMediums << medium.id();527 break;528 }529 }530 }531 return allMediums;532 }533 534 QStringList ControllerItem::ctrUsedMediumIds() const535 {536 QStringList usedImages;537 for (int i = 0; i < mAttachments.size(); ++ i)538 {539 QString usedMediumId = static_cast <AttachmentItem*> (mAttachments [i])->attMediumId();540 if (!vboxGlobal().findMedium (usedMediumId).isNull())541 usedImages << usedMediumId;542 }543 return usedImages;544 }545 546 512 AbstractItem::ItemType ControllerItem::rtti() const 547 513 { … … 606 572 : AbstractItem (aParent) 607 573 , mAttDeviceType (aDeviceType) 608 , mAttIsShowDiffs (false)609 574 , mAttIsHostDrive (false) 610 575 , mAttIsPassthrough (false) … … 616 581 AssertMsg (!attSlots().isEmpty(), ("There should be at least one available slot!\n")); 617 582 mAttSlot = attSlots() [0]; 618 619 /* Try to select unique medium for HD and empty medium for CD/FD device */620 QStringList freeMediumIds (attMediumIds());621 if (freeMediumIds.size() > 0)622 setAttMediumId (freeMediumIds [0]);623 583 } 624 584 … … 657 617 } 658 618 659 QStringList AttachmentItem::attMediumIds (bool aFilter) const660 {661 ControllerItem *ctr = static_cast <ControllerItem*> (mParent);662 QStringList allMediumIds;663 664 /* Populate list of suitable medium ids */665 foreach (QString mediumId, ctr->ctrAllMediumIds (mAttIsShowDiffs))666 {667 VBoxMedium medium = vboxGlobal().findMedium (mediumId);668 if ((medium.isNull() && mAttDeviceType != KDeviceType_HardDisk) ||669 (!medium.isNull() && medium.medium().GetDeviceType() == mAttDeviceType))670 allMediumIds << mediumId;671 }672 673 if (aFilter)674 {675 /* Filter list from used medium ids */676 QStringList usedMediumIds (ctr->ctrUsedMediumIds());677 foreach (QString usedMediumId, usedMediumIds)678 if (usedMediumId != mAttMediumId)679 allMediumIds.removeAll (usedMediumId);680 }681 682 return allMediumIds;683 }684 685 bool AttachmentItem::attIsShowDiffs() const686 {687 return mAttIsShowDiffs;688 }689 690 619 bool AttachmentItem::attIsHostDrive() const 691 620 { … … 710 639 void AttachmentItem::setAttMediumId (const QString &aAttMediumId) 711 640 { 712 VBoxMedium medium; 713 714 /* Caching first available medium */ 715 if (aAttMediumId == firstAvailableId && !attMediumIds (false).isEmpty()) 716 medium = vboxGlobal().findMedium (attMediumIds (false) [0]); 717 /* Caching passed medium */ 718 else if (!aAttMediumId.isEmpty()) 719 medium = vboxGlobal().findMedium (aAttMediumId); 720 721 mAttMediumId = medium.id(); 641 AssertMsg(!aAttMediumId.isEmpty(), ("Medium ID value can't be null/empty!\n")); 642 mAttMediumId = vboxGlobal().findMedium(aAttMediumId).id(); 722 643 cache(); 723 644 } 724 645 725 void AttachmentItem::setAttIsShowDiffs (bool aAttIsShowDiffs)726 {727 mAttIsShowDiffs = aAttIsShowDiffs;728 cache();729 }730 731 646 void AttachmentItem::setAttIsPassthrough (bool aIsAttPassthrough) 732 647 { … … 764 679 765 680 /* Cache medium information */ 766 mAttName = medium.name ( !mAttIsShowDiffs);767 mAttTip = medium.toolTipCheckRO ( !mAttIsShowDiffs, mAttDeviceType != KDeviceType_HardDisk);768 mAttPixmap = medium.iconCheckRO ( !mAttIsShowDiffs);681 mAttName = medium.name (true); 682 mAttTip = medium.toolTipCheckRO (true, mAttDeviceType != KDeviceType_HardDisk); 683 mAttPixmap = medium.iconCheckRO (true); 769 684 mAttIsHostDrive = medium.isHostDrive(); 770 685 771 686 /* Cache additional information */ 772 mAttSize = medium.size (!mAttIsShowDiffs); 773 mAttLogicalSize = medium.logicalSize (!mAttIsShowDiffs); 774 mAttLocation = medium.location (!mAttIsShowDiffs); 775 mAttFormat = medium.isNull() ? QString ("--") : 776 QString ("%1 (%2)").arg (medium.hardDiskType (!mAttIsShowDiffs)) 777 .arg (medium.hardDiskFormat (!mAttIsShowDiffs)); 778 mAttUsage = medium.usage (!mAttIsShowDiffs); 687 mAttSize = medium.size (true); 688 mAttLogicalSize = medium.logicalSize (true); 689 mAttLocation = medium.location (true); 690 if (medium.isNull()) 691 { 692 mAttFormat = QString("--"); 693 } 694 else 695 { 696 switch (mAttDeviceType) 697 { 698 case KDeviceType_HardDisk: 699 { 700 mAttFormat = QString("%1 (%2)").arg(medium.hardDiskType(true)).arg(medium.hardDiskFormat(true)); 701 break; 702 } 703 case KDeviceType_DVD: 704 case KDeviceType_Floppy: 705 { 706 mAttFormat = mAttIsHostDrive ? UIMachineSettingsStorage::tr("Host Drive") : UIMachineSettingsStorage::tr("Image"); 707 break; 708 } 709 default: 710 break; 711 } 712 } 713 mAttUsage = medium.usage (true); 779 714 780 715 /* Fill empty attributes */ … … 1138 1073 return QString(); 1139 1074 } 1140 case R_AttIsShowDiffs:1141 {1142 if (AbstractItem *item = static_cast <AbstractItem*> (aIndex.internalPointer()))1143 if (item->rtti() == AbstractItem::Type_AttachmentItem)1144 return static_cast <AttachmentItem*> (item)->attIsShowDiffs();1145 return false;1146 }1147 1075 case R_AttIsHostDrive: 1148 1076 { … … 1350 1278 return false; 1351 1279 } 1352 case R_AttIsShowDiffs:1353 {1354 if (AbstractItem *item = static_cast <AbstractItem*> (aIndex.internalPointer()))1355 if (item->rtti() == AbstractItem::Type_AttachmentItem)1356 {1357 static_cast <AttachmentItem*> (item)->setAttIsShowDiffs (aValue.toBool());1358 emit dataChanged (aIndex, aIndex);1359 return true;1360 }1361 return false;1362 }1363 1280 case R_AttIsPassthrough: 1364 1281 { … … 1398 1315 } 1399 1316 1400 QModelIndex StorageModel::addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType )1317 QModelIndex StorageModel::addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType, const QString &strMediumId) 1401 1318 { 1402 1319 if (AbstractItem *parent = mRootItem->childById (aCtrId)) … … 1405 1322 QModelIndex parentIndex = index (parentPosition, 0, root()); 1406 1323 beginInsertRows (parentIndex, parent->childCount(), parent->childCount()); 1407 new AttachmentItem (parent, aDeviceType); 1324 AttachmentItem *pItem = new AttachmentItem (parent, aDeviceType); 1325 pItem->setAttMediumId(strMediumId); 1408 1326 endInsertRows(); 1409 1327 return index (parent->childCount() - 1, 0, parentIndex); … … 1653 1571 1654 1572 /** 1573 * UI Medium ID Holder. 1574 * Used for compliance with other storage page widgets 1575 * which caching and holding corresponding information. 1576 */ 1577 class UIMediumIDHolder : public QObject 1578 { 1579 Q_OBJECT; 1580 1581 public: 1582 1583 UIMediumIDHolder(QWidget *pParent) : QObject(pParent) {} 1584 1585 QString id() const { return m_strId; } 1586 void setId(const QString &strId) { m_strId = strId; emit sigChanged(); } 1587 1588 VBoxDefs::MediumType type() const { return m_type; } 1589 void setType(VBoxDefs::MediumType type) { m_type = type; } 1590 1591 bool isNull() const { return m_strId == VBoxMedium().id(); } 1592 1593 signals: 1594 1595 void sigChanged(); 1596 1597 private: 1598 1599 QString m_strId; 1600 VBoxDefs::MediumType m_type; 1601 }; 1602 1603 /** 1655 1604 * QWidget class reimplementation. 1656 1605 * Used as HD Settings widget. … … 1663 1612 , mAddAttAction(0), mDelAttAction(0) 1664 1613 , mAddHDAttAction(0), mAddCDAttAction(0), mAddFDAttAction(0) 1614 , m_pMediumIdHolder(new UIMediumIDHolder(this)) 1665 1615 , mIsLoadingInProgress(0) 1666 1616 , mIsPolished(false) … … 1751 1701 #endif /* Q_WS_MAC */ 1752 1702 1753 /* Vdi Combo */ 1754 mCbVdi->setNullItemPresent (true); 1755 mCbVdi->refresh(); 1756 1757 /* Vmm Button */ 1758 mTbOpen->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap (PixmapPool::VMMEn), 1759 PixmapPool::pool()->pixmap (PixmapPool::VMMDis))); 1760 mTbNew->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap (PixmapPool::HDAttachmentAddEn), 1761 PixmapPool::pool()->pixmap (PixmapPool::HDAttachmentAddDis))); 1703 /* Setup choose-medium button: */ 1704 QMenu *pOpenMediumMenu = new QMenu(this); 1705 mTbOpen->setMenu(pOpenMediumMenu); 1762 1706 1763 1707 /* Info Pane initialization */ 1708 mLbHDFormatValue->setFullSizeSelection (true); 1709 mLbCDFDTypeValue->setFullSizeSelection (true); 1764 1710 mLbHDVirtualSizeValue->setFullSizeSelection (true); 1765 1711 mLbHDActualSizeValue->setFullSizeSelection (true); 1766 1712 mLbSizeValue->setFullSizeSelection (true); 1767 1713 mLbLocationValue->setFullSizeSelection (true); 1768 mLbHDFormatValue->setFullSizeSelection (true);1769 1714 mLbUsageValue->setFullSizeSelection (true); 1770 1715 … … 1808 1753 connect (mCbSlot, SIGNAL (activated (int)), this, SLOT (setInformation())); 1809 1754 connect (mCbIoCache, SIGNAL (stateChanged (int)), this, SLOT (setInformation())); 1810 connect (mCbVdi, SIGNAL (activated (int)), this, SLOT (setInformation())); 1811 connect (mTbOpen, SIGNAL (clicked (bool)), this, SLOT (sltOpenMedium())); 1812 connect (mTbNew, SIGNAL (clicked (bool)), this, SLOT (sltNewMedium())); 1813 connect (mCbShowDiffs, SIGNAL (stateChanged (int)), this, SLOT (setInformation())); 1755 connect (m_pMediumIdHolder, SIGNAL (sigChanged()), this, SLOT (setInformation())); 1756 connect (mTbOpen, SIGNAL (clicked (bool)), mTbOpen, SLOT (showMenu())); 1757 connect (pOpenMediumMenu, SIGNAL (aboutToShow()), this, SLOT (sltPrepareOpenMediumMenu())); 1814 1758 connect (mCbPassthrough, SIGNAL (stateChanged (int)), this, SLOT (setInformation())); 1815 1759 … … 1892 1836 { 1893 1837 /* Apply internal variables data to QWidget(s): */ 1894 mCbVdi->setMachineId(m_cache.m_strMachineId);1895 1838 mStorageModel->setMachineId(m_cache.m_strMachineId); 1896 1839 for (int iControllerIndex = 0; iControllerIndex < m_cache.m_items.size(); ++iControllerIndex) … … 1907 1850 /* Get iterated attachment: */ 1908 1851 const UIStorageAttachmentData &attachmentData = controllerData.m_items[iAttachmentIndex]; 1909 QModelIndex attachmentIndex = mStorageModel->addAttachment(controllerId, attachmentData.m_attachmentType );1852 QModelIndex attachmentIndex = mStorageModel->addAttachment(controllerId, attachmentData.m_attachmentType, attachmentData.m_strAttachmentMediumId); 1910 1853 StorageSlot attachmentStorageSlot(controllerData.m_controllerBus, 1911 1854 attachmentData.m_iAttachmentPort, … … 1913 1856 mStorageModel->setData(attachmentIndex, QVariant::fromValue(attachmentStorageSlot), StorageModel::R_AttSlot); 1914 1857 mStorageModel->setData(attachmentIndex, attachmentData.m_fAttachmentPassthrough, StorageModel::R_AttIsPassthrough); 1915 mStorageModel->setData(attachmentIndex, attachmentData.m_strAttachmentMediumId, StorageModel::R_AttMediumId);1916 1858 } 1917 1859 } … … 2119 2061 /* Second column indent minimum width */ 2120 2062 QList <QLabel*> labelsList; 2121 labelsList << mLb Slot << mLbVdi2063 labelsList << mLbMedium << mLbHDFormat << mLbCDFDType 2122 2064 << mLbHDVirtualSize << mLbHDActualSize << mLbSize 2123 << mLbLocation << mLb HDFormat << mLbUsage;2065 << mLbLocation << mLbUsage; 2124 2066 int maxWidth = 0; 2125 2067 QFontMetrics metrics (font()); … … 2166 2108 if (attMediumId == aMediumId) 2167 2109 { 2168 mStorageModel->setData (attIndex, firstAvailableId, StorageModel::R_AttMediumId);2110 mStorageModel->setData (attIndex, VBoxMedium().id(), StorageModel::R_AttMediumId); 2169 2111 if (mValidator) mValidator->revalidate(); 2170 2112 } … … 2345 2287 mCbSlot->setToolTip (mCbSlot->itemText (mCbSlot->currentIndex())); 2346 2288 2347 /* Getting Show Diffs state */2348 bool isShowDiffs = mStorageModel->data (index, StorageModel::R_AttIsShowDiffs).toBool();2349 mCbShowDiffs->setChecked (isShowDiffs);2350 2351 2289 /* Getting Attachment Medium */ 2352 2290 KDeviceType device = mStorageModel->data (index, StorageModel::R_AttDevice).value <KDeviceType>(); … … 2354 2292 { 2355 2293 case KDeviceType_HardDisk: 2356 mLbVdi->setText(tr("Hard &Disk:")); 2357 mTbOpen->setWhatsThis(tr("Open hard disk image file using file-open dialog.")); 2358 mTbOpen->setToolTip(tr("Open hard disk image file")); 2359 mTbNew->setVisible(true); 2294 mLbMedium->setText(tr("Hard &Disk:")); 2295 mTbOpen->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::HDAttachmentNormal))); 2296 mTbOpen->setWhatsThis(tr("Choose or create a virtual hard disk file. The virtual machine will see " 2297 "the data in the file as the contents of the virtual hard disk.")); 2298 mTbOpen->setToolTip(tr("Set up the virtual hard disk")); 2360 2299 break; 2361 2300 case KDeviceType_DVD: 2362 mLbVdi->setText(tr("&CD/DVD Device:")); 2363 mTbOpen->setWhatsThis(tr("Open CD/DVD image file using file-open dialog.")); 2364 mTbOpen->setToolTip(tr("Open CD/DVD image file")); 2365 mTbNew->setVisible(false); 2301 mLbMedium->setText(tr("CD/DVD &Drive:")); 2302 mTbOpen->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::CDAttachmentNormal))); 2303 mTbOpen->setWhatsThis(tr("Choose a virtual CD/DVD disk or a physical drive to use with the virtual drive. " 2304 "The virtual machine will see a disk inserted into the drive with the data " 2305 "in the file or on the disk in the physical drive as its contents.")); 2306 mTbOpen->setToolTip(tr("Set up the virtual CD/DVD drive")); 2366 2307 break; 2367 2308 case KDeviceType_Floppy: 2368 mLbVdi->setText(tr("&Floppy Device:")); 2369 mTbOpen->setWhatsThis(tr("Open floppy image file using file-open dialog.")); 2370 mTbOpen->setToolTip(tr("Open floppy image file")); 2371 mTbNew->setVisible(false); 2309 mLbMedium->setText(tr("Floppy &Drive:")); 2310 mTbOpen->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::FDAttachmentNormal))); 2311 mTbOpen->setWhatsThis(tr("Choose a virtual floppy disk or a physical drive to use with the virtual drive. " 2312 "The virtual machine will see a disk inserted into the drive with the data " 2313 "in the file or on the disk in the physical drive as its contents.")); 2314 mTbOpen->setToolTip(tr("Set up the virtual floppy drive")); 2372 2315 break; 2373 2316 default: 2374 2317 break; 2375 2318 } 2376 mCbVdi->setType (typeToLocal (device)); 2377 mCbVdi->setShowDiffs (isShowDiffs); 2378 mCbVdi->setCurrentItem (mStorageModel->data (index, StorageModel::R_AttMediumId).toString()); 2379 mCbVdi->refresh(); 2319 m_pMediumIdHolder->setType(typeToLocal(device)); 2320 m_pMediumIdHolder->setId(mStorageModel->data(index, StorageModel::R_AttMediumId).toString()); 2380 2321 2381 2322 /* Getting Passthrough state */ 2382 2323 bool isHostDrive = mStorageModel->data (index, StorageModel::R_AttIsHostDrive).toBool(); 2383 mCbPassthrough->set Enabled (isHostDrive);2324 mCbPassthrough->setVisible (device == KDeviceType_DVD && isHostDrive); 2384 2325 mCbPassthrough->setChecked (isHostDrive && mStorageModel->data (index, StorageModel::R_AttIsPassthrough).toBool()); 2385 2326 … … 2388 2329 2389 2330 /* Getting Other Information */ 2331 mLbHDFormatValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttFormat).toString())); 2332 mLbCDFDTypeValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttFormat).toString())); 2390 2333 mLbHDVirtualSizeValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttLogicalSize).toString())); 2391 2334 mLbHDActualSizeValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttSize).toString())); 2392 2335 mLbSizeValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttSize).toString())); 2393 2336 mLbLocationValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttLocation).toString())); 2394 mLbHDFormatValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttFormat).toString()));2395 2337 mLbUsageValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttUsage).toString())); 2396 2338 … … 2443 2385 } 2444 2386 /* Setting Attachment Medium */ 2445 else if (sdr == mCbVdi) 2446 mStorageModel->setData (index, mCbVdi->id(), StorageModel::R_AttMediumId); 2447 else if (sdr == mCbShowDiffs) 2448 mStorageModel->setData (index, mCbShowDiffs->isChecked(), StorageModel::R_AttIsShowDiffs); 2387 else if (sdr == m_pMediumIdHolder) 2388 mStorageModel->setData (index, m_pMediumIdHolder->id(), StorageModel::R_AttMediumId); 2449 2389 else if (sdr == mCbPassthrough) 2450 2390 { … … 2462 2402 } 2463 2403 2464 void UIMachineSettingsStorage::sltOpenMedium() 2465 { 2466 QString id = vboxGlobal().openMediumWithFileOpenDialog(mCbVdi->type(), this); 2467 if (!id.isNull()) 2468 mCbVdi->setCurrentItem(id); 2469 } 2470 2471 void UIMachineSettingsStorage::sltNewMedium() 2472 { 2473 QString id = getWithNewHDWizard(); 2474 if (!id.isNull()) 2475 mCbVdi->setCurrentItem (id); 2404 void UIMachineSettingsStorage::sltPrepareOpenMediumMenu() 2405 { 2406 /* This slot should be called only by open-medium menu: */ 2407 QMenu *pOpenMediumMenu = qobject_cast<QMenu*>(sender()); 2408 AssertMsg(pOpenMediumMenu, ("Can't access open-medium menu!\n")); 2409 if (pOpenMediumMenu) 2410 { 2411 /* Eraze menu initially: */ 2412 pOpenMediumMenu->clear(); 2413 /* Depending on current medium type: */ 2414 switch (m_pMediumIdHolder->type()) 2415 { 2416 case VBoxDefs::MediumType_HardDisk: 2417 { 2418 /* Add "Create a new virtual hard disk" action: */ 2419 QAction *pCreateNewHardDisk = pOpenMediumMenu->addAction(tr("Create a new hard disk...")); 2420 pCreateNewHardDisk->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::HDNewEn), 2421 PixmapPool::pool()->pixmap(PixmapPool::HDNewDis))); 2422 connect(pCreateNewHardDisk, SIGNAL(triggered(bool)), this, SLOT(sltCreateNewHardDisk())); 2423 /* Add "Choose a virtual hard disk file" action: */ 2424 addChooseExistingMediumAction(pOpenMediumMenu, tr("Choose a virtual hard disk file...")); 2425 break; 2426 } 2427 case VBoxDefs::MediumType_DVD: 2428 { 2429 /* Add "Choose a virtual CD/DVD disk file" action: */ 2430 addChooseExistingMediumAction(pOpenMediumMenu, tr("Choose a CD/DVD disk image...")); 2431 /* Add "Choose a physical drive" actions: */ 2432 addChooseHostDriveActions(pOpenMediumMenu); 2433 /* Add "Eject current medium" action: */ 2434 pOpenMediumMenu->addSeparator(); 2435 QAction *pEjectCurrentMedium = pOpenMediumMenu->addAction(tr("Remove disk from virtual drive")); 2436 pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull()); 2437 pEjectCurrentMedium->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::CDUnmountEnabled), 2438 PixmapPool::pool()->pixmap(PixmapPool::CDUnmountDisabled))); 2439 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice())); 2440 break; 2441 } 2442 case VBoxDefs::MediumType_Floppy: 2443 { 2444 /* Add "Choose a virtual floppy disk file" action: */ 2445 addChooseExistingMediumAction(pOpenMediumMenu, tr("Choose a floppy disk image...")); 2446 /* Add "Choose a physical drive" actions: */ 2447 addChooseHostDriveActions(pOpenMediumMenu); 2448 /* Add "Eject current medium" action: */ 2449 pOpenMediumMenu->addSeparator(); 2450 QAction *pEjectCurrentMedium = pOpenMediumMenu->addAction(tr("Remove disk from virtual drive")); 2451 pEjectCurrentMedium->setEnabled(!m_pMediumIdHolder->isNull()); 2452 pEjectCurrentMedium->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::FDUnmountEnabled), 2453 PixmapPool::pool()->pixmap(PixmapPool::FDUnmountDisabled))); 2454 connect(pEjectCurrentMedium, SIGNAL(triggered(bool)), this, SLOT(sltUnmountDevice())); 2455 break; 2456 } 2457 default: 2458 break; 2459 } 2460 } 2461 } 2462 2463 void UIMachineSettingsStorage::sltCreateNewHardDisk() 2464 { 2465 QString strMediumId = getWithNewHDWizard(); 2466 if (!strMediumId.isNull()) 2467 m_pMediumIdHolder->setId(strMediumId); 2468 } 2469 2470 void UIMachineSettingsStorage::sltUnmountDevice() 2471 { 2472 m_pMediumIdHolder->setId(VBoxMedium().id()); 2473 } 2474 2475 void UIMachineSettingsStorage::sltChooseExistingMedium() 2476 { 2477 QString strMediumId = vboxGlobal().openMediumWithFileOpenDialog(m_pMediumIdHolder->type(), this); 2478 if (!strMediumId.isNull()) 2479 m_pMediumIdHolder->setId(strMediumId); 2480 } 2481 2482 void UIMachineSettingsStorage::sltChooseHostDrive() 2483 { 2484 /* This slot should be called ONLY by choose-host-drive action: */ 2485 QAction *pChooseHostDriveAction = qobject_cast<QAction*>(sender()); 2486 AssertMsg(pChooseHostDriveAction, ("Can't access choose-host-drive action!\n")); 2487 if (pChooseHostDriveAction) 2488 m_pMediumIdHolder->setId(pChooseHostDriveAction->data().toString()); 2476 2489 } 2477 2490 … … 2523 2536 if (!mTwStorageTree->isExpanded (aParent)) 2524 2537 mTwStorageTree->setExpanded (aParent, true); 2525 2526 /* Check if no medium was selected for this attachment */2527 if (mStorageModel->data (index, StorageModel::R_AttMediumId).toString().isEmpty())2528 {2529 /* Ask the user for the method to select medium */2530 KDeviceType deviceType = mStorageModel->data (index, StorageModel::R_AttDevice).value <KDeviceType>();2531 int askResult = vboxProblem().confirmRunNewHDWzdOrOFD (deviceType);2532 QString mediumId = askResult == QIMessageBox::Yes ? getWithNewHDWizard() :2533 askResult == QIMessageBox::No ? vboxGlobal().openMediumWithFileOpenDialog(typeToLocal (deviceType), this) : QString();2534 if (mediumId.isNull())2535 mediumId = firstAvailableId;2536 mStorageModel->setData (index, mediumId, StorageModel::R_AttMediumId);2537 }2538 2538 break; 2539 2539 } … … 2801 2801 } 2802 2802 2803 void UIMachineSettingsStorage::addAttachmentWrapper (KDeviceType aDevice)2803 void UIMachineSettingsStorage::addAttachmentWrapper(KDeviceType deviceType) 2804 2804 { 2805 2805 QModelIndex index = mTwStorageTree->currentIndex(); 2806 Assert (mStorageModel->data (index, StorageModel::R_IsController).toBool()); 2807 Assert (mStorageModel->data (index, StorageModel::R_IsMoreAttachmentsPossible).toBool()); 2808 2809 mStorageModel->addAttachment (QUuid (mStorageModel->data (index, StorageModel::R_ItemId).toString()), aDevice); 2810 mStorageModel->sort(); 2811 emit storageChanged(); 2812 if (mValidator) mValidator->revalidate(); 2806 Assert(mStorageModel->data(index, StorageModel::R_IsController).toBool()); 2807 Assert(mStorageModel->data(index, StorageModel::R_IsMoreAttachmentsPossible).toBool()); 2808 QString strControllerName(mStorageModel->data(index, StorageModel::R_CtrName).toString()); 2809 2810 QString strMediumId; 2811 switch (deviceType) 2812 { 2813 case KDeviceType_HardDisk: 2814 { 2815 int iAnswer = vboxProblem().askAboutHardDiskAttachmentCreation(this, strControllerName); 2816 if (iAnswer == QIMessageBox::Yes) 2817 strMediumId = getWithNewHDWizard(); 2818 else if (iAnswer == QIMessageBox::No) 2819 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(VBoxDefs::MediumType_HardDisk, this); 2820 break; 2821 } 2822 case KDeviceType_DVD: 2823 { 2824 int iAnswer = vboxProblem().askAboutOpticalAttachmentCreation(this, strControllerName); 2825 if (iAnswer == QIMessageBox::Yes) 2826 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(VBoxDefs::MediumType_DVD, this); 2827 else if (iAnswer == QIMessageBox::No) 2828 strMediumId = vboxGlobal().findMedium(strMediumId).id(); 2829 break; 2830 } 2831 case KDeviceType_Floppy: 2832 { 2833 int iAnswer = vboxProblem().askAboutFloppyAttachmentCreation(this, strControllerName); 2834 if (iAnswer == QIMessageBox::Yes) 2835 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(VBoxDefs::MediumType_Floppy, this); 2836 else if (iAnswer == QIMessageBox::No) 2837 strMediumId = vboxGlobal().findMedium(strMediumId).id(); 2838 break; 2839 } 2840 } 2841 2842 if (!strMediumId.isEmpty()) 2843 { 2844 mStorageModel->addAttachment(QUuid(mStorageModel->data(index, StorageModel::R_ItemId).toString()), deviceType, strMediumId); 2845 mStorageModel->sort(); 2846 emit storageChanged(); 2847 if (mValidator) 2848 mValidator->revalidate(); 2849 } 2813 2850 } 2814 2851 … … 2829 2866 void UIMachineSettingsStorage::updateAdditionalObjects (KDeviceType aType) 2830 2867 { 2831 mCbShowDiffs->setVisible (aType == KDeviceType_HardDisk); 2832 mCbPassthrough->setVisible (aType == KDeviceType_DVD); 2868 mLbHDFormat->setVisible (aType == KDeviceType_HardDisk); 2869 mLbHDFormatValue->setVisible (aType == KDeviceType_HardDisk); 2870 2871 mLbCDFDType->setVisible (aType != KDeviceType_HardDisk); 2872 mLbCDFDTypeValue->setVisible (aType != KDeviceType_HardDisk); 2833 2873 2834 2874 mLbHDVirtualSize->setVisible (aType == KDeviceType_HardDisk); … … 2840 2880 mLbSize->setVisible (aType != KDeviceType_HardDisk); 2841 2881 mLbSizeValue->setVisible (aType != KDeviceType_HardDisk); 2842 2843 mLbHDFormat->setVisible (aType == KDeviceType_HardDisk);2844 mLbHDFormatValue->setVisible (aType == KDeviceType_HardDisk);2845 2882 } 2846 2883 … … 2883 2920 } 2884 2921 2922 void UIMachineSettingsStorage::addChooseExistingMediumAction(QMenu *pOpenMediumMenu, const QString &strActionName) 2923 { 2924 QAction *pChooseExistingMedium = pOpenMediumMenu->addAction(strActionName); 2925 pChooseExistingMedium->setIcon(UIIconPool::iconSet(PixmapPool::pool()->pixmap(PixmapPool::ChooseExistingEn), 2926 PixmapPool::pool()->pixmap(PixmapPool::ChooseExistingDis))); 2927 connect(pChooseExistingMedium, SIGNAL(triggered(bool)), this, SLOT(sltChooseExistingMedium())); 2928 } 2929 2930 void UIMachineSettingsStorage::addChooseHostDriveActions(QMenu *pOpenMediumMenu) 2931 { 2932 const VBoxMediaList &mediums = vboxGlobal().currentMediaList(); 2933 VBoxMediaList::const_iterator it; 2934 for (it = mediums.begin(); it != mediums.end(); ++it) 2935 { 2936 const VBoxMedium &medium = *it; 2937 if (medium.isHostDrive() && m_pMediumIdHolder->type() == medium.type()) 2938 { 2939 QAction *pHostDriveAction = pOpenMediumMenu->addAction(medium.name()); 2940 pHostDriveAction->setData(medium.id()); 2941 connect(pHostDriveAction, SIGNAL(triggered(bool)), this, SLOT(sltChooseHostDrive())); 2942 } 2943 } 2944 } 2945 2946 #include "UIMachineSettingsStorage.moc" 2947 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r33932 r34329 39 39 class AttachmentItem; 40 40 class ControllerItem; 41 class UIMediumIDHolder; 41 42 42 43 /* Internal Types */ … … 110 111 FDAttachmentAddDis = 36, 111 112 112 VMMEn = 37, 113 VMMDis = 38, 113 ChooseExistingEn = 37, 114 ChooseExistingDis = 38, 115 HDNewEn = 39, 116 HDNewDis = 40, 117 CDUnmountEnabled = 41, 118 CDUnmountDisabled = 42, 119 FDUnmountEnabled = 43, 120 FDUnmountDisabled = 44, 114 121 115 122 MaxIndex … … 313 320 SlotsList ctrUsedSlots() const; 314 321 DeviceTypeList ctrDeviceTypeList() const; 315 QStringList ctrAllMediumIds (bool aShowDiffs) const;316 QStringList ctrUsedMediumIds() const;317 322 318 323 void setAttachments(const QList<AbstractItem*> &attachments) { mAttachments = attachments; } … … 349 354 DeviceTypeList attDeviceTypes() const; 350 355 QString attMediumId() const; 351 QStringList attMediumIds (bool aFilter = true) const;352 bool attIsShowDiffs() const;353 356 bool attIsHostDrive() const; 354 357 bool attIsPassthrough() const; … … 357 360 void setAttDevice (KDeviceType aAttDeviceType); 358 361 void setAttMediumId (const QString &aAttMediumId); 359 void setAttIsShowDiffs (bool aAttIsShowDiffs);360 362 void setAttIsPassthrough (bool aPassthrough); 361 363 … … 490 492 void delController (const QUuid &aCtrId); 491 493 492 QModelIndex addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType );494 QModelIndex addAttachment (const QUuid &aCtrId, KDeviceType aDeviceType, const QString &strMediumId); 493 495 void delAttachment (const QUuid &aCtrId, const QUuid &aAttId); 494 496 … … 630 632 void setInformation(); 631 633 632 void sltOpenMedium(); 633 void sltNewMedium(); 634 void sltPrepareOpenMediumMenu(); 635 void sltCreateNewHardDisk(); 636 void sltUnmountDevice(); 637 void sltChooseExistingMedium(); 638 void sltChooseHostDrive(); 634 639 635 640 void updateActionsState(); … … 659 664 660 665 uint32_t deviceCount (KDeviceType aType) const; 666 667 void addChooseExistingMediumAction(QMenu *pOpenMediumMenu, const QString &strActionName); 668 void addChooseHostDriveActions(QMenu *pOpenMediumMenu); 661 669 662 670 QIWidgetValidator *mValidator; … … 677 685 QAction *mAddFDAttAction; 678 686 687 UIMediumIDHolder *m_pMediumIdHolder; 688 679 689 bool mIsLoadingInProgress; 680 690 bool mIsPolished; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui
r33882 r34329 256 256 </item> 257 257 <item row="1" column="1" > 258 <widget class="QLabel" name="mLbSlot" > 259 <property name="text" > 260 <string>S&lot:</string> 261 </property> 258 <widget class="QLabel" name="mLbMedium" > 262 259 <property name="buddy" > 263 <cstring>m CbSlot</cstring>260 <cstring>mTbOpen</cstring> 264 261 </property> 265 262 <property name="alignment" > … … 269 266 </item> 270 267 <item row="1" column="2" > 271 <widget class="QComboBox" name="mCbSlot" > 272 <property name="whatsThis" > 273 <string>Selects the slot on the storage controller used by this attachment. The available slots depend on the type of the controller and other attachments on it.</string> 274 </property> 275 <property name="sizePolicy" > 276 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 277 <horstretch>0</horstretch> 278 <verstretch>0</verstretch> 279 </sizepolicy> 280 </property> 281 </widget> 282 </item> 283 <item row="2" column="1" > 284 <widget class="QLabel" name="mLbVdi" > 285 <property name="buddy" > 286 <cstring>mCbVdi</cstring> 287 </property> 288 <property name="alignment" > 289 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 290 </property> 291 </widget> 268 <layout class="QHBoxLayout" name="mLtContainer" > 269 <property name="leftMargin" > 270 <number>0</number> 271 </property> 272 <property name="topMargin" > 273 <number>0</number> 274 </property> 275 <property name="rightMargin" > 276 <number>0</number> 277 </property> 278 <property name="bottomMargin" > 279 <number>0</number> 280 </property> 281 <property name="spacing" > 282 <number>1</number> 283 </property> 284 <item> 285 <widget class="QComboBox" name="mCbSlot" > 286 <property name="whatsThis" > 287 <string>Selects the slot on the storage controller used by this attachment. The available slots depend on the type of the controller and other attachments on it.</string> 288 </property> 289 <property name="sizePolicy" > 290 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" > 291 <horstretch>0</horstretch> 292 <verstretch>0</verstretch> 293 </sizepolicy> 294 </property> 295 </widget> 296 </item> 297 <item> 298 <widget class="QIToolButton" name="mTbOpen" > 299 <property name="text" > 300 <string/> 301 </property> 302 <property name="autoRaise" > 303 <bool>true</bool> 304 </property> 305 </widget> 306 </item> 307 </layout> 292 308 </item> 293 309 <item row="2" column="2" > 294 <widget class="QWidget" name="mWtContainer" >295 <layout class="QHBoxLayout" name="mLtContainer" >296 <property name="leftMargin" >297 <number>0</number>298 </property>299 <property name="topMargin" >300 <number>0</number>301 </property>302 <property name="rightMargin" >303 <number>0</number>304 </property>305 <property name="bottomMargin" >306 <number>0</number>307 </property>308 <property name="spacing" >309 <number>0</number>310 </property>311 <item>312 <widget class="VBoxMediaComboBox" native="1" name="mCbVdi" >313 <property name="whatsThis" >314 <string>Selects the virtual disk image or the host drive used by this attachment.</string>315 </property>316 <property name="sizePolicy" >317 <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >318 <horstretch>0</horstretch>319 <verstretch>0</verstretch>320 </sizepolicy>321 </property>322 </widget>323 </item>324 <item>325 <widget class="QIToolButton" name="mTbOpen" >326 <property name="text" >327 <string/>328 </property>329 <property name="autoRaise" >330 <bool>true</bool>331 </property>332 </widget>333 </item>334 <item>335 <widget class="QIToolButton" name="mTbNew" >336 <property name="whatsThis" >337 <string>Create hard disk image file using New Hard Disk wizard.</string>338 </property>339 <property name="toolTip" >340 <string>Create hard disk image file</string>341 </property>342 <property name="text" >343 <string/>344 </property>345 <property name="autoRaise" >346 <bool>true</bool>347 </property>348 </widget>349 </item>350 </layout>351 </widget>352 </item>353 <item row="3" column="2" >354 <widget class="QCheckBox" name="mCbShowDiffs">355 <property name="sizePolicy" >356 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >357 <horstretch>0</horstretch>358 <verstretch>0</verstretch>359 </sizepolicy>360 </property>361 <property name="whatsThis">362 <string>If checked, shows the differencing hard disks that are attached to slots rather than their base hard disks (shown for indirect attachments) and allows explicit attaching of differencing hard disks. Check this only if you need a complex hard disk setup.</string>363 </property>364 <property name="text">365 <string>D&ifferencing Disks</string>366 </property>367 </widget>368 </item>369 <item row="4" column="2" >370 310 <widget class="QCheckBox" name="mCbPassthrough" > 371 311 <property name="sizePolicy" > … … 383 323 </widget> 384 324 </item> 385 <item row=" 5" column="0" colspan="3" >325 <item row="3" column="0" colspan="3" > 386 326 <widget class="QILabelSeparator" native="1" name="mLsInformation" > 387 327 <property name="text" > 388 328 <string>Information</string> 329 </property> 330 </widget> 331 </item> 332 <item row="4" column="1" > 333 <widget class="QLabel" name="mLbHDFormat" > 334 <property name="text" > 335 <string>Type (Format):</string> 336 </property> 337 <property name="alignment" > 338 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 339 </property> 340 </widget> 341 </item> 342 <item row="4" column="2" > 343 <widget class="QILabel" name="mLbHDFormatValue" > 344 <property name="sizePolicy" > 345 <sizepolicy vsizetype="Preferred" hsizetype="Ignored" > 346 <horstretch>0</horstretch> 347 <verstretch>0</verstretch> 348 </sizepolicy> 349 </property> 350 </widget> 351 </item> 352 <item row="5" column="1" > 353 <widget class="QLabel" name="mLbCDFDType" > 354 <property name="text" > 355 <string>Type:</string> 356 </property> 357 <property name="alignment" > 358 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 359 </property> 360 </widget> 361 </item> 362 <item row="5" column="2" > 363 <widget class="QILabel" name="mLbCDFDTypeValue" > 364 <property name="sizePolicy" > 365 <sizepolicy vsizetype="Preferred" hsizetype="Ignored" > 366 <horstretch>0</horstretch> 367 <verstretch>0</verstretch> 368 </sizepolicy> 389 369 </property> 390 370 </widget> … … 471 451 </item> 472 452 <item row="10" column="1" > 473 <widget class="QLabel" name="mLb HDFormat" >474 <property name="text" > 475 <string> Type (Format):</string>453 <widget class="QLabel" name="mLbUsage" > 454 <property name="text" > 455 <string>Attached To:</string> 476 456 </property> 477 457 <property name="alignment" > … … 481 461 </item> 482 462 <item row="10" column="2" > 483 <widget class="QILabel" name="mLbHDFormatValue" >484 <property name="sizePolicy" >485 <sizepolicy vsizetype="Preferred" hsizetype="Ignored" >486 <horstretch>0</horstretch>487 <verstretch>0</verstretch>488 </sizepolicy>489 </property>490 </widget>491 </item>492 <item row="11" column="1" >493 <widget class="QLabel" name="mLbUsage" >494 <property name="text" >495 <string>Attached To:</string>496 </property>497 <property name="alignment" >498 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>499 </property>500 </widget>501 </item>502 <item row="11" column="2" >503 463 <widget class="QILabel" name="mLbUsageValue" > 504 464 <property name="sizePolicy" > … … 510 470 </widget> 511 471 </item> 512 <item row="1 2" column="0" colspan="3" >472 <item row="11" column="0" colspan="3" > 513 473 <spacer name="mSp6" > 514 474 <property name="orientation" >
Note:
See TracChangeset
for help on using the changeset viewer.