| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
We already change the selection currently in the press event,
which leads wo weird behaivour if e.g. shift is pressed.
In this case the item is immediately unselected which is unexpected
and cannot be moved anymore.
Generally reacting to the event in the release event is the correct way
to do it.
Change-Id: Ib765f97f85e5dbeb6148d48f8640f1798a057b48
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The move tool normally does not reparent, but by pressing shift the user
can enforce reparenting. In the drag tool we prefer to reparent to layouts.
The shoft modifer disables this heuristic.
Task-number: QTCREATORBUG-18737
Change-Id: Ic8041aed537619b16b892a791c0d2bc2390af204
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I introduced a zone around the boarder of each item where
it can always be dragged,
instead of selection another overlapping item.
The area is now a lot smaller, but the 4px seem enough for me
when testing it.
This zone is slightly to big. I keep the size of 20px at the top
so the label/gizmo is always dragable.
Change-Id: Ia1b8afb822b506f5322b952d5537eafc73b52ea2
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
This was introduced when adjusting the selection behaivour.
We have to check for the empty list before we call
itemList.first().
Change-Id: I12a12bc17f1f513304c8df738e76db999267854a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was introduced when adjusting the selection behaivour.
When we change to the selection tool we might delete items.
This item could be in itemlist we forward to AbstractFormEditorTool.
Therefore we change to the selection tool after calling
mouseReleaseEvent().
Change-Id: I5cab902b8560780c6ee4edc3466e7087d719f1ef
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
|
|
|
|
|
| |
Change-Id: Ic89c578474d7cdf1f72a61a91d0cdf32f7b70a7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp:145:
warning: suggest parentheses around '&&' within '||' [-Wparentheses]
|| selectedItemCursorInMovableArea(event->scenePos())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& !event->modifiers().testFlag(Qt::ControlModifier)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&& !event->modifiers().testFlag(Qt::ShiftModifier)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: Iea6018d885b9bad13363a39e2aee0e6e229f93c4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
This makes it less likely to accidentally move an
item instead of resizing it.
Change-Id: I6102a05c50a68d50ea9e4a316f48089186b3a373
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The check for selectedItemCursorInMovableArea has to be the first check,
because otherwise we might change back to the selection tool if e.g.
the item list is empty. This leads to a flickering cursor and bad
usabilty.
Change-Id: I0ea82cd1c4bf83cde0b173ab08f19bd04b1128c0
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a major overhaul of the slection logic.
We do not change to the move tool automatically once
the curser enters the selected item. This allows selection
of items that are at the same position as the current selected item.
The selected item can still be moved if there is no pissible candidate for
selection. Also the border and gizmo always allows an item to be moved, if
the item is fully covered by another item.
Change-Id: Ic97a2bf23f33fcc5e209248aeb2f97df67bd23e1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and make use of it.
With gcc 7, the new option -Wimplicit-fallthrough is introduced and
added to the -Wextra set, triggering dozens of warnings in our sources.
Therefore, we annotate all obviously intended fall-throughs. The ones
that are still left are unclear and need to be checked by the respective
maintainer.
Change-Id: I44ead33cd42a4b41c28ee5fcb5a31db272710bbc
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QGraphicsObject is a QObject and significantly heavier
then QGraphicsItem. There is no need to use
QGraphicsObject in our case.
Using QGraphicsItem instead is simply good practice.
Change-Id: I65f9db85eace25fd0e7873093e903d923eb338dc
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
Everyone agreed that the rubberband selection should be
inclusive. There is no need to require that all items are sub children
of the same item. This seems confusing.
Change-Id: I5fffbc72e0ef15a82fc9f0ab589c865581359775
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
InvertSelection was not properly implemented.
Change-Id: I101105b33f8e2b9ed7b62a06d6330cbbfd87879a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
The rectangle that indicates selection has now the selection color.
Change-Id: I59bcd070bfb8b16f297e648ff53d83c8953b4896
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-17965
Change-Id: Id2a3bef8d4becdecc9f358021a18feb2353743b5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
| |
Change-Id: I3a1ef67d8af255604494695807331576540b8afa
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ibdc46d30ad3f2b703d4cbdd796a1032030bd17cd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
| |
I had this a couple of times and this does not seem fatal.
Change-Id: Id6d2101a5dc1bdc652e6ca8557c7dd8450399be4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a nasty one. The text item that
triggers the crash is part of a delegate and therefore,
does not have an item in the scene.
The rewriter is now setting the id again, when reading the file after
the Rectangle is removed. we get a crash.
Since delegates are currently not shown in the navigator, this crash
could not happen before we introduced the integrated text editor.
Task-number: QTCREATORBUG-17970
Change-Id: Ica16dec5bb2f852324de179c4a2b4d43dcf27aa9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: Iaa207dec5ea869833750eb9fc18f70f404d08572
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the warnings become too annoying, since they are
also triggered by undo/redo.
Do not disable the form editor in case of warnings.
Task-number: QTCREATORBUG-16306
Change-Id: Ieb1d6072269935e420e9cf988c900e1af792686f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
+ De-slot where possible
Change-Id: Ibd2edbef7b7712aba20593bd0417940e828e0c9c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
When opening a new document the rewriter is attached first
and the documentMessage notifers are send before the form editor
is attached.
Change-Id: I85d91534fd4b0f9fca55829af36dfeec5a284d57
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
This just wastes memory. We already cache the content in a pixmap.
Anything we render on top is cheap.
Change-Id: Ieecb689aa001ec8948b76c454e0b5217ff20be4f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
This reduces/minimizes flickering when reseting the puppet.
With layouts items have the tendency to jump around.
We just block any updates on the view for one second.
Change-Id: I4baa4bca3ed87a233bce41ab20bd25fc7f59fc06
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- rename Theming -> Theme
- made derived colors as Q_INVOKABLE methods available
- rename registerIconProvider -> setupTheme
- inside *.qml files use a singleton import instead of a context
Before this change, every request for a theme value copied the map into the
Qml context including the convert of values QVariant -> QJSString
Change-Id: I1c483fb591336b519d5adab8ad37b42bc5a06720
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
| |
We have to set clipping in the right places.
Change-Id: Ifc4b1a91cd488b492d1dcd5c420fc7a5ac311fdb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
If an item is dopped in a layout we reset the position.
Change-Id: I22d005111b1f1d16ed81473c84ea8f9e27130e9d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I11cecafb6132b4c1cbcdcca9d3eedd78ee23c83c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
If already the parent is invisible do not select an item.
Change-Id: I0ec667314ae7446cda5ed1f0eaa9234ab419de8c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I9e35217b13627074b6732dd532ff8fbe99177ebe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
The item m_labelItem might be null.
Change-Id: I3c4c8c1141694a72ad7eb71498929538da55b920
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I3430e7c49678422811754f1c0400291cdf61c29b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
This allows to show certain actions inside the selection label.
This is useful for context dependent actions that do not belong
in the general toolbar and gives those actiosn visibility.
Change-Id: I24499d760556c5a60e108f847d39e645b8ee692f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
There is no need to reimplement qBound.
Change-Id: I3b753f30bd183392bef88810228c2153a5edbdb5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
The initial m_currentComboBoxIndex was wrong. Initial Zoom-in
jumped to 50% instead of to 125%.
Change-Id: Id090e60322a30e7d4b345fa7b8cd1a7be399fdf1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When an item in a stacked container is selected,
then select the container instead.
Usually the user is not interested in the contaienr items.
They can still be selected in the navigator.
Change-Id: I4d2d7d3d84d40520a91c71c5fc05c815c50d38a2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generally painting the place holder for invisble items makes
sense.
The logic is different for items stacked containers,
since those are overlapping and we are only interested
in the current visible one.
Also it does not make sense to paint the placeholder if already
the parent is invisible, since this just creates noise.
The logic is now more complex, but the usabilty increases significantly.
Change-Id: Ia25f2877c79cace475f0b99fd11ebd242c96e4bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
There is special logic to prefer layouts as parents.
This makes total sense, but comes in the way if the
grand parent is e.g. a stack layout.
Using hints to determine these cases.
Change-Id: Ie93c3f99e851cf319e888cbdb8868272da53b946
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
|
|
|
|
|
|
|
|
|
| |
These logs are useful to debug hints and form editor
behavivour. Adding more if required.
I cleaned up the include order.
Change-Id: I39b8c4e215ba4e6a524f4b00828156d6e56d8eb7
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
If an item is invisible then it is not an intuitive container.
Change-Id: I1f978be98b7330848e19192843188331438b98ba
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
This allows items in the scene to handle mouse clicks and hover events.
This is required to add e.g. a toolbar.
Change-Id: I3780735f1cbe30df0481d421f2aa2646f8e270d8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
The indicator for a single selection now has a label.
I also adjusted the color a bit.
The selection indicator now has a width of 2.
Change-Id: I541e8d3ab3f648af8b1fc6b0c005ddd538bb7de8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
|
| |
If any FormEditor item has non FormEditor item children the current
code will crash. While currently FormEditor items do not have such children,
we might add such children in the future.
Change-Id: I894324a4b247e91eb3fd0db30eb4d9f198f7474a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
| |
The mouse buttons are handled by the tools.
Change-Id: Ie47818e7acfe32db69d9258175580c7cdb05ed5e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I6b5733714a6d0cbf6d20dd74be88cdbdf7d7bd54
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
| |
Change-Id: If8ad086bed95d051661fe834a6cfb3883bed5269
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
| |
Change-Id: I9eb5cc5a3e5527308a4371bc2b6add47d1b3ed7f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ib78ea3244594320f54a2feb04f639caa83e1ba84
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|