VirtualBox

Changeset 62913 in vbox for trunk


Ignore:
Timestamp:
Aug 3, 2016 1:38:58 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Machine-window: Extending API with possibility to restore cached geometry.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.h

    r62493 r62913  
    8686    const QString& machineName() const;
    8787
     88    /** Restores cached window geometry.
     89      * @note Reimplemented in sub-classes. Base implementation does nothing. */
     90    virtual void restoreCachedGeometry() {}
     91
    8892    /** Adjusts machine-window size to correspond current machine-view size.
    8993      * @param fAdjustPosition determines whether is it necessary to adjust position too.
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r62493 r62913  
    513513}
    514514
     515void UIMachineWindowNormal::restoreCachedGeometry()
     516{
     517    /* Restore the geometry cached by the window: */
     518    resize(m_normalGeometry.size());
     519    move(m_normalGeometry.topLeft());
     520
     521    /* Adjust machine-view accordingly: */
     522    adjustMachineViewSize();
     523}
     524
    515525void UIMachineWindowNormal::normalizeGeometry(bool fAdjustPosition)
    516526{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r62493 r62913  
    113113    void showInNecessaryMode();
    114114
     115    /** Restores cached window geometry. */
     116    virtual void restoreCachedGeometry() /* override */;
     117
    115118    /** Performs window geometry normalization according to guest-size and host's available geometry.
    116119      * @param  fAdjustPosition  Determines whether is it necessary to adjust position as well. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp

    r62493 r62913  
    164164}
    165165
     166void UIMachineWindowScale::restoreCachedGeometry()
     167{
     168    /* Restore the geometry cached by the window: */
     169    resize(m_normalGeometry.size());
     170    move(m_normalGeometry.topLeft());
     171
     172    /* Adjust machine-view accordingly: */
     173    adjustMachineViewSize();
     174}
     175
    166176bool UIMachineWindowScale::event(QEvent *pEvent)
    167177{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.h

    r62493 r62913  
    5454    void showInNecessaryMode();
    5555
     56    /** Restores cached window geometry. */
     57    virtual void restoreCachedGeometry() /* override */;
     58
    5659    /** Common @a pEvent handler. */
    5760    bool event(QEvent *pEvent);
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