aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/qquickpopup_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Templates: rename the C++ module to qtquicktemplates2J-P Nurmi2016-04-131-209/+0
| | | | | Change-Id: I146da903b46f5c2caf865e37291c25376b49021a Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Cleanup whitespaceJ-P Nurmi2016-03-191-1/+0
| | | | | Change-Id: I97ac45fe3b3205f4f5073cb0c59215ba6c010a13 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add Popup::localeJ-P Nurmi2016-03-181-0/+1
| | | | | | Change-Id: I1f07318f3e018debd74e41bc0a1443c45def7bf3 Task-number: QTBUG-50984 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add Popup::fontJ-P Nurmi2016-03-181-0/+3
| | | | | | Change-Id: I66feeb597e9f4a6176d6462640b3e26823a3d761 Task-number: QTBUG-50984 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* QQuickPopup: allow subclasses to prepare/finalize transitionsJ-P Nurmi2016-03-021-2/+9
| | | | | | | | | | This allows QQuickDrawer prepare the transitions so that "position" is is set as the default target property, and finalize the transtitions so that the drawer remains visible on the window edge, and will be able to handle overlay events. Change-Id: I0afedb3d10c37c68a19df926c0224dacf39dd8ce Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add virtual QQuickPopupPrivate::reposition() for QQuickDrawerJ-P Nurmi2016-03-011-10/+3
| | | | | | | | | | QQuickDrawer implements different kind of positioning than other popups. Unlike other popups, it specificly wants to go outside the window bounds. Change-Id: I33a885066ce750f73479be490274389d09eae442 Task-number: QTBUG-51007 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Add QQuickPopup::childMouseEventFilter() for QQuickDrawerJ-P Nurmi2016-03-011-0/+1
| | | | | | | | | | QQuickDrawer needs to be able to filter child mouse events so that the drawer can be closed by dragging also over the drawer, not just outside. Change-Id: I5b9978ebdf33cd0095d6cf67a0d76eee2edae8b6 Task-number: QTBUG-51007 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-02-251-0/+4
|\ | | | | | | | | | | | | Conflicts: src/templates/qquickrangeslider_p.h Change-Id: Ibe8ec18a7e22080f69f316d0394af1d03517ce93
| * Implement accessibility support for Popup and MenuJ-P Nurmi2016-02-251-0/+4
| | | | | | | | | | | | Change-Id: I55067bb1cb9888be8e0e991fb73c9365d93d04f4 Task-number: QTBUG-51316 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-02-201-20/+4
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/templates/qquickapplicationwindow.cpp src/templates/qquickcontrol_p.h src/templates/qquickpage.cpp src/templates/qquickpopup.cpp src/templates/qquickpopup_p_p.h Change-Id: I265e0267afb22e3d3f80801191f1a810cd2be312
| * Popup: use available size and paddings from the popup itemJ-P Nurmi2016-02-191-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the internal popup item inherits Control, which already provides these features, we may use them directly instead of re-doing them in Popup. NOTE: QQuickMenu code has lots of direct references to the content item, which used to be stored in QQuickPopupPrivate, which is the base class of QQuickMenuPrivate. Now that the content item is stored by QQuickPopupItem instead, the direct references don't work. Thus, as a temporary solution to avoid this patch growing large, we'll store the content item in QQuickMenuPrivate. Change-Id: I80a16d34432131a4326c1b6ae54419470be53f96 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
| * Controls: fix font inheritance for popupsLiang Qi2016-02-181-1/+2
| | | | | | | | | | | | | | | | | | QQuickPopup is a QObject, not a QQuickControl. Then need to make QQuickPopup::popupItem() inherit its font from QQuickPopup::parentItem(). Task-number: QTBUG-50984 Change-Id: I7f417474172b533b744eb668a0476cdcbabba868 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-311-4/+20
|\| | | | | | | | | | | | | | | | | Conflicts: src/templates/qquickpopup.cpp src/templates/qquickpopup_p_p.h src/templates/qquickspinbox_p.h Change-Id: Ief25ad2d27410f62e90879f60499ed87359406c3
| * Make popups work without ApplicationWindow, to some degreev5.6.0-rc1v5.6.0J-P Nurmi2016-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ApplicationWindow is highly recommended. First of all, with a plain Window, QQuickPopup attempts to set a high z-value, but cannot guarantee correct stacking order. Secondly, we cannot provide style- specific background dimming for modal popups, because it is styled as part of ApplicationWindow. Last but not least, QQuickPopup has to install a window-level event filter, which is far less efficient than how event handling done in QQuickOverlay. Change-Id: I08915abce7a1764177b92f7539eef77c054a405a Task-number: QTBUG-49921 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Add Popup::marginsJ-P Nurmi2016-01-301-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Allow specifying margins around the popup that are taken into account while positioning the popup. For example, the Material style draws a drop shadow that goes outside the popups bounds. This allows it to specify margins so that the drop shadow doesn't get clipped. Other use case is to specify the margins so that the popup doesn't overlap with window header or footer. Change-Id: I018d961259fa8b960d86b77de01413eefb75a59b Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Popup: improve positioningJ-P Nurmi2016-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | Don't spend time repositioning while hidden, but make sure to reposition when the popup item is resized, or when the popup itself becomes visible. This fixes the issue that a ComboBox popup wasn't positioned inside the window when shown initially, until the ComboBox itself moved. Change-Id: I1456dc647e35b6eb9ec2c60dbe9bc9229f932e24 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-281-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/controls/material/qtlabsmaterialstyleplugin.cpp src/templates/qquickapplicationwindow_p.h src/templates/qquickcombobox.cpp src/templates/qquickcombobox_p.h src/templates/qquickpopup.cpp Change-Id: Ibd87e907bc8abf1f675147761ea8bb0b40722478
| * Add Popup::closePolicyJ-P Nurmi2016-01-281-0/+1
| | | | | | | | | | Change-Id: Ie3d0f50a59aeaab36ec388af897cbf2596269ce3 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devJ-P Nurmi2016-01-251-2/+97
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore src/templates/qquickcombobox_p.h src/templates/qquickmenu_p.h src/templates/qquickmenu_p_p.h src/templates/qquickoverlay_p.h src/templates/qquickpopup.cpp src/templates/qquickpopup_p.h src/templates/qquickstackview_p.cpp Change-Id: I89c7d518697beec0b81ef3a12205286a4f3ccf89
| * Popup: add implicit & content sizesJ-P Nurmi2016-01-231-2/+5
| | | | | | | | | | | | | | Behaves the same way than the Pane/Frame/GroupBox container controls. Change-Id: I370f3961b77a363a63a0a64fc629cc5da6dfd53f Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Add Popup::parentJ-P Nurmi2016-01-231-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parent defaults to the QML parent object where Popup is declared. Popup::x/y are relative to the parent, and the popup also automatically follows the parent as appropriate. QQuickPopupPositioner has been adapted from Qt Quick Controls 1. It was called QQuickScenePosListener, and it was implemented for the text selection handle popups. ComboBox's popup now follows the control eg. when scrolling, but the below/above positioning feature is temporarily gone missing. It will be restored in a follow up commit. Change-Id: I8a6b58cd74e07f33930abc35d0ab9da056685128 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * Forward input events from the internal QQuickPopupItem to QQuickPopupJ-P Nurmi2016-01-221-0/+11
| | | | | | | | | | | | | | | | | | Popup accepts/blocks all input events by default, to avoid them leaking throgh. Subclasses may override the event handlers to implement eg. key navigation (menu). Change-Id: I726b6a3f61a397e4f95d736c6617dd77a35b01dc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * Refactor PopupJ-P Nurmi2016-01-221-1/+43
| | | | | | | | | | | | | | | | | | | | | | Added relevant properties to make it almost like a Control: x, y, width, height, padding, background... This change makes popup use an internal item where the style/user-supplied contentItem and background are re-parented. This way we can provide a default style (background) for Popup. Change-Id: I3e7933562464c5c852e4ba4bc37d9ac25691c714 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
| * Add QQuickPopup::isComponentComplete()J-P Nurmi2016-01-211-0/+1
| | | | | | | | | | | | | | Needed for the next commit. Change-Id: Icb34d6f772dd1ab662b050580aa776fdc78afa49 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | C++11 keywordsJ-P Nurmi2016-01-211-1/+1
|/ | | | | | | | - Q_NULLPTR -> nullptr - Q_DECL_OVERRIDE -> override Change-Id: I8ee65caafd43ab41b6de43835200cac6c8ffa278 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Just tidy up QQuickPopup a bitJ-P Nurmi2015-12-191-5/+5
| | | | | Change-Id: Ibc8097299f0796f943682f0c1de628a8da87e430 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename Popup transitionsJ-P Nurmi2015-12-191-7/+7
| | | | | | | | | Use Android-inspired enter & exit, which eliminates the need of using a "transition" suffix, and also less prone to appear in auto-completion when new users try to open/show/close/hide popups. Change-Id: I3a448d3e9be33fbfffbf08488858aa63a70233f2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Rename Panel to PopupJ-P Nurmi2015-12-091-0/+105
Popup is a more descriptive name. Furthermore, this name change opens the door for another type called Pane. It gives the appropriate background color for the current style & theme. Change-Id: Idb91d37e807f62e870b50f0b656e84ee2d43a9fb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>