Commit Graph

32 Commits

Author SHA1 Message Date
Thomas Hartmann
1b9ed62028 QmlDesigner: Close dialog if target is removed
If the target is removed also the connection is removed and
we close the dialog.

Change-Id: I361e89ef64484e39bc0068e103f542cbc9dcbf78
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Aleksei German <aleksei.german@qt.io>
2023-09-18 15:54:39 +00:00
Henning Gruendl
5e8b5ec1f0 QmlDesigner: Integrate Expression Builder
Task-number: QDS-10587
Change-Id: Ifc13a8364fccb74cb60d683f0e6c322d80baab50
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-08 14:15:40 +00:00
Knud Dollereder
759b560bab Cleanup ConnectionEditor models
Simplified interface for the BindingModel and DynamicPropertiesModel.

Change-Id: I772f31be704afe2a43c6368aefab1b026b85ec8b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-06 17:14:38 +00:00
Henning Gruendl
b2ee8acafa QmlDesigner: Add QML views transient scrollbars
* Add transient scrollbars to all QML based views
* Remove version from QtQuick imports
* Fix missing AssetsLibraryBackend reference in AssetsDelegate

Task-number: QDS-9549
Change-Id: I7ab2e52106efae07caa37763b5b0592cfbf57c2e
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-09-01 13:54:14 +00:00
Thomas Hartmann
34cef91983 QmlDesigner: Update ConnectionModel
Change-Id: I5be9117284a5eae2437b0a4fc9452694098713f3
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-08-30 08:07:21 +00:00
Henning Gruendl
16bbccf2ea QmlDesigner: Connection Editor design cleanup
Cleanup of the QML connection editor only. Binding and property will be
done afterwards as it is just copy and paste of the style in the end.

Task-number: QDS-10211
Change-Id: I83fb93bc25813571ea7f645feeeaeb274751b6de
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-08-21 09:21:12 +00:00
Thomas Hartmann
9a11fa3ef8 QmlDesigner: Add QML front-end for ConnectionView
This is still disabled by default until the UI gets polished.

Add roles to models. ConnectionModel, BindingModel and DynamicPropertiesModel.
In QML roles are used in the ListView to "mimic" columns. The columns are only
relevant for the "old" cpp QTableView and can be removed.

Making currentIndex part of the model. If rows are removed and added
again we have to "reset/keep" the currentIndex as part of the model, because
the index is temporarly invalid on the view.

Implementing DynamicPropertiesModelBackendDelegate as reference.
This is a pure "backend delegate" that exposes all relevant properties for
a current row to QML.

Adding StudioQuickWidget and exposing the backend.

Adding StudioQmlTextBackend and StudioQmlComboBoxBackend to
StudioQuickWidget (should be moved into their own files).
Those helper classes make is easy to expose a property to a combobox or
textfield. The backend has to know nothing about the actual frontend
and those classes act as a mini-model for a view in QML.
The API is similar to UI controls.

Change-Id: I7a2c6ad951306fbca1d586fb8f278acdd91a064b
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2023-07-07 09:36:34 +00:00
Marco Bubke
278d69df4f QmlDesigner: Fix deprecated function calls
count() -> size()
userType() -> typeId()
type() -> typeId()

Fixes: QTCREATORBUG-29237
Change-Id: Ic63b79f6fab1f6ed5227d97aa12dcbfdebb4f05f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2023-06-07 11:31:25 +00:00
Marco Bubke
6035ff939d QmlDesigner: Add module scanner
For performance reason we want to get the qml modules directly from the
file system. When the project storage is finished we can get the modules
from there.

Task-number: QDS-9542
Change-Id: I26d4b028fbf5ebc541fcd8e34d285ded1fb14935
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-04-19 13:58:22 +00:00
Tim Jenßen
feabda3aa7 Merge remote-tracking branch 'origin/10.0' into qds/dev
bigger conflicts resolved at:
  src/plugins/qmldesigner/CMakeLists.txt
  src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp

Change-Id: I08e2a109d8e37cbd77225129854e9e633725bfc7
2023-03-26 16:26:18 +02:00
Mahmoud Badri
cd70e9cecb QmlDesigner: Move connection classes out of Internal
Also clean up DynamicPropertiesProxyModel and DynamicPropertiesModel
classes.

Change-Id: I40a2864c1ffbd555dfea9452cd55bbeb23e9fdfa
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-03-16 16:49:34 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Marco Bubke
78cf5051f5 QmlDesigner: Merge cmake files
To improve testability external dependencies are now broken with an
interface. It is a first step to test individual units without injection
of source files.

Task-number: QDS-7571
Change-Id: I4255c8668022f1097947e4ea5788f2a6b605365d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-10-07 13:15:41 +00:00
Marco Bubke
0be4de69d8 QmlDesigner: Remove parent from abstract view
We apply not very often the parent to views. So it can lead to dangling
pointer if the parent is used by other objects and does not handle the
null pointer case. It can lead to double deletion if the parent is
deleted before the object when it is on the stack or handled by smart
pointer.

If you really want to use it there is still setParent.

Change-Id: I1fc6b145a50f037a0e9d415fb36e7970ea7296ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-09-22 19:08:12 +00:00
Eike Ziller
5d55cfdae5 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
	share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf
	src/libs/utils/fileutils.cpp
	src/plugins/qmldesigner/components/edit3d/edit3dwidget.cpp
	src/plugins/qmldesigner/designercore/include/abstractview.h
	src/plugins/qmldesigner/designercore/include/nodemetainfo.h
	src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
	src/plugins/qmldesigner/designercore/model/model_p.h
	src/plugins/remotelinux/linuxdevice.cpp
	tests/auto/utils/fileutils/tst_fileutils.cpp

Change-Id: I26a21e2523d3d725fdb8c548a531cdbdaeaeca20
2022-09-19 09:54:06 +02:00
Thomas Hartmann
39f44cf57c QmlDesigner: Fix expressions in DynamicPropertyRow and states
* States are now taken into account.
* If name is empty in expressionChanged(), then this
  is just a notifier for the QML frontend and has to be ignored.
* When exposing the expression to QML we also have to take into
  account states.
* Implementing resetting dynamic properties. We have to hardcode
  the default values for the base state
* I also implemented the callbacks in the views for PropertyChanges.

Change-Id: I08247a3c1783a52853db7bf0f7f249520f7edc1c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-16 15:04:29 +00:00
Marco Bubke
4726b0da2d QmlDesigner: Fix warnings
Change-Id: Id61a8e9e47563088283b5c024eb740acbc25faff
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-14 11:29:41 +00:00
Eike Ziller
5ae23f8c66 Merge remote-tracking branch 'origin/8.0'
Conflicts:
	.github/workflows/build_cmake.yml
	src/plugins/qmldesigner/components/connectioneditor/dynamicpropertiesmodel.cpp
	src/plugins/qmldesigner/components/materialeditor/materialeditorview.h
	src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
	src/plugins/qmldesigner/designercore/model/model.cpp

Change-Id: I111b9140375b894a5487cc012b17cc32100bdb8d
2022-09-13 11:15:16 +02:00
Thomas Hartmann
c1bc770564 QmlDesigner: Reset dynamicPropertiesModel on state change
Change-Id: If503d0d4f5cb3d23c4445fa6e774729779d4dd5b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-09-12 13:30:45 +00:00
Thomas Hartmann
4c91ed496a QmlDesigner: Add dynamic properties to property editor
Added dynamic properties section to property editor and material
editor for all nodes. It shows all dynamic properties defined
for the node with proper editors for the supported types.
Dynamic properties can be added and removed via property editor
as well.
Material editor shows dynamic properties similarly.

Fixes: QDS-7411
Change-Id: Id195f5ca23d55544cea29eb8996690a7eed1cc57
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-06 12:40:50 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Marco Bubke
c13e2b89f5 QmlDesigner: Add type enumeration to auxiliary data
Auxiliary data so far used naming conventions to declare the kind of the
data. Now an enumeration is used. The auxiliaryData(...) is returning an
optional too so that it is known if a value exists. There is now
auxiliaryDataWithDefault(...) which is returning an invalid
QVariant instead.

The instance cache is now disabled because there is not notification for
information changes. So if we get the real data from the node instances
there will be no information changes because nothing changed. So the
form editor is a strange state of being reset but not all data
arrived. Before this patch there were still changes happen because of
some side effects that auxiliary properties were sent which were never
intended to be sent. If we re-enable the cache we need to send
information changes or every view must expect that the information is
already there.

Task-number: QDS-7338
Change-Id: I0cafd149c53df552c7c8442f1e8ba87f5451dbd1
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-09 17:52:03 +00:00
Marco Bubke
9faf6d0826 QmlDesigner: Adapt to C++ 17 [[maybe_unused]]
It has the advantage to to move the attribute to the declaration instead
of using a workaround.

Change-Id: I08b712f146a0625d0367657c31d6c1e5f7caec41
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-11 09:29:52 +00:00
Thomas Hartmann
8f141a8e26 QmlDesigner: Add instance to ConnectionView and make methods public
This allows to use the model from the property editor.
We do not implement the instance as singleton but use the View Manager.

Change-Id: I2d95235a31d4a776411336ef82ace0f230c9971f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-08 06:38:53 +00:00
Thomas Hartmann
5e96768eac QmlDesigner: Rename Connections View to simply Connections
Change-Id: I13f126b5a847cdd047a39063fd0d68c6606c24fa
Reviewed-by: Brook Cronin <brook.cronin@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-05 07:47:18 +00:00
Artem Sokolovskii
427c26d900 QmlDesigner: Remove foreach / Q_FOREACH usage in componentcore
Task-number: QTCREATORBUG-27464
Change-Id: I89d78d131a11b84b592d3d10577fe1ea4c7a6b4c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-13 09:31:05 +00:00
Knud Dollereder
381bfd623c Remove ToolBarWidgetFactoryInterface from WidgetInfo
Since it is sometimes created with new but never used,
it leaked memory.

Change-Id: I5adfb71f9c773be37c1cefc619236bad9f34aad1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 10:05:49 +00:00
Thomas Hartmann
350d1cd090 QmlDesigner: Properly react to deleted properties in ConnectionView
If the property contained a node we reset the model.

Task-number: QTCREATORBUG-25437
Change-Id: If7efebed87fe2936069a06e2bd03193806427a97
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-06 13:29:51 +00:00
Henning Gruendl
2860e57112 QmlDesigner: Add lock functionality to navigator
* Update icon font and change related theme and constants files
* Add locked column to Navigator
* Add auxiliary property "locked"
* Integrate locked feature into the following components:
  * Transition Editor
  * Connection Editor
  * Form Editor
  * Text Editor
  * Timeline
  * Navigator
  * State Editor

Task-number: QDS-826
Change-Id: Ibf3ae96e0d5daeb1ab00279b94df5aaabe75e0bb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-12 15:24:55 +00:00
Aleksei German
ec43ac0481 QmlDesigner Connection View signals fixes
Bug: QDS-1333
Change-Id: Ic0d4206888bd8c5bd3d5cef29225441f19efa59d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-16 09:16:07 +00:00
Aleksei German
0adf810587 QmlDesigner Action Editor for Connections View
Task: QDS-1261
Change-Id: I81e6687e31a0f987ba15dc81dd52f240e4ea9689
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-06 13:26:30 +00:00
Knud Dollereder
376c6b9d59 Add curve editor
Moved qmldesignerextension into component

Updated build systems

Change-Id: I8d2d0757a1639a472d426b66c0c8ae6fb84cc3d2
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-06-19 09:22:31 +00:00