VirtualBox

Ignore:
Timestamp:
Mar 13, 2015 5:17:57 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7676: Runtime UI: Disk Encryption (DE) support: Simplify description label to use QLabel instead of QILabel; Add Disk Encryption dialog title.

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  
    2222/* Qt includes: */
    2323# include <QVBoxLayout>
     24# include <QLabel>
    2425# include <QLineEdit>
    2526# include <QTableView>
     
    3031
    3132/* GUI includes: */
    32 # include "QILabel.h"
    3333# include "QIDialogButtonBox.h"
    3434# include "QIWithRetranslateUI.h"
     
    374374}
    375375
    376 UIAddDiskEncryptionPasswordDialog::UIAddDiskEncryptionPasswordDialog(QWidget *pParent, const EncryptedMediumMap &encryptedMediums)
     376UIAddDiskEncryptionPasswordDialog::UIAddDiskEncryptionPasswordDialog(QWidget *pParent,
     377                                                                     const QString &strMachineName,
     378                                                                     const EncryptedMediumMap &encryptedMediums)
    377379    : QIWithRetranslateUI<QDialog>(pParent)
     380    , m_strMachineName(strMachineName)
    378381    , m_encryptedMediums(encryptedMediums)
    379382    , m_pLabelDescription(0)
     
    403406        {
    404407            /* Create description label: */
    405             m_pLabelDescription = new QILabel;
    406             m_pLabelDescription->useSizeHintForWidth(450);
    407             m_pLabelDescription->updateGeometry();
     408            m_pLabelDescription = new QLabel;
    408409            AssertPtrReturnVoid(m_pLabelDescription);
    409410            {
    410                 /* Configure description label: */
    411                 m_pLabelDescription->setWordWrap(true);
    412411                /* Add label into layout: */
    413412                pInputLayout->addWidget(m_pLabelDescription);
     
    439438void UIAddDiskEncryptionPasswordDialog::retranslateUi()
    440439{
     440    /* Translate the dialog title: */
     441    setWindowTitle(tr("%1 - Disk Encryption").arg(m_strMachineName));
     442
     443    /* Translate the description label: */
    441444    AssertPtrReturnVoid(m_pLabelDescription);
    442445    m_pLabelDescription->setText(tr("This virtual machine is password protected. "
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h

    r54753 r54754  
    2828/* Forward declarations: */
    2929class UIEncryptionDataTable;
    30 class QILabel;
     30class QLabel;
    3131
    3232/* Type definitions: */
     
    4444    /** Constructor.
    4545      * @param pParent          being passed to the base-class,
     46      * @param strMachineName   holds the name of the machine we show this dialog for,
    4647      * @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);
    4849
    4950    /** Returns the shallow copy of the encryption password map
     
    5960    void retranslateUi();
    6061
     62    /** Holds the name of the machine we show this dialog for. */
     63    const QString m_strMachineName;
     64
    6165    /** Holds the encrypted medium map reference. */
    6266    const EncryptedMediumMap &m_encryptedMediums;
    6367
    6468    /** Holds the description label instance. */
    65     QILabel *m_pLabelDescription;
     69    QLabel *m_pLabelDescription;
    6670    /** Holds the encryption-data table instance. */
    6771    UIEncryptionDataTable *m_pTableEncryptionData;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r54753 r54754  
    24372437        /* Create corresponding dialog: */
    24382438        QPointer<UIAddDiskEncryptionPasswordDialog> pDlg =
    2439              new UIAddDiskEncryptionPasswordDialog(activeMachineWindow(), encryptedMediums);
     2439             new UIAddDiskEncryptionPasswordDialog(activeMachineWindow(),
     2440                                                   machineName(),
     2441                                                   encryptedMediums);
    24402442        /* Execute it and acquire the result: */
    24412443        if (pDlg->exec() == QDialog::Accepted)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette