VirtualBox

Changeset 47847 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 19, 2013 3:44:05 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Some cleanup for r88139.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp

    r47846 r47847  
    3232UIWarningPane::UIWarningPane(QWidget *pParent)
    3333    : QWidget(pParent)
    34     , m_pWarningLabel(0)
     34    , m_pIconLayout(0)
     35    , m_pTextLabel(0)
    3536{
    3637    /* Prepare: */
     
    4041void UIWarningPane::setWarningLabel(const QString &strWarningLabel)
    4142{
    42     m_pWarningLabel->setText(strWarningLabel);
     43    /* Assign passed text directly to warning-label: */
     44    m_pTextLabel->setText(strWarningLabel);
    4345}
    4446
    4547void UIWarningPane::registerValidator(UIPageValidator *pValidator)
    4648{
    47     /* Make sure validator is set! */
     49    /* Make sure validator exists: */
    4850    AssertPtrReturnVoid(pValidator);
    4951
    50     /* Makre sure validator is not registered yet: */
     52    /* Make sure validator is not registered yet: */
    5153    if (m_validators.contains(pValidator))
    5254    {
     
    6466        m_icons << pIconLabel;
    6567        /* Add icon-label into layout: */
    66         m_pLayout->addWidget(pIconLabel);
     68        m_pIconLayout->addWidget(pIconLabel);
    6769        /* Configure icon-label: */
    6870        pIconLabel->setMouseTracking(true);
     
    7375    }
    7476
    75     /* Mark icon as 'non-hovered': */
     77    /* Mark icon as 'unhovered': */
    7678    m_hovered << false;
    7779}
     
    9294        /* Add left stretch: */
    9395        pMainLayout->addStretch();
    94         /* Create warning-label: */
    95         m_pWarningLabel = new QLabel;
     96        /* Create text-label: */
     97        m_pTextLabel = new QLabel;
    9698        {
    9799            /* Add into main-layout: */
    98             pMainLayout->addWidget(m_pWarningLabel);
     100            pMainLayout->addWidget(m_pTextLabel);
    99101        }
    100102        /* Create layout: */
    101         m_pLayout = new QHBoxLayout;
     103        m_pIconLayout = new QHBoxLayout;
    102104        {
    103105            /* Configure layout: */
    104             m_pLayout->setContentsMargins(0, 0, 0, 0);
     106            m_pIconLayout->setContentsMargins(0, 0, 0, 0);
    105107            /* Add into main-layout: */
    106             pMainLayout->addLayout(m_pLayout);
     108            pMainLayout->addLayout(m_pIconLayout);
    107109        }
    108110        /* Add right stretch: */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.h

    r47846 r47847  
    6060
    6161    /* Variables: */
    62     QHBoxLayout *m_pLayout;
    63     QLabel *m_pWarningLabel;
     62    QHBoxLayout *m_pIconLayout;
     63    QLabel *m_pTextLabel;
    6464    QList<UIPageValidator*> m_validators;
    6565    QList<QLabel*> m_icons;
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