summaryrefslogtreecommitdiffstats
path: root/tools/designer/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-03 09:42:26 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-03 09:42:26 (GMT)
commit7702b57286b0d02857f5312dbc36c87784ac1b11 (patch)
treedcb12feb0bfe8532a590a7711b74b6a1709e9ebc /tools/designer/src
parentfc92419c2058b8c3af8fc1c723e9d957118bcb8f (diff)
downloadQt-7702b57286b0d02857f5312dbc36c87784ac1b11.zip
Qt-7702b57286b0d02857f5312dbc36c87784ac1b11.tar.gz
Qt-7702b57286b0d02857f5312dbc36c87784ac1b11.tar.bz2
Designer: Support the 'windowOpacity'-property for forms.
Analogous to windowTitle, etc. Task-number: QTBUG-7822
Diffstat (limited to 'tools/designer/src')
-rw-r--r--tools/designer/src/components/formeditor/formwindow.cpp1
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp10
2 files changed, 9 insertions, 2 deletions
diff --git a/tools/designer/src/components/formeditor/formwindow.cpp b/tools/designer/src/components/formeditor/formwindow.cpp
index 2d013c9..4cfec95 100644
--- a/tools/designer/src/components/formeditor/formwindow.cpp
+++ b/tools/designer/src/components/formeditor/formwindow.cpp
@@ -484,6 +484,7 @@ void FormWindow::setMainContainer(QWidget *w)
sheet->setVisible(sheet->indexOf(QLatin1String("windowTitle")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowIcon")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowModality")), true);
+ sheet->setVisible(sheet->indexOf(QLatin1String("windowOpacity")), true);
sheet->setVisible(sheet->indexOf(QLatin1String("windowFilePath")), true);
// ### generalize
}
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index b4b962c..13bb1d7 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -610,8 +610,9 @@ QDesignerPropertySheet::QDesignerPropertySheet(QObject *object, QObject *parent)
createFakeProperty(QLatin1String("whatsThis"));
createFakeProperty(QLatin1String("acceptDrops"));
createFakeProperty(QLatin1String("dragEnabled"));
- // windowModality is visible only for the main container, in which case the form windows enables it on loading
+ // windowModality/Opacity is visible only for the main container, in which case the form windows enables it on loading
setVisible(createFakeProperty(QLatin1String("windowModality")), false);
+ setVisible(createFakeProperty(QLatin1String("windowOpacity"), double(1.0)), false);
if (qobject_cast<const QToolBar *>(d->m_object)) { // prevent toolbars from being dragged off
createFakeProperty(QLatin1String("floatable"), QVariant(true));
} else {
@@ -1451,8 +1452,13 @@ bool QDesignerPropertySheet::isVisible(int index) const
}
if (isFakeProperty(index)) {
- if (type == PropertyWindowModality) // Hidden for child widgets
+ switch (type) {
+ case PropertyWindowModality: // Hidden for child widgets
+ case PropertyWindowOpacity:
return d->m_info.value(index).visible;
+ default:
+ break;
+ }
return true;
}