VirtualBox

Changeset 10916 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 28, 2008 2:46:54 PM (16 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Fixing QIDialog centering for qt4 frontend (this dialog used for any problem reporter messages). Also new version notifier now uses correct parent to be centered relatively to main VirtualBox window.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk

    r10742 r10916  
    447447        include/QIMainDialog.h \
    448448        include/QIHelpButton.h \
     449        include/QIDialog.h \
    449450        include/VBoxFilePathSelectorWidget.h \
    450451        include/VBoxUtils.h \
  • trunk/src/VBox/Frontends/VirtualBox4/include/QIDialog.h

    r8331 r10916  
    2929class QIDialog: public QDialog
    3030{
     31    Q_OBJECT;
     32
    3133public:
     34
    3235    QIDialog (QWidget *aParent = 0, Qt::WindowFlags aFlags = 0);
    3336
    3437protected:
     38
    3539    void showEvent (QShowEvent *aEvent);
     40
     41    bool mPolished;
    3642};
    3743
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIDialog.cpp

    r10796 r10916  
    2323
    2424#include "QIDialog.h"
     25#include "VBoxGlobal.h"
    2526#ifdef Q_WS_MAC
    2627#include "VBoxUtils.h"
     
    2829
    2930QIDialog::QIDialog (QWidget *aParent, Qt::WindowFlags aFlags)
    30     : QDialog (aParent, aFlags)
     31    : QDialog (aParent, aFlags)
     32    , mPolished (false)
    3133{
    3234}
     
    4850#endif /* Q_WS_MAC */
    4951    }
     52
     53    /* Polishing border */
     54    if (mPolished)
     55        return;
     56    mPolished = true;
     57
     58    /* Explicit widget centering relatively to it's parent
     59     * if any or desktop if parent is missed. */
     60    vboxGlobal().centerWidget (this, parentWidget(), false);
    5061}
    5162
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r10892 r10916  
    686686    : mValid (false)
    687687    , mSelectorWnd (NULL), mConsoleWnd (NULL)
     688    , mMainWindow (NULL)
    688689#ifdef VBOX_WITH_REGISTRATION
    689690    , mRegDlg (NULL)
    690691#endif
     692    , mUpdDlg (NULL)
    691693    , media_enum_thread (NULL)
    692694    , verString ("1.0")
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxUpdateDlg.cpp

    r10856 r10916  
    368368        /* For background update */
    369369        if (mForceRun)
    370             vboxProblem().showUpdateFailure (this, aReason);
     370            vboxProblem().showUpdateFailure (vboxGlobal().mainWindow(), aReason);
    371371        QTimer::singleShot (0, this, SLOT (accept()));
    372372    }
     
    406406                {
    407407                    /* For background update */
    408                     vboxProblem().showUpdateSuccess (this,
     408                    vboxProblem().showUpdateSuccess (vboxGlobal().mainWindow(),
    409409                        lv.toString(), platformInfo [1]);
    410410                    QTimer::singleShot (0, this, SLOT (accept()));
     
    428428        /* For background update */
    429429        if (mForceRun)
    430             vboxProblem().showUpdateNotFound (this);
     430            vboxProblem().showUpdateNotFound (vboxGlobal().mainWindow());
    431431        QTimer::singleShot (0, this, SLOT (accept()));
    432432    }
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