VirtualBox

Ignore:
Timestamp:
Jan 13, 2017 8:13:30 AM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 168): A bit of care for UIVMInformationDialog tabs: Syncing everything like comments, coding-style, behavior.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.cpp

    r62347 r65274  
    3333#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3434
     35
    3536UIInformationConfiguration::UIInformationConfiguration(QWidget *pParent, const CMachine &machine, const CConsole &console)
    3637    : QWidget(pParent)
     
    4142    , m_pView(0)
    4243{
    43     /* Prepare main-layout: */
    44     prepareMainLayout();
     44    /* Prepare layout: */
     45    prepareLayout();
    4546
    4647    /* Prepare model: */
     
    5152}
    5253
    53 void UIInformationConfiguration::prepareMainLayout()
     54void UIInformationConfiguration::prepareLayout()
    5455{
    55     /* Create main-layout: */
    56     m_pMainLayout = new QVBoxLayout;
     56    /* Create layout: */
     57    m_pMainLayout = new QVBoxLayout(this);
    5758    AssertPtrReturnVoid(m_pMainLayout);
    5859    {
    59         /* Configure main-layout: */
     60        /* Configure layout: */
    6061        m_pMainLayout->setContentsMargins(2, 0, 0, 0);
    6162        m_pMainLayout->setSpacing(0);
    62         /* Set main-layout: */
    63         setLayout(m_pMainLayout);
    6463    }
    6564}
     
    163162        /* Configure information-view: */
    164163        m_pView->setResizeMode(QListView::Adjust);
     164
    165165        /* Create information-delegate item: */
    166166        UIInformationItem *pItem = new UIInformationItem(m_pView);
     
    170170            m_pView->setItemDelegate(pItem);
    171171        }
    172         /* Connect datachanged signal: */
    173         connect(m_pModel, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)),
    174                 m_pView, SLOT(updateData(const QModelIndex&, const QModelIndex&)));
     172        /* Connect data changed signal: */
     173        connect(m_pModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
     174                m_pView, SLOT(updateData(const QModelIndex &, const QModelIndex &)));
    175175
    176176        /* Set model for view: */
    177177        m_pView->setModel(m_pModel);
    178         /* Add information-view to the main-layout: */
     178        /* Add information-view to the layout: */
    179179        m_pMainLayout->addWidget(m_pView);
    180180    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.h

    r62347 r65274  
    3333class UIInformationModel;
    3434
     35
    3536/** QWidget extension
    3637  * providing GUI with configuration-information tab in session-information window. */
     
    4849private:
    4950
    50     /** Prepares main-layout. */
    51     void prepareMainLayout();
     51    /** Prepares layout. */
     52    void prepareLayout();
    5253
    5354    /** Prepares model. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r60021 r65274  
    3333#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3434
     35
    3536UIInformationRuntime::UIInformationRuntime(QWidget *pParent, const CMachine &machine, const CConsole &console)
    3637    : QWidget(pParent)
     
    4142    , m_pView(0)
    4243{
    43     /* Prepare main-layout: */
     44    /* Prepare layout: */
    4445    prepareLayout();
    4546
     
    5354void UIInformationRuntime::prepareLayout()
    5455{
    55     /* Create main-layout: */
     56    /* Create layout: */
    5657    m_pMainLayout = new QVBoxLayout(this);
    5758    AssertPtrReturnVoid(m_pMainLayout);
    5859    {
    59         /* Configure main-layout: */
     60        /* Configure layout: */
    6061        m_pMainLayout->setContentsMargins(2, 0, 0, 0);
    6162        m_pMainLayout->setSpacing(0);
    62         /* Set main-layout: */
    63         setLayout(m_pMainLayout);
    6463    }
    6564}
     
    6766void UIInformationRuntime::prepareModel()
    6867{
    69     /* Create model: */
     68    /* Create information-model: */
    7069    m_pModel = new UIInformationModel(this, m_machine, m_console);
    7170    AssertPtrReturnVoid(m_pModel);
     71    {
     72        /* Create runtime-attributes data-item: */
     73        UIInformationDataRuntimeAttributes *pGeneral = new UIInformationDataRuntimeAttributes(m_machine, m_console, m_pModel);
     74        AssertPtrReturnVoid(pGeneral);
     75        {
     76            /* Add runtime-attributes data-item to model: */
     77            m_pModel->addItem(pGeneral);
     78        }
    7279
    73     /* Create runtime-attributes item: */
    74     UIInformationDataRuntimeAttributes *pGeneral = new UIInformationDataRuntimeAttributes(m_machine, m_console, m_pModel);
    75     AssertPtrReturnVoid(pGeneral);
    76     {
    77         /* Add runtime-attributes item to model: */
    78         m_pModel->addItem(pGeneral);
    79     }
     80        /* Create network-statistics data-item: */
     81        UIInformationDataNetworkStatistics *pNetwork = new UIInformationDataNetworkStatistics(m_machine, m_console, m_pModel);
     82        AssertPtrReturnVoid(pNetwork);
     83        {
     84            /* Add network-statistics data-item to model: */
     85            m_pModel->addItem(pNetwork);
     86        }
    8087
    81     /* Create network-statistics item: */
    82     UIInformationDataNetworkStatistics *pNetwork = new UIInformationDataNetworkStatistics(m_machine, m_console, m_pModel);
    83     AssertPtrReturnVoid(pNetwork);
    84     {
    85         /* Add network-statistics item to model: */
    86         m_pModel->addItem(pNetwork);
    87     }
    88 
    89     /* Create storage-statistics item: */
    90     UIInformationDataStorageStatistics *pStorage = new UIInformationDataStorageStatistics(m_machine, m_console, m_pModel);
    91     AssertPtrReturnVoid(pStorage);
    92     {
    93         /* Add storage-statistics item to model: */
    94         m_pModel->addItem(pStorage);
     88        /* Create storage-statistics data-item: */
     89        UIInformationDataStorageStatistics *pStorage = new UIInformationDataStorageStatistics(m_machine, m_console, m_pModel);
     90        AssertPtrReturnVoid(pStorage);
     91        {
     92            /* Add storage-statistics data-item to model: */
     93            m_pModel->addItem(pStorage);
     94        }
    9595    }
    9696}
     
    9898void UIInformationRuntime::prepareView()
    9999{
    100     /* Create view: */
     100    /* Create information-view: */
    101101    m_pView = new UIInformationView;
    102102    AssertPtrReturnVoid(m_pView);
    103103    {
    104         /* Configure view: */
     104        /* Configure information-view: */
    105105        m_pView->setResizeMode(QListView::Adjust);
    106106
    107107        /* Create information-delegate item: */
    108         UIInformationItem* pItem = new UIInformationItem(m_pView);
     108        UIInformationItem *pItem = new UIInformationItem(m_pView);
    109109        AssertPtrReturnVoid(pItem);
    110110        {
    111             /* Set item-delegate: */
     111            /* Set item-delegate for information-view: */
    112112            m_pView->setItemDelegate(pItem);
    113113        }
    114         /* Connect datachanged signal: */
    115         connect(m_pModel, SIGNAL(dataChanged(const QModelIndex, const QModelIndex)),
    116                 m_pView, SLOT(updateData(const QModelIndex,const QModelIndex)));
     114        /* Connect data changed signal: */
     115        connect(m_pModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),
     116                m_pView, SLOT(updateData(const QModelIndex &, const QModelIndex &)));
    117117
    118         /* Set model: */
     118        /* Set model for view: */
    119119        m_pView->setModel(m_pModel);
    120         /* Layout view: */
     120        /* Add information-view to the layout: */
    121121        m_pMainLayout->addWidget(m_pView);
    122122    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h

    r59646 r65274  
    2828#include "CConsole.h"
    2929
    30 /* Forward declartions: */
    31 class UIVMItem;
     30/* Forward declarations: */
    3231class QVBoxLayout;
    3332class UIInformationView;
    3433class UIInformationModel;
     34class UIVMItem;
     35
    3536
    3637/** QWidget extension
     
    4950private:
    5051
    51     /** Prepares main-layout. */
     52    /** Prepares layout. */
    5253    void prepareLayout();
    5354
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