Commit Graph

30 Commits

Author SHA1 Message Date
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
Thomas Hartmann
924149e515 QmlDesigner: Use simplified name for Connections
Task-number: QDS-9737
Change-Id: I1883632cf3029263b28095cc481e45a41c0d89d1
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2023-04-20 17:03:24 +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
Aleksei German
36c96a0972 QmlDesigner: Use Model ConnectionMetaInfo method
Change-Id: I1ac34ed36df45e8fe1f8baa60311b1c337c4ac71
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-12-02 09:38:35 +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
35a773b2dc QmlDesigner: Use ProjectStorage
Task-number: QDS-7379
Change-Id: I50c8a4a527daa7268a723094b6ceec37d10dfaa6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-26 10:57:09 +00:00
Marco Bubke
fd41105191 QmlDesigner: Introduction of PropertyMetaInfo
Because the project storage is integer id based the string based API
isn't fitting well for the new approach. PropertyMetaInfo can be easier
mapped to the project storage.

Task-number: QDS-7197
Change-Id: I49bc650abdaacf4b039d76c2514b5ad05ec84abe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-06 12:40:58 +00:00
Thomas Hartmann
3d917a01cc QmlDesigner: Fix crash
This case should not happen and is handled in a separate patch,
but in case we miss another corner case this avoids the crash.

Task-number: QTCREATORBUG-25437
Change-Id: I370e3e0b6901d8cdd857714a0766f0f8442a3d66
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-04-06 13:29:10 +00:00
Henning Gruendl
bebd70573e QmlDesigner: Add signal list dialog
* Add signal list dialog, delegate and view
* Add context menu entry on items which have a trigger signal
* Add specific model node operations
* Add qml Connections util class
* Add utility functions to signal handler property
* Fix property processing in node meta info
* Fix source code in connection editor and navigator

Task-number: QDS-3138
Change-Id: I362ceef230efdb14f2050995b1693937e5e73c41
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-01-06 16:09:34 +00:00
Christian Kandeler
9cbcbfff33 Fix various clang warnings
Unused variables & functions, unneeded copies in range-for loops,
missing overrides.

Change-Id: I27b60e7c92a6ca425a84c89b537d5c3815449a94
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-08 15:39:20 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
Thomas Hartmann
83036eff4c QmlDesigner: Add more trace points
Change-Id: I618e027785676de8492cd698f109579abb9b053a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-11-20 11:19:45 +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
7d21caabdb QmlDesigner: Minor Fixes for QDS MCU compatibility
Change-Id: I401ecf9ce12d7020e78a5449b321fb7927caffed
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-19 10:54:29 +00:00
Henning Gruendl
ac5d35a53d QmlDesigner: Remove parent as Connections target
Task-number: QDS-2651
Change-Id: Ib4520206cc2a3f8a044a66e3e01db0ec603a3029
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-08-27 10:05:26 +00:00
Aleksei German
66122492a6 QmlDesigner: Extend Connections view support
- Connection view support to components
 - Connection view support to singletons
 - Minor reparenting improvements
Task: QDS-2411

Change-Id: I337535012dbb3d3a1722d75d89156463eabb8a4c
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2020-08-13 10:32:16 +00:00
Aleksei German
8c97f870b9 QmlDesigner: Add Singleton support to Connections
Change-Id: I07eae4e381f172d7c6a23ee5b7e13273afa788b9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-07-10 17:14:53 +00:00
Aleksei German
e9e1e797c7 QmlDesigner: Support aliases in Connection View
- Allows user to select aliases in connections view
 - Seeks signals for aliases

Task: QDS-2411

Change-Id: I69eb875eb99cbf8cd6a842d5f7e166d9990bb255
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-07-02 14:47:48 +00:00
Tim Jenssen
b8cd87dea0 Merge remote-tracking branch 'origin/qds-1.59' into 4.13
Conflicts:
	src/plugins/clangformat/clangformatplugin.cpp
	src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp
	src/plugins/qmldesigner/qmldesigner.qbs

Change-Id: Ie4a0beeb9fd32ac9683f4e8769988a9c3f3e369a
2020-06-26 16:51:22 +02:00
Aleksei German
4ed146035e QmlDesigner: Fix for Connections visibility
- Fixes an issue with connection model not finding Connections in 5.15

Task: QDS-2412

Change-Id: I07bbb900907aaaebccdd90dbc1f037ee0b2fcc61
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-25 13:13:05 +00:00
Aleksei German
27d4f4b663 QmlDesigner: Fix crashes in connection view
- Fix for connections order in view
 - Fix for binding and connection editor init crash

Change-Id: If0faf401b8e89a5548c65f07284138e869612c95
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-24 09:53:50 +00:00
Thomas Hartmann
3ad76aa57f QmlDesigner: Add trigger "action" for transition
Change-Id: Ia498af6ad5014fbae61bd51ddb066ce61ba647b5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-11 17:13:02 +00:00
Thomas Hartmann
be66d1250c QmlDesigner: Add FlowActionArea support to connection view
Change-Id: I5b7d53ccab299960aed736f6a292e158ec60ce99
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-04-07 12:24:10 +00:00
Thomas Hartmann
c8779e9c93 QmlDesigner: Create connections inside the target element
Change-Id: I29e00e4f90d1fec2f230a989c7b04f64e8b81a9b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-02-14 15:03:42 +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