VirtualBox

Changeset 59641 in vbox for trunk


Ignore:
Timestamp:
Feb 12, 2016 9:34:11 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​​bugref:8088: Rework session-information window: UIInformation classes cleanup.

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

Legend:

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

    r59484 r59641  
    4444    prepareLayout();
    4545
     46    /* Prepare model: */
     47    prepareModel();
     48
    4649    /* Prepare view: */
    4750    prepareView();
    48 
    49     /* Prepare model: */
    50     prepareModel();
    5151}
    5252
     
    6969    m_pModel = new UIInformationModel(this, m_machine, m_console);
    7070    AssertPtrReturnVoid(m_pModel);
     71
     72    /* Prepare data for information-model: */
     73    /* General data-item: */
     74    UIInformationDataItem *pGeneral = new UIInformationDataGeneral(m_machine, m_console, m_pModel);
     75    AssertPtrReturnVoid(pGeneral);
     76    {
     77        m_pModel->addItem(pGeneral);
     78    }
     79    /* System data-item: */
     80    UIInformationDataItem *pSystem = new UIInformationDataSystem(m_machine, m_console, m_pModel);
     81    AssertPtrReturnVoid(pSystem);
     82    {
     83        m_pModel->addItem(pSystem);
     84    }
     85    /* Display data-item: */
     86    UIInformationDataItem *pDisplay = new UIInformationDataDisplay(m_machine, m_console, m_pModel);
     87    AssertPtrReturnVoid(pDisplay);
     88    {
     89        m_pModel->addItem(pDisplay);
     90    }
     91    /* Storage data-item: */
     92    UIInformationDataItem *pStorage = new UIInformationDataStorage(m_machine, m_console, m_pModel);
     93    AssertPtrReturnVoid(pStorage);
     94    {
     95        m_pModel->addItem(pStorage);
     96    }
     97    /* Audio data-item: */
     98    UIInformationDataItem *pAudio = new UIInformationDataAudio(m_machine, m_console, m_pModel);
     99    AssertPtrReturnVoid(pAudio);
     100    {
     101        m_pModel->addItem(pAudio);
     102    }
     103    /* Network data-item: */
     104    UIInformationDataItem *pNetwork = new UIInformationDataNetwork(m_machine, m_console, m_pModel);
     105    AssertPtrReturnVoid(pNetwork);
     106    {
     107        m_pModel->addItem(pNetwork);
     108    }
     109    /* Serial ports data-item: */
     110    UIInformationDataItem *pSerialPorts = new UIInformationDataSerialPorts(m_machine, m_console, m_pModel);
     111    AssertPtrReturnVoid(pSerialPorts);
     112    {
     113        m_pModel->addItem(pSerialPorts);
     114    }
     115#ifdef VBOX_WITH_PARALLEL_PORTS
     116    /* Parallel ports data-item: */
     117    UIInformationDataItem *pParallelPorts = new UIInformationDataParallelPorts(m_machine, m_console, m_pModel);
     118    AssertPtrReturnVoid(pParallelPorts);
     119    {
     120        m_list.append(pParallelPorts);
     121    }
     122#endif /* VBOX_WITH_PARALLEL_PORTS */
     123    /* USB data-item: */
     124    UIInformationDataItem *pUSB = new UIInformationDataUSB(m_machine, m_console, m_pModel);
     125    AssertPtrReturnVoid(pUSB);
     126    {
     127        m_pModel->addItem(pUSB);
     128    }
     129    /* Shared folders data-item: */
     130    UIInformationDataItem *pSharedFolders = new UIInformationDataSharedFolders(m_machine, m_console, m_pModel);
     131    AssertPtrReturnVoid(pSharedFolders);
     132    {
     133        m_pModel->addItem(pSharedFolders);
     134    }
    71135}
    72136
     
    79143        /* Prepare view: */
    80144        m_pView->setResizeMode(QListView::Adjust);
    81 
    82145        /* Create information-delegate item: */
    83146        UIInformationItem* pItem = new UIInformationItem(m_pView);
     
    86149            m_pView->setItemDelegate(pItem);
    87150        }
     151        /* Connect datachanged signal: */
     152        connect(m_pModel, SIGNAL(dataChanged(const QModelIndex, const QModelIndex)), m_pView, SLOT(updateData(const QModelIndex, const QModelIndex)));
    88153
    89154        /* Set model: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformation.h

    r59484 r59641  
    2929
    3030/* Forward declartions: */
    31 class UIVMItem;
    3231class QVBoxLayout;
    3332class UIInformationView;
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