VirtualBox

Changeset 52987 in vbox


Ignore:
Timestamp:
Oct 8, 2014 10:58:38 AM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI rework/cleanup for 7115 (part #4): UIMachine doxy.

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

Legend:

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

    r52977 r52987  
    213213    machineLogic()->initializePostPowerUp();
    214214
     215    /* True by default: */
    215216    return true;
    216217}
     
    242243QWidget* UIMachine::activeWindow() const
    243244{
    244     /* Null if machine-logic not yet created: */
    245     if (!machineLogic())
    246         return 0;
    247     /* Active machine-window otherwise: */
    248     return machineLogic()->activeMachineWindow();
     245    if (machineLogic() &&  machineLogic()->activeMachineWindow())
     246        return machineLogic()->activeMachineWindow();
     247    return 0;
    249248}
    250249
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r52977 r52987  
    3535class UIMachineLogic;
    3636
     37/** Singleton QObject extension
     38  * used as virtual machine (VM) singleton instance. */
    3739class UIMachine : public QObject
    3840{
     
    5355    UIMachine();
    5456    /** Destructor. */
    55     virtual ~UIMachine();
     57    ~UIMachine();
    5658
    57     /* Public getters: */
     59    /** Returns active machine-window reference (if possible). */
    5860    QWidget* activeWindow() const;
     61    /** Returns UI session instance. */
    5962    UISession *uisession() const { return m_pSession; }
    6063
     
    6770private slots:
    6871
    69     /* Visual state-change handler: */
     72    /** Visual state-change handler. */
    7073    void sltChangeVisualState(UIVisualStateType visualStateType);
    7174
    7275private:
    7376
     77    /** Prepare routine. */
    7478    bool prepare();
    7579
    76     /* Move VM to default (normal) state: */
     80    /** Moves VM to default (normal) state. */
    7781    void enterInitialVisualState();
    7882
    79     /* Private getters: */
     83    /** Returns machine-logic reference (if possible). */
    8084    UIMachineLogic* machineLogic() const;
    8185
    82     /* Prepare helpers: */
     86    /** Prepare routine: Loading stuff. */
    8387    void loadMachineSettings();
    8488
    85     /* Cleanup helpers: */
     89    /** Prepare routine: Saving stuff. */
    8690    void saveMachineSettings();
    8791
     
    98102
    99103#endif /* !___UIMachine_h___ */
    100 
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