VirtualBox

Ignore:
Timestamp:
Feb 2, 2024 12:01:56 PM (13 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161429
Message:

FE/Qt: bugref:10501. Small fixes on context menu stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp

    r103171 r103172  
    107107    quint64 m_iData1;
    108108    quint64 m_iDataMaximum;
    109     int m_iMargin;
    110     QColor m_color0;
    111     QColor m_color1;
     109    int     m_iMargin;
     110    QColor  m_color0;
     111    QColor  m_color1;
    112112    /** If not empty this text is drawn at the center of the doughnut chart. */
    113113    QString m_strCenter;
     
    403403    int itemIndex(const QUuid &uid);
    404404    bool isVMRunning(int rowIndex) const;
     405    bool isCloudVM(int rowIndex) const;
    405406    void setDefaultViewFont(const QFont &font);
    406407    void setDefaultViewFontColor(const QColor &color);
     
    13061307{
    13071308    Q_UNUSED(sourceParent);
    1308     if (m_fShowNotRunningVMs)
     1309    if (m_fShowNotRunningVMs && m_fShowCloudVMs)
    13091310        return true;
    13101311    UIActivityOverviewModel *pModel = qobject_cast<UIActivityOverviewModel*>(sourceModel());
    13111312    if (!pModel)
    13121313        return true;
    1313     if (!pModel->isVMRunning(iSourceRow))
     1314
     1315    if (!m_fShowNotRunningVMs && !pModel->isVMRunning(iSourceRow))
     1316        return false;
     1317    if (!m_fShowCloudVMs && pModel->isCloudVM(iSourceRow))
    13141318        return false;
    13151319    return true;
     
    13961400        return false;
    13971401    return m_itemList[rowIndex]->isRunning();
     1402}
     1403
     1404bool UIActivityOverviewModel::isCloudVM(int rowIndex) const
     1405{
     1406    if (rowIndex >= m_itemList.size() || rowIndex < 0 || !m_itemList[rowIndex])
     1407        return false;
     1408    return m_itemList[rowIndex]->isCloudVM();
    13981409}
    13991410
     
    17501761    , m_iSortIndicatorWidth(0)
    17511762    , m_fShowNotRunningVMs(false)
    1752     , m_fShowCloudVMs(false)
     1763    , m_fShowCloudVMs(true)
    17531764{
    17541765    prepare();
     
    18381849    connect(&uiCommon(), &UICommon::sigAskToDetachCOM,
    18391850            this, &UIVMActivityOverviewWidget::sltClearCOMData);
     1851    sltCloudVMVisibility(m_fShowCloudVMs);
    18401852}
    18411853
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