VirtualBox

Changeset 80356 in vbox


Ignore:
Timestamp:
Aug 20, 2019 11:50:29 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132821
Message:

FE/Qt: bugref:9510: Updating the 'Configuration Details' tab as the machine data changes.

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

Legend:

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

    r80355 r80356  
    3131#include "UIIconPool.h"
    3232#include "UIInformationConfiguration.h"
    33 
     33#include "UIVirtualBoxEventHandler.h"
    3434
    3535UIInformationConfiguration::UIInformationConfiguration(QWidget *pParent, const CMachine &machine, const CConsole &console)
     
    4949    retranslateUi();
    5050    createTableItems();
     51
     52    connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineDataChange,
     53            this, &UIInformationConfiguration::sltMachineDataChanged);
     54}
     55
     56void UIInformationConfiguration::sltMachineDataChanged()
     57{
     58    resetTable();
     59    createTableItems();
    5160}
    5261
    5362UIInformationConfiguration::~UIInformationConfiguration()
    5463{
    55     qDeleteAll(m_tableItems);
    56     m_tableItems.clear();
    5764}
    5865
     
    203210    m_pTableWidget->setItem(iRow, 2, pCol2);
    204211}
     212
     213void UIInformationConfiguration::resetTable()
     214{
     215    if (m_pTableWidget)
     216    {
     217        m_pTableWidget->clear();
     218        m_pTableWidget->setRowCount(0);
     219        m_pTableWidget->setColumnCount(m_iColumCount);
     220    }
     221}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.h

    r80354 r80356  
    6161    void retranslateUi() /* override */;
    6262
     63private slots:
     64
     65    void sltMachineDataChanged();
     66
    6367private:
    6468
     
    7276                       const QFontMetrics &fontMetrics, int &iMaxColumn1Length);
    7377
     78    void resetTable();
    7479    /** Holds the machine instance. */
    7580    CMachine m_machine;
Note: See TracChangeset for help on using the changeset viewer.

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