QIMainDialog.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * VBox frontends: Qt GUI ("VirtualBox"):
bb25c06cca41ca78e5fb87fbb8e81d55beb18c95jg * VirtualBox Qt extensions: QIMainDialog class implementation
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * Copyright (C) 2008 Oracle Corporation
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * This file is part of VirtualBox Open Source Edition (OSE), as
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * available from http://www.virtualbox.org. This file is free software;
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * you can redistribute it and/or modify it under the terms of the GNU
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * General Public License (GPL) as published by the Free Software
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * Foundation, in version 2 as it comes in the "COPYING" file of the
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc/* Qt includes */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc AssertMsg (!mEventLoop, ("exec is called recursively!\n"));
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Reset the result code */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc bool deleteOnClose = testAttribute (Qt::WA_DeleteOnClose);
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Create a local event loop */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Show the window */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* A guard to ourself for the case we destroy ourself. */
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe /* Start the event loop. This blocks. */
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe /* Delete the event loop */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Are we valid anymore? */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Set the old show modal attribute */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Delete us in the case we should do so on close */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc delete this;
7a1306a70fee0e017a445bde1dcfd1997f691cf4xc /* Return the final result */
7a1306a70fee0e017a445bde1dcfd1997f691cf4xcvoid QIMainDialog::setFileForProxyIcon (const QString& aFile)
return mSizeGrip;
return mDefaultButton;
#ifdef Q_WS_MAC
QPixmap cursorPixmap (::darwinCreateDragPixmap (QPixmap (windowIcon().pixmap (16, 16)), fi.fileName()));
if (mPolished)
mPolished = true;
if (mIsAutoCentering)
if (mSizeGrip)
if (isRightToLeft())
if (!isActiveWindow())
if (mDefaultButton)
if (mDefaultButton)
if (::darwinIsMenuOpen())
#ifdef Q_WS_MAC
reject();
if (currentDefault)
reject();
return button;
hide();
close();
#ifdef Q_WS_MAC
QString path = mFileForProxyIcon.left (mFileForProxyIcon.indexOf (aAction->text())) + aAction->text();