VirtualBox

Changeset 27097 in vbox


Ignore:
Timestamp:
Mar 5, 2010 2:42:17 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
58425
Message:

FE/Qt4: Extending QIMainDialog API to let to disable auto-centering feature.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp

    r26714 r27097  
    4545    , mRescode (QDialog::Rejected)
    4646    , mPolished (false)
     47    , mIsAutoCentering (true)
    4748    , mCenterWidget (aParent)
    4849{
     
    126127}
    127128
     129void QIMainDialog::setAutoCenteringEnabled(bool fIsAutoCentering)
     130{
     131    mIsAutoCentering = fIsAutoCentering;
     132}
    128133
    129134void QIMainDialog::setVisible (bool aVisible)
     
    227232    /* Explicit widget centering relatively to it's centering
    228233     * widget if any or desktop if centering widget is missed. */
    229     VBoxGlobal::centerWidget (this, mCenterWidget, false);
     234    if (mIsAutoCentering)
     235        VBoxGlobal::centerWidget (this, mCenterWidget, false);
    230236}
    231237
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h

    r25177 r27097  
    5252    QPushButton* defaultButton () const;
    5353
     54    void setAutoCenteringEnabled(bool fIsAutoCentering);
     55
    5456public slots:
    5557
     
    8991
    9092    bool mPolished;
     93    bool mIsAutoCentering;
    9194    QWidget *mCenterWidget;
    9295};
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