| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
We've come to realize that even though it's tempting to group similar
properties together, organizing the API so that revisions are grouped
together makes future maintenance more pleasant. It's a lot easier to
to see what was added and when.
The same was done for earlier revisions in 5.9 in commit 430fe83.
Change-Id: I738d7fdadd348c21737228c37d0f31e39b37f8e7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is going to be used for sub-menus by QQuickMenu itself,
by the upcoming QQuickMenuBar, and allows users to implement
their own Menu navigation if desired.
Change-Id: I29258e78fec27e8dd207ed649958df1a718bcd39
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added "count" property.
Change-Id: I42971a6bf8fd74b9f2d3df52f191b66cd7022b81
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
| |
To help propagating the cascade-property automatically, instead of
doing it manually in openSubMenu() that we're trying to get rid of.
Change-Id: I3a3d59cafccc85d6affc325eb60e717e22b8f812
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added a dismiss() method. Unlike close()
that only closes a menu and its sub-menus, dismiss() closes the whole
hierarchy of menus, including the parent menus.
Change-Id: Ibde2102bbb542a5deefdf17843496b7b80021db4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This complements the add/insert/remove/take API that was added for
actions and menus. Unlike for menu items, there was no convenient
way to access a specific action or menu directly without accessing
the respective item first.
[ChangeLog][Controls][Menu] Added actionAt() and menuAt() accessors.
Change-Id: I5515441626b3a04b05265d5b42afdaea8e256709
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In general, when shortcuts override key press events, the respective
key release events are still sent. Therefore, in order to respect
shortcuts, key navigation should be based on key press events. Key
release -based navigation is also not going to work with nested menus
in a menubar, because a leaf menu may need to propagate key events up
to the parent menus and finally to the menubar, but only if keys are
not actually handled.
Change-Id: Ia040a387adc782d8828250fbed393ef1794f2148
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
De-couple current index management from the content item. Instead of
manipulating the content item's current index directly from C++, offer
a currentIndex property that can be visualized by the style, also when
not using a ListView. This is essentially the same technique ComboBox
uses to control the highlighted index in the popup ListView.
[ChangeLog][Controls][Menu] Added currentIndex property for styling
purposes.
Change-Id: Idf7746d9c08fc9ca9a0dfd15225ebae5a29243c9
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added addAction(), insertAction(),
removeAction(), and takeAction() methods for adding and removing
actions programmatically.
Change-Id: I7d494ef1edc1cf384314fa90d97cfd2290d2e8a3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Controls][Menu] Added addMenu(), insertMenu(),
removeMenu(), and takeMenu() methods for adding and removing
sub-menus programmatically.
Change-Id: Ibf39448cdf528f64695b1ee5f0781384b754ba22
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
This improves the usability on desktop. When a menu has multiple sub-
menu items, they don't all trigger a sub-menu (and close immediately)
while moving mouse over the items.
Change-Id: Ie4c9e409da8d6877e35506bffb94ed57f5985dcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds initial support for cascading sub-menus by allowing
one to nest declarative Menu declarations. A follow-up commit adds
support for adding, inserting, and removing menus programmatically.
[ChangeLog][Controls][Menu] Added support for cascading sub-menus.
Task-number: QTBUG-60351
Change-Id: I0eee4f74d92a97c09333fcc4348b019782448535
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
src/quicktemplates2/qquickapplicationwindow.cpp
src/quicktemplates2/qquickmenu.cpp
src/quicktemplates2/qquickmenu_p.h
src/quicktemplates2/qquickpopup.cpp
tests/auto/auto.pro
Change-Id: I856a022d38abd84763127539f46ef032ddc53c3d
|
| |
| |
| |
| |
| | |
Change-Id: I74e512074cbc66378ffd71f8040ae8977a3ffeac
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a small preparation step for cascading sub-menus. A menu item
that presents a sub-menu can connect the sub-menu's titleChanged()
directly to its setText() slot. The same technique is used for menu
items that present actions.
Task-number: QTBUG-60351
Change-Id: Id2c840d108167679d3a61caf35cbb0afacb6afe4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Idac8b830efc228303346432d5bf0957b17a428a4
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deprecate removeItem(int) in favor of removeItem(Item) and
takeItem(int) with clearer semantics.
If one already has access to an item, one can pass it to removeItem()
to get rid of it for good, instead of having to call destroy() by hand.
If one knows the index instead, we provide a way to take the respective
item out of the menu, and let the user decide what to do with it. This
way we provide convenient ways to remove & destroy items in one go, and
to take items out without destroying them.
This nice pattern was once upon time planned for the QQC1 containers
such as SplitView, and should have been used for the QQC2 containers,
but was simply forgotten during the development...
[ChangeLog][Controls][Menu] Deprecated removeItem(int) in favor of
removeItem(Item) and takeItem(int) with clearer semantics. The former
destroys the item, whereas the latter transfers ownership to the
caller.
Change-Id: Id2a07fb65019b2904a013c8bcc3154089d36a0ea
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a little optimization trick for the QML engine. We basically
tell it to not lookup overridden/overshadowed properties further in
subclasses/composite types.
Change-Id: I04168c58d00c07e5a354259cabefb3664ffd95b3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Controls][Menu] Added support for declaring Actions.
The new "delegate" property is used to define a Component that is
used to create menu items that present the actions.
Change-Id: If26f38f6910aa5592879703429a2b418193d5710
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Controls][Menu] Added a popup() method that opens a menu
at the mouse cursor on desktop platforms that have a mouse cursor
available, and otherwise centers the menu over its parent item.
Task-number: QTBUG-50471
Change-Id: I9456a48e71fde91f73cdb268fcdd69a8511a41a4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|/
|
|
|
| |
Change-Id: I4345f6a3b61476287b6161d89b752735757f3a7e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: I03deebff661746d49e537af5b1c8899b938efb0d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
| |
Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
They're all private classes.
Change-Id: I2f1463429109c5651f9cca5bc7aabe5cf0f79637
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
| |
This file is part of the Qt Quick Templates 2 module of the Qt Toolkit.
Change-Id: I39ef9cbb00f55a32b7a43f11ffbdfbb40b84e124
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|
|
Change-Id: I146da903b46f5c2caf865e37291c25376b49021a
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
|