Changeset 54754 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 13, 2015 5:17:57 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
r54753 r54754 22 22 /* Qt includes: */ 23 23 # include <QVBoxLayout> 24 # include <QLabel> 24 25 # include <QLineEdit> 25 26 # include <QTableView> … … 30 31 31 32 /* GUI includes: */ 32 # include "QILabel.h"33 33 # include "QIDialogButtonBox.h" 34 34 # include "QIWithRetranslateUI.h" … … 374 374 } 375 375 376 UIAddDiskEncryptionPasswordDialog::UIAddDiskEncryptionPasswordDialog(QWidget *pParent, const EncryptedMediumMap &encryptedMediums) 376 UIAddDiskEncryptionPasswordDialog::UIAddDiskEncryptionPasswordDialog(QWidget *pParent, 377 const QString &strMachineName, 378 const EncryptedMediumMap &encryptedMediums) 377 379 : QIWithRetranslateUI<QDialog>(pParent) 380 , m_strMachineName(strMachineName) 378 381 , m_encryptedMediums(encryptedMediums) 379 382 , m_pLabelDescription(0) … … 403 406 { 404 407 /* Create description label: */ 405 m_pLabelDescription = new QILabel; 406 m_pLabelDescription->useSizeHintForWidth(450); 407 m_pLabelDescription->updateGeometry(); 408 m_pLabelDescription = new QLabel; 408 409 AssertPtrReturnVoid(m_pLabelDescription); 409 410 { 410 /* Configure description label: */411 m_pLabelDescription->setWordWrap(true);412 411 /* Add label into layout: */ 413 412 pInputLayout->addWidget(m_pLabelDescription); … … 439 438 void UIAddDiskEncryptionPasswordDialog::retranslateUi() 440 439 { 440 /* Translate the dialog title: */ 441 setWindowTitle(tr("%1 - Disk Encryption").arg(m_strMachineName)); 442 443 /* Translate the description label: */ 441 444 AssertPtrReturnVoid(m_pLabelDescription); 442 445 m_pLabelDescription->setText(tr("This virtual machine is password protected. " -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h
r54753 r54754 28 28 /* Forward declarations: */ 29 29 class UIEncryptionDataTable; 30 class Q ILabel;30 class QLabel; 31 31 32 32 /* Type definitions: */ … … 44 44 /** Constructor. 45 45 * @param pParent being passed to the base-class, 46 * @param strMachineName holds the name of the machine we show this dialog for, 46 47 * @param encryptedMediums contains the lists of medium ids (values) encrypted with passwords with ids (keys). */ 47 UIAddDiskEncryptionPasswordDialog(QWidget *pParent, const EncryptedMediumMap &encryptedMediums);48 UIAddDiskEncryptionPasswordDialog(QWidget *pParent, const QString &strMachineName, const EncryptedMediumMap &encryptedMediums); 48 49 49 50 /** Returns the shallow copy of the encryption password map … … 59 60 void retranslateUi(); 60 61 62 /** Holds the name of the machine we show this dialog for. */ 63 const QString m_strMachineName; 64 61 65 /** Holds the encrypted medium map reference. */ 62 66 const EncryptedMediumMap &m_encryptedMediums; 63 67 64 68 /** Holds the description label instance. */ 65 Q ILabel *m_pLabelDescription;69 QLabel *m_pLabelDescription; 66 70 /** Holds the encryption-data table instance. */ 67 71 UIEncryptionDataTable *m_pTableEncryptionData; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r54753 r54754 2437 2437 /* Create corresponding dialog: */ 2438 2438 QPointer<UIAddDiskEncryptionPasswordDialog> pDlg = 2439 new UIAddDiskEncryptionPasswordDialog(activeMachineWindow(), encryptedMediums); 2439 new UIAddDiskEncryptionPasswordDialog(activeMachineWindow(), 2440 machineName(), 2441 encryptedMediums); 2440 2442 /* Execute it and acquire the result: */ 2441 2443 if (pDlg->exec() == QDialog::Accepted)
Note:
See TracChangeset
for help on using the changeset viewer.