Changeset 55564 in vbox
- Timestamp:
- Apr 30, 2015 3:37:42 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
-
medium/UIMediumManager.cpp (modified) (5 diffs)
-
settings/machine/UIMachineSettingsStorage.cpp (modified) (7 diffs)
-
settings/machine/UIMachineSettingsStorage.h (modified) (3 diffs)
-
settings/machine/UIMachineSettingsStorage.ui (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r54597 r55564 140 140 /** Returns QString <i>storage details</i> of the wrapped UIMedium. */ 141 141 QString details() const { return m_medium.storageDetails(); } 142 /** Returns QString <i>encryption password ID</i> of the wrapped UIMedium. */ 143 QString encryptionPasswordID() const { return m_medium.encryptionPasswordID(); } 142 144 143 145 /** Returns QString <i>tool-tip</i> of the wrapped UIMedium. */ … … 1205 1207 prepareTreeWidget(type, type == UIMediumType_HardDisk ? 3 : 2); 1206 1208 /* Prepare information-container: */ 1207 prepareInformationContainer(type, type == UIMediumType_HardDisk ? 6: 3);1209 prepareInformationContainer(type, type == UIMediumType_HardDisk ? 7 : 3); 1208 1210 } 1209 1211 } … … 1610 1612 { 1611 1613 /* Acquire required details: */ 1612 QString strDetails = pCurrentItem->details(); 1613 QString strUsage = pCurrentItem->usage().isNull() ? 1614 formatFieldText(QApplication::translate("VBoxMediaManagerDlg", "<i>Not Attached</i>"), false) : 1615 formatFieldText(pCurrentItem->usage()); 1614 const QString strDetails = pCurrentItem->details(); 1615 const QString strUsage = pCurrentItem->usage().isNull() ? 1616 formatFieldText(QApplication::translate("VBoxMediaManagerDlg", "<i>Not Attached</i>"), false) : 1617 formatFieldText(pCurrentItem->usage()); 1618 const QString strEncryptionPasswordID = pCurrentItem->encryptionPasswordID().isNull() ? 1619 formatFieldText(QApplication::translate("VBoxMediaManagerDlg", "<i>Not Encrypted</i>"), false) : 1620 formatFieldText(pCurrentItem->encryptionPasswordID()); 1616 1621 const QString strID = pCurrentItem->id(); 1617 1622 if (infoField(UIMediumType_HardDisk, 0)) … … 1626 1631 infoField(UIMediumType_HardDisk, 4)->setText(strUsage); 1627 1632 if (infoField(UIMediumType_HardDisk, 5)) 1628 infoField(UIMediumType_HardDisk, 5)->setText(strID); 1633 infoField(UIMediumType_HardDisk, 5)->setText(strEncryptionPasswordID); 1634 if (infoField(UIMediumType_HardDisk, 6)) 1635 infoField(UIMediumType_HardDisk, 6)->setText(strID); 1629 1636 } 1630 1637 … … 1803 1810 infoLabel(UIMediumType_HardDisk, 4)->setText(QApplication::translate("VBoxMediaManagerDlg", "Attached to:")); 1804 1811 if (infoLabel(UIMediumType_HardDisk, 5)) 1805 infoLabel(UIMediumType_HardDisk, 5)->setText(QApplication::translate("VBoxMediaManagerDlg", "UUID:")); 1812 infoLabel(UIMediumType_HardDisk, 5)->setText(QApplication::translate("VBoxMediaManagerDlg", "Encrypted with key:")); 1813 if (infoLabel(UIMediumType_HardDisk, 6)) 1814 infoLabel(UIMediumType_HardDisk, 6)->setText(QApplication::translate("VBoxMediaManagerDlg", "UUID:")); 1806 1815 1807 1816 /* Translate CD tree-widget: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r54285 r55564 866 866 } 867 867 868 QString AttachmentItem::attEncryptionPasswordID() const 869 { 870 return m_strAttEncryptionPasswordID; 871 } 872 868 873 void AttachmentItem::cache() 869 874 { … … 880 885 mAttLogicalSize = medium.logicalSize (true); 881 886 mAttLocation = medium.location (true); 887 m_strAttEncryptionPasswordID = QString("--"); 882 888 if (medium.isNull()) 883 889 { … … 892 898 mAttFormat = QString("%1 (%2)").arg(medium.hardDiskType(true)).arg(medium.hardDiskFormat(true)); 893 899 mAttDetails = medium.storageDetails(); 900 const QString strAttEncryptionPasswordID = medium.encryptionPasswordID(); 901 if (!strAttEncryptionPasswordID.isNull()) 902 m_strAttEncryptionPasswordID = strAttEncryptionPasswordID; 894 903 break; 895 904 } … … 1375 1384 if (item->rtti() == AbstractItem::Type_AttachmentItem) 1376 1385 return static_cast <AttachmentItem*> (item)->attUsage(); 1386 return QString(); 1387 } 1388 case R_AttEncryptionPasswordID: 1389 { 1390 if (AbstractItem *pItem = static_cast<AbstractItem*>(aIndex.internalPointer())) 1391 if (pItem->rtti() == AbstractItem::Type_AttachmentItem) 1392 return static_cast<AttachmentItem*>(pItem)->attEncryptionPasswordID(); 1377 1393 return QString(); 1378 1394 } … … 2022 2038 mLbLocationValue->setFullSizeSelection (true); 2023 2039 mLbUsageValue->setFullSizeSelection (true); 2040 m_pLabelEncryptionValue->setFullSizeSelection(true); 2024 2041 2025 2042 /* Setup connections: */ … … 2781 2798 mLbLocationValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttLocation).toString())); 2782 2799 mLbUsageValue->setText (compressText (mStorageModel->data (index, StorageModel::R_AttUsage).toString())); 2800 m_pLabelEncryptionValue->setText(compressText(mStorageModel->data(index, StorageModel::R_AttEncryptionPasswordID).toString())); 2783 2801 2784 2802 /* Showing Attachment Page */ … … 3965 3983 mLbUsage->setEnabled(isMachineInValidMode()); 3966 3984 mLbUsageValue->setEnabled(isMachineInValidMode()); 3985 m_pLabelEncryption->setEnabled(isMachineInValidMode()); 3986 m_pLabelEncryptionValue->setEnabled(isMachineInValidMode()); 3967 3987 3968 3988 /* Update action states: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.h
r55401 r55564 374 374 QString attDetails() const; 375 375 QString attUsage() const; 376 QString attEncryptionPasswordID() const; 376 377 377 378 private: … … 411 412 QString mAttDetails; 412 413 QString mAttUsage; 414 QString m_strAttEncryptionPasswordID; 413 415 }; 414 416 … … 465 467 R_AttDetails, 466 468 R_AttUsage, 469 R_AttEncryptionPasswordID, 467 470 468 471 R_Margin, -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.ui
r51276 r55564 571 571 </widget> 572 572 </item> 573 <item row="12" column="0" colspan="3" > 573 <item row="12" column="1"> 574 <widget class="QLabel" name="m_pLabelEncryption"> 575 <property name="text"> 576 <string>Encrypted with key:</string> 577 </property> 578 <property name="alignment"> 579 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 580 </property> 581 </widget> 582 </item> 583 <item row="12" column="2"> 584 <widget class="QILabel" name="m_pLabelEncryptionValue"> 585 <property name="sizePolicy"> 586 <sizepolicy vsizetype="Preferred" hsizetype="Ignored"> 587 <horstretch>0</horstretch> 588 <verstretch>0</verstretch> 589 </sizepolicy> 590 </property> 591 </widget> 592 </item> 593 <item row="13" column="0" colspan="3" > 574 594 <spacer name="mSp6" > 575 595 <property name="orientation" >
Note:
See TracChangeset
for help on using the changeset viewer.

