Commit Graph

30 Commits

Author SHA1 Message Date
Knud Dollereder
db78fa9cf8 Update the curveeditor when changing keyframes in the text editor
Fixes: QDS-10062
Change-Id: Ie0364d095f17ba6b5f16bd8fbf9abddfca2f26db
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2023-07-17 09:49:03 +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
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
432ed0a72d QmlDesigner: Use new validation approach in curve editor
Many validation tests can now be skipped.

Task-number: QDS-7454
Change-Id: I24aa4023808a42215a6e79c15f962128702ff51c
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
2022-09-28 09:20:30 +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
Marco Bubke
da36459759 QmlDesigner: Refactor isSubClass
IsSubClass is renamed to isBasedOn and takes now NodeMetaInfo as a
parameter. But for most cases there are is... functions as short cut.
The model is providing shortcut NodeMetaInfos too. This is done in the
sake of caching.

Task-number: QDS-7445
Change-Id: Iff2dea66e253b412105427134bd49cb16ed76193
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-08-26 15:02:24 +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
Eike Ziller
90a03391d7 Merge remote-tracking branch 'origin/8.0'
Change-Id: I37a1f78caf9ae258c6b052efa3be15b3dbcbe164
2022-07-12 13:56:23 +02: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
Knud Dollereder
1df1a065de QmlDesigner: Improve usability of boolean animation curves
Boolean animation curves are now painted from min to max of the value range
instead of from 0 to 1. This allows to see value changes when the curve is
loaded together with other animation curves of different value ranges.

Boolean curves are now forced to be step interpolated.
If the user tries other interpolation types the request is denied and an
error message is written in the new status line.

Added a status line that displays the current frame number by default and
an informative text in case the user did something forbidden.

Respect the current state when populating the curve editor.

Fixes: QDS-6950
Fixes: QDS-6889
Change-Id: Ia5fa1c1c55ee93eda5a39fd83987b54fb41d54db
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-07-08 13:20:26 +00:00
Eike Ziller
09efabaf89 Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: I3780a56c1e02c2e98028aaf02b54733c6f222498
2022-05-30 14:14:04 +02:00
Knud Dollereder
bf69c6c3a9 Do not update animation range from inactive timelines
In a scene with multiple states and timelines it occasionally happend
that the curve editor was updated from an inactive timeline.
This is now fixed.

Fixes: QDS-6948
Change-Id: I586593452e69cebe7bb2571e301230bf0ace8631
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-05-30 09:39:18 +00:00
Eike Ziller
6a296ab68a Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmlprojectmanager/qmlprojectplugin.cpp

Change-Id: I14030f58303839e706af892dd12a67566e3bed68
2022-05-18 13:35:47 +02:00
Knud Dollereder
4d58f8dee8 Make the curveeditor state aware
Fixes: QDS-6872
Change-Id: I2fe733bf6c25d3517ff80d122977113e10bac627
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-13 09:46:43 +00:00
Eike Ziller
1b7295514c Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/languageclient/languageclientoutline.cpp

Change-Id: I106fbde6467818368a8358d612d793313cad27e6
2022-05-02 15:06:08 +02:00
Knud Dollereder
9195d0dd2c Improve Animationcurve editor
- Prevent insertion of invalid animation ranges that may cause DS
  hanging
- Properly update the toolbar when switching to a different qml file
- Show an informative text instead of the empty curve editor when
  the current file does not contain a timeline
- Move the toolbar into its own class
- Add an implentation to the "Set Default" button

Fixes: QDS-6543
Fixes: QDS-6542
Fixes: QDS-6545
Fixes: QDS-6544
Change-Id: Id6bc1457627ea23a670e74ea335fbb475711b9a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-04-28 10:01:46 +00:00
Thomas Hartmann
648e659356 QmlDesigner: Simplify naming of views
* Curve Editor -> Curves
* 3D Editor -> 3D
* Form Editor -> 2D
* Text Editor -> Text
* Transition Editor -> Transitions

Most view titles are now a single word and all superfluous "Editor"
as part of the title have been removed.
"File System" and "Open Documents" stay as they are.

Task-number: QDS-6325
Change-Id: I8fb6477f9e07c324f76a49796f550a8b8799fedd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-21 10:04:08 +00:00
Eike Ziller
41538832c3 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/libs/utils/qtcprocess.cpp
	src/plugins/qmldesigner/components/curveeditor/curveeditorview.cpp
	src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp

Change-Id: Id0c31719e46d1c44770ea89663eee321a0517ff4
2022-02-24 11:42:57 +01:00
Thomas Hartmann
3a210bb811 QmlDesigner: Rename views for consistency
"CurveEditor" -> "Curve Editor"

Task-number: QDS-5852, QDS-6325
Change-Id: I709b54c338708f4387d0d1cb4b928d8eebbfb3be
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-02-23 16:57:27 +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
a07112258b QmlDesigner: Disable Timeview and CurveEditorView when widget is invisble
Task-number: QDS-5159
Change-Id: Ibae0b9742d4aaac6a1def1c84342a031baf75256
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-10-01 14:03:45 +00:00
Knud Dollereder
d5daa1d0bb Improve stability of the curve editor
- Clear the CurveEditor when deleting a timeline
- Prevent value-axis computation with invalid values
- Prevent invalid values when animation curves contain one keyframe only
- Set the dirty flag when deleting a keyframe in order to properly
  delete it
- Fix autoscrolling for the timeline editor

Fixes: QDS-4115
Fixes: QDS-4081
Fixes: QDS-4080
Fixes: QDS-3251
Change-Id: I3bc8406ac57f30b16bccc2e1c164a84502de7750
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-05-06 12:40:10 +00:00
Knud Dollereder
5faee6221f Load all curves when opening DS with lastsession
Change-Id: I2de37fbd25b828e585739edee8bb079c02f58f94
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-25 16:00:12 +00:00
Knud Dollereder
ced7a2e51f Emit frame-changed signals on valid timelines only
Fixes: QDS-3876
Change-Id: I57605849d9a2f20d79dbae54f8c4c58ee8dcb192
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-17 15:49:01 +00:00
Knud Dollereder
1ba7c149af Enable step functions in the curve-editor
... and shut-up an annoying qDebug log in the transition-editor.

Change-Id: Iea8b48e48bb7e52cd4c845f28c49f8a513785fab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-04 14:48:19 +00:00
Knud Dollereder
8ca3b557da Update locking state from external views and cleanup
Improve treeview styling related to locking/pinning
    Use font icons.
    Show implicitly locked nodes by darkening text and icon.
    Show implicitly locked curves by darkening the text.
    Show unlocked/unpined icons only when hovering the mouse above the item.
It is now possible to lock/pin multiple curves by locking/pinning the node items.
Load unselected curves into the graphicsview when pinning them.
Rename namespace DesignTools to QmlDesigner.
Remove unused function from the timeline module.
Get rid of a memory leak.

Change-Id: I2c9c0a9e1ffe79520c4869178a11cc5825d04bbe
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-28 13:13:56 +00:00
Knud Dollereder
aaf564cab7 CurveEditor: Fix bounding rect computation for the graphicsscene
Task-number: QDS-2957
Change-Id: I0019d538e7460e923b35024bd02f7186e1935f6b
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-10-19 14:43:04 +00:00
Knud Dollereder
3bce5f2e76 Convert the CurveEditorDialog to a view-plugin
Continuously send frame-changed signals when dragging the playhead
Fix timescale painting
Paint playhead behind the valuescale

Task-number: QDS-2551
Change-Id: Ia8d3952b4401500a4c6d31ff9f5742ff44b2c092
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-11 13:28:09 +00:00