VirtualBox

Ignore:
Timestamp:
Feb 5, 2020 7:35:22 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136015
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Extending virtual machine item and chooser node with possibility to create real cloud VM elements; For now such elements are represented by name only.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.cpp

    r82960 r83000  
    4747UIVirtualMachineItemCloud *UIVirtualMachineItem::toCloud()
    4848{
    49     return   itemType() == ItemType_CloudFake
     49    return   (   itemType() == ItemType_CloudFake
     50              || itemType() == ItemType_CloudReal)
    5051           ? static_cast<UIVirtualMachineItemCloud*>(this)
    5152           : 0;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItem.h

    r82960 r83000  
    5050
    5151    /** Item types. */
    52     enum ItemType { ItemType_Local, ItemType_CloudFake };
     52    enum ItemType { ItemType_Local, ItemType_CloudFake, ItemType_CloudReal };
    5353
    5454    /** Constructs VM item on the basis of taken @a enmType. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp

    r82960 r83000  
    2727    , m_enmFakeCloudItemState(FakeCloudItemState_Loading)
    2828{
     29    recache();
     30}
     31
     32UIVirtualMachineItemCloud::UIVirtualMachineItemCloud(const QString &strName)
     33    : UIVirtualMachineItem(ItemType_CloudReal)
     34    , m_enmFakeCloudItemState(FakeCloudItemState_NotApplicable)
     35{
     36    m_strName = strName;
    2937    recache();
    3038}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r82960 r83000  
    4242    /** Constructs fake cloud VM item. */
    4343    UIVirtualMachineItemCloud();
     44    /** Constructs real cloud VM item. */
     45    UIVirtualMachineItemCloud(const QString &strName);
    4446    /** Destructs cloud VM item. */
    4547    virtual ~UIVirtualMachineItemCloud();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp

    r82968 r83000  
    3636UIChooserNodeMachine::UIChooserNodeMachine(UIChooserNode *pParent,
    3737                                           bool fFavorite,
     38                                           int iPosition,
     39                                           const QString &strName)
     40    : UIChooserNode(pParent, fFavorite)
     41    , m_pCache(new UIVirtualMachineItemCloud(strName))
     42{
     43    if (parentNode())
     44        parentNode()->addNode(this, iPosition);
     45    retranslateUi();
     46}
     47
     48UIChooserNodeMachine::UIChooserNodeMachine(UIChooserNode *pParent,
     49                                           bool fFavorite,
    3850                                           int  iPosition)
    3951    : UIChooserNode(pParent, fFavorite)
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.h

    r82968 r83000  
    4545                         int iPosition,
    4646                         const CMachine &comMachine);
    47     /** Constructs chooser node for cloud VM passing @a pParent to the base-class.
     47    /** Constructs chooser node for real cloud VM passing @a pParent to the base-class.
     48      * @param  fFavorite  Brings whether the node is favorite.
     49      * @param  iPosition  Brings the initial node position.
     50      * @param  strName    Brings the cloud VM name. */
     51    UIChooserNodeMachine(UIChooserNode *pParent,
     52                         bool fFavorite,
     53                         int iPosition,
     54                         const QString &strName);
     55    /** Constructs chooser node for fake cloud VM passing @a pParent to the base-class.
    4856      * @param  fFavorite  Brings whether the node is favorite.
    4957      * @param  iPosition  Brings the initial node position. */
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