VBoxProgressDialog.h revision e014c798932e7f4d57bca099271c938da5eddfd9
4b3769ce483ece06f60f983193712492b920144fJake Feasel * VBox frontends: Qt4 GUI ("VirtualBox"):
4b3769ce483ece06f60f983193712492b920144fJake Feasel * VBoxProgressDialog class declaration
4b3769ce483ece06f60f983193712492b920144fJake Feasel * Copyright (C) 2009 Sun Microsystems, Inc.
4b3769ce483ece06f60f983193712492b920144fJake Feasel * This file is part of VirtualBox Open Source Edition (OSE), as
4b3769ce483ece06f60f983193712492b920144fJake Feasel * available from http://www.virtualbox.org. This file is free software;
4b3769ce483ece06f60f983193712492b920144fJake Feasel * you can redistribute it and/or modify it under the terms of the GNU
4b3769ce483ece06f60f983193712492b920144fJake Feasel * General Public License (GPL) as published by the Free Software
4b3769ce483ece06f60f983193712492b920144fJake Feasel * Foundation, in version 2 as it comes in the "COPYING" file of the
4b3769ce483ece06f60f983193712492b920144fJake Feasel * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4b3769ce483ece06f60f983193712492b920144fJake Feasel * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4b3769ce483ece06f60f983193712492b920144fJake Feasel * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
4b3769ce483ece06f60f983193712492b920144fJake Feasel * Clara, CA 95054 USA or visit http://www.sun.com if you need
4b3769ce483ece06f60f983193712492b920144fJake Feasel * additional information or have any questions.
4b3769ce483ece06f60f983193712492b920144fJake Feasel/* Qt includes */
185941104719f48494a107996e17a23aad237c7dJon Branch/* VBox forward declarations */
4b3769ce483ece06f60f983193712492b920144fJake Feasel/* Qt forward declarations */
4b3769ce483ece06f60f983193712492b920144fJake Feasel * A QProgressDialog enhancement that allows to:
4b3769ce483ece06f60f983193712492b920144fJake Feasel * 1) prevent closing the dialog when it has no cancel button;
4b3769ce483ece06f60f983193712492b920144fJake Feasel * 2) effectively track the IProgress object completion (w/o using
4b3769ce483ece06f60f983193712492b920144fJake Feasel * IProgress::waitForCompletion() and w/o blocking the UI thread in any other
4b3769ce483ece06f60f983193712492b920144fJake Feasel * way for too long).
4b3769ce483ece06f60f983193712492b920144fJake Feasel * @note The CProgress instance is passed as a non-const reference to the
4b3769ce483ece06f60f983193712492b920144fJake Feasel * constructor (to memorize COM errors if they happen), and therefore must
4b3769ce483ece06f60f983193712492b920144fJake Feasel * not be destroyed before the created VBoxProgressDialog instance is
4b3769ce483ece06f60f983193712492b920144fJake Feasel * destroyed.
4b3769ce483ece06f60f983193712492b920144fJake Feasel VBoxProgressDialog (CProgress &aProgress, const QString &aTitle,
4b3769ce483ece06f60f983193712492b920144fJake Feasel bool cancelEnabled() const { return mCancelEnabled; }
4b3769ce483ece06f60f983193712492b920144fJake Feasel /* Private member vars */
4b3769ce483ece06f60f983193712492b920144fJake Feasel static const char *sOpDescTpl;
4b3769ce483ece06f60f983193712492b920144fJake Feasel#endif /* __VBoxProgressDialog_h__ */