summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src/lib')
-rw-r--r--tools/designer/src/lib/sdk/membersheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/propertysheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/taskmenu.qdoc6
-rw-r--r--tools/designer/src/lib/shared/newactiondialog.ui96
-rw-r--r--tools/designer/src/lib/shared/qdesigner_command.cpp4
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertysheet.cpp13
-rw-r--r--tools/designer/src/lib/shared/shared.pri2
-rw-r--r--tools/designer/src/lib/uilib/container.qdoc6
-rw-r--r--tools/designer/src/lib/uilib/customwidget.qdoc6
9 files changed, 79 insertions, 70 deletions
diff --git a/tools/designer/src/lib/sdk/membersheet.qdoc b/tools/designer/src/lib/sdk/membersheet.qdoc
index fdd13f2..57a3664 100644
--- a/tools/designer/src/lib/sdk/membersheet.qdoc
+++ b/tools/designer/src/lib/sdk/membersheet.qdoc
@@ -40,7 +40,7 @@
manipulate the member functions' appearance in \QD's signals and
slots editing mode. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 2
When implementing a custom widget plugin, a pointer to \QD's
current QDesignerFormEditorInterface object (\c formEditor in the
@@ -69,7 +69,7 @@
made known to the meta object system using the Q_INTERFACES()
macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 3
This enables \QD to use qobject_cast() to query for
supported interfaces using nothing but a QObject pointer.
@@ -101,13 +101,13 @@
QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 4
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a member sheet extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 5
For a complete example using an extension class, see \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/propertysheet.qdoc b/tools/designer/src/lib/sdk/propertysheet.qdoc
index d82de88..becc74b 100644
--- a/tools/designer/src/lib/sdk/propertysheet.qdoc
+++ b/tools/designer/src/lib/sdk/propertysheet.qdoc
@@ -41,7 +41,7 @@
manipulate the properties' appearance in the property editor. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 15
Note that if you change the value of a property using the
QDesignerPropertySheetExtension::setProperty() function, the undo
@@ -80,7 +80,7 @@
an interface, we must ensure that it's made known to the meta
object system using the Q_INTERFACES() macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 16
This enables \QD to use qobject_cast() to query for supported
interfaces using nothing but a QObject pointer.
@@ -112,14 +112,14 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 17
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a property sheet extension extension as well. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 18
For a complete example using an extension class, see the \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/taskmenu.qdoc b/tools/designer/src/lib/sdk/taskmenu.qdoc
index 06d0b96..c5a3795 100644
--- a/tools/designer/src/lib/sdk/taskmenu.qdoc
+++ b/tools/designer/src/lib/sdk/taskmenu.qdoc
@@ -51,7 +51,7 @@
inherit from both QObject and QDesignerTaskMenuExtension. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 9
Since we are implementing an interface, we must ensure that it
is made known to the meta-object system using the Q_INTERFACES()
@@ -94,13 +94,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 10
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a task menu extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 11
For a complete example using the QDesignerTaskMenuExtension class,
see the \l {designer/taskmenuextension}{Task Menu Extension
diff --git a/tools/designer/src/lib/shared/newactiondialog.ui b/tools/designer/src/lib/shared/newactiondialog.ui
index 17b5d64..aef9710 100644
--- a/tools/designer/src/lib/shared/newactiondialog.ui
+++ b/tools/designer/src/lib/shared/newactiondialog.ui
@@ -89,6 +89,50 @@
<item row="1" column="1">
<widget class="QLineEdit" name="editObjectName"/>
</item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="toolTipLabel">
+ <property name="text">
+ <string>T&amp;oolTip:</string>
+ </property>
+ <property name="buddy">
+ <cstring>tooltipEditor</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <layout class="QHBoxLayout" name="toolTipLayout">
+ <item>
+ <widget class="TextPropertyEditor" name="tooltipEditor" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="toolTipToolButton">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="iconThemeLabel">
+ <property name="text">
+ <string>Icon th&amp;eme:</string>
+ </property>
+ <property name="buddy">
+ <cstring>iconThemeEditor</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="qdesigner_internal::IconThemeEditor" name="iconThemeEditor" native="true"/>
+ </item>
<item row="4" column="0">
<widget class="QLabel" name="iconLabel">
<property name="text">
@@ -119,16 +163,6 @@
</item>
</layout>
</item>
- <item row="6" column="0">
- <widget class="QLabel" name="shortcutLabel">
- <property name="text">
- <string>&amp;Shortcut:</string>
- </property>
- <property name="buddy">
- <cstring>keySequenceEdit</cstring>
- </property>
- </widget>
- </item>
<item row="5" column="1">
<widget class="QCheckBox" name="checkableCheckBox">
<property name="text">
@@ -146,37 +180,16 @@
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="toolTipLabel">
+ <item row="6" column="0">
+ <widget class="QLabel" name="shortcutLabel">
<property name="text">
- <string>T&amp;oolTip:</string>
+ <string>&amp;Shortcut:</string>
</property>
<property name="buddy">
- <cstring>tooltipEditor</cstring>
+ <cstring>keySequenceEdit</cstring>
</property>
</widget>
</item>
- <item row="2" column="1">
- <layout class="QHBoxLayout" name="toolTipLayout">
- <item>
- <widget class="TextPropertyEditor" name="tooltipEditor" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toolTipToolButton">
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
<item row="6" column="1">
<layout class="QHBoxLayout" name="keysequenceLayout">
<item>
@@ -198,19 +211,6 @@
</item>
</layout>
</item>
- <item row="3" column="0">
- <widget class="QLabel" name="iconThemeLabel">
- <property name="text">
- <string>Icon th&amp;eme:</string>
- </property>
- <property name="buddy">
- <cstring>iconThemeEditor</cstring>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="qdesigner_internal::IconThemeEditor" name="iconThemeEditor" native="true"/>
- </item>
</layout>
</item>
<item>
diff --git a/tools/designer/src/lib/shared/qdesigner_command.cpp b/tools/designer/src/lib/shared/qdesigner_command.cpp
index 148b4c8..f4e250d 100644
--- a/tools/designer/src/lib/shared/qdesigner_command.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_command.cpp
@@ -2094,12 +2094,12 @@ void AddContainerWidgetPageCommand::init(QWidget *containerWidget, ContainerType
case PageContainer:
setText(QApplication::translate("Command", "Insert Page"));
m_widget = new QDesignerWidget(formWindow(), m_containerWidget);
- m_widget->setObjectName(QApplication::translate("Command", "page"));
+ m_widget->setObjectName(QLatin1String("page"));
break;
case MdiContainer:
setText(QApplication::translate("Command", "Insert Subwindow"));
m_widget = new QDesignerWidget(formWindow(), m_containerWidget);
- m_widget->setObjectName(QApplication::translate("Command", "subwindow"));
+ m_widget->setObjectName(QLatin1String("subwindow"));
setPropertySheetWindowTitle(core, m_widget, QApplication::translate("Command", "Subwindow"));
break;
case WizardContainer: // Apply style, don't manage
diff --git a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
index babe20e..27527da 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertysheet.cpp
@@ -1195,8 +1195,17 @@ bool QDesignerPropertySheet::reset(int index)
{
if (d->invalidIndex(Q_FUNC_INFO, index))
return false;
- if (d->isStringProperty(index))
- setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetStringValue()));
+ if (d->isStringProperty(index)) {
+ qdesigner_internal::PropertySheetStringValue value;
+ // Main container: Reset to stored class name as not to change the file names generated by uic.
+ if (propertyName(index) == QLatin1String("objectName")) {
+ const QVariant classNameDefaultV = d->m_object->property("_q_classname");
+ if (classNameDefaultV.isValid())
+ value.setValue(classNameDefaultV.toString());
+ }
+ setProperty(index, QVariant::fromValue(value));
+ return true;
+ }
if (d->isKeySequenceProperty(index))
setProperty(index, QVariant::fromValue(qdesigner_internal::PropertySheetKeySequenceValue()));
if (d->isResourceProperty(index)) {
diff --git a/tools/designer/src/lib/shared/shared.pri b/tools/designer/src/lib/shared/shared.pri
index 8286360..9d50911 100644
--- a/tools/designer/src/lib/shared/shared.pri
+++ b/tools/designer/src/lib/shared/shared.pri
@@ -2,7 +2,7 @@
INCLUDEPATH += $$PWD
contains(QT_CONFIG, script): QT += script
-include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
+include(../../../../shared/qtpropertybrowser/qtpropertybrowserutils.pri)
include(../../../../shared/deviceskin/deviceskin.pri)
include(../../../../../src/tools/rcc/rcc.pri)
include(../../../../shared/findwidget/findwidget.pri)
diff --git a/tools/designer/src/lib/uilib/container.qdoc b/tools/designer/src/lib/uilib/container.qdoc
index 51d942e..d931051 100644
--- a/tools/designer/src/lib/uilib/container.qdoc
+++ b/tools/designer/src/lib/uilib/container.qdoc
@@ -44,7 +44,7 @@
To create a container extension, your extension class must inherit
from both QObject and QDesignerContainerExtension. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 6
Since we are implementing an interface, we must ensure that it's
made known to the meta object system using the Q_INTERFACES()
@@ -88,13 +88,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 7
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a container extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 8
For a complete example using the QDesignerContainerExtension
class, see the \l {designer/containerextension}{Container
diff --git a/tools/designer/src/lib/uilib/customwidget.qdoc b/tools/designer/src/lib/uilib/customwidget.qdoc
index 3410fc6..d5ddaa7 100644
--- a/tools/designer/src/lib/uilib/customwidget.qdoc
+++ b/tools/designer/src/lib/uilib/customwidget.qdoc
@@ -73,7 +73,7 @@
class called \c MyCustomWidget, we can export it by adding the
following line to the file containing the plugin implementation:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 14
This macro ensures that \QD can access and construct the custom widget.
Without this macro, there is no way for \QD to use it.
@@ -264,13 +264,13 @@
several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and
\c CustomWidgetThree, the class definition may look like this:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 12
In the class constructor you add the interfaces to your custom
widgets to the list which you return in the customWidgets()
function:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 13
Note that instead of exporting each custom widget plugin using the
Q_EXPORT_PLUGIN2() macro, you export the entire collection. The