QIAbstractWizard.cpp revision 8e0c2ca3abd721979958f95b9af73b60665478c8
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* QIAbstractWizard class implementation
*/
/*
* Copyright (C) 2006-2008 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#include "QIAbstractWizard.h"
#include "QILabel.h"
/* Qt includes */
#include <QStackedWidget>
#include <QPushButton>
#include <QScrollBar>
#include <VBoxGlobal.h>
{
/* Disable the background painting of the editor widget. */
viewport()->setAutoFillBackground (false);
/* Make editor readonly by default. */
setReadOnly (true);
}
{
/* If there is an updated sizeHint() present - using it. */
}
{
/* Viewer should not influent layout if there is no text. */
return QSize (0, 0);
}
void QITextEdit::updateSizeHint()
{
if (document())
{
if (horizontalScrollBar()->isVisible())
h += horizontalScrollBar()->height();
mOwnSizeHint = QSize (w, h);
}
}
{
}
, mStackedWidget (0)
, mFinishButton (0)
{
}
void QIAbstractWizard::initializeWizardHdr()
{
/* Search for widget stack of inherited dialog.
* Please note what widget stack should have objectName()
* equal "mPageStack". */
this, SLOT (onPageShow()));
/* Assigning all next buttons of inherited dialog.
* Please note what all next buttons should have objectName()
* matching mBtnNext<number> rule. */
{
{
mNextButtons << list [0];
}
}
/* Assigning all back buttons of inherited dialog.
* Please note what all back buttons should have objectName()
* matching mBtnBack<number> rule. */
for (int i = 0; i < mStackedWidget->count(); ++ i)
{
{
mBackButtons << list [0];
}
}
/* Assigning all cancel buttons of inherited dialog.
* Please note what all cancel buttons should have objectName()
* matching mBtnCancel<number> rule. */
for (int i = 0; i < mStackedWidget->count(); ++ i)
{
{
mCancelButtons << list [0];
}
}
/* Assigning finish button of inherited dialog.
* Please note what finish button should have objectName()
* matching mBtnFinish. */
/* Decorating all wizard logo images of inherited dialog.
* Please note what all logo images should have objectName()
* matching mLogo<subname> rule. */
for (int i = 0; i < logoImages.count(); ++ i)
}
void QIAbstractWizard::initializeWizardFtr()
{
/* Update sizeHint() of all text labels of inherited dialog.
* Please note what all text labels should have objectName()
* matching mText<subname> rule. */
for (int i = 0; i < textLabels.count(); ++ i)
textLabels [i]->updateSizeHint();
/* Update sizeHint() of summary viewer of inherited dialog.
* Please note what summary viewer should have objectName()
* matching mTeSummary. */
if (teSummary)
}
{
"mBtnNext\\d*");
}
{
"mBtnBack\\d*");
}
{
"mBtnCancel\\d*");
}
{
"mBtnFinish");
}
{
resize (minimumSize());
onPageShow();
}
void QIAbstractWizard::showNextPage()
{
/* Switch to the next page */
}
void QIAbstractWizard::showBackPage()
{
/* Switch to the previous page */
}
{
}
{
}
{
return buttonsList [0];
}