aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QmlDesigner: Do not sync z value on root itemThomas Hartmann2019-06-121-1/+1
| | | | | | | | Setting the z value on the root item triggers side effects. Task-number: QDS-800 Change-Id: I52021b7e3e59b67088a69f2a89f0cdffa90fffb8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Remove excess blank lines after namespaceOrgad Shaneh2019-05-271-1/+0
| | | | | Change-Id: I4e4f83017f2bfc2cf842c4c971ed4b05e0447e6a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix Qt 5.13 deprecation warning about QFontMetrics::width()Friedemann Kleint2019-02-151-1/+1
| | | | | | | | | Replace by QFontMetrics::horizontalAdvance(), fixing: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Change-Id: I9991ffefe6e87e872dc35ba291d562e06b28ca64 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: Use a less expensive QColor constructorAlessandro Portale2018-05-141-1/+1
| | | | | Change-Id: Ib49bd177cc8106c3995401e93f816a4ec052b4e7 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Fix clippingThomas Hartmann2018-02-131-1/+4
| | | | | | | | | We can only use the slightly extended boundingRect, if the bounding rect is actually included in the clip region. the clip region is smaller if the parent item has clip enabled. Change-Id: Ia773f4402475ec984663af48cc1420a8840cc642 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Don't blur the form editor items and background patternAlessandro Portale2018-01-081-0/+9
| | | | | | | | | | | | When zooming in, or generally in dpi scaled mode, it is not desirable to have blurred items or blurred edges on the background pattern. Design tools don't do that. If an item is painted smaller than its natural size or if it is rotated, it should be painted with interpolation. Change-Id: Ie221db47a8f9a807c99ba8e0c96a2cc8d5115d6f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Increase the bounding rectangleThomas Hartmann2017-12-131-2/+2
| | | | | | | | | Since we clip against the bounding rectangle we increase the size a bit. This ensures we do not get painting artefacts if something is 1 or 2 pixels off. Change-Id: I4d9c40dd25aaa4469b568df914a1290f21790271 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Enable clipping in FormEditorItemThomas Hartmann2017-12-111-0/+3
| | | | | | | | When resizing an item the instanceIsRenderPixmap can be bigger than the bounding rect. In this case we get painting artefacts. Change-Id: I6da43f16a1e85d045a0ebbb01db594979ad89622 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Turn FormEditor item into QGraphicsItemThomas Hartmann2017-07-121-1/+1
| | | | | | | | | | 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>
* QmlDesigner: Adjust colorThomas Hartmann2017-05-101-1/+4
| | | | | | | The rectangle that indicates selection has now the selection color. Change-Id: I59bcd070bfb8b16f297e648ff53d83c8953b4896 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Disable caching for form editor itemsThomas Hartmann2017-03-131-1/+1
| | | | | | | | 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>
* QmlDesigner: Fix forceClipThomas Hartmann2017-03-091-3/+1
| | | | | | | We have to set clipping in the right places. Change-Id: Ifc4b1a91cd488b492d1dcd5c420fc7a5ac311fdb Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Refine painting of place holderThomas Hartmann2017-02-131-8/+20
| | | | | | | | | | | | | | | | 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>
* QmlDesigner: The items of the form editor should not accept buttonsThomas Hartmann2017-02-081-0/+1
| | | | | | | The mouse buttons are handled by the tools. Change-Id: Ie47818e7acfe32db69d9258175580c7cdb05ed5e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* white space only changesTim Jenssen2017-01-241-2/+0
| | | | | Change-Id: Ib78ea3244594320f54a2feb04f639caa83e1ba84 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Some cleanupThomas Hartmann2017-01-241-15/+0
| | | | | Change-Id: I16e2cd891dfb2f799c6be0d606762d44b9bb0b59 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Use NodeHints for clipping in form editorThomas Hartmann2017-01-241-0/+8
| | | | | Change-Id: Icbc8e08cab760020126324bcae6dd5909508d5d3 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Refine selection indicatorThomas Hartmann2017-01-201-17/+11
| | | | | | | | | The highlighted bounding rectangle has now the size of the selection rectangle. Because both rectangles do not have to match we draw both. Change-Id: I0d4260e446c552622626153774a2cff489ebf584 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Removing out commented codeThomas Hartmann2017-01-201-2/+0
| | | | | Change-Id: I7e3fc3fc1f7d846d64e68acd39552159e1820c70 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Use cosmetic pen in form editorThomas Hartmann2016-09-191-0/+1
| | | | | | | This way the selection rectangles do not become ugly when zooming in. Change-Id: I78f1bd106c94f0e40ebcbc1be5a52fc914a015f1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-10/+10
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Qt Quick Designer: License change to Qt Commercial + GPLv3Alessandro Portale2015-09-181-12/+7
| | | | | | | | Change-Id: I7f7aecd02892b6c616cd148fa5d845e7bc0d3b4f Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
* QmlDesigner.FormEditor: Adding FormEditorItem::selectionWeigthThomas Hartmann2015-07-171-0/+22
| | | | | Change-Id: I79e62ed497cca2a0c82ccc6bafa8c1ae77245fff Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QmlDesigner: reuse code from AbstractFormEditorToolMarco Bubke2014-07-221-1/+1
| | | | | Change-Id: I84ece6344cde0841f489f959cad6ec1f13e7fabc Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* QmlDesigner: Disable clipping for text drawingMarco Bubke2014-03-111-0/+1
| | | | | | Task-number: QTCREATORBUG-11680 Change-Id: I5709e9c777f453c4ba4822f5f7b84332094e136a Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* QmlDesigner: Refactor FormEditorItem::paintPlaceHolderForInvisbleItemMarco Bubke2014-03-111-21/+28
| | | | | | | | The method is doing to things so splitting it up in two functions makes this more clear. Change-Id: Ie19c3405d671b16ae51ba37ea00f21bbbde785c8 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | QmlDesigner: Update ContentNotEditableIndicator for movementsMarco Bubke2014-01-021-0/+19
| | | | | | | | | | | | Task-number: QTCREATORBUG-10644 Change-Id: I23a02dae01faf703dbf9bd5bd643dc091a947eba Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | QmlDesigner: Fix clippingMarco Bubke2014-01-021-5/+4
| | | | | | | | | | Change-Id: Iad309614756c5d57830382a4548b3faa9ed6b658 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | QmlDesigner: Fix aligment of textMarco Bubke2014-01-021-7/+8
| | | | | | | | | | | | | | | | | | We are now have three different bounding rectangles, for selection, the painted content and a combination of the two. Task-number: QTCREATORBUG-11054 Change-Id: I4e40056f2811eb8e738e571f4a7fded16fa73a68 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | QmlDesigner: Fix item selectionMarco Bubke2013-12-161-0/+13
|/ | | | | | | | Painted bounding rectangle was used for selection. Task-number: QTCREATORBUG-11066 Change-Id: I267b7cc4bb563efcb8d351ba980a4899d64c53a0 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner.FormEditor: crash fixThomas Hartmann2013-11-211-0/+3
| | | | | | | | Fix a crash when closing Qt Creator and clear() is called from the destructor. Change-Id: I037599653a6ca32e326b2263e7e6f526523e6f8e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Add ContentNotEditableIndicatorMarco Bubke2013-09-181-2/+8
| | | | | | | If you hover over a tab the content will be visulized as non editable. Change-Id: If7fcc8aaa319e0f952f501f6e9e2fc767b89b636 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Add blur render imageMarco Bubke2013-09-181-1/+13
| | | | | | | To give the impression that the content is non editable. Change-Id: I1869d02a27b2d1a7c2c12abb9a8d8d24068adf22 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner.FormEditor: Adding check to FormEditorItem::isContainerThomas Hartmann2013-09-161-0/+6
| | | | | | | | An item is not considered a container if the default property is a component. Change-Id: I73453fb17d6c181cdd79cd6620307e5c30cac09d Reviewed-by: Marco Bubke <marco.bubke@digia.com>
* QmlDesigner: Remove space lineMarco Bubke2013-09-111-1/+0
| | | | | Change-Id: Ib9a1e470a94e47f95241a9ce94a16703aa4f336b Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Change hover feedback from dotted line to solid lineMarco Bubke2013-09-111-5/+9
| | | | | Change-Id: If538e1d9c265b4dcf69a19a19c78c1fff9d705ab Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Remove unused attention from FormEditorMarco Bubke2013-08-191-52/+0
| | | | | Change-Id: I9cb2b9f4bffe1c80cfaf6894c934d0eece74dbda Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Add container item support in node instancesMarco Bubke2013-05-301-3/+3
| | | | | Change-Id: I30e0d11346b8c63188d052b46656e7ede179e55d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Discriminate between painted and size bounding rectangleMarco Bubke2013-05-211-13/+14
| | | | | Change-Id: Ic465e472c13570a1da0dee047c5810c50f7a4492 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlDesigner: Use bounding rectangle instead of painted rectangleMarco Bubke2013-05-151-1/+1
| | | | | | | Otherwise text items are to small. Change-Id: Icafbebba6fcc749d0a5a1f5c0bf1dc05bf9f3474 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Fix indentationOrgad Shaneh2013-05-061-1/+1
| | | | | | | | | Mostly 3 leading spaces converted to 4 A few other indentation issues Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863 Reviewed-by: hjk <hjk121@nokiamail.com>
* Clean headers in QML-Designer.Friedemann Kleint2013-04-301-7/+0
| | | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: I8a2e9e35980198fc4162623db044c228bd209a0f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Refactoring document handlingMarco Bubke2013-01-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | The document handling in the qml designer was complicated source code, which was initially intended for a non creator application. To integrate new views it has to be changed and cleaned up. This is the first major step in that direction. Change-Id: Ie26f0aad7a03946d18bdb4c0759b246c5439d922 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | QmlDesigner.FormEditor: Fix visibilityMarco Bubke2012-11-211-1/+1
|/ | | | | | | The paint function should check if the content is visible. Change-Id: I80742ed260124e0b874a7d53b3abd81437bc72d9 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>