VirtualBox

Changeset 108534 in vbox for trunk/src


Ignore:
Timestamp:
Mar 12, 2025 10:35:28 AM (2 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167924
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: Reordering code according to Global, Machines, Managers architecture.

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

Legend:

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

    r108506 r108534  
    6060    , m_enmClass(enmClass)
    6161    , m_pActionPool(pActionPool)
     62    , m_fActive(false)
    6263    , m_pLayout(0)
    6364    , m_pPaneHome(0)
     
    6869    , m_pPaneCloud(0)
    6970    , m_pPaneActivities(0)
    70     , m_fActive(false)
    7171{
    7272    prepare();
     
    491491}
    492492
    493 void UIToolPane::setCloudMachineItems(const QList<UIVirtualMachineItemCloud*> &cloudItems)
    494 {
    495     /* Cache passed value: */
    496     m_cloudItems = cloudItems;
    497 
    498     /* Update activity overview pane if it is open: */
    499     if (isToolOpened(UIToolType_Activities))
    500     {
    501         AssertPtrReturnVoid(m_pPaneActivities);
    502         m_pPaneActivities->setCloudMachineItems(m_cloudItems);
    503     }
    504 }
    505 
    506493UIMachineToolsWidget *UIToolPane::machineToolsWidget() const
    507494{
     
    562549{
    563550    return m_pPaneSnapshots ? m_pPaneSnapshots->currentSnapshotId() : QUuid();
     551}
     552
     553void UIToolPane::setCloudMachineItems(const QList<UIVirtualMachineItemCloud*> &cloudItems)
     554{
     555    /* Cache passed value: */
     556    m_cloudItems = cloudItems;
     557
     558    /* Update activity overview pane if it is open: */
     559    if (isToolOpened(UIToolType_Activities))
     560    {
     561        AssertPtrReturnVoid(m_pPaneActivities);
     562        m_pPaneActivities->setCloudMachineItems(m_cloudItems);
     563    }
    564564}
    565565
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPane.h

    r108506 r108534  
    6767    /** @name Global tool stuff.
    6868      * @{ */
    69         /** Notifies listeners about creation procedure was requested. */
    70         void sigCreateMedium();
    71         /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */
    72         void sigCopyMedium(const QUuid &uMediumId);
    73 
    74         /** Notifies listeners about request to switch to Activity pane of machine with @a uMachineId. */
    75         void sigSwitchToMachineActivityPane(const QUuid &uMachineId);
     69        /** Notifies listeners about request to detach pane with tool type @enmToolType. */
     70        void sigDetachToolPane(UIToolType enmToolType);
    7671    /** @} */
    7772
     
    9085        /** Notifies listeners about request to switch to Activity Overview pane. */
    9186        void sigSwitchToActivityOverviewPane();
    92 
    93         /** Notifies listeners about request to detach pane with tool type @enmToolType. */
    94         void sigDetachToolPane(UIToolType enmToolType);
     87    /** @} */
     88
     89    /** @name Manager tool stuff.
     90      * @{ */
     91        /** Notifies listeners about creation procedure was requested. */
     92        void sigCreateMedium();
     93        /** Notifies listeners about copy procedure was requested for medium with specified @a uMediumId. */
     94        void sigCopyMedium(const QUuid &uMediumId);
     95
     96        /** Notifies listeners about request to switch to Activity pane of machine with @a uMachineId. */
     97        void sigSwitchToMachineActivityPane(const QUuid &uMachineId);
    9598    /** @} */
    9699
     
    126129    /** @name Global tool stuff.
    127130      * @{ */
     131        /** Holds the Machine Tools Widget instance. */
     132        UIMachineToolsWidget *machineToolsWidget() const;
     133    /** @} */
     134
     135    /** @name Machine tool stuff.
     136      * @{ */
     137        /** Defines error @a strDetails and switches to Error pane. */
     138        void setErrorDetails(const QString &strDetails);
     139
     140        /** Defines the machine @a items. */
     141        void setItems(const QList<UIVirtualMachineItem*> &items);
     142
     143        /** Returns whether current-state item of Snapshot pane is selected. */
     144        bool isCurrentStateItemSelected() const;
     145        /** Returns currently selected snapshot ID if any. */
     146        QUuid currentSnapshotId();
     147    /** @} */
     148
     149    /** @name Manager tool stuff.
     150      * @{ */
    128151        /** Defines the @a cloudItems. */
    129152        void setCloudMachineItems(const QList<UIVirtualMachineItemCloud*> &cloudItems);
    130 
    131         /** Holds the Machine Tools Widget instance. */
    132         UIMachineToolsWidget *machineToolsWidget() const;
    133     /** @} */
    134 
    135     /** @name Machine tool stuff.
    136       * @{ */
    137         /** Defines error @a strDetails and switches to Error pane. */
    138         void setErrorDetails(const QString &strDetails);
    139 
    140         /** Defines the machine @a items. */
    141         void setItems(const QList<UIVirtualMachineItem*> &items);
    142 
    143         /** Returns whether current-state item of Snapshot pane is selected. */
    144         bool isCurrentStateItemSelected() const;
    145 
    146         /** Returns currently selected snapshot ID if any. */
    147         QUuid currentSnapshotId();
    148153    /** @} */
    149154
    150155private slots:
    151156
    152     /** @name Machine tool stuff.
     157    /** @name Global tool stuff.
    153158      * @{ */
    154159        /** Handles the detach signals received from panes.*/
     
    173178    UIActionPool *m_pActionPool;
    174179
     180    /** Holds whether this pane is active. */
     181    bool  m_fActive;
     182
    175183    /** Holds the stacked-layout instance. */
    176184    QStackedLayout *m_pLayout;
    177185
    178     /** Holds the Home pane instance. */
    179     UIHomePane *m_pPaneHome;
    180 
    181     /** @name Global tool stuff.
    182       * @{ */
     186    /** @name Global tool stuff.
     187      * @{ */
     188        /** Holds the Home pane instance. */
     189        UIHomePane *m_pPaneHome;
     190
    183191        /** Holds the Machine Tools Widget instance. */
    184192        UIMachineToolsWidget *m_pPaneMachines;
     
    199207        /** Holds the File Manager pane instance. */
    200208        UIFileManager          *m_pPaneFileManager;
    201     /** @} */
    202 
    203     /** @name Global tool stuff.
     209
     210        /** Holds the cache of passed machine items. */
     211        QList<UIVirtualMachineItem*>  m_items;
     212    /** @} */
     213
     214    /** @name Manager tool stuff.
    204215      * @{ */
    205216        /** Holds the Extension Pack Manager instance. */
     
    213224        /** Holds the VM Activity Overview instance. */
    214225        UIVMActivityOverviewWidget   *m_pPaneActivities;
    215     /** @} */
    216 
    217     /** Holds whether this pane is active. */
    218     bool  m_fActive;
    219 
    220     /** @name Global tool stuff.
    221       * @{ */
     226
    222227        /** Holds the cache of passed cloud machine items. */
    223228        QList<UIVirtualMachineItemCloud*>  m_cloudItems;
    224229    /** @} */
    225 
    226     /** @name Machine tool stuff.
    227       * @{ */
    228         /** Holds the cache of passed items. */
    229         QList<UIVirtualMachineItem*>  m_items;
    230     /** @} */
    231230};
    232231
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