Add command line options to windowgeometry test

Add -widgetminimized, -widgetmaximized, -widgetfullscreen,
-windowminimized, -windowmaximized, -windowfullscreen
as command line option to test creation of windows in
these modes

Change-Id: If192c131c8996d3b67648427e5784da47ffee971
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Andreas Holzammer 2012-07-31 14:00:11 +02:00 committed by Qt by Nokia
parent b5ad1fcd08
commit a0be8ef271

View File

@ -442,7 +442,15 @@ ControllerWidget::ControllerWidget(QWidget *parent)
} }
m_testWidget->move(x, y); m_testWidget->move(x, y);
m_testWidget->resize(200, 200); m_testWidget->resize(200, 200);
m_testWidget->show();
if (args.contains(QLatin1String("-widgetminimized"), Qt::CaseInsensitive))
m_testWidget->showMinimized();
else if (args.contains(QLatin1String("-widgetmaximized"), Qt::CaseInsensitive))
m_testWidget->showMaximized();
else if (args.contains(QLatin1String("-widgetfullscreen"), Qt::CaseInsensitive))
m_testWidget->showFullScreen();
else
m_testWidget->show();
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
x += 300; x += 300;
@ -451,7 +459,14 @@ ControllerWidget::ControllerWidget(QWidget *parent)
| Qt::WindowTitleHint); | Qt::WindowTitleHint);
m_testWindow->setFramePos(QPoint(x, y)); m_testWindow->setFramePos(QPoint(x, y));
m_testWindow->resize(200, 200); m_testWindow->resize(200, 200);
m_testWindow->show(); if (args.contains(QLatin1String("-windowminimized"), Qt::CaseInsensitive))
m_testWindow->showMinimized();
else if (args.contains(QLatin1String("-windowmaximized"), Qt::CaseInsensitive))
m_testWindow->showMaximized();
else if (args.contains(QLatin1String("-windowfullscreen"), Qt::CaseInsensitive))
m_testWindow->showFullScreen();
else
m_testWindow->show();
m_testWindow->setWindowTitle(tr("TestWindow")); m_testWindow->setWindowTitle(tr("TestWindow"));
#endif #endif