Add Qt::WindowTransparentForInput to Window flags manual test.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Thu, 7 Jun 2012 09:00:31 +0000 (11:00 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 8 Jun 2012 06:02:46 +0000 (08:02 +0200)
Change-Id: If27567a93d5a2e910289c680643503d02831d742
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
tests/manual/windowflags/controls.cpp
tests/manual/windowflags/controls.h

index bdd8894..7cb2a14 100644 (file)
@@ -65,6 +65,7 @@ HintControl::HintControl(QWidget *parent)
     , windowStaysOnTopCheckBox(new QCheckBox(tr("Window stays on top")))
     , windowStaysOnBottomCheckBox(new QCheckBox(tr("Window stays on bottom")))
     , customizeWindowHintCheckBox(new QCheckBox(tr("Customize window")))
+    , transparentForInputCheckBox(new QCheckBox(tr("Transparent for input")))
 {
     connect(msWindowsFixedSizeDialogCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
     connect(x11BypassWindowManagerCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
@@ -79,6 +80,7 @@ HintControl::HintControl(QWidget *parent)
     connect(windowStaysOnTopCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
     connect(windowStaysOnBottomCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
     connect(customizeWindowHintCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
+    connect(transparentForInputCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
     QGridLayout *layout = new QGridLayout(this);
     layout->setSpacing(0);
     layout->setMargin(ControlLayoutMargin);
@@ -95,6 +97,7 @@ HintControl::HintControl(QWidget *parent)
     layout->addWidget(windowStaysOnTopCheckBox, 5, 1);
     layout->addWidget(windowStaysOnBottomCheckBox, 6, 1);
     layout->addWidget(customizeWindowHintCheckBox, 5, 0);
+    layout->addWidget(transparentForInputCheckBox, 6, 0);
 }
 
 Qt::WindowFlags HintControl::hints() const
@@ -126,6 +129,8 @@ Qt::WindowFlags HintControl::hints() const
         flags |= Qt::WindowStaysOnBottomHint;
     if (customizeWindowHintCheckBox->isChecked())
         flags |= Qt::CustomizeWindowHint;
+    if (transparentForInputCheckBox->isChecked())
+        flags |= Qt::WindowTransparentForInput;
     return flags;
 }
 
@@ -144,6 +149,7 @@ void HintControl::setHints(Qt::WindowFlags flags)
     windowStaysOnTopCheckBox->setChecked(flags & Qt::WindowStaysOnTopHint);
     windowStaysOnBottomCheckBox->setChecked(flags & Qt::WindowStaysOnBottomHint);
     customizeWindowHintCheckBox->setChecked(flags & Qt::CustomizeWindowHint);
+    transparentForInputCheckBox->setChecked(flags & Qt::WindowTransparentForInput);
 }
 
 void HintControl::slotCheckBoxChanged()
index 57d9798..45f295e 100644 (file)
@@ -82,6 +82,7 @@ private:
     QCheckBox *windowStaysOnTopCheckBox;
     QCheckBox *windowStaysOnBottomCheckBox;
     QCheckBox *customizeWindowHintCheckBox;
+    QCheckBox *transparentForInputCheckBox;
 };
 
 // Control for the Qt::WindowState enum, optional with a "visible" QCheckbox