VirtualBox

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


Ignore:
Timestamp:
Nov 7, 2012 11:19:49 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
81898
Message:

FE/Qt: VM group UI: Some machine-item cleanup (part 1).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r43620 r43828  
    4646    : UIGChooserItem(pParent, pParent->isTemporary())
    4747    , UIVMItem(machine)
    48     , m_pToolBar(0)
    49     , m_pSettingsButton(0)
    50     , m_pStartButton(0)
    51     , m_pPauseButton(0)
    52     , m_pCloseButton(0)
    53     , m_iCornerRadius(0)
    54 #ifdef Q_WS_MAC
    55     , m_iHighlightLightness(115)
    56     , m_iHoverLightness(110)
    57     , m_iHoverHighlightLightness(120)
    58 #else /* Q_WS_MAC */
    59     , m_iHighlightLightness(130)
    60     , m_iHoverLightness(155)
    61     , m_iHoverHighlightLightness(175)
    62 #endif /* !Q_WS_MAC */
    63 {
    64 //    /* Prepare: */
    65 //    prepare();
     48{
     49    /* Prepare: */
     50    prepare();
    6651
    6752    /* Add item to the parent: */
     
    7964    : UIGChooserItem(pParent, pParent->isTemporary())
    8065    , UIVMItem(pCopyFrom->machine())
    81     , m_pToolBar(0)
    82     , m_pSettingsButton(0)
    83     , m_pStartButton(0)
    84     , m_pPauseButton(0)
    85     , m_pCloseButton(0)
    86     , m_iCornerRadius(0)
    87 #ifdef Q_WS_MAC
    88     , m_iHighlightLightness(115)
    89     , m_iHoverLightness(110)
    90     , m_iHoverHighlightLightness(120)
    91 #else /* Q_WS_MAC */
    92     , m_iHighlightLightness(130)
    93     , m_iHoverLightness(155)
    94     , m_iHoverHighlightLightness(175)
    95 #endif /* !Q_WS_MAC */
    96 {
    97 //    /* Prepare: */
    98 //    prepare();
     66{
     67    /* Prepare: */
     68    prepare();
    9969
    10070    /* Add item to the parent: */
     
    11585        model()->setFocusItem(0);
    11686    }
    117     /* If that item is selected: */
     87    /* If that item is in selection list: */
    11888    if (model()->currentItems().contains(this))
    11989    {
     
    12191        model()->removeFromCurrentItems(this);
    12292    }
    123     /* Remove item from the navigation list: */
    124     model()->removeFromNavigationList(this);
     93    /* If that item is in navigation list: */
     94    if (model()->navigationList().contains(this))
     95    {
     96        /* Remove item from the navigation list: */
     97        model()->removeFromNavigationList(this);
     98    }
    12599
    126100    /* Remove item from the parent: */
     
    933907void UIGChooserItemMachine::prepare()
    934908{
     909    /* Tool-bar/buttons: */
     910    m_pToolBar = 0;
     911    m_pSettingsButton = 0;
     912    m_pStartButton = 0;
     913    m_pPauseButton = 0;
     914    m_pCloseButton = 0;
     915    /* Corner radius: */
     916    m_iCornerRadius = 0;
     917    /* Colors: */
     918#ifdef Q_WS_MAC
     919    m_iHighlightLightness = 115;
     920    m_iHoverLightness = 110;
     921    m_iHoverHighlightLightness = 120;
     922#else /* Q_WS_MAC */
     923    m_iHighlightLightness = 130;
     924    m_iHoverLightness = 155;
     925    m_iHoverHighlightLightness = 175;
     926#endif /* !Q_WS_MAC */
     927
     928    /* Other things disabled for now: */
     929    return;
     930
    935931    /* Create tool-bar: */
    936932    m_pToolBar = new UIGraphicsToolBar(this, 2, 2);
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h

    r43620 r43828  
    5151    int type() const { return Type; }
    5252
    53     /* Constructor/destructor: */
     53    /* Constructor (new item): */
    5454    UIGChooserItemMachine(UIGChooserItem *pParent, const CMachine &machine, int iPosition = -1);
     55    /* Constructor (new item copy): */
    5556    UIGChooserItemMachine(UIGChooserItem *pParent, UIGChooserItemMachine *pCopyFrom, int iPosition = -1);
     57    /* Destructor: */
    5658    ~UIGChooserItemMachine();
    5759
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