summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cmake.conf3
-rw-r--r--.qmake.conf2
-rw-r--r--CMakeLists.txt2
-rw-r--r--LICENSE.FDL451
-rw-r--r--LICENSE.GPL3-EXCEPT704
-rw-r--r--coin/module_config.yaml12
-rw-r--r--conanfile.py120
-rw-r--r--dependencies.yaml12
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--examples/datavisualization/CMakeLists.txt44
-rw-r--r--examples/datavisualization/bars/CMakeLists.txt2
-rw-r--r--examples/datavisualization/bars/graphmodifier.h2
-rw-r--r--examples/datavisualization/custominput/CMakeLists.txt2
-rw-r--r--examples/datavisualization/customitems/CMakeLists.txt2
-rw-r--r--examples/datavisualization/customproxy/CMakeLists.txt2
-rw-r--r--examples/datavisualization/draggableaxes/CMakeLists.txt2
-rw-r--r--examples/datavisualization/itemmodel/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qml3doscilloscope/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml336
-rw-r--r--examples/datavisualization/qmlaxisdrag/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml20
-rw-r--r--examples/datavisualization/qmlaxisformatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlbars/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlbars/qml/qmlbars/main.qml17
-rw-r--r--examples/datavisualization/qmlcustominput/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml84
-rw-r--r--examples/datavisualization/qmllegend/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlmultigraph/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml8
-rw-r--r--examples/datavisualization/qmlscatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml180
-rw-r--r--examples/datavisualization/qmlspectrogram/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml147
-rw-r--r--examples/datavisualization/qmlsurface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml91
-rw-r--r--examples/datavisualization/qmlsurfacelayers/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml293
-rw-r--r--examples/datavisualization/rotations/CMakeLists.txt2
-rw-r--r--examples/datavisualization/scatter/CMakeLists.txt2
-rw-r--r--examples/datavisualization/scatter/scatterdatamodifier.h2
-rw-r--r--examples/datavisualization/surface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/texturesurface/CMakeLists.txt2
-rw-r--r--examples/datavisualization/volumetric/CMakeLists.txt2
-rw-r--r--src/datavisualization/data/customrenderitem.cpp3
-rw-r--r--src/datavisualization/data/customrenderitem_p.h2
-rw-r--r--src/datavisualization/data/qcustom3ditem.cpp7
-rw-r--r--src/datavisualization/data/qsurfacedataproxy.cpp80
-rw-r--r--src/datavisualization/doc/qtdatavis3d.qdocconf60
-rw-r--r--src/datavisualization/doc/src/qtdatavisualization.qdoc2
-rw-r--r--src/datavisualization/engine/abstract3drenderer.cpp11
-rw-r--r--src/datavisualization/engine/q3dcamera_p.h2
-rw-r--r--src/datavisualization/engine/qabstract3dgraph.cpp5
-rw-r--r--src/datavisualization/utils/meshloader.cpp4
-rw-r--r--src/datavisualization/utils/objecthelper.cpp86
-rw-r--r--src/datavisualization/utils/qutils.h4
-rw-r--r--src/datavisualizationqml2/CMakeLists.txt2
-rw-r--r--src/datavisualizationqml2/abstractdeclarative.cpp5
-rw-r--r--src/datavisualizationqml2/colorgradient_p.h2
-rw-r--r--src/datavisualizationqml2/declarativebars.cpp2
-rw-r--r--src/datavisualizationqml2/declarativebars_p.h6
-rw-r--r--src/datavisualizationqml2/declarativecolor_p.h2
-rw-r--r--src/datavisualizationqml2/declarativescene_p.h2
-rw-r--r--src/datavisualizationqml2/declarativeseries_p.h4
-rw-r--r--tests/auto/cpptest/CMakeLists.txt1
-rw-r--r--tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt11
-rw-r--r--tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp292
-rw-r--r--tests/auto/qmltest/CMakeLists.txt6
-rw-r--r--tests/auto/qmltest/tst_qmltest.cpp24
-rw-r--r--tests/manual/barstest/CMakeLists.txt2
-rw-r--r--tests/manual/barstest/buttonwrapper.cpp40
-rw-r--r--tests/manual/barstest/buttonwrapper.h48
-rw-r--r--tests/manual/barstest/chart.cpp24
-rw-r--r--tests/manual/barstest/chart.h26
-rw-r--r--tests/manual/barstest/main.cpp99
-rw-r--r--tests/manual/barstest/sliderwrapper.cpp39
-rw-r--r--tests/manual/barstest/sliderwrapper.h49
-rw-r--r--tests/manual/directional/scatterdatamodifier.h2
-rw-r--r--tests/manual/scattertest/scatterchart.cpp12
-rw-r--r--tests/manual/scattertest/scatterchart.h12
-rw-r--r--tests/manual/surfacetest/CMakeLists.txt2
-rw-r--r--tests/manual/surfacetest/buttonwrapper.cpp40
-rw-r--r--tests/manual/surfacetest/buttonwrapper.h48
-rw-r--r--tests/manual/surfacetest/checkboxwrapper.cpp40
-rw-r--r--tests/manual/surfacetest/checkboxwrapper.h49
-rw-r--r--tests/manual/surfacetest/graphmodifier.cpp56
-rw-r--r--tests/manual/surfacetest/graphmodifier.h56
-rw-r--r--tests/manual/surfacetest/main.cpp51
87 files changed, 2895 insertions, 1001 deletions
diff --git a/.cmake.conf b/.cmake.conf
index 4e73b3d6..e62fae5e 100644
--- a/.cmake.conf
+++ b/.cmake.conf
@@ -1 +1,2 @@
-set(QT_REPO_MODULE_VERSION "6.2.0")
+set(QT_REPO_MODULE_VERSION "6.2.8")
+set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "")
diff --git a/.qmake.conf b/.qmake.conf
index 90b8856d..c806b808 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,6 +2,6 @@ load(qt_build_config)
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
-MODULE_VERSION = 6.2.0
+MODULE_VERSION = 6.2.8
CONFIG += warning_clean
CMAKE_MODULE_TESTS=-
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e61dda74..417b8f09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.15.0)
+cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
project(QtDataVisualization
diff --git a/LICENSE.FDL b/LICENSE.FDL
new file mode 100644
index 00000000..857214dd
--- /dev/null
+++ b/LICENSE.FDL
@@ -0,0 +1,451 @@
+
+ GNU Free Documentation License
+ Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
+https://www.gnu.org/licenses/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/LICENSE.GPL3-EXCEPT b/LICENSE.GPL3-EXCEPT
new file mode 100644
index 00000000..b1cb1bec
--- /dev/null
+++ b/LICENSE.GPL3-EXCEPT
@@ -0,0 +1,704 @@
+This is the GNU General Public License version 3, annotated with The
+Qt Company GPL Exception 1.0:
+
+-------------------------------------------------------------------------
+
+The Qt Company GPL Exception 1.0
+
+Exception 1:
+
+As a special exception you may create a larger work which contains the
+output of this application and distribute that work under terms of your
+choice, so long as the work is not otherwise derived from or based on
+this application and so long as the work does not in itself generate
+output that contains the output from this application in its original
+or modified form.
+
+Exception 2:
+
+As a special exception, you have permission to combine this application
+with Plugins licensed under the terms of your choice, to produce an
+executable, and to copy and distribute the resulting executable under
+the terms of your choice. However, the executable must be accompanied
+by a prominent notice offering all users of the executable the entire
+source code to this application, excluding the source code of the
+independent modules, but including any changes you have made to this
+application, under the terms of this license.
+
+
+-------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 7004c27d..8f0e6ef0 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -1,4 +1,5 @@
version: 2
+alias: qtdatavis3d
accept_configuration:
condition: property
property: features
@@ -13,6 +14,11 @@ instructions:
instructions:
- !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml"
disable_if:
- condition: property
- property: configureArgs
- contains_value: "-DFEATURE_widgets=OFF"
+ condition: or
+ conditions:
+ - condition: property
+ property: configureArgs
+ contains_value: "-DFEATURE_widgets=OFF"
+ - condition: property
+ property: configureArgs
+ contains_value: "-no-widgets"
diff --git a/conanfile.py b/conanfile.py
index bfd82662..8aa42f17 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -26,110 +26,34 @@
##
#############################################################################
-from conans import ConanFile, tools, CMake
-import os
+from conans import ConanFile
+import re
+from pathlib import Path
-class QtConanError(Exception):
- pass
+def _parse_qt_version_by_key(key: str) -> str:
+ with open(Path(__file__).parent.resolve() / ".cmake.conf") as f:
+ m = re.search(fr'{key} .*"(.*)"', f.read())
+ return m.group(1) if m else ""
+
+
+def _get_qt_minor_version() -> str:
+ return ".".join(_parse_qt_version_by_key("QT_REPO_MODULE_VERSION").split(".")[:2])
class QtDataVisualization(ConanFile):
name = "qtdatavis3d"
- version = "6.2.0"
license = "GPL-3.0+, Commercial Qt License Agreement"
author = "The Qt Company <https://www.qt.io/contact-us>"
- url = "https://code.qt.io/cgit/qt/qtdatavis3d.git/"
- description = "Qt Data Visualization provides UI Components for displaying 3D graphs, driven by static or dynamic data models."
- topics = ("qt", "qt6", "data visualization", "qtquick")
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False, "default"],
- "qt6": "ANY"} # this is needed to model unique package_id for the Add-on build per used Qt6 version
- default_options = {"shared": "default", # default: Use the value of the Qt build
- "qt6": None}
+ url = "https://code.qt.io/cgit/qt/qtdatavis3d.git"
+ description = (
+ "Qt Data Visualization provides UI Components for displaying 3D graphs, driven by static or "
+ "dynamic data models."
+ )
+ topics = "qt", "qt6", "data visualization", "qtquick"
+ settings = "os", "compiler", "arch", "build_type"
+ # for referencing the version number and prerelease tag and dependencies info
+ exports = ".cmake.conf", "dependencies.yaml"
exports_sources = "*", "!conan*.*"
- revision_mode = "scm" # use commit ID as the RREV (recipe revision)
-
- def source(self):
- # sources are installed next to recipe, no need to clone etc. sources here
- pass
-
- def _get_cmake_prefix_path(self):
- # 'QTDIR' provided as env variable in profile file which is part of the Qt essential binary
- # package(s). Installed under .conan/profiles
- cmake_prefix_path = os.environ.get("QTDIR")
- if not cmake_prefix_path:
- raise QtConanError("'QTDIR' not defined! The 'QTDIR' needs to point to Qt installation directory.")
- print(f"CMAKE_PREFIX_PATH for '{self.name}/{self.version}' build is: {cmake_prefix_path}")
- return cmake_prefix_path
-
- def _read_env(self, key):
- value = os.environ.get(key)
- if not value:
- raise QtConanError(f"{self.settings.os} build specified but '{key}' was not defined?")
- return value
-
- def _get_qtcmake(self):
- qt_install_path = self._get_cmake_prefix_path()
- ext = ".bat" if tools.os_info.is_windows else ""
- qtcmake = os.path.abspath(os.path.join(qt_install_path, "bin", "qt-cmake" + ext))
- if not os.path.exists(qtcmake):
- raise QtConanError(f"Unable to locate {qtcmake} from 'QTDIR': {qt_install_path}")
- return qtcmake
-
- def _get_cmake_tool(self):
- cmake = CMake(self, cmake_program=self._get_qtcmake())
- cmake.verbose = True
-
- # Qt modules need to be 'installed'.
- # We need to direct the 'make install' to some directory under Conan cache,
- # place it under the current build directory which is also under the Conan cache.
- # Note, the actual 'make install' is called in "package()".
- install_dir = os.path.join(os.getcwd(), "_install_tmp")
- cmake.definitions["CMAKE_INSTALL_PREFIX"] = install_dir
-
- # Use the value of the Qt build
- if self.options.shared.value == "default":
- del cmake.definitions["BUILD_SHARED_LIBS"]
-
- cmake_toolchain_file = os.environ.get("CMAKE_TOOLCHAIN_FILE")
- if cmake_toolchain_file:
- cmake.definitions["CMAKE_TOOLCHAIN_FILE"] = cmake_toolchain_file
-
- if self.settings.os == "Android":
- cmake.definitions["ANDROID_SDK_ROOT"] = self._read_env('ANDROID_SDK_ROOT')
- cmake.definitions["ANDROID_NDK_ROOT"] = self._read_env('ANDROID_NDK_ROOT')
-
- if self.settings.os == "iOS":
- # Instead of Conan's auto-added 'Darwin', explicitly pass 'iOS'.
- cmake.definitions["CMAKE_SYSTEM_NAME"] = "iOS"
-
- # Remove the explicit sysroot, let CMake detect the sysroots, to ensure
- # that multi-arch builds work.
- del cmake.definitions["CMAKE_OSX_SYSROOT"]
-
- # Remove the conan provided architecture, instead rely on the architectures set
- # by the Qt toolchain file, which with official Qt packages most likely means
- # multi-arch iOS.
- del cmake.definitions["CMAKE_OSX_ARCHITECTURES"]
-
- return cmake
-
- def build(self):
- cmake = self._get_cmake_tool()
- self.run('%s "%s" %s' % (self._get_qtcmake(), self.source_folder, cmake.command_line))
- self.run('cmake --build . %s' % cmake.build_config)
- return
-
- def package(self):
- install_dir = os.path.join(os.getcwd(), "_install_tmp") # see 'CMAKE_INSTALL_PREFIX' above
- self.run('cmake --build . --target install')
- self.copy("*", src=install_dir, dst=".")
-
- def package_info(self):
- self.cpp_info.libs = ["Qt6DataVisualization"] # used for the actual library filename, Ordered list with the library names
-
- def deploy(self):
- self.copy("*") # copy from current package
- self.copy_deps("*") # copy from dependencies
-
+ python_requires = f"qt-conan-common/{_get_qt_minor_version()}@qt/everywhere"
+ python_requires_extend = "qt-conan-common.QtLeafModule"
diff --git a/dependencies.yaml b/dependencies.yaml
index f6b3356c..91d92f71 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,10 +1,10 @@
dependencies:
- ../qtbase:
- ref: 621c16a9650d3068ec9aea2c055193c00a5f8ce5
+ ../tqtc-qtbase:
+ ref: 4c1c38dede55565afa846685b3e19cf8f1cfed0c
required: true
- ../qtdeclarative:
- ref: 4bb54ee50eb8bbaf0b7d2f48e0ab8d324f304f1a
+ ../tqtc-qtdeclarative:
+ ref: 9919f58fce6329a233ca885188d0aba5f484e546
required: false
- ../qtmultimedia:
- ref: bb5877d33bf34769383ef105ca11fa80112ea98a
+ ../tqtc-qtmultimedia:
+ ref: 34dc084899419ab704703a888dbffe119566eaca
required: false
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 5b2f563c..54d480c3 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-qt_examples_build_begin()
+qt_examples_build_begin(EXTERNAL_BUILD)
add_subdirectory(datavisualization)
diff --git a/examples/datavisualization/CMakeLists.txt b/examples/datavisualization/CMakeLists.txt
index 4c46ac6f..88530c64 100644
--- a/examples/datavisualization/CMakeLists.txt
+++ b/examples/datavisualization/CMakeLists.txt
@@ -1,26 +1,26 @@
if(TARGET Qt::Quick)
- add_subdirectory(qmlbars)
- add_subdirectory(qmlscatter)
- add_subdirectory(qmlsurface)
- add_subdirectory(qmlcustominput)
- add_subdirectory(qmllegend)
- add_subdirectory(qmlmultigraph)
- add_subdirectory(qml3doscilloscope)
- add_subdirectory(qmlsurfacelayers)
- add_subdirectory(qmlaxisformatter)
- add_subdirectory(qmlaxisdrag)
- add_subdirectory(qmlspectrogram)
+ qt_internal_add_example(qmlbars)
+ qt_internal_add_example(qmlscatter)
+ qt_internal_add_example(qmlsurface)
+ qt_internal_add_example(qmlcustominput)
+ qt_internal_add_example(qmllegend)
+ qt_internal_add_example(qmlmultigraph)
+ qt_internal_add_example(qml3doscilloscope)
+ qt_internal_add_example(qmlsurfacelayers)
+ qt_internal_add_example(qmlaxisformatter)
+ qt_internal_add_example(qmlaxisdrag)
+ qt_internal_add_example(qmlspectrogram)
endif()
if(NOT ANDROID AND NOT IOS AND NOT WINRT)
- add_subdirectory(bars)
- add_subdirectory(custominput)
- add_subdirectory(customproxy)
- add_subdirectory(itemmodel)
- add_subdirectory(scatter)
- add_subdirectory(surface)
- add_subdirectory(rotations)
- add_subdirectory(draggableaxes)
- add_subdirectory(customitems)
- add_subdirectory(texturesurface)
- add_subdirectory(volumetric)
+ qt_internal_add_example(bars)
+ qt_internal_add_example(custominput)
+ qt_internal_add_example(customproxy)
+ qt_internal_add_example(itemmodel)
+ qt_internal_add_example(scatter)
+ qt_internal_add_example(surface)
+ qt_internal_add_example(rotations)
+ qt_internal_add_example(draggableaxes)
+ qt_internal_add_example(customitems)
+ qt_internal_add_example(texturesurface)
+ qt_internal_add_example(volumetric)
endif()
diff --git a/examples/datavisualization/bars/CMakeLists.txt b/examples/datavisualization/bars/CMakeLists.txt
index 5388c565..5bc76255 100644
--- a/examples/datavisualization/bars/CMakeLists.txt
+++ b/examples/datavisualization/bars/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(bars LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/bars/graphmodifier.h b/examples/datavisualization/bars/graphmodifier.h
index b1420e33..4611cc43 100644
--- a/examples/datavisualization/bars/graphmodifier.h
+++ b/examples/datavisualization/bars/graphmodifier.h
@@ -77,7 +77,7 @@ Q_SIGNALS:
void shadowQualityChanged(int quality);
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
void fontSizeChanged(int size);
private:
diff --git a/examples/datavisualization/custominput/CMakeLists.txt b/examples/datavisualization/custominput/CMakeLists.txt
index 94007d98..a9008ac1 100644
--- a/examples/datavisualization/custominput/CMakeLists.txt
+++ b/examples/datavisualization/custominput/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(custominput LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/customitems/CMakeLists.txt b/examples/datavisualization/customitems/CMakeLists.txt
index a415d170..54f64e25 100644
--- a/examples/datavisualization/customitems/CMakeLists.txt
+++ b/examples/datavisualization/customitems/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customitems LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/customproxy/CMakeLists.txt b/examples/datavisualization/customproxy/CMakeLists.txt
index c93b4165..b1c3c661 100644
--- a/examples/datavisualization/customproxy/CMakeLists.txt
+++ b/examples/datavisualization/customproxy/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(customproxy LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/draggableaxes/CMakeLists.txt b/examples/datavisualization/draggableaxes/CMakeLists.txt
index 76fdba33..5728b70f 100644
--- a/examples/datavisualization/draggableaxes/CMakeLists.txt
+++ b/examples/datavisualization/draggableaxes/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(draggableaxes LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/itemmodel/CMakeLists.txt b/examples/datavisualization/itemmodel/CMakeLists.txt
index 2f35c1a3..4848fffb 100644
--- a/examples/datavisualization/itemmodel/CMakeLists.txt
+++ b/examples/datavisualization/itemmodel/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(itemmodel LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qml3doscilloscope/CMakeLists.txt b/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
index 7a50caa1..26ed3b19 100644
--- a/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
+++ b/examples/datavisualization/qml3doscilloscope/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qml3doscilloscope LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml b/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml
index 51eba416..89d5030d 100644
--- a/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml
+++ b/examples/datavisualization/qml3doscilloscope/qml/qml3doscilloscope/main.qml
@@ -28,9 +28,8 @@
****************************************************************************/
import QtQuick
-import QtQuick.Layouts
import QtQuick.Controls
-import QtDataVisualization 1.2
+import QtDataVisualization
import "."
Item {
@@ -42,6 +41,8 @@ Item {
property int sampleRows: sampleColumns / 2
property int sampleCache: 24
+ property bool portraitMode: width < height
+
onSampleRowsChanged: {
surfaceSeries.selectedPoint = surfaceSeries.invalidSelectionPosition
generateData()
@@ -51,7 +52,7 @@ Item {
id: dataView
anchors.bottom: parent.bottom
width: parent.width
- height: parent.height - buttonLayout.height
+ height: parent.height - controlArea.height
Surface3D {
id: surfaceGraph
@@ -118,206 +119,175 @@ Item {
//! [3]
Rectangle {
- width: parent.width
- height: flatShadingToggle.implicitHeight * 2
+ id: controlArea
+ height: portraitMode ? flatShadingToggle.implicitHeight * 7
+ : flatShadingToggle.implicitHeight * 2
anchors.left: parent.left
anchors.top: parent.top
+ anchors.right: parent.right
color: surfaceGraph.theme.backgroundColor
- ColumnLayout {
- anchors.fill: parent
- RowLayout {
- id: sliderLayout
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumHeight: flatShadingToggle.implicitHeight
- spacing: 0
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: samplesText.implicitWidth + 120
- Layout.maximumWidth: samplesText.implicitWidth + 120
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- border.color: "gray"
- border.width: 1
- radius: 4
-
- RowLayout {
- anchors.fill: parent
- anchors.margins: parent.border.width + 1
-
- Slider {
- id: sampleSlider
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
- Layout.minimumWidth: 80
- from: mainView.sampleCache * 2
- to: from * 10
- stepSize: mainView.sampleCache
- Component.onCompleted: value = from * 2
- }
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: samplesText.implicitWidth + 10
- Layout.maximumWidth: samplesText.implicitWidth + 10
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- Text {
- id: samplesText
- text: "Samples: " + (mainView.sampleRows * mainView.sampleColumns)
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
- }
- }
+ // Samples
+ Rectangle {
+ id: samples
+ width: portraitMode ? mainView.width : mainView.width / 4
+ height: flatShadingToggle.implicitHeight
+ anchors.left: parent.left
+ anchors.top: parent.top
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 10
+ padding: 5
+
+ Slider {
+ id: sampleSlider
+ from: mainView.sampleCache * 2
+ to: from * 10
+ stepSize: mainView.sampleCache
+ Component.onCompleted: value = from * 2
}
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: frequencyText.implicitWidth + 120
- Layout.maximumWidth: frequencyText.implicitWidth + 120
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- border.color: "gray"
- border.width: 1
- radius: 4
-
- RowLayout {
- anchors.fill: parent
- anchors.margins: parent.border.width + 1
-
- Slider {
- id: frequencySlider
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
- Layout.minimumWidth: 80
- from: 2
- to: 60
- stepSize: 2
- value: 30
- }
-
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: frequencyText.implicitWidth + 10
- Layout.maximumWidth: frequencyText.implicitWidth + 10
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- Text {
- id: frequencyText
- text: "Freq: " + frequencySlider.value + " Hz"
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
- }
- }
+ Text {
+ id: samplesText
+ text: "Samples: " + (mainView.sampleRows * mainView.sampleColumns)
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
}
+ }
+ }
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: fpsText.implicitWidth + 10
- Layout.maximumWidth: fpsText.implicitWidth + 10
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- border.color: "gray"
- border.width: 1
- radius: 4
-
- Text {
- id: fpsText
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- }
+ // Frequency
+ Rectangle {
+ id: frequency
+ width: portraitMode ? mainView.width : mainView.width / 4
+ height: flatShadingToggle.implicitHeight
+ anchors.left: portraitMode ? parent.left : samples.right
+ anchors.top: portraitMode ? samples.bottom : parent.top
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 10
+ padding: 5
+
+ Slider {
+ id: frequencySlider
+ from: 2
+ to: 60
+ stepSize: 2
+ value: 30
}
- Rectangle {
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumWidth: selectionText.implicitWidth + 10
- Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
-
- border.color: "gray"
- border.width: 1
- radius: 4
-
- Text {
- id: selectionText
- anchors.fill: parent
- verticalAlignment: Text.AlignVCenter
- horizontalAlignment: Text.AlignHCenter
- text: "No selection"
- }
+ Text {
+ id: frequencyText
+ text: "Freq: " + frequencySlider.value + " Hz"
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
}
}
+ }
- RowLayout {
- id: buttonLayout
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.minimumHeight: flatShadingToggle.implicitHeight
- spacing: 0
-
- Button {
- id: flatShadingToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
-
- text: surfaceSeries.flatShadingSupported ? "Show Flat" : "Flat not supported"
- enabled: surfaceSeries.flatShadingSupported
-
- onClicked: {
- if (surfaceSeries.flatShadingEnabled === true) {
- surfaceSeries.flatShadingEnabled = false;
- text = "Show Flat"
- } else {
- surfaceSeries.flatShadingEnabled = true;
- text = "Show Smooth"
- }
- }
- }
-
- Button {
- id: surfaceGridToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
-
- text: "Show Surface Grid"
-
- onClicked: {
- if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
- surfaceSeries.drawMode &= ~Surface3DSeries.DrawWireframe;
- text = "Show Surface Grid"
- } else {
- surfaceSeries.drawMode |= Surface3DSeries.DrawWireframe;
- text = "Hide Surface Grid"
- }
- }
- }
+ // FPS
+ Rectangle {
+ id: fpsindicator
+ width: portraitMode ? mainView.width : mainView.width / 4
+ height: flatShadingToggle.implicitHeight
+ anchors.left: portraitMode ? parent.left : frequency.right
+ anchors.top: portraitMode ? frequency.bottom : parent.top
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Text {
+ id: fpsText
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+ }
- Button {
- id: exitButton
- Layout.fillHeight: true
- Layout.fillWidth: true
+ // Selection
+ Rectangle {
+ id: selection
+ width: portraitMode ? mainView.width : mainView.width / 4
+ height: flatShadingToggle.implicitHeight
+ anchors.left: portraitMode ? parent.left : fpsindicator.right
+ anchors.top: portraitMode ? fpsindicator.bottom : parent.top
+
+ border.color: "gray"
+ border.width: 1
+ radius: 4
+
+ Text {
+ id: selectionText
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: "No selection"
+ }
+ }
- text: "Quit"
+ // Flat shading
+ Button {
+ id: flatShadingToggle
+ width: portraitMode ? mainView.width : mainView.width / 3
+ anchors.left: parent.left
+ anchors.top: selection.bottom
+
+ text: surfaceSeries.flatShadingSupported ? "Show Flat" : "Flat not supported"
+ enabled: surfaceSeries.flatShadingSupported
+
+ onClicked: {
+ if (surfaceSeries.flatShadingEnabled === true) {
+ surfaceSeries.flatShadingEnabled = false;
+ text = "Show Flat"
+ } else {
+ surfaceSeries.flatShadingEnabled = true;
+ text = "Show Smooth"
+ }
+ }
+ }
- onClicked: Qt.quit();
+ // Surface grid
+ Button {
+ id: surfaceGridToggle
+ width: portraitMode ? mainView.width : mainView.width / 3
+ anchors.left: portraitMode ? parent.left : flatShadingToggle.right
+ anchors.top: portraitMode ? flatShadingToggle.bottom : selection.bottom
+
+ text: "Show Surface Grid"
+
+ onClicked: {
+ if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
+ surfaceSeries.drawMode &= ~Surface3DSeries.DrawWireframe;
+ text = "Show Surface Grid"
+ } else {
+ surfaceSeries.drawMode |= Surface3DSeries.DrawWireframe;
+ text = "Hide Surface Grid"
}
}
}
+ // Exit
+ Button {
+ id: exitButton
+ width: portraitMode ? mainView.width : mainView.width / 3
+ anchors.left: portraitMode ? parent.left : surfaceGridToggle.right
+ anchors.top: portraitMode ? surfaceGridToggle.bottom : selection.bottom
+
+ text: "Quit"
+
+ onClicked: Qt.quit();
+ }
}
//! [4]
diff --git a/examples/datavisualization/qmlaxisdrag/CMakeLists.txt b/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
index 7a2125b9..774c1210 100644
--- a/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
+++ b/examples/datavisualization/qmlaxisdrag/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlaxisdrag LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml
index ac4cbd85..b500e412 100644
--- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml
+++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml
@@ -28,7 +28,7 @@
****************************************************************************/
import QtQuick
-import QtDataVisualization 1.1
+import QtDataVisualization
import QtQuick.Controls
import "."
@@ -45,6 +45,8 @@ Item {
property int previousMouseX: -1
property int previousMouseY: -1
+ property bool portraitMode: width < height
+
ListModel {
id: graphModel
ListElement{ xPos: 0.0; yPos: 0.0; zPos: 0.0; rotation: "@0,0,0,0" }
@@ -87,7 +89,7 @@ Item {
}
} else {
graphModel.remove(2, 10);
- if (graphModel.count == 2) {
+ if (graphModel.count === 2) {
scatterGraph.theme = dynamicColorTheme
isIncreasing = true
}
@@ -273,9 +275,11 @@ Item {
Button {
id: rangeToggle
- width: parent.width / 3 // We're adding 3 buttons and want to divide them equally
+ // We're adding 3 buttons and want to divide them equally, if not in portrait mode
+ width: portraitMode ? parent.width : parent.width / 3
text: "Use Preset Range"
anchors.left: parent.left
+ anchors.top: parent.top
property bool autoRange: true
onClicked: {
if (autoRange) {
@@ -302,9 +306,10 @@ Item {
//! [8]
Button {
id: orthoToggle
- width: parent.width / 3
+ width: portraitMode ? parent.width : parent.width / 3
text: "Display Orthographic"
- anchors.left: rangeToggle.right
+ anchors.left: portraitMode ? parent.left : rangeToggle.right
+ anchors.top: portraitMode ? rangeToggle.bottom : parent.top
onClicked: {
if (scatterGraph.orthoProjection) {
text = "Display Orthographic";
@@ -321,9 +326,10 @@ Item {
Button {
id: exitButton
- width: parent.width / 3
+ width: portraitMode ? parent.width : parent.width / 3
text: "Quit"
- anchors.left: orthoToggle.right
+ anchors.left: portraitMode ? parent.left : orthoToggle.right
+ anchors.top: portraitMode ? orthoToggle.bottom : parent.top
onClicked: Qt.quit();
}
}
diff --git a/examples/datavisualization/qmlaxisformatter/CMakeLists.txt b/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
index 54f23dde..3c4335b5 100644
--- a/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
+++ b/examples/datavisualization/qmlaxisformatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlaxisformatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlbars/CMakeLists.txt b/examples/datavisualization/qmlbars/CMakeLists.txt
index 071c788c..6792b858 100644
--- a/examples/datavisualization/qmlbars/CMakeLists.txt
+++ b/examples/datavisualization/qmlbars/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlbars LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
index 76eff0f2..dfebf1b1 100644
--- a/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
+++ b/examples/datavisualization/qmlbars/qml/qmlbars/main.qml
@@ -63,7 +63,7 @@ Item {
// Set tableView current row to selected bar
var rowRole = series.dataProxy.rowLabels[position.x];
var colRole
- if (barGraph.columnAxis === graphAxes.total)
+ if (barGraph.columnAxis == graphAxes.total)
colRole = "01";
else
colRole = series.dataProxy.columnLabels[position.y];
@@ -83,13 +83,12 @@ Item {
Item {
id: dataView
- anchors.right: mainview.right;
+ anchors.right: mainview.right
anchors.bottom: mainview.bottom
Bars3D {
id: barGraph
- width: dataView.width
- height: dataView.height
+ anchors.fill: parent
shadowQuality: AbstractGraph3D.ShadowQualityMedium
selectionMode: AbstractGraph3D.SelectionItem
theme: Theme3D {
@@ -176,12 +175,9 @@ Item {
}
}
-
-
ColumnLayout {
id: tableViewLayout
-
anchors.top: parent.top
anchors.left: parent.left
@@ -195,7 +191,6 @@ Item {
padding: 3
text: header.columnNames[index]
}
-
}
TableView {
@@ -215,7 +210,6 @@ Item {
rows: graphData.modelAsJsArray
}
-
delegate: Rectangle {
implicitHeight: 30
implicitWidth: tableView.width / 3
@@ -245,7 +239,6 @@ Item {
return display
}
}
-
}
}
}
@@ -258,7 +251,7 @@ Item {
var matches = pattern.exec(timestamp)
var rowIndex = modelProxy.rowCategoryIndex(matches[1])
var colIndex
- if (barGraph.columnAxis === graphAxes.total)
+ if (barGraph.columnAxis == graphAxes.total)
colIndex = 0 // Just one column when showing yearly totals
else
colIndex = modelProxy.columnCategoryIndex(matches[2])
@@ -388,7 +381,7 @@ Item {
name: "portrait"
PropertyChanges {
target: dataView
- width: mainview.height / 4 * 3
+ width: mainview.width
height: mainview.width
}
PropertyChanges {
diff --git a/examples/datavisualization/qmlcustominput/CMakeLists.txt b/examples/datavisualization/qmlcustominput/CMakeLists.txt
index 0e659e9e..f359d3fc 100644
--- a/examples/datavisualization/qmlcustominput/CMakeLists.txt
+++ b/examples/datavisualization/qmlcustominput/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlcustominput LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
index 77576127..8bd906fd 100644
--- a/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
+++ b/examples/datavisualization/qmlcustominput/qml/qmlcustominput/main.qml
@@ -38,6 +38,8 @@ Item {
width: 1280
height: 720
+ property bool portraitMode: width < height
+
Data {
id: graphData
}
@@ -46,7 +48,7 @@ Item {
id: dataView
anchors.bottom: parent.bottom
width: parent.width
- height: parent.height - buttonLayout.height
+ height: parent.height - (portraitMode ? shadowToggle.height * 3 : shadowToggle.height)
//! [0]
Scatter3D {
@@ -191,54 +193,50 @@ Item {
}
//! [7]
- RowLayout {
- id: buttonLayout
- Layout.minimumHeight: shadowToggle.height
- width: parent.width
+
+ Button {
+ id: shadowToggle
+ width: portraitMode ? parent.width : parent.width / 3
anchors.left: parent.left
- spacing: 0
-
- Button {
- id: shadowToggle
- Layout.fillHeight: true
- Layout.minimumWidth: parent.width / 3 // 3 buttons divided equally in the layout
- text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
- enabled: scatterGraph.shadowsSupported
-
- onClicked: {
- if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
- scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityMedium;
- text = "Hide Shadows";
- } else {
- scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityNone;
- text = "Show Shadows";
- }
+ anchors.top: parent.top
+ text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
+ enabled: scatterGraph.shadowsSupported
+
+ onClicked: {
+ if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityMedium;
+ text = "Hide Shadows";
+ } else {
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityNone;
+ text = "Show Shadows";
}
}
+ }
- Button {
- id: cameraToggle
- Layout.fillHeight: true
- Layout.minimumWidth: parent.width / 3
- text: "Pause Camera"
-
- onClicked: {
- cameraAnimationX.paused = !cameraAnimationX.paused;
- cameraAnimationY.paused = cameraAnimationX.paused;
- if (cameraAnimationX.paused) {
- text = "Animate Camera";
- } else {
- text = "Pause Camera";
- }
+ Button {
+ id: cameraToggle
+ width: portraitMode ? parent.width : parent.width / 3
+ anchors.left: portraitMode ? parent.left : shadowToggle.right
+ anchors.top: portraitMode ? shadowToggle.bottom : parent.top
+ text: "Pause Camera"
+
+ onClicked: {
+ cameraAnimationX.paused = !cameraAnimationX.paused;
+ cameraAnimationY.paused = cameraAnimationX.paused;
+ if (cameraAnimationX.paused) {
+ text = "Animate Camera";
+ } else {
+ text = "Pause Camera";
}
}
+ }
- Button {
- id: exitButton
- Layout.fillHeight: true
- Layout.minimumWidth: parent.width / 3
- text: "Quit"
- onClicked: Qt.quit();
- }
+ Button {
+ id: exitButton
+ width: portraitMode ? parent.width : parent.width / 3
+ anchors.left: portraitMode ? parent.left : cameraToggle.right
+ anchors.top: portraitMode ? cameraToggle.bottom : parent.top
+ text: "Quit"
+ onClicked: Qt.quit();
}
}
diff --git a/examples/datavisualization/qmllegend/CMakeLists.txt b/examples/datavisualization/qmllegend/CMakeLists.txt
index 2c3f56f0..ed972f4b 100644
--- a/examples/datavisualization/qmllegend/CMakeLists.txt
+++ b/examples/datavisualization/qmllegend/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmllegend LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlmultigraph/CMakeLists.txt b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
index dae22cbd..388c5df2 100644
--- a/examples/datavisualization/qmlmultigraph/CMakeLists.txt
+++ b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlmultigraph LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
index f30b1739..219f22d4 100644
--- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
@@ -38,6 +38,8 @@ Item {
width: 800
height: 600
+ property bool portratiMode: width < height
+
Data {
id: data
}
@@ -102,7 +104,7 @@ Item {
Layout.minimumWidth: parent.width / 2
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Clear Selections"
+ text: portratiMode ? "Clear\nSelections" : "Clear Selections"
onClicked: clearSelections() // call a helper function to keep button itself simpler
}
@@ -117,14 +119,14 @@ Item {
Button {
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Reset Cameras"
+ text: portratiMode ? "Reset\nCameras" : "Reset Cameras"
onClicked: resetCameras() // call a helper function to keep button itself simpler
}
Button {
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Toggle Mesh Styles"
+ text: portratiMode ? "Toggle\nMesh\nStyles" : "Toggle Mesh Styles"
onClicked: toggleMeshStyle() // call a helper function to keep button itself simpler
}
}
diff --git a/examples/datavisualization/qmlscatter/CMakeLists.txt b/examples/datavisualization/qmlscatter/CMakeLists.txt
index 4f154bf2..65e5d2a7 100644
--- a/examples/datavisualization/qmlscatter/CMakeLists.txt
+++ b/examples/datavisualization/qmlscatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlscatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
index 89863d84..97f5082a 100644
--- a/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
+++ b/examples/datavisualization/qmlscatter/qml/qmlscatter/main.qml
@@ -29,9 +29,8 @@
//! [0]
import QtQuick
-import QtQuick.Layouts
import QtQuick.Controls
-import QtDataVisualization 1.2
+import QtDataVisualization
import "."
//! [0]
@@ -42,6 +41,8 @@ Item {
width: 500
height: 500
+ property bool portraitMode: width < height
+
//! [4]
Data {
id: seriesData
@@ -52,7 +53,6 @@ Item {
Theme3D {
id: themeIsabelle
type: Theme3D.ThemeIsabelle
- font.family: "Lucida Handwriting"
font.pointSize: 40
}
//! [13]
@@ -69,7 +69,8 @@ Item {
anchors.bottom: parent.bottom
//! [9]
width: parent.width
- height: parent.height - buttonLayout.height
+ height: parent.height - (portraitMode ? shadowToggle.implicitHeight * 3 + 25
+ : shadowToggle.implicitHeight + 10)
//! [8]
//! [2]
@@ -142,103 +143,108 @@ Item {
}
}
- RowLayout {
- id: buttonLayout
- Layout.minimumHeight: cameraToggle.height
- width: parent.width
+ //! [7]
+ Button {
+ id: shadowToggle
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
anchors.left: parent.left
- spacing: 0
- //! [7]
- Button {
- id: shadowToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
- enabled: scatterGraph.shadowsSupported
- onClicked: {
- if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
- scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualitySoftLow;
- text = "Hide Shadows";
- } else {
- scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityNone;
- text = "Show Shadows";
- }
+ anchors.top: parent.top
+ anchors.margins: 5
+ text: scatterGraph.shadowsSupported ? "Hide Shadows" : "Shadows not supported"
+ enabled: scatterGraph.shadowsSupported
+ onClicked: {
+ if (scatterGraph.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualitySoftLow;
+ text = "Hide Shadows";
+ } else {
+ scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityNone;
+ text = "Show Shadows";
}
}
- //! [7]
-
- Button {
- id: smoothToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Use Smooth for Series One"
- onClicked: {
- if (scatterSeries.meshSmooth === false) {
- text = "Use Flat for Series One";
- scatterSeries.meshSmooth = true;
- } else {
- text = "Use Smooth for Series One"
- scatterSeries.meshSmooth = false;
- }
+ }
+ //! [7]
+
+ Button {
+ id: smoothToggle
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
+ anchors.left: shadowToggle.right
+ anchors.top: parent.top
+ anchors.margins: 5
+ text: "Use Smooth for Series One"
+ onClicked: {
+ if (scatterSeries.meshSmooth === false) {
+ text = "Use Flat for Series One";
+ scatterSeries.meshSmooth = true;
+ } else {
+ text = "Use Smooth for Series One"
+ scatterSeries.meshSmooth = false;
}
}
+ }
- Button {
- id: cameraToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Change Camera Placement"
- onClicked: {
- if (scatterGraph.scene.activeCamera.cameraPreset === Camera3D.CameraPresetFront) {
- scatterGraph.scene.activeCamera.cameraPreset =
- Camera3D.CameraPresetIsometricRightHigh;
- } else {
- scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetFront;
- }
+ Button {
+ id: cameraToggle
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
+ anchors.left: portraitMode ? parent.left : smoothToggle.right
+ anchors.top: portraitMode ? smoothToggle.bottom : parent.top
+ anchors.margins: 5
+ text: "Change Camera Placement"
+ onClicked: {
+ if (scatterGraph.scene.activeCamera.cameraPreset === Camera3D.CameraPresetFront) {
+ scatterGraph.scene.activeCamera.cameraPreset =
+ Camera3D.CameraPresetIsometricRightHigh;
+ } else {
+ scatterGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetFront;
}
}
+ }
- Button {
- id: themeToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Change Theme"
- onClicked: {
- if (scatterGraph.theme.type === Theme3D.ThemeArmyBlue) {
- scatterGraph.theme = themeIsabelle
- } else {
- scatterGraph.theme = themeArmyBlue
- }
- if (scatterGraph.theme.backgroundEnabled === true) {
- backgroundToggle.text = "Hide Background";
- } else {
- backgroundToggle.text = "Show Background";
- }
+ Button {
+ id: themeToggle
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
+ anchors.left: cameraToggle.right
+ anchors.top: portraitMode ? smoothToggle.bottom : parent.top
+ anchors.margins: 5
+ text: "Change Theme"
+ onClicked: {
+ if (scatterGraph.theme.type === Theme3D.ThemeArmyBlue) {
+ scatterGraph.theme = themeIsabelle
+ } else {
+ scatterGraph.theme = themeArmyBlue
+ }
+ if (scatterGraph.theme.backgroundEnabled === true) {
+ backgroundToggle.text = "Hide Background";
+ } else {
+ backgroundToggle.text = "Show Background";
}
}
+ }
- Button {
- id: backgroundToggle
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Hide Background"
- onClicked: {
- if (scatterGraph.theme.backgroundEnabled === true) {
- scatterGraph.theme.backgroundEnabled = false;
- text = "Show Background";
- } else {
- scatterGraph.theme.backgroundEnabled = true;
- text = "Hide Background";
- }
+ Button {
+ id: backgroundToggle
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
+ anchors.left: portraitMode ? parent.left : themeToggle.right
+ anchors.top: portraitMode ? themeToggle.bottom : parent.top
+ anchors.margins: 5
+ text: "Hide Background"
+ onClicked: {
+ if (scatterGraph.theme.backgroundEnabled === true) {
+ scatterGraph.theme.backgroundEnabled = false;
+ text = "Show Background";
+ } else {
+ scatterGraph.theme.backgroundEnabled = true;
+ text = "Hide Background";
}
}
+ }
- Button {
- id: exitButton
- Layout.fillHeight: true
- Layout.fillWidth: true
- text: "Quit"
- onClicked: Qt.quit();
- }
+ Button {
+ id: exitButton
+ width: portraitMode ? implicitWidth : (mainView.width / 6 - 6)
+ anchors.left: backgroundToggle.right
+ anchors.top: portraitMode ? themeToggle.bottom : parent.top
+ anchors.margins: 5
+ text: "Quit"
+ onClicked: Qt.quit();
}
}
diff --git a/examples/datavisualization/qmlspectrogram/CMakeLists.txt b/examples/datavisualization/qmlspectrogram/CMakeLists.txt
index d0ac0515..ce86d5c1 100644
--- a/examples/datavisualization/qmlspectrogram/CMakeLists.txt
+++ b/examples/datavisualization/qmlspectrogram/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlspectrogram LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
index 35143179..c866f075 100644
--- a/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
+++ b/examples/datavisualization/qmlspectrogram/qml/qmlspectrogram/main.qml
@@ -28,10 +28,9 @@
****************************************************************************/
import QtQuick
-import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Window
-import QtDataVisualization 1.2
+import QtDataVisualization
import "."
Window {
@@ -42,16 +41,18 @@ Window {
height: 768
color: surfaceGraph.theme.windowColor
+ property bool portraitMode: width < height
+
Data {
id: surfaceData
}
Item {
id: surfaceView
- width: mainview.width
- height: mainview.height
- anchors.top: mainview.top
- anchors.left: mainview.left
+ anchors.top: buttons.bottom
+ anchors.left: parent.left
+ anchors.right: legend.left
+ anchors.bottom: parent.bottom
ColorGradient {
id: surfaceGradient
@@ -114,8 +115,7 @@ Window {
Surface3D {
//! [7]
id: surfaceGraph
- width: surfaceView.width
- height: surfaceView.height
+ anchors.fill: parent
shadowQuality: AbstractGraph3D.ShadowQualityNone
selectionMode: AbstractGraph3D.SelectionSlice | AbstractGraph3D.SelectionItemAndColumn
@@ -164,26 +164,29 @@ Window {
//! [0]
}
- RowLayout {
- id: buttonLayout
+ Item {
+ id: buttons
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
- opacity: 0.5
+ height: portraitMode ? (polarToggle.height + 10) * 3 : polarToggle.height + 30
+ anchors.margins: 10
//! [3]
Button {
id: polarToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Switch to polar"
+ anchors.margins: 5
+ anchors.left: parent.left
+ anchors.top: parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 50) / 5
+ text: "Switch to\npolar"
onClicked: {
if (surfaceGraph.polar === false) {
surfaceGraph.polar = true
- text = "Switch to cartesian"
+ text = "Switch to\ncartesian"
} else {
surfaceGraph.polar = false
- text = "Switch to polar"
+ text = "Switch to\npolar"
}
}
}
@@ -191,9 +194,11 @@ Window {
Button {
id: orthoToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Switch to perspective"
+ anchors.margins: 5
+ anchors.left: polarToggle.right
+ anchors.top: parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 50) / 5
+ text: "Switch to\nperspective"
onClicked: {
if (surfaceGraph.orthoProjection === true) {
surfaceGraph.orthoProjection = false;
@@ -201,7 +206,7 @@ Window {
yAxis.labelAutoRotation = 30
zAxis.labelAutoRotation = 30
customInputHandler.rotationEnabled = true
- text = "Switch to orthographic"
+ text = "Switch to\northographic"
} else {
surfaceGraph.orthoProjection = true;
surfaceGraph.scene.activeCamera.cameraPreset = Camera3D.CameraPresetDirectlyAbove
@@ -210,16 +215,18 @@ Window {
yAxis.labelAutoRotation = 0
zAxis.labelAutoRotation = 0
customInputHandler.rotationEnabled = false
- text = "Switch to perspective"
+ text = "Switch to\nperspective"
}
}
}
Button {
id: flipGridToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Toggle axis grid on top"
+ anchors.margins: 5
+ anchors.left: portraitMode ? parent.left : orthoToggle.right
+ anchors.top: portraitMode ? orthoToggle.bottom : parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 50) / 5
+ text: "Toggle axis\ngrid on top"
onClicked: {
if (surfaceGraph.flipHorizontalGrid === true) {
surfaceGraph.flipHorizontalGrid = false;
@@ -231,9 +238,11 @@ Window {
Button {
id: labelOffsetToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Toggle radial label position"
+ anchors.margins: 5
+ anchors.left: flipGridToggle.right
+ anchors.top: portraitMode ? orthoToggle.bottom : parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 50) / 5
+ text: "Toggle radial\nlabel position"
visible: surfaceGraph.polar
onClicked: {
if (surfaceGraph.radialLabelOffset >= 1.0) {
@@ -246,9 +255,16 @@ Window {
Button {
id: surfaceGridToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Toggle surface grid"
+ anchors.margins: 5
+ anchors.left: portraitMode ? (labelOffsetToggle.visible ? parent.left
+ : flipGridToggle.right)
+ : (labelOffsetToggle.visible ? labelOffsetToggle.right
+ : flipGridToggle.right)
+ anchors.top: portraitMode ? (labelOffsetToggle.visible ? labelOffsetToggle.bottom
+ : orthoToggle.bottom)
+ : parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 50) / 5
+ text: "Toggle\nsurface grid"
visible: !surfaceGraph.orthoProjection
onClicked: {
if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
@@ -258,46 +274,53 @@ Window {
}
}
}
-
}
- Rectangle {
+ Item {
id: legend
- anchors.margins: 20
anchors.bottom: parent.bottom
- anchors.top: buttonLayout.bottom
+ anchors.top: buttons.bottom
anchors.right: parent.right
- border.color: "black"
- border.width: 1
- width: 50
- rotation: 180
- gradient: Gradient {
- GradientStop { position: 0.0; color: "black" }
- GradientStop { position: 0.2; color: "red" }
- GradientStop { position: 0.5; color: "blue" }
- GradientStop { position: 0.8; color: "yellow" }
- GradientStop { position: 1.0; color: "white" }
+ width: portraitMode ? 100 : 125
+
+ Rectangle {
+ id: gradient
+ anchors.margins: 20
+ anchors.bottom: legend.bottom
+ anchors.top: legend.top
+ anchors.right: legend.right
+ border.color: "black"
+ border.width: 1
+ width: portraitMode ? 25 : 50
+ rotation: 180
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "black" }
+ GradientStop { position: 0.2; color: "red" }
+ GradientStop { position: 0.5; color: "blue" }
+ GradientStop { position: 0.8; color: "yellow" }
+ GradientStop { position: 1.0; color: "white" }
+ }
}
- }
- Text {
- anchors.verticalCenter: legend.bottom
- anchors.right: legend.left
- anchors.margins: 2
- text: surfaceGraph.axisY.min + "%"
- }
+ Text {
+ anchors.verticalCenter: gradient.bottom
+ anchors.right: gradient.left
+ anchors.margins: 2
+ text: surfaceGraph.axisY.min + "%"
+ }
- Text {
- anchors.verticalCenter: legend.verticalCenter
- anchors.right: legend.left
- anchors.margins: 2
- text: (surfaceGraph.axisY.max + surfaceGraph.axisY.min) / 2 + "%"
- }
+ Text {
+ anchors.verticalCenter: gradient.verticalCenter
+ anchors.right: gradient.left
+ anchors.margins: 2
+ text: (surfaceGraph.axisY.max + surfaceGraph.axisY.min) / 2 + "%"
+ }
- Text {
- anchors.verticalCenter: legend.top
- anchors.right: legend.left
- anchors.margins: 2
- text: surfaceGraph.axisY.max + "%"
+ Text {
+ anchors.verticalCenter: gradient.top
+ anchors.right: gradient.left
+ anchors.margins: 2
+ text: surfaceGraph.axisY.max + "%"
+ }
}
}
diff --git a/examples/datavisualization/qmlsurface/CMakeLists.txt b/examples/datavisualization/qmlsurface/CMakeLists.txt
index e2d3bf33..c1a6459c 100644
--- a/examples/datavisualization/qmlsurface/CMakeLists.txt
+++ b/examples/datavisualization/qmlsurface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlsurface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
index 2124346a..9597a557 100644
--- a/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
+++ b/examples/datavisualization/qmlsurface/qml/qmlsurface/main.qml
@@ -28,9 +28,8 @@
****************************************************************************/
import QtQuick
-import QtQuick.Layouts
import QtQuick.Controls
-import QtDataVisualization 1.2
+import QtDataVisualization
import "."
Rectangle {
@@ -39,16 +38,18 @@ Rectangle {
height: 768
color: surfacePlot.theme.windowColor
+ property bool portraitMode: width < height
+
Data {
id: surfaceData
}
Item {
id: surfaceView
- width: mainview.width
- height: mainview.height
- anchors.top: mainview.top
+ anchors.top: buttons.bottom
+ anchors.bottom: mainview.bottom
anchors.left: mainview.left
+ anchors.right: mainview.right
//! [0]
ColorGradient {
@@ -75,6 +76,7 @@ Rectangle {
shadowQuality: AbstractGraph3D.ShadowQualityMedium
selectionMode: AbstractGraph3D.SelectionSlice | AbstractGraph3D.SelectionItemAndRow
scene.activeCamera.cameraPreset: Camera3D.CameraPresetIsometricLeft
+ scene.activeCamera.zoomLevel: 75
axisY.min: 0.0
axisY.max: 500.0
axisX.segmentCount: 10
@@ -129,18 +131,23 @@ Rectangle {
}
}
- RowLayout {
- id: buttonLayout
+ Item {
+ id: buttons
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
+ anchors.margins: 10
+ height: portraitMode ? surfaceGridToggle.implicitHeight * 3 + 20
+ : surfaceGridToggle.implicitHeight * 2 + 15
opacity: 0.5
Button {
id: surfaceGridToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Show Surface Grid"
+ anchors.margins: 5
+ anchors.left: parent.left
+ anchors.top: parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: "Show Surface\nGrid"
//! [1]
onClicked: {
if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe) {
@@ -156,9 +163,11 @@ Rectangle {
Button {
id: surfaceToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Hide Surface"
+ anchors.margins: 5
+ anchors.left: surfaceGridToggle.right
+ anchors.top: parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: "Hide\nSurface"
//! [8]
onClicked: {
if (surfaceSeries.drawMode & Surface3DSeries.DrawSurface) {
@@ -174,20 +183,22 @@ Rectangle {
Button {
id: flatShadingToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: surfaceSeries.flatShadingSupported ? "Show Flat" : "Flat not supported"
+ anchors.margins: 5
+ anchors.left: portraitMode ? parent.left : surfaceToggle.right
+ anchors.top: portraitMode ? surfaceToggle.bottom : parent.top
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: surfaceSeries.flatShadingSupported ? "Show\nFlat" : "Flat not\nsupported"
enabled: surfaceSeries.flatShadingSupported
//! [2]
onClicked: {
if (surfaceSeries.flatShadingEnabled === true) {
surfaceSeries.flatShadingEnabled = false;
heightSeries.flatShadingEnabled = false;
- text = "Show Flat"
+ text = "Show\nFlat"
} else {
surfaceSeries.flatShadingEnabled = true;
heightSeries.flatShadingEnabled = true;
- text = "Show Smooth"
+ text = "Show\nSmooth"
}
}
//! [2]
@@ -195,41 +206,47 @@ Rectangle {
Button {
id: backgroundToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Hide Background"
+ anchors.margins: 5
+ anchors.left: portraitMode ? flatShadingToggle.right : parent.left
+ anchors.top: portraitMode ? surfaceToggle.bottom : flatShadingToggle.bottom
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: "Hide\nBackground"
onClicked: {
if (surfacePlot.theme.backgroundEnabled === true) {
surfacePlot.theme.backgroundEnabled = false;
- text = "Show Background"
+ text = "Show\nBackground"
} else {
surfacePlot.theme.backgroundEnabled = true;
- text = "Hide Background"
+ text = "Hide\nBackground"
}
}
}
Button {
id: gridToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Hide Grid"
+ anchors.margins: 5
+ anchors.left: portraitMode ? parent.left : backgroundToggle.right
+ anchors.top: portraitMode ? backgroundToggle.bottom : surfaceToggle.bottom
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: "Hide\nGrid"
onClicked: {
if (surfacePlot.theme.gridEnabled === true) {
surfacePlot.theme.gridEnabled = false;
- text = "Show Grid"
+ text = "Show\nGrid"
} else {
surfacePlot.theme.gridEnabled = true;
- text = "Hide Grid"
+ text = "Hide\nGrid"
}
}
}
Button {
id: seriesToggle
- Layout.fillWidth: true
- Layout.fillHeight: true
- text: "Switch to Height Map Series"
+ anchors.margins: 5
+ anchors.left: gridToggle.right
+ anchors.top: portraitMode ? backgroundToggle.bottom : surfaceToggle.bottom
+ width: portraitMode ? (mainview.width - 35) / 2 : (mainview.width - 40) / 3
+ text: "Switch to\nHeight Map Series"
//! [3]
onClicked: {
if (surfaceSeries.visible === false) {
@@ -237,13 +254,13 @@ Rectangle {
surfaceSeries.visible = true
heightSeries.visible = false
middleGradient.position = 0.25
- text = "Switch to Height Map Series"
+ text = "Switch to\nHeight Map Series"
} else {
surfacePlot.axisY.max = 250.0
surfaceSeries.visible = false
heightSeries.visible = true
middleGradient.position = 0.50
- text = "Switch to Item Model Series"
+ text = "Switch to\nItem Model Series"
}
}
//! [3]
@@ -252,13 +269,13 @@ Rectangle {
function checkState() {
if (surfaceSeries.drawMode & Surface3DSeries.DrawSurface)
- surfaceToggle.text = "Hide Surface"
+ surfaceToggle.text = "Hide\nSurface"
else
- surfaceToggle.text = "Show Surface"
+ surfaceToggle.text = "Show\nSurface"
if (surfaceSeries.drawMode & Surface3DSeries.DrawWireframe)
- surfaceGridToggle.text = "Hide Surface Grid"
+ surfaceGridToggle.text = "Hide Surface\nGrid"
else
- surfaceGridToggle.text = "Show Surface Grid"
+ surfaceGridToggle.text = "Show Surface\nGrid"
}
}
diff --git a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt b/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
index 12c27085..d011aa03 100644
--- a/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
+++ b/examples/datavisualization/qmlsurfacelayers/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlsurfacelayers LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
index b2469ba9..b15f8bac 100644
--- a/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
+++ b/examples/datavisualization/qmlsurfacelayers/qml/qmlsurfacelayers/main.qml
@@ -39,10 +39,11 @@ Item {
height: 720
property real fontSize: 12
+ property bool portraitMode: width < height
Item {
id: surfaceView
- width: mainview.width - buttonLayout.width
+ width: mainview.width - settings.width
height: mainview.height
anchors.right: mainview.right;
@@ -134,175 +135,185 @@ Item {
}
}
- ColumnLayout {
- id: buttonLayout
- anchors.top: parent.top
- anchors.left: parent.left
- spacing: 0
+ Flickable {
+ id: settings
+ width: buttonLayout.width
+ contentHeight: buttonLayout.height
+ height: mainview.height
- //! [3]
- GroupBox {
- Layout.fillWidth: true
- Column {
- spacing: 10
+ ColumnLayout {
+ id: buttonLayout
+ anchors.top: parent.top
+ anchors.left: parent.left
+ spacing: 0
- Label {
- font.pointSize: fontSize
- font.bold: true
- text: "Layer Selection"
- }
+ //! [3]
+ GroupBox {
+ Layout.fillWidth: true
+ Column {
+ spacing: 10
- CheckBox {
- id: layerOneToggle
- checked: true
- text: "Show Ground Layer"
- }
+ Label {
+ font.pointSize: fontSize
+ font.bold: true
+ text: portraitMode ? "Layer\nSelection" : "Layer Selection"
+ }
- CheckBox {
- id: layerTwoToggle
- checked: true
- text: "Show Sea Layer"
- }
+ CheckBox {
+ id: layerOneToggle
+ checked: true
+ text: portraitMode ? "Show\nGround\nLayer" : "Show Ground Layer"
+ }
- CheckBox {
- id: layerThreeToggle
- checked: true
- text: "Show Tectonic Layer"
+ CheckBox {
+ id: layerTwoToggle
+ checked: true
+ text: portraitMode ? "Show\nSea\nLayer" : "Show Sea Layer"
+ }
+
+ CheckBox {
+ id: layerThreeToggle
+ checked: true
+ text: portraitMode ? "Show\nTectonic\nLayer" : "Show Tectonic Layer"
+ }
}
}
- }
- //! [3]
+ //! [3]
- //! [5]
- GroupBox {
- Layout.fillWidth: true
- Column {
- spacing: 10
+ //! [5]
+ GroupBox {
+ Layout.fillWidth: true
+ Column {
+ spacing: 10
- Label {
- font.pointSize: fontSize
- font.bold: true
- text: "Layer Style"
- }
+ Label {
+ font.pointSize: fontSize
+ font.bold: true
+ text: portraitMode ? "Layer\nStyle" : "Layer Style"
+ }
- CheckBox {
- id: layerOneGrid
- text: "Show Ground as Grid"
- onCheckedChanged: {
- if (checked)
- layerOneSeries.drawMode = Surface3DSeries.DrawWireframe
- else
- layerOneSeries.drawMode = Surface3DSeries.DrawSurface
+ CheckBox {
+ id: layerOneGrid
+ text: portraitMode ? "Show\nGround\nas Grid" : "Show Ground as Grid"
+ onCheckedChanged: {
+ if (checked)
+ layerOneSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerOneSeries.drawMode = Surface3DSeries.DrawSurface
+ }
}
- }
- CheckBox {
- id: layerTwoGrid
- text: "Show Sea as Grid"
+ CheckBox {
+ id: layerTwoGrid
+ text: portraitMode ? "Show\nSea\nas Grid" : "Show Sea as Grid"
- onCheckedChanged: {
- if (checked)
- layerTwoSeries.drawMode = Surface3DSeries.DrawWireframe
- else
- layerTwoSeries.drawMode = Surface3DSeries.DrawSurface
+ onCheckedChanged: {
+ if (checked)
+ layerTwoSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerTwoSeries.drawMode = Surface3DSeries.DrawSurface
+ }
}
- }
- CheckBox {
- id: layerThreeGrid
- text: "Show Tectonic as Grid"
- onCheckedChanged: {
- if (checked)
- layerThreeSeries.drawMode = Surface3DSeries.DrawWireframe
- else
- layerThreeSeries.drawMode = Surface3DSeries.DrawSurface
+ CheckBox {
+ id: layerThreeGrid
+ text: portraitMode ? "Show\nTectonic\nas Grid" : "Show Tectonic as Grid"
+ onCheckedChanged: {
+ if (checked)
+ layerThreeSeries.drawMode = Surface3DSeries.DrawWireframe
+ else
+ layerThreeSeries.drawMode = Surface3DSeries.DrawSurface
+ }
}
}
}
- }
- //! [5]
+ //! [5]
- //! [6]
- Button {
- id: sliceButton
- text: "Slice All Layers"
- Layout.fillWidth: true
- Layout.minimumHeight: 40
- onClicked: {
- if (surfaceLayers.selectionMode & AbstractGraph3D.SelectionMultiSeries) {
- surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
- | AbstractGraph3D.SelectionSlice
- text = "Slice All Layers"
- } else {
- surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
- | AbstractGraph3D.SelectionSlice
- | AbstractGraph3D.SelectionMultiSeries
- text = "Slice One Layer"
+ //! [6]
+ Button {
+ id: sliceButton
+ text: portraitMode ? "Slice\nAll\nLayers" : "Slice All Layers"
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ onClicked: {
+ if (surfaceLayers.selectionMode & AbstractGraph3D.SelectionMultiSeries) {
+ surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
+ | AbstractGraph3D.SelectionSlice
+ text = portraitMode ? "Slice\nAll\nLayers" : "Slice All Layers"
+ } else {
+ surfaceLayers.selectionMode = AbstractGraph3D.SelectionRow
+ | AbstractGraph3D.SelectionSlice
+ | AbstractGraph3D.SelectionMultiSeries
+ text = portraitMode ? "Slice\nOne\nLayer" : "Slice One Layer"
+ }
}
}
- }
- //! [6]
+ //! [6]
- Button {
- id: shadowButton
- Layout.fillWidth: true
- Layout.minimumHeight: 40
- text: surfaceLayers.shadowsSupported ? "Show Shadows" : "Shadows not supported"
- enabled: surfaceLayers.shadowsSupported
- onClicked: {
- if (surfaceLayers.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
- surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityLow
- text = "Hide Shadows"
- } else {
- surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityNone
- text = "Show Shadows"
+ Button {
+ id: shadowButton
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ text: surfaceLayers.shadowsSupported ? (portraitMode ? "Show\nShadows" : "Show Shadows")
+ : (portraitMode ? "Shadows\nnot\nsupported" : "Shadows not supported")
+ enabled: surfaceLayers.shadowsSupported
+ onClicked: {
+ if (surfaceLayers.shadowQuality === AbstractGraph3D.ShadowQualityNone) {
+ surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityLow
+ text = portraitMode ? "Hide\nShadows" : "Hide Shadows"
+ } else {
+ surfaceLayers.shadowQuality = AbstractGraph3D.ShadowQualityNone
+ text = portraitMode ? "Show\nShadows" : "Show Shadows"
+ }
}
}
- }
- Button {
- id: renderModeButton
- text: "Switch Render Mode"
- Layout.fillWidth: true
- Layout.minimumHeight: 40
- onClicked: {
- var modeText = "Indirect "
- var aaText
- if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
- surfaceLayers.msaaSamples === 0) {
- surfaceLayers.renderingMode = AbstractGraph3D.RenderDirectToBackground
- modeText = "BackGround "
- } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
- surfaceLayers.msaaSamples === 4) {
- surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
- surfaceLayers.msaaSamples = 0
- } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
- surfaceLayers.msaaSamples === 8) {
- surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
- surfaceLayers.msaaSamples = 4
- } else {
- surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
- surfaceLayers.msaaSamples = 8
- }
+ Button {
+ id: renderModeButton
+ text: portraitMode ? "Switch\nRender\nMode" : "Switch Render Mode"
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ onClicked: {
+ var modeText = "Indirect, "
+ var aaText
+ if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 0) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderDirectToBackground
+ modeText = "BackGround, "
+ } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 4) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 0
+ } else if (surfaceLayers.renderingMode === AbstractGraph3D.RenderIndirect &&
+ surfaceLayers.msaaSamples === 8) {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 4
+ } else {
+ surfaceLayers.renderingMode = AbstractGraph3D.RenderIndirect
+ surfaceLayers.msaaSamples = 8
+ }
- if (surfaceLayers.msaaSamples <= 0) {
- aaText = "No AA"
- } else {
- aaText = surfaceLayers.msaaSamples + "xMSAA"
- }
+ if (surfaceLayers.msaaSamples <= 0) {
+ aaText = "No AA"
+ } else {
+ aaText = surfaceLayers.msaaSamples + "xMSAA"
+ }
- renderLabel.text = modeText + aaText
+ renderLabel.text = modeText + aaText
+ }
}
- }
- TextField {
- id: renderLabel
- font.pointSize: fontSize
- Layout.fillWidth: true
- Layout.minimumHeight: 40
- enabled: false
- horizontalAlignment: TextInput.AlignHCenter
- text: "Indirect, " + surfaceLayers.msaaSamples + "xMSAA"
+ TextField {
+ id: renderLabel
+ font.pointSize: fontSize
+ Layout.fillWidth: true
+ Layout.minimumHeight: 40
+ color: "gray"
+ enabled: false
+ horizontalAlignment: TextInput.AlignHCenter
+ wrapMode: TextField.WrapAtWordBoundaryOrAnywhere
+ text: "Indirect, " + surfaceLayers.msaaSamples + "xMSAA"
+ }
}
}
}
diff --git a/examples/datavisualization/rotations/CMakeLists.txt b/examples/datavisualization/rotations/CMakeLists.txt
index d3333639..620d34b3 100644
--- a/examples/datavisualization/rotations/CMakeLists.txt
+++ b/examples/datavisualization/rotations/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(rotations LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/scatter/CMakeLists.txt b/examples/datavisualization/scatter/CMakeLists.txt
index 0dbedc1d..1b2e967f 100644
--- a/examples/datavisualization/scatter/CMakeLists.txt
+++ b/examples/datavisualization/scatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(scatter LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/scatter/scatterdatamodifier.h b/examples/datavisualization/scatter/scatterdatamodifier.h
index cbb14995..f79a46e9 100644
--- a/examples/datavisualization/scatter/scatterdatamodifier.h
+++ b/examples/datavisualization/scatter/scatterdatamodifier.h
@@ -63,7 +63,7 @@ Q_SIGNALS:
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
void shadowQualityChanged(int quality);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
private:
QVector3D randVector();
diff --git a/examples/datavisualization/surface/CMakeLists.txt b/examples/datavisualization/surface/CMakeLists.txt
index 594c5988..8740d13e 100644
--- a/examples/datavisualization/surface/CMakeLists.txt
+++ b/examples/datavisualization/surface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(surface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/texturesurface/CMakeLists.txt b/examples/datavisualization/texturesurface/CMakeLists.txt
index ac8c7ed9..5da2e03e 100644
--- a/examples/datavisualization/texturesurface/CMakeLists.txt
+++ b/examples/datavisualization/texturesurface/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(texturesurface LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/volumetric/CMakeLists.txt b/examples/datavisualization/volumetric/CMakeLists.txt
index e79fff49..577c1604 100644
--- a/examples/datavisualization/volumetric/CMakeLists.txt
+++ b/examples/datavisualization/volumetric/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(volumetric LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/src/datavisualization/data/customrenderitem.cpp b/src/datavisualization/data/customrenderitem.cpp
index 68e84c44..6279921d 100644
--- a/src/datavisualization/data/customrenderitem.cpp
+++ b/src/datavisualization/data/customrenderitem.cpp
@@ -68,9 +68,10 @@ CustomRenderItem::~CustomRenderItem()
ObjectHelper::releaseObjectHelper(m_renderer, m_object);
}
-void CustomRenderItem::setMesh(const QString &meshFile)
+bool CustomRenderItem::setMesh(const QString &meshFile)
{
ObjectHelper::resetObjectHelper(m_renderer, m_object, meshFile);
+ return m_object ? true : false;
}
void CustomRenderItem::setColorTable(const QList<QRgb> &colors)
diff --git a/src/datavisualization/data/customrenderitem_p.h b/src/datavisualization/data/customrenderitem_p.h
index 196e6aa0..e14b1de4 100644
--- a/src/datavisualization/data/customrenderitem_p.h
+++ b/src/datavisualization/data/customrenderitem_p.h
@@ -59,7 +59,7 @@ public:
inline void setTexture(GLuint texture) { m_texture = texture; }
inline GLuint texture() const { return m_texture; }
- void setMesh(const QString &meshFile);
+ bool setMesh(const QString &meshFile);
inline ObjectHelper *mesh() const { return m_object; }
inline void setScaling(const QVector3D &scaling) { m_scaling = scaling; }
inline const QVector3D &scaling() const { return m_scaling; }
diff --git a/src/datavisualization/data/qcustom3ditem.cpp b/src/datavisualization/data/qcustom3ditem.cpp
index 07e3c809..63ba2b20 100644
--- a/src/datavisualization/data/qcustom3ditem.cpp
+++ b/src/datavisualization/data/qcustom3ditem.cpp
@@ -58,7 +58,9 @@ QT_BEGIN_NAMESPACE
/*! \qmlproperty string Custom3DItem::meshFile
*
* The item mesh file name. The item in the file must be in Wavefront OBJ format and include
- * vertices, normals, and UVs. It also needs to be in triangles.
+ * vertices, normals, and UVs. It also needs to be in triangles. If the file is missing either
+ * normals or UVs, loading will fail with an error message to the console output and the item will
+ * not be rendered.
*/
/*! \qmlproperty string Custom3DItem::textureFile
@@ -203,6 +205,9 @@ QCustom3DItem::~QCustom3DItem()
*
* The item in the file must be in Wavefront OBJ format and include
* vertices, normals, and UVs. It also needs to be in triangles.
+ * If the file is missing either normals or UVs, loading will fail
+ * with an error message to the console output and the item will
+ * not be rendered.
*/
void QCustom3DItem::setMeshFile(const QString &meshFile)
{
diff --git a/src/datavisualization/data/qsurfacedataproxy.cpp b/src/datavisualization/data/qsurfacedataproxy.cpp
index 7601d021..c9c6425d 100644
--- a/src/datavisualization/data/qsurfacedataproxy.cpp
+++ b/src/datavisualization/data/qsurfacedataproxy.cpp
@@ -552,9 +552,11 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float itemValue = m_dataArray->at(i)->at(j).y();
if (qIsNaN(itemValue) || qIsInf(itemValue))
continue;
- if (min > itemValue && isValidValue(itemValue, axisY))
+ if ((min > itemValue || (qIsNaN(min) || qIsInf(min)))
+ && isValidValue(itemValue, axisY)) {
min = itemValue;
- if (max < itemValue)
+ }
+ if (max < itemValue || (qIsNaN(max) || qIsInf(max)))
max = itemValue;
}
}
@@ -569,33 +571,59 @@ void QSurfaceDataProxyPrivate::limitValues(QVector3D &minValues, QVector3D &maxV
float xHigh = m_dataArray->at(0)->last().x();
float zLow = m_dataArray->at(0)->at(0).z();
float zHigh = m_dataArray->last()->at(0).z();
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->at(0)->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zLow = qMin(zLow,zItemValue);
+ for (int i = 0; i < rows; i++) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ zLow = qMin(zLow,zItemValue);
+ }
+ if (!qIsNaN(zLow) && !qIsInf(zLow))
+ break;
}
- for (int i = 0; i < columns; i++) {
- float zItemValue = m_dataArray->last()->at(i).z();
- if (qIsNaN(zItemValue) || qIsInf(zItemValue))
- continue;
- else if (isValidValue(zItemValue, axisZ))
- zHigh = qMax(zHigh, zItemValue);
+ for (int i = rows - 1; i >= 0; i--) {
+ for (int j = 0; j < columns; j++) {
+ float zItemValue = m_dataArray->at(i)->at(j).z();
+ if (qIsNaN(zItemValue) || qIsInf(zItemValue))
+ continue;
+ else if (isValidValue(zItemValue, axisZ))
+ {
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ zHigh = qMax(zHigh, zItemValue);
+ else
+ zHigh = zItemValue;
+ }
+ }
+ if (!qIsNaN(zHigh) && !qIsInf(zHigh))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->at(0).x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xLow = qMin(xLow, xItemValue);
+ for (int j = 0; j<columns; j++){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ xLow = qMin(xLow, xItemValue);
+ }
+ if (!qIsNaN(xLow) && !qIsInf(xLow))
+ break;
}
- for (int i = 0; i < rows; i++) {
- float xItemValue = m_dataArray->at(i)->last().x();
- if (qIsNaN(xItemValue) || qIsInf(xItemValue))
- continue;
- else if (isValidValue(xItemValue, axisX))
- xHigh = qMax(xHigh, xItemValue);
+ for (int j = columns-1; j >= 0; j--){
+ for (int i = 0; i < rows; i++) {
+ float xItemValue = m_dataArray->at(i)->at(j).x();
+ if (qIsNaN(xItemValue) || qIsInf(xItemValue))
+ continue;
+ else if (isValidValue(xItemValue, axisX))
+ {
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ xHigh = qMax(xHigh, xItemValue);
+ else
+ xHigh = xItemValue;
+ }
+ }
+ if (!qIsNaN(xHigh) && !qIsInf(xHigh))
+ break;
}
minValues.setX(xLow);
minValues.setZ(zLow);
diff --git a/src/datavisualization/doc/qtdatavis3d.qdocconf b/src/datavisualization/doc/qtdatavis3d.qdocconf
index bc4690ad..1f689dfa 100644
--- a/src/datavisualization/doc/qtdatavis3d.qdocconf
+++ b/src/datavisualization/doc/qtdatavis3d.qdocconf
@@ -1,7 +1,7 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
include($QT_INSTALL_DOCS/config/exampleurl-qtdatavis3d.qdocconf)
-project = QtDataVisualization
+project = QtDataVis3D
description = Qt Data Visualization Reference Documentation
version = $QT_VERSION
buildversion = Qt Data Visualization | Commercial or GPLv3
@@ -17,37 +17,37 @@ imagedirs += ../images \
depends = qtcore qtgui qtqml qtquick qtdoc qtcmake qtwidgets
-qhp.projects = QtDataVisualization
-
-qhp.QtDataVisualization.file = qtdatavis3d.qhp
-qhp.QtDataVisualization.namespace = org.qt-project.qtdatavisualization.$QT_VERSION_TAG
-qhp.QtDataVisualization.virtualFolder = qtdatavisualization
-qhp.QtDataVisualization.indexTitle = Qt Data Visualization
-qhp.QtDataVisualization.indexRoot =
-
-qhp.QtDataVisualization.filterAttributes = qtdatavisualization $QT_VERSION qtrefdoc
-qhp.QtDataVisualization.customFilters.Qt.name = QtDataVisualization $QT_VERSION
-qhp.QtDataVisualization.customFilters.Qt.filterAttributes = qtdatavisualization $QT_VERSION
-qhp.QtDataVisualization.subprojects = gettingstarted examples classes types
-qhp.QtDataVisualization.subprojects.gettingstarted.title = Getting Started
-qhp.QtDataVisualization.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
-qhp.QtDataVisualization.subprojects.gettingstarted.selectors = doc:page
-qhp.QtDataVisualization.subprojects.gettingstarted.sortPages = true
-qhp.QtDataVisualization.subprojects.examples.title = Examples
-qhp.QtDataVisualization.subprojects.examples.indexTitle = Qt Data Visualization Examples
-qhp.QtDataVisualization.subprojects.examples.selectors = doc:example
-qhp.QtDataVisualization.subprojects.examples.sortPages = true
-qhp.QtDataVisualization.subprojects.classes.title = C++ Classes
-qhp.QtDataVisualization.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
-qhp.QtDataVisualization.subprojects.classes.selectors = class
-qhp.QtDataVisualization.subprojects.classes.sortPages = true
-qhp.QtDataVisualization.subprojects.types.title = QML Types
-qhp.QtDataVisualization.subprojects.types.indexTitle = Qt Data Visualization QML Types
-qhp.QtDataVisualization.subprojects.types.selectors = qmlclass
-qhp.QtDataVisualization.subprojects.types.sortPages = true
+qhp.projects = QtDataVis3D
+
+qhp.QtDataVis3D.file = qtdatavis3d.qhp
+qhp.QtDataVis3D.namespace = org.qt-project.qtdatavisualization.$QT_VERSION_TAG
+qhp.QtDataVis3D.virtualFolder = qtdatavisualization
+qhp.QtDataVis3D.indexTitle = Qt Data Visualization
+qhp.QtDataVis3D.indexRoot =
+
+qhp.QtDataVis3D.filterAttributes = qtdatavisualization $QT_VERSION qtrefdoc
+qhp.QtDataVis3D.customFilters.Qt.name = QtDataVisualization $QT_VERSION
+qhp.QtDataVis3D.customFilters.Qt.filterAttributes = qtdatavisualization $QT_VERSION
+qhp.QtDataVis3D.subprojects = gettingstarted examples classes types
+qhp.QtDataVis3D.subprojects.gettingstarted.title = Getting Started
+qhp.QtDataVis3D.subprojects.gettingstarted.indexTitle = Qt Data Visualization Getting Started
+qhp.QtDataVis3D.subprojects.gettingstarted.selectors = doc:page
+qhp.QtDataVis3D.subprojects.gettingstarted.sortPages = true
+qhp.QtDataVis3D.subprojects.examples.title = Examples
+qhp.QtDataVis3D.subprojects.examples.indexTitle = Qt Data Visualization Examples
+qhp.QtDataVis3D.subprojects.examples.selectors = doc:example
+qhp.QtDataVis3D.subprojects.examples.sortPages = true
+qhp.QtDataVis3D.subprojects.classes.title = C++ Classes
+qhp.QtDataVis3D.subprojects.classes.indexTitle = Qt Data Visualization C++ Classes
+qhp.QtDataVis3D.subprojects.classes.selectors = class
+qhp.QtDataVis3D.subprojects.classes.sortPages = true
+qhp.QtDataVis3D.subprojects.types.title = QML Types
+qhp.QtDataVis3D.subprojects.types.indexTitle = Qt Data Visualization QML Types
+qhp.QtDataVis3D.subprojects.types.selectors = qmlclass
+qhp.QtDataVis3D.subprojects.types.sortPages = true
navigation.landingpage = Qt Data Visualization
navigation.cppclassespage = Qt Data Visualization C++ Classes
navigation.qmltypespage = Qt Data Visualization QML Types
-manifestmeta.highlighted.names = "QtDataVisualization/Textured Surface Example"
+manifestmeta.highlighted.names = "QtDataVis3D/Textured Surface Example"
diff --git a/src/datavisualization/doc/src/qtdatavisualization.qdoc b/src/datavisualization/doc/src/qtdatavisualization.qdoc
index 33448065..1f9cb60c 100644
--- a/src/datavisualization/doc/src/qtdatavisualization.qdoc
+++ b/src/datavisualization/doc/src/qtdatavisualization.qdoc
@@ -29,6 +29,8 @@
\module QtDataVisualization
\title Qt Data Visualization C++ Classes
\ingroup modules
+ \qtcmakepackage DataVisualization
+ \qtvariable datavisualization
\brief C++ classes for the Qt Data Visualization API.
diff --git a/src/datavisualization/engine/abstract3drenderer.cpp b/src/datavisualization/engine/abstract3drenderer.cpp
index 54487ba1..4a0b1c8f 100644
--- a/src/datavisualization/engine/abstract3drenderer.cpp
+++ b/src/datavisualization/engine/abstract3drenderer.cpp
@@ -749,8 +749,10 @@ void Abstract3DRenderer::updateCustomData(const QList<QCustom3DItem *> &customIt
CustomRenderItem *renderItem = m_customRenderCache.value(item);
if (!renderItem)
renderItem = addCustomItem(item);
- renderItem->setValid(true);
- renderItem->setIndex(i); // always update index, as it must match the custom item index
+ if (renderItem) {
+ renderItem->setValid(true);
+ renderItem->setIndex(i); // always update index, as it must match the custom item index
+ }
}
// Check render item cache and remove items that are not in customItems list anymore
@@ -1133,7 +1135,10 @@ CustomRenderItem *Abstract3DRenderer::addCustomItem(QCustom3DItem *item)
CustomRenderItem *newItem = new CustomRenderItem();
newItem->setRenderer(this);
newItem->setItemPointer(item); // Store pointer for render item updates
- newItem->setMesh(item->meshFile());
+ if (!newItem->setMesh(item->meshFile())) {
+ delete newItem;
+ return nullptr;
+ }
newItem->setOrigPosition(item->position());
newItem->setOrigScaling(item->scaling());
newItem->setScalingAbsolute(item->isScalingAbsolute());
diff --git a/src/datavisualization/engine/q3dcamera_p.h b/src/datavisualization/engine/q3dcamera_p.h
index 944e408e..27685a43 100644
--- a/src/datavisualization/engine/q3dcamera_p.h
+++ b/src/datavisualization/engine/q3dcamera_p.h
@@ -89,7 +89,7 @@ Q_SIGNALS:
void minYRotationChanged(float rotation);
void maxXRotationChanged(float rotation);
void maxYRotationChanged(float rotation);
- void viewMatrixChanged(QMatrix4x4 viewMatrix);
+ void viewMatrixChanged(const QMatrix4x4 &viewMatrix);
void viewMatrixAutoUpdateChanged(bool enabled);
public:
diff --git a/src/datavisualization/engine/qabstract3dgraph.cpp b/src/datavisualization/engine/qabstract3dgraph.cpp
index 6e17937e..957004f4 100644
--- a/src/datavisualization/engine/qabstract3dgraph.cpp
+++ b/src/datavisualization/engine/qabstract3dgraph.cpp
@@ -656,11 +656,6 @@ qreal QAbstract3DGraph::currentFps() const
*
* \brief Whether orthographic projection is used for displaying the graph.
*
- * If \c {true}, ortographic projection is used to create 2D graphs by replacing
- * the default input handler with one that does not allow rotating the graph and
- * by setting the camera to view the graph
- * directly from the side or from the top. Also, axis labels typically need to be rotated when
- * viewing the graph from the sides.
* Defaults to \c{false}.
* \note Shadows will be disabled when set to \c{true}.
*
diff --git a/src/datavisualization/utils/meshloader.cpp b/src/datavisualization/utils/meshloader.cpp
index 274d4a13..fa071a96 100644
--- a/src/datavisualization/utils/meshloader.cpp
+++ b/src/datavisualization/utils/meshloader.cpp
@@ -81,6 +81,10 @@ bool MeshLoader::loadOBJ(const QString &path, QList<QVector3D> &out_vertices,
QStringList set1 = lineContents.at(1).split(slashTag);
QStringList set2 = lineContents.at(2).split(slashTag);
QStringList set3 = lineContents.at(3).split(slashTag);
+ if (set1.length() < 3 || set2.length() < 3 || set3.length() < 3) {
+ qWarning("The file being loaded is missing UVs and/or normals");
+ return false;
+ }
vertexIndex[0] = set1.at(0).toUInt();
vertexIndex[1] = set2.at(0).toUInt();
vertexIndex[2] = set3.at(0).toUInt();
diff --git a/src/datavisualization/utils/objecthelper.cpp b/src/datavisualization/utils/objecthelper.cpp
index f8fa01de..87875a98 100644
--- a/src/datavisualization/utils/objecthelper.cpp
+++ b/src/datavisualization/utils/objecthelper.cpp
@@ -113,10 +113,19 @@ ObjectHelper *ObjectHelper::getObjectHelper(const Abstract3DRenderer *cacheId,
objRef = new ObjectHelperRef;
objRef->refCount = 0;
objRef->obj = new ObjectHelper(objectFile);
- objectTable->insert(objectFile, objRef);
+ if (objRef->obj->m_meshDataLoaded) {
+ objectTable->insert(objectFile, objRef);
+ } else {
+ delete objRef->obj;
+ delete objRef;
+ objRef = nullptr;
+ }
+ }
+ if (objRef) {
+ objRef->refCount++;
+ return objRef->obj;
}
- objRef->refCount++;
- return objRef->obj;
+ return nullptr;
}
void ObjectHelper::load()
@@ -140,41 +149,44 @@ void ObjectHelper::load()
QList<QVector2D> uvs;
QList<QVector3D> normals;
bool loadOk = MeshLoader::loadOBJ(m_objectFile, vertices, uvs, normals);
- if (!loadOk)
- qFatal("loading failed");
-
- // Index vertices
- VertexIndexer::indexVBO(vertices, uvs, normals, m_indices, m_indexedVertices, m_indexedUVs,
- m_indexedNormals);
-
- m_indexCount = m_indices.size();
-
- glGenBuffers(1, &m_vertexbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_vertexbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedVertices.size() * sizeof(QVector3D),
- &m_indexedVertices.at(0),
- GL_STATIC_DRAW);
- glGenBuffers(1, &m_normalbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_normalbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedNormals.size() * sizeof(QVector3D),
- &m_indexedNormals.at(0),
- GL_STATIC_DRAW);
-
- glGenBuffers(1, &m_uvbuffer);
- glBindBuffer(GL_ARRAY_BUFFER, m_uvbuffer);
- glBufferData(GL_ARRAY_BUFFER, m_indexedUVs.size() * sizeof(QVector2D),
- &m_indexedUVs.at(0), GL_STATIC_DRAW);
-
- glGenBuffers(1, &m_elementbuffer);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_elementbuffer);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GLuint),
- &m_indices.at(0), GL_STATIC_DRAW);
-
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- m_meshDataLoaded = true;
+ if (!loadOk) {
+ qCritical() << "Loading" << m_objectFile << "failed";
+ m_meshDataLoaded = false;
+ } else {
+ // Index vertices
+ VertexIndexer::indexVBO(vertices, uvs, normals, m_indices, m_indexedVertices, m_indexedUVs,
+ m_indexedNormals);
+
+ m_indexCount = m_indices.size();
+
+ glGenBuffers(1, &m_vertexbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_vertexbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedVertices.size() * sizeof(QVector3D),
+ &m_indexedVertices.at(0),
+ GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_normalbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_normalbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedNormals.size() * sizeof(QVector3D),
+ &m_indexedNormals.at(0),
+ GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_uvbuffer);
+ glBindBuffer(GL_ARRAY_BUFFER, m_uvbuffer);
+ glBufferData(GL_ARRAY_BUFFER, m_indexedUVs.size() * sizeof(QVector2D),
+ &m_indexedUVs.at(0), GL_STATIC_DRAW);
+
+ glGenBuffers(1, &m_elementbuffer);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_elementbuffer);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GLuint),
+ &m_indices.at(0), GL_STATIC_DRAW);
+
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
+
+ m_meshDataLoaded = true;
+ }
}
QT_END_NAMESPACE
diff --git a/src/datavisualization/utils/qutils.h b/src/datavisualization/utils/qutils.h
index dc72835e..6a35ff34 100644
--- a/src/datavisualization/utils/qutils.h
+++ b/src/datavisualization/utils/qutils.h
@@ -38,9 +38,7 @@
QT_BEGIN_NAMESPACE
-#ifdef Q_OS_MACOS
-#pragma clang diagnostic ignored "-Wunused-function"
-#endif
+[[maybe_unused]]
static inline QSurfaceFormat qDefaultSurfaceFormat(bool antialias)
{
bool isES = false;
diff --git a/src/datavisualizationqml2/CMakeLists.txt b/src/datavisualizationqml2/CMakeLists.txt
index fc7ff7d0..a752306a 100644
--- a/src/datavisualizationqml2/CMakeLists.txt
+++ b/src/datavisualizationqml2/CMakeLists.txt
@@ -60,7 +60,7 @@ qt_internal_add_qml_module(DataVisualizationQml2
${qml_files}
RESOURCES
${resources}
- PUBLIC_LIBRARIES
+ LIBRARIES
Qt::Core
Qt::Gui
Qt::OpenGL
diff --git a/src/datavisualizationqml2/abstractdeclarative.cpp b/src/datavisualizationqml2/abstractdeclarative.cpp
index dbbd803d..890ea324 100644
--- a/src/datavisualizationqml2/abstractdeclarative.cpp
+++ b/src/datavisualizationqml2/abstractdeclarative.cpp
@@ -66,8 +66,11 @@ AbstractDeclarative::AbstractDeclarative(QQuickItem *parent) :
connect(this, &QQuickItem::windowChanged, this, &AbstractDeclarative::handleWindowChanged);
// Set contents to false in case we are in qml designer to make component look nice
- m_runningInDesigner = QGuiApplication::applicationDisplayName() == "Qml2Puppet";
+ m_runningInDesigner = QGuiApplication::applicationDisplayName() == QLatin1String("Qml2Puppet");
setFlag(ItemHasContents, !m_runningInDesigner);
+
+ // Accept touchevents
+ setAcceptTouchEvents(true);
}
AbstractDeclarative::~AbstractDeclarative()
diff --git a/src/datavisualizationqml2/colorgradient_p.h b/src/datavisualizationqml2/colorgradient_p.h
index 3e5162a7..bdec6469 100644
--- a/src/datavisualizationqml2/colorgradient_p.h
+++ b/src/datavisualizationqml2/colorgradient_p.h
@@ -64,7 +64,7 @@ public:
Q_SIGNALS:
void positionChanged(qreal position);
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
void updateGradient();
diff --git a/src/datavisualizationqml2/declarativebars.cpp b/src/datavisualizationqml2/declarativebars.cpp
index fe90e159..8ac2888c 100644
--- a/src/datavisualizationqml2/declarativebars.cpp
+++ b/src/datavisualizationqml2/declarativebars.cpp
@@ -112,7 +112,7 @@ float DeclarativeBars::barThickness() const
return m_barsController->barThickness();
}
-void DeclarativeBars::setBarSpacing(QSizeF spacing)
+void DeclarativeBars::setBarSpacing(const QSizeF &spacing)
{
if (spacing != barSpacing()) {
m_barsController->setBarSpecs(GLfloat(barThickness()), spacing, isBarSpacingRelative());
diff --git a/src/datavisualizationqml2/declarativebars_p.h b/src/datavisualizationqml2/declarativebars_p.h
index 97359ede..fb75a40b 100644
--- a/src/datavisualizationqml2/declarativebars_p.h
+++ b/src/datavisualizationqml2/declarativebars_p.h
@@ -79,7 +79,7 @@ public:
void setBarThickness(float thicknessRatio);
float barThickness() const;
- void setBarSpacing(QSizeF spacing);
+ void setBarSpacing(const QSizeF &spacing);
QSizeF barSpacing() const;
void setBarSpacingRelative(bool relative);
@@ -111,9 +111,9 @@ Q_SIGNALS:
void columnAxisChanged(QCategory3DAxis *axis);
void multiSeriesUniformChanged(bool uniform);
void barThicknessChanged(float thicknessRatio);
- void barSpacingChanged(QSizeF spacing);
+ void barSpacingChanged(const QSizeF &spacing);
void barSpacingRelativeChanged(bool relative);
- void meshFileNameChanged(QString filename);
+ void meshFileNameChanged(const QString &filename);
void primarySeriesChanged(QBar3DSeries *series);
void selectedSeriesChanged(QBar3DSeries *series);
Q_REVISION(1) void floorLevelChanged(float level);
diff --git a/src/datavisualizationqml2/declarativecolor_p.h b/src/datavisualizationqml2/declarativecolor_p.h
index 54be5397..c4e3a30d 100644
--- a/src/datavisualizationqml2/declarativecolor_p.h
+++ b/src/datavisualizationqml2/declarativecolor_p.h
@@ -57,7 +57,7 @@ public:
QColor color() const;
Q_SIGNALS:
- void colorChanged(QColor color);
+ void colorChanged(const QColor &color);
private:
QColor m_color;
diff --git a/src/datavisualizationqml2/declarativescene_p.h b/src/datavisualizationqml2/declarativescene_p.h
index 70e3da82..5fd8ae22 100644
--- a/src/datavisualizationqml2/declarativescene_p.h
+++ b/src/datavisualizationqml2/declarativescene_p.h
@@ -63,7 +63,7 @@ public:
QPoint invalidSelectionPoint() const;
Q_SIGNALS:
- void selectionQueryPositionChanged(const QPointF position);
+ void selectionQueryPositionChanged(const QPointF &position);
};
QT_END_NAMESPACE
diff --git a/src/datavisualizationqml2/declarativeseries_p.h b/src/datavisualizationqml2/declarativeseries_p.h
index 5f5a535a..18631b85 100644
--- a/src/datavisualizationqml2/declarativeseries_p.h
+++ b/src/datavisualizationqml2/declarativeseries_p.h
@@ -93,7 +93,7 @@ public Q_SLOTS:
void handleMultiHighlightGradientUpdate();
Q_SIGNALS:
- void selectedBarChanged(QPointF position);
+ void selectedBarChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
@@ -185,7 +185,7 @@ public Q_SLOTS:
void handleMultiHighlightGradientUpdate();
Q_SIGNALS:
- void selectedPointChanged(QPointF position);
+ void selectedPointChanged(const QPointF &position);
void baseGradientChanged(ColorGradient *gradient);
void singleHighlightGradientChanged(ColorGradient *gradient);
void multiHighlightGradientChanged(ColorGradient *gradient);
diff --git a/tests/auto/cpptest/CMakeLists.txt b/tests/auto/cpptest/CMakeLists.txt
index 7b6ef00b..bed23651 100644
--- a/tests/auto/cpptest/CMakeLists.txt
+++ b/tests/auto/cpptest/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory(q3dscatter-series)
add_subdirectory(q3dsurface)
add_subdirectory(q3dsurface-proxy)
add_subdirectory(q3dsurface-modelproxy)
+add_subdirectory(q3dsurface-modelproxy-nan)
add_subdirectory(q3dsurface-heightproxy)
add_subdirectory(q3dsurface-series)
add_subdirectory(q3daxis-category)
diff --git a/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt b/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt
new file mode 100644
index 00000000..8125bd21
--- /dev/null
+++ b/tests/auto/cpptest/q3dsurface-modelproxy-nan/CMakeLists.txt
@@ -0,0 +1,11 @@
+qt_internal_add_test(q3dsurface-modelproxy-nan
+ SOURCES
+ tst_proxy.cpp
+ INCLUDE_DIRECTORIES
+ ../common
+ PUBLIC_LIBRARIES
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Widgets
+ Qt::DataVisualization
+)
diff --git a/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp b/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp
new file mode 100644
index 00000000..53b9ac39
--- /dev/null
+++ b/tests/auto/cpptest/q3dsurface-modelproxy-nan/tst_proxy.cpp
@@ -0,0 +1,292 @@
+/****************************************************************************
+**
+** Copyright (C) 2021 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+
+#include <QtDataVisualization/QItemModelSurfaceDataProxy>
+#include <QtDataVisualization/Q3DSurface>
+
+#include "cpptestutil.h"
+
+class tst_proxy: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+ void dataContainingNaNFirstRow();
+ void dataContainingNaNLastRow();
+ void dataContainingNaNFirstLastRow();
+};
+
+void tst_proxy::initTestCase()
+{
+}
+
+void tst_proxy::cleanupTestCase()
+{
+}
+
+void tst_proxy::init()
+{
+}
+
+void tst_proxy::cleanup()
+{
+}
+
+void tst_proxy::dataContainingNaNFirstRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int missingRow = 0;
+
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D((i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ delete graph;
+
+}
+
+void tst_proxy::dataContainingNaNLastRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int missingRow = size - 1;
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D((i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ (i == missingRow) ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+ delete graph;
+}
+
+void tst_proxy::dataContainingNaNFirstLastRow()
+{
+ if (!CpptestUtil::isOpenGLSupported())
+ QSKIP("OpenGL not supported on this platform");
+
+ const int size = 10;
+ const int rowFirst = 0;
+ const int rowLast = size - 1;
+ QItemModelSurfaceDataProxy *proxy = new QItemModelSurfaceDataProxy();
+ QSurface3DSeries *series = new QSurface3DSeries(proxy);
+ Q3DSurface *graph = new Q3DSurface();
+ graph->addSeries(series);
+
+ // X
+ QSurfaceDataArray *array = new QSurfaceDataArray();
+ array->reserve(size);
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(i),
+ qSin(static_cast<float>(i)), static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Y
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : qSin(static_cast<float>(i)),
+ static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+
+ // Z
+ for (int i = 0; i < size; i++) {
+ bool missingRow = (i == rowFirst || i == rowLast);
+ QSurfaceDataRow *row = new QSurfaceDataRow(size);
+ for (int j = 0; j < size; j++) {
+ (*row)[j].setPosition(QVector3D(static_cast<float>(i),
+ qSin(static_cast<float>(i)),
+ missingRow ? std::numeric_limits<float>::quiet_NaN()
+ : static_cast<float>(j)));
+ }
+ *array << row;
+ }
+ proxy->resetArray(array);
+ QVERIFY(!qIsNaN(graph->axisX()->min()));
+ QVERIFY(!qIsNaN(graph->axisX()->max()));
+ QVERIFY(!qIsNaN(graph->axisY()->min()));
+ QVERIFY(!qIsNaN(graph->axisY()->max()));
+ QVERIFY(!qIsNaN(graph->axisZ()->min()));
+ QVERIFY(!qIsNaN(graph->axisZ()->max()));
+ delete graph;
+}
+
+QTEST_MAIN(tst_proxy)
+#include "tst_proxy.moc"
diff --git a/tests/auto/qmltest/CMakeLists.txt b/tests/auto/qmltest/CMakeLists.txt
index 8ab433b4..3a53e40f 100644
--- a/tests/auto/qmltest/CMakeLists.txt
+++ b/tests/auto/qmltest/CMakeLists.txt
@@ -1,9 +1,15 @@
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ *)
+list(APPEND test_data ${test_data_glob})
+
qt_internal_add_test(tst_qmltest
QMLTEST
SOURCES
tst_qmltest.cpp
PUBLIC_LIBRARIES
Qt::Gui
+ TESTDATA ${test_data}
)
set(qmltest_resource_files
diff --git a/tests/auto/qmltest/tst_qmltest.cpp b/tests/auto/qmltest/tst_qmltest.cpp
index 746430c5..cde45b0b 100644
--- a/tests/auto/qmltest/tst_qmltest.cpp
+++ b/tests/auto/qmltest/tst_qmltest.cpp
@@ -28,13 +28,33 @@
****************************************************************************/
#include <QtQuickTest/quicktest.h>
+
+class tst_qmltest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void skiptest() { QSKIP("This test will fail, skipping."); };
+};
+
int main(int argc, char **argv)
{
if (!qEnvironmentVariableIsEmpty("QEMU_LD_PREFIX")) {
- qWarning("This test will fail due to QEMU emulation shortcomings.");
- return 0;
+ qWarning("This test would fail due to QEMU emulation shortcomings, so it will be skipped.");
+ tst_qmltest skip;
+ return QTest::qExec(&skip, argc, argv);
}
+#ifdef Q_OS_QNX
+ if (qEnvironmentVariable("QTEST_ENVIRONMENT").split(' ').contains("ci") &&
+ qEnvironmentVariable("QT_QPA_PLATFORM").split(' ').contains("offscreen")
+ ) {
+ qWarning("This test would fail on CI QNX QEMU without OpenGL support, so it will be skipped.");
+ tst_qmltest skip;
+ return QTest::qExec(&skip, argc, argv);
+ }
+#endif
qputenv("QSG_RHI_BACKEND", "opengl");
QTEST_SET_MAIN_SOURCE_PATH
return quick_test_main(argc, argv, "qmltest", QUICK_TEST_SOURCE_DIR);
}
+
+#include "tst_qmltest.moc"
diff --git a/tests/manual/barstest/CMakeLists.txt b/tests/manual/barstest/CMakeLists.txt
index 8c4c9295..2d268023 100644
--- a/tests/manual/barstest/CMakeLists.txt
+++ b/tests/manual/barstest/CMakeLists.txt
@@ -7,6 +7,8 @@ qt_internal_add_manual_test(barstest
GUI
SOURCES
chart.cpp chart.h
+ sliderwrapper.cpp sliderwrapper.h
+ buttonwrapper.cpp buttonwrapper.h
custominputhandler.cpp custominputhandler.h
main.cpp
)
diff --git a/tests/manual/barstest/buttonwrapper.cpp b/tests/manual/barstest/buttonwrapper.cpp
new file mode 100644
index 00000000..e1098fe9
--- /dev/null
+++ b/tests/manual/barstest/buttonwrapper.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "buttonwrapper.h"
+#include <QPushButton>
+
+ButtonWrapper::ButtonWrapper(QPushButton *button)
+{
+ m_button = button;
+}
+
+void ButtonWrapper::setEnabled(int state)
+{
+ m_button->setEnabled(state);
+}
diff --git a/tests/manual/barstest/buttonwrapper.h b/tests/manual/barstest/buttonwrapper.h
new file mode 100644
index 00000000..f3f40c7b
--- /dev/null
+++ b/tests/manual/barstest/buttonwrapper.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BUTTONWRAPPER_H
+#define BUTTONWRAPPER_H
+
+#include <QObject>
+class QPushButton;
+
+class ButtonWrapper : public QObject
+{
+ Q_OBJECT
+public:
+ ButtonWrapper(QPushButton *button);
+
+public Q_SLOTS:
+ void setEnabled(int state);
+
+private:
+ QPushButton *m_button;
+};
+
+#endif // BUTTONWRAPPER_H
diff --git a/tests/manual/barstest/chart.cpp b/tests/manual/barstest/chart.cpp
index 7d878046..b139629a 100644
--- a/tests/manual/barstest/chart.cpp
+++ b/tests/manual/barstest/chart.cpp
@@ -266,7 +266,7 @@ void GraphModifier::start()
restart(false);
}
-void GraphModifier::restart(bool dynamicData)
+void GraphModifier::restart(int dynamicData)
{
m_static = !dynamicData;
@@ -341,7 +341,7 @@ void GraphModifier::releaseSeries()
m_graph->removeSeries(series);
}
-void GraphModifier::flipViews()
+void GraphModifier::flipViews(bool checked)
{
m_graph->scene()->setSecondarySubviewOnTop(!m_graph->scene()->isSecondarySubviewOnTop());
qDebug() << "secondary subview on top:" << m_graph->scene()->isSecondarySubviewOnTop();
@@ -733,7 +733,7 @@ void GraphModifier::handleSelectionChange(const QPoint &position)
qDebug() << "Selected bar position:" << position << "series:" << index;
}
-void GraphModifier::setUseNullInputHandler(bool useNull)
+void GraphModifier::setUseNullInputHandler(int useNull)
{
qDebug() << "setUseNullInputHandler" << useNull;
if (m_useNullInputHandler == useNull)
@@ -826,7 +826,7 @@ QBarDataArray *GraphModifier::makeDummyData()
}
// Executes one step of the primary series test
-void GraphModifier::primarySeriesTest()
+void GraphModifier::primarySeriesTest(bool checked)
{
static int nextStep = 0;
@@ -1048,7 +1048,7 @@ void GraphModifier::insertRemoveTestToggle()
}
}
-void GraphModifier::toggleRotation()
+void GraphModifier::toggleRotation(bool checked)
{
if (m_rotationTimer.isActive())
m_rotationTimer.stop();
@@ -1056,7 +1056,7 @@ void GraphModifier::toggleRotation()
m_rotationTimer.start(20);
}
-void GraphModifier::useLogAxis()
+void GraphModifier::useLogAxis(bool checked)
{
static int counter = -1;
static QLogValue3DAxisFormatter *logFormatter = 0;
@@ -1212,7 +1212,7 @@ void GraphModifier::addRemoveSeries()
counter++;
}
-void GraphModifier::testItemAndRowChanges()
+void GraphModifier::testItemAndRowChanges(bool checked)
{
static int counter = 0;
const int rowCount = 12;
@@ -1602,7 +1602,7 @@ void GraphModifier::rotateY(int rotation)
m_graph->scene()->activeCamera()->setCameraPosition(m_xRotation, m_yRotation);
}
-void GraphModifier::setFpsMeasurement(bool enable)
+void GraphModifier::setFpsMeasurement(int enable)
{
m_graph->setMeasureFps(enable);
}
@@ -1659,7 +1659,7 @@ void GraphModifier::setMaxY(int max)
m_maxval = max;
}
-void GraphModifier::changeColorStyle()
+void GraphModifier::changeColorStyle(bool checked)
{
int style = m_graph->activeTheme()->colorStyle();
@@ -1669,7 +1669,7 @@ void GraphModifier::changeColorStyle()
m_graph->activeTheme()->setColorStyle(Q3DTheme::ColorStyle(style));
}
-void GraphModifier::useOwnTheme()
+void GraphModifier::useOwnTheme(bool checked)
{
// Own theme is persistent, any changes to it via UI will be remembered
if (!m_ownTheme) {
@@ -1708,7 +1708,7 @@ void GraphModifier::changeBaseColor(const QColor &color)
m_graph->activeTheme()->setBaseColors(colors);
}
-void GraphModifier::setGradient()
+void GraphModifier::setGradient(bool checked)
{
QLinearGradient barGradient(0, 0, 1, 100);
barGradient.setColorAt(1.0, Qt::lightGray);
@@ -1748,7 +1748,7 @@ void GraphModifier::toggleMultiseriesScaling()
m_graph->setMultiSeriesUniform(!m_graph->isMultiSeriesUniform());
}
-void GraphModifier::setReflection(bool enabled)
+void GraphModifier::setReflection(int enabled)
{
m_graph->setReflection(enabled);
}
diff --git a/tests/manual/barstest/chart.h b/tests/manual/barstest/chart.h
index 9a4cd60e..b7dcdeb7 100644
--- a/tests/manual/barstest/chart.h
+++ b/tests/manual/barstest/chart.h
@@ -68,7 +68,7 @@ public:
void changeFontSize(int fontsize);
void rotateX(int rotation);
void rotateY(int rotation);
- void setFpsMeasurement(bool enable);
+ void setFpsMeasurement(int state);
void setBackgroundEnabled(int enabled);
void setGridEnabled(int enabled);
void setSpecsRatio(int barwidth);
@@ -82,43 +82,43 @@ public:
void setMinY(int min);
void setMaxY(int max);
void start();
- void restart(bool dynamicData);
+ void restart(int dynamicData);
void selectBar();
void swapAxis();
void releaseAxes();
void releaseSeries();
void createMassiveArray();
- void useOwnTheme();
+ void useOwnTheme(bool checked);
void changeBaseColor(const QColor &color);
- void changeColorStyle();
+ void changeColorStyle(bool checked);
void showFiveSeries();
QBarDataArray *makeDummyData();
- void primarySeriesTest();
+ void primarySeriesTest(bool checked);
void insertRemoveTestToggle();
- void toggleRotation();
- void useLogAxis();
+ void toggleRotation(bool checked);
+ void useLogAxis(bool checked);
void changeValueAxisFormat(const QString & text);
void changeLogBase(const QString & text);
void setFpsLabel(QLabel *fpsLabel) { m_fpsLabel = fpsLabel; }
void addRemoveSeries();
- void testItemAndRowChanges();
+ void testItemAndRowChanges(bool checked);
void reverseValueAxis(int enabled);
void setInputHandlerRotationEnabled(int enabled);
void setInputHandlerZoomEnabled(int enabled);
void setInputHandlerSelectionEnabled(int enabled);
void setInputHandlerZoomAtTargetEnabled(int enabled);
- void setReflection(bool enabled);
+ void setReflection(int enabled);
void setReflectivity(int value);
void toggleCustomItem();
public Q_SLOTS:
- void flipViews();
- void setGradient();
+ void flipViews(bool checked);
+ void setGradient(bool checked);
void toggleMultiseriesScaling();
void changeShadowQuality(int quality);
void shadowQualityUpdatedByVisual(QAbstract3DGraph::ShadowQuality shadowQuality);
void handleSelectionChange(const QPoint &position);
- void setUseNullInputHandler(bool useNull);
+ void setUseNullInputHandler(int useNull);
void changeValueAxisSegments(int value);
void handleRowAxisChanged(QCategory3DAxis *axis);
@@ -150,7 +150,7 @@ private:
int m_rowCount;
float m_xRotation;
float m_yRotation;
- bool m_static;
+ int m_static;
float m_barSpacingX;
float m_barSpacingZ;
int m_fontSize;
diff --git a/tests/manual/barstest/main.cpp b/tests/manual/barstest/main.cpp
index a0379fd7..1eddca65 100644
--- a/tests/manual/barstest/main.cpp
+++ b/tests/manual/barstest/main.cpp
@@ -28,6 +28,8 @@
****************************************************************************/
#include "chart.h"
+#include "sliderwrapper.h"
+#include "buttonwrapper.h"
#include <QApplication>
#include <QWidget>
@@ -595,12 +597,14 @@ int main(int argc, char **argv)
QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, modifier,
&GraphModifier::setUseNullInputHandler);
- QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderX,
- &QSlider::setEnabled);
+ SliderWrapper *rotationSliderWrapperX = new SliderWrapper(rotationSliderX);
+ SliderWrapper *rotationSliderWrapperY = new SliderWrapper(rotationSliderY);
+ QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderWrapperX,
+ &SliderWrapper::setEnabled);
QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderX,
&QSlider::setValue);
- QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderY,
- &QSlider::setEnabled);
+ QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderWrapperY,
+ &SliderWrapper::setEnabled);
QObject::connect(rotationCheckBox, &QCheckBox::stateChanged, rotationSliderY,
&QSlider::setValue);
@@ -615,40 +619,59 @@ int main(int argc, char **argv)
QObject::connect(toggleCustomItemButton, &QPushButton::clicked, modifier,
&GraphModifier::toggleCustomItem);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addDataButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addMultiDataButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertDataButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertMultiDataButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeSingleDataButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowsButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowsButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, massiveArrayButton,
- &QPushButton::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderX,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderZ,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderX,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderZ,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderY,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, maxSliderY,
- &QSlider::setEnabled);
- QObject::connect(staticCheckBox, &QCheckBox::stateChanged, swapAxisButton,
- &QSlider::setEnabled);
+ ButtonWrapper *addDataButtonWrapper = new ButtonWrapper(addDataButton);
+ ButtonWrapper *addMultiDataButtonWrapper = new ButtonWrapper(addMultiDataButton);
+ ButtonWrapper *insertDataButtonWrapper = new ButtonWrapper(insertDataButton);
+ ButtonWrapper *insertMultiDataButtonWrapper = new ButtonWrapper(insertMultiDataButton);
+ ButtonWrapper *changeSingleDataButtonWrapper = new ButtonWrapper(changeSingleDataButton);
+ ButtonWrapper *changeRowButtonWrapper = new ButtonWrapper(changeRowButton);
+ ButtonWrapper *changeRowsButtonWrapper = new ButtonWrapper(changeRowsButton);
+ ButtonWrapper *massiveArrayButtonWrapper = new ButtonWrapper(massiveArrayButton);
+ ButtonWrapper *removeRowButtonWrapper = new ButtonWrapper(removeRowButton);
+ ButtonWrapper *removeRowsButtonWrapper = new ButtonWrapper(removeRowsButton);
+
+ SliderWrapper *sampleSliderWrapperX = new SliderWrapper(sampleSliderX);
+ SliderWrapper *sampleSliderWrapperZ = new SliderWrapper(sampleSliderZ);
+ SliderWrapper *minSliderWrapperX = new SliderWrapper(minSliderX);
+ SliderWrapper *minSliderWrapperZ = new SliderWrapper(minSliderZ);
+ SliderWrapper *minSliderWrapperY = new SliderWrapper(minSliderY);
+ SliderWrapper *maxSliderWrapperY = new SliderWrapper(maxSliderY);
+ ButtonWrapper *swapAxisButtonWrapper = new ButtonWrapper(swapAxisButton);
+
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addDataButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, addMultiDataButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertDataButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, insertMultiDataButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeSingleDataButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, changeRowsButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, removeRowsButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, massiveArrayButtonWrapper,
+ &ButtonWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderWrapperX,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, sampleSliderWrapperZ,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperX,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperZ,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, minSliderWrapperY,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, maxSliderWrapperY,
+ &SliderWrapper::setEnabled);
+ QObject::connect(staticCheckBox, &QCheckBox::stateChanged, swapAxisButtonWrapper,
+ &ButtonWrapper::setEnabled);
QObject::connect(staticCheckBox, &QCheckBox::stateChanged, modifier, &GraphModifier::restart);
modifier->setFpsLabel(fpsLabel);
diff --git a/tests/manual/barstest/sliderwrapper.cpp b/tests/manual/barstest/sliderwrapper.cpp
new file mode 100644
index 00000000..652f766c
--- /dev/null
+++ b/tests/manual/barstest/sliderwrapper.cpp
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "sliderwrapper.h"
+
+SliderWrapper::SliderWrapper(QSlider *slider)
+{
+ m_slider = slider;
+}
+
+void SliderWrapper::setEnabled(int enabled)
+{
+ m_slider->setEnabled(enabled);
+}
diff --git a/tests/manual/barstest/sliderwrapper.h b/tests/manual/barstest/sliderwrapper.h
new file mode 100644
index 00000000..38136490
--- /dev/null
+++ b/tests/manual/barstest/sliderwrapper.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef SLIDERWRAPPER_H
+#define SLIDERWRAPPER_H
+#include <QObject>
+#include <QSlider>
+
+class SliderWrapper : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit SliderWrapper(QSlider *slider);
+
+public Q_SLOTS:
+ void setEnabled(int enabled);
+
+private:
+ QSlider *m_slider = nullptr;
+
+};
+
+#endif // SLIDERWRAPPER_H
diff --git a/tests/manual/directional/scatterdatamodifier.h b/tests/manual/directional/scatterdatamodifier.h
index 7ca463c3..3120b6f6 100644
--- a/tests/manual/directional/scatterdatamodifier.h
+++ b/tests/manual/directional/scatterdatamodifier.h
@@ -65,7 +65,7 @@ Q_SIGNALS:
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
void shadowQualityChanged(int quality);
- void fontChanged(QFont font);
+ void fontChanged(const QFont &font);
private:
Q3DScatter *m_graph;
diff --git a/tests/manual/scattertest/scatterchart.cpp b/tests/manual/scattertest/scatterchart.cpp
index ca8414ac..7f056aa5 100644
--- a/tests/manual/scattertest/scatterchart.cpp
+++ b/tests/manual/scattertest/scatterchart.cpp
@@ -244,7 +244,7 @@ void ScatterDataModifier::massiveTestAppendAndScroll()
m_chart->axisZ()->setRange(min, max);
}
-void ScatterDataModifier::setFpsMeasurement(bool enable)
+void ScatterDataModifier::setFpsMeasurement(int enable)
{
m_chart->setMeasureFps(enable);
}
@@ -973,14 +973,14 @@ void ScatterDataModifier::changeRadialLabelOffset(int offset)
m_chart->setRadialLabelOffset(float(offset) / 100.0f);
}
-void ScatterDataModifier::toggleAxisTitleVisibility(bool enabled)
+void ScatterDataModifier::toggleAxisTitleVisibility(int enabled)
{
m_chart->axisX()->setTitleVisible(enabled);
m_chart->axisY()->setTitleVisible(enabled);
m_chart->axisZ()->setTitleVisible(enabled);
}
-void ScatterDataModifier::toggleAxisTitleFixed(bool enabled)
+void ScatterDataModifier::toggleAxisTitleFixed(int enabled)
{
m_chart->axisX()->setTitleFixed(enabled);
m_chart->axisY()->setTitleFixed(enabled);
@@ -1009,12 +1009,12 @@ void ScatterDataModifier::renderToImage()
}
}
-void ScatterDataModifier::togglePolar(bool enable)
+void ScatterDataModifier::togglePolar(int enable)
{
m_chart->setPolar(enable);
}
-void ScatterDataModifier::toggleStatic(bool enable)
+void ScatterDataModifier::toggleStatic(int enable)
{
if (enable)
m_chart->setOptimizationHints(QAbstract3DGraph::OptimizationStatic);
@@ -1022,7 +1022,7 @@ void ScatterDataModifier::toggleStatic(bool enable)
m_chart->setOptimizationHints(QAbstract3DGraph::OptimizationDefault);
}
-void ScatterDataModifier::toggleOrtho(bool enable)
+void ScatterDataModifier::toggleOrtho(int enable)
{
m_chart->setOrthoProjection(enable);
}
diff --git a/tests/manual/scattertest/scatterchart.h b/tests/manual/scattertest/scatterchart.h
index 43fabeac..bf1f060c 100644
--- a/tests/manual/scattertest/scatterchart.h
+++ b/tests/manual/scattertest/scatterchart.h
@@ -67,7 +67,7 @@ public:
void massiveDataTest();
void massiveTestScroll();
void massiveTestAppendAndScroll();
- void setFpsMeasurement(bool enable);
+ void setFpsMeasurement(int enable);
void setFpsLabel(QLabel *fpsLabel) { m_fpsLabel = fpsLabel; }
void testItemChanges();
void testAxisReverse();
@@ -101,12 +101,12 @@ public Q_SLOTS:
void handleFpsChange(qreal fps);
void changeLabelRotation(int rotation);
void changeRadialLabelOffset(int offset);
- void toggleAxisTitleVisibility(bool enabled);
- void toggleAxisTitleFixed(bool enabled);
+ void toggleAxisTitleVisibility(int enabled);
+ void toggleAxisTitleFixed(int enabled);
void renderToImage();
- void togglePolar(bool enable);
- void toggleStatic(bool enable);
- void toggleOrtho(bool enable);
+ void togglePolar(int enable);
+ void toggleStatic(int enable);
+ void toggleOrtho(int enable);
void setCameraTargetX(int value);
void setCameraTargetY(int value);
void setCameraTargetZ(int value);
diff --git a/tests/manual/surfacetest/CMakeLists.txt b/tests/manual/surfacetest/CMakeLists.txt
index c59f9488..a1e68d25 100644
--- a/tests/manual/surfacetest/CMakeLists.txt
+++ b/tests/manual/surfacetest/CMakeLists.txt
@@ -6,6 +6,8 @@ set(CMAKE_AUTOUIC ON)
qt_internal_add_manual_test(surfacetest
GUI
SOURCES
+ buttonwrapper.cpp buttonwrapper.h
+ checkboxwrapper.cpp checkboxwrapper.h
graphmodifier.cpp graphmodifier.h
main.cpp
)
diff --git a/tests/manual/surfacetest/buttonwrapper.cpp b/tests/manual/surfacetest/buttonwrapper.cpp
new file mode 100644
index 00000000..e1098fe9
--- /dev/null
+++ b/tests/manual/surfacetest/buttonwrapper.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "buttonwrapper.h"
+#include <QPushButton>
+
+ButtonWrapper::ButtonWrapper(QPushButton *button)
+{
+ m_button = button;
+}
+
+void ButtonWrapper::setEnabled(int state)
+{
+ m_button->setEnabled(state);
+}
diff --git a/tests/manual/surfacetest/buttonwrapper.h b/tests/manual/surfacetest/buttonwrapper.h
new file mode 100644
index 00000000..f3f40c7b
--- /dev/null
+++ b/tests/manual/surfacetest/buttonwrapper.h
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef BUTTONWRAPPER_H
+#define BUTTONWRAPPER_H
+
+#include <QObject>
+class QPushButton;
+
+class ButtonWrapper : public QObject
+{
+ Q_OBJECT
+public:
+ ButtonWrapper(QPushButton *button);
+
+public Q_SLOTS:
+ void setEnabled(int state);
+
+private:
+ QPushButton *m_button;
+};
+
+#endif // BUTTONWRAPPER_H
diff --git a/tests/manual/surfacetest/checkboxwrapper.cpp b/tests/manual/surfacetest/checkboxwrapper.cpp
new file mode 100644
index 00000000..3ee7548b
--- /dev/null
+++ b/tests/manual/surfacetest/checkboxwrapper.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "checkboxwrapper.h"
+#include <QCheckBox>
+
+CheckBoxWrapper::CheckBoxWrapper(QCheckBox *cb)
+{
+ m_checkbox = cb;
+}
+
+void CheckBoxWrapper::setEnabled(int enabled)
+{
+ m_checkbox->setEnabled(enabled);
+}
diff --git a/tests/manual/surfacetest/checkboxwrapper.h b/tests/manual/surfacetest/checkboxwrapper.h
new file mode 100644
index 00000000..d0dda7ba
--- /dev/null
+++ b/tests/manual/surfacetest/checkboxwrapper.h
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Data Visualization module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef CHECKBOXWRAPPER_H
+#define CHECKBOXWRAPPER_H
+
+#include <QObject>
+
+class QCheckBox;
+
+class CheckBoxWrapper : public QObject
+{
+ Q_OBJECT
+public:
+ explicit CheckBoxWrapper(QCheckBox *cb);
+
+public Q_SLOTS:
+ void setEnabled(int enabled);
+
+private:
+ QCheckBox *m_checkbox;
+};
+
+#endif // CHECKBOXWRAPPER_H
diff --git a/tests/manual/surfacetest/graphmodifier.cpp b/tests/manual/surfacetest/graphmodifier.cpp
index 76c5afb9..01999ee0 100644
--- a/tests/manual/surfacetest/graphmodifier.cpp
+++ b/tests/manual/surfacetest/graphmodifier.cpp
@@ -193,7 +193,7 @@ void GraphModifier::fillSeries()
m_multiseries[3]->dataProxy()->resetArray(dataArray4);
}
-void GraphModifier::toggleSeries1(bool enabled)
+void GraphModifier::toggleSeries1(int enabled)
{
qDebug() << __FUNCTION__ << " enabled = " << enabled;
@@ -204,7 +204,7 @@ void GraphModifier::toggleSeries1(bool enabled)
}
}
-void GraphModifier::toggleSeries2(bool enabled)
+void GraphModifier::toggleSeries2(int enabled)
{
qDebug() << __FUNCTION__ << " enabled = " << enabled;
@@ -215,7 +215,7 @@ void GraphModifier::toggleSeries2(bool enabled)
}
}
-void GraphModifier::toggleSeries3(bool enabled)
+void GraphModifier::toggleSeries3(int enabled)
{
qDebug() << __FUNCTION__ << " enabled = " << enabled;
@@ -226,7 +226,7 @@ void GraphModifier::toggleSeries3(bool enabled)
}
}
-void GraphModifier::toggleSeries4(bool enabled)
+void GraphModifier::toggleSeries4(int enabled)
{
qDebug() << __FUNCTION__ << " enabled = " << enabled;
@@ -237,7 +237,7 @@ void GraphModifier::toggleSeries4(bool enabled)
}
}
-void GraphModifier::toggleSmooth(bool enabled)
+void GraphModifier::toggleSmooth(int enabled)
{
qDebug() << "GraphModifier::toggleSmooth " << enabled;
m_theSeries->setFlatShadingEnabled(enabled);
@@ -246,7 +246,7 @@ void GraphModifier::toggleSmooth(bool enabled)
#endif
}
-void GraphModifier::toggleSurfaceGrid(bool enable)
+void GraphModifier::toggleSurfaceGrid(int enable)
{
qDebug() << "GraphModifier::toggleSurfaceGrid" << enable;
if (enable)
@@ -260,7 +260,7 @@ void GraphModifier::toggleSurfaceGrid(bool enable)
#endif
}
-void GraphModifier::toggleSurface(bool enable)
+void GraphModifier::toggleSurface(int enable)
{
qDebug() << "GraphModifier::toggleSurface" << enable;
if (enable)
@@ -274,7 +274,7 @@ void GraphModifier::toggleSurface(bool enable)
#endif
}
-void GraphModifier::toggleSeriesVisible(bool enable)
+void GraphModifier::toggleSeriesVisible(int enable)
{
m_theSeries->setVisible(enable);
#ifdef MULTI_SERIES
@@ -282,13 +282,13 @@ void GraphModifier::toggleSeriesVisible(bool enable)
#endif
}
-void GraphModifier::toggleSmoothS2(bool enabled)
+void GraphModifier::toggleSmoothS2(int enabled)
{
qDebug() << __FUNCTION__ << enabled;
m_multiseries[1]->setFlatShadingEnabled(enabled);
}
-void GraphModifier::toggleSurfaceGridS2(bool enable)
+void GraphModifier::toggleSurfaceGridS2(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -299,7 +299,7 @@ void GraphModifier::toggleSurfaceGridS2(bool enable)
m_multiseries[1]->setDrawMode(m_drawMode2);
}
-void GraphModifier::toggleSurfaceS2(bool enable)
+void GraphModifier::toggleSurfaceS2(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -310,19 +310,19 @@ void GraphModifier::toggleSurfaceS2(bool enable)
m_multiseries[1]->setDrawMode(m_drawMode2);
}
-void GraphModifier::toggleSeries2Visible(bool enable)
+void GraphModifier::toggleSeries2Visible(int enable)
{
qDebug() << __FUNCTION__ << enable;
m_multiseries[1]->setVisible(enable);
}
-void GraphModifier::toggleSmoothS3(bool enabled)
+void GraphModifier::toggleSmoothS3(int enabled)
{
qDebug() << __FUNCTION__ << enabled;
m_multiseries[2]->setFlatShadingEnabled(enabled);
}
-void GraphModifier::toggleSurfaceGridS3(bool enable)
+void GraphModifier::toggleSurfaceGridS3(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -333,7 +333,7 @@ void GraphModifier::toggleSurfaceGridS3(bool enable)
m_multiseries[2]->setDrawMode(m_drawMode3);
}
-void GraphModifier::toggleSurfaceS3(bool enable)
+void GraphModifier::toggleSurfaceS3(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -344,19 +344,19 @@ void GraphModifier::toggleSurfaceS3(bool enable)
m_multiseries[2]->setDrawMode(m_drawMode3);
}
-void GraphModifier::toggleSeries3Visible(bool enable)
+void GraphModifier::toggleSeries3Visible(int enable)
{
qDebug() << __FUNCTION__ << enable;
m_multiseries[2]->setVisible(enable);
}
-void GraphModifier::toggleSmoothS4(bool enabled)
+void GraphModifier::toggleSmoothS4(int enabled)
{
qDebug() << __FUNCTION__ << enabled;
m_multiseries[3]->setFlatShadingEnabled(enabled);
}
-void GraphModifier::toggleSurfaceGridS4(bool enable)
+void GraphModifier::toggleSurfaceGridS4(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -367,7 +367,7 @@ void GraphModifier::toggleSurfaceGridS4(bool enable)
m_multiseries[3]->setDrawMode(m_drawMode4);
}
-void GraphModifier::toggleSurfaceS4(bool enable)
+void GraphModifier::toggleSurfaceS4(int enable)
{
qDebug() << __FUNCTION__ << enable;
if (enable)
@@ -378,13 +378,13 @@ void GraphModifier::toggleSurfaceS4(bool enable)
m_multiseries[3]->setDrawMode(m_drawMode4);
}
-void GraphModifier::toggleSeries4Visible(bool enable)
+void GraphModifier::toggleSeries4Visible(int enable)
{
qDebug() << __FUNCTION__ << enable;
m_multiseries[3]->setVisible(enable);
}
-void GraphModifier::toggleSqrtSin(bool enable)
+void GraphModifier::toggleSqrtSin(int enable)
{
if (enable) {
qDebug() << "Create Sqrt&Sin surface, (" << m_xCount << ", " << m_zCount << ")";
@@ -426,7 +426,7 @@ void GraphModifier::toggleSqrtSin(bool enable)
}
}
-void GraphModifier::togglePlane(bool enable)
+void GraphModifier::togglePlane(int enable)
{
qDebug() << "GraphModifier::togglePlane " << enable;
@@ -749,21 +749,21 @@ void GraphModifier::changeLabelRotation(int rotation)
m_graph->axisZ()->setLabelAutoRotation(float(rotation));
}
-void GraphModifier::toggleAxisTitleVisibility(bool enabled)
+void GraphModifier::toggleAxisTitleVisibility(int enabled)
{
m_graph->axisX()->setTitleVisible(enabled);
m_graph->axisY()->setTitleVisible(enabled);
m_graph->axisZ()->setTitleVisible(enabled);
}
-void GraphModifier::toggleAxisTitleFixed(bool enabled)
+void GraphModifier::toggleAxisTitleFixed(int enabled)
{
m_graph->axisX()->setTitleFixed(enabled);
m_graph->axisY()->setTitleFixed(enabled);
m_graph->axisZ()->setTitleFixed(enabled);
}
-void GraphModifier::toggleXAscending(bool enabled)
+void GraphModifier::toggleXAscending(int enabled)
{
m_ascendingX = enabled;
@@ -793,7 +793,7 @@ void GraphModifier::toggleXAscending(bool enabled)
}
}
-void GraphModifier::toggleZAscending(bool enabled)
+void GraphModifier::toggleZAscending(int enabled)
{
m_ascendingZ = enabled;
@@ -823,7 +823,7 @@ void GraphModifier::toggleZAscending(bool enabled)
}
}
-void GraphModifier::togglePolar(bool enabled)
+void GraphModifier::togglePolar(int enabled)
{
m_graph->setPolar(enabled);
}
@@ -1681,7 +1681,7 @@ void GraphModifier::setHorizontalAspectRatio(int ratio)
m_graph->setHorizontalAspectRatio(aspectRatio);
}
-void GraphModifier::setSurfaceTexture(bool enabled)
+void GraphModifier::setSurfaceTexture(int enabled)
{
if (enabled)
m_multiseries[3]->setTexture(QImage(":/maps/mapimage"));
diff --git a/tests/manual/surfacetest/graphmodifier.h b/tests/manual/surfacetest/graphmodifier.h
index e535021a..747cec8d 100644
--- a/tests/manual/surfacetest/graphmodifier.h
+++ b/tests/manual/surfacetest/graphmodifier.h
@@ -53,29 +53,29 @@ public:
explicit GraphModifier(Q3DSurface *graph, QWidget *parentWidget);
~GraphModifier();
- void toggleSeries1(bool enabled);
- void toggleSeries2(bool enabled);
- void toggleSeries3(bool enabled);
- void toggleSeries4(bool enabled);
- void toggleSmooth(bool enabled);
- void toggleSurfaceGrid(bool enable);
- void toggleSurface(bool enable);
- void toggleSeriesVisible(bool enable);
- void toggleSmoothS2(bool enabled);
- void toggleSurfaceGridS2(bool enable);
- void toggleSurfaceS2(bool enable);
- void toggleSeries2Visible(bool enable);
- void toggleSmoothS3(bool enabled);
- void toggleSurfaceGridS3(bool enable);
- void toggleSurfaceS3(bool enable);
- void toggleSeries3Visible(bool enable);
- void toggleSmoothS4(bool enabled);
- void toggleSurfaceGridS4(bool enable);
- void toggleSurfaceS4(bool enable);
- void toggleSeries4Visible(bool enable);
+ void toggleSeries1(int enabled);
+ void toggleSeries2(int enabled);
+ void toggleSeries3(int enabled);
+ void toggleSeries4(int enabled);
+ void toggleSmooth(int enabled);
+ void toggleSurfaceGrid(int enable);
+ void toggleSurface(int enable);
+ void toggleSeriesVisible(int enable);
+ void toggleSmoothS2(int enabled);
+ void toggleSurfaceGridS2(int enable);
+ void toggleSurfaceS2(int enable);
+ void toggleSeries2Visible(int enable);
+ void toggleSmoothS3(int enabled);
+ void toggleSurfaceGridS3(int enable);
+ void toggleSurfaceS3(int enable);
+ void toggleSeries3Visible(int enable);
+ void toggleSmoothS4(int enabled);
+ void toggleSurfaceGridS4(int enable);
+ void toggleSurfaceS4(int enable);
+ void toggleSeries4Visible(int enable);
- void toggleSqrtSin(bool enable);
- void togglePlane(bool enable);
+ void toggleSqrtSin(int enable);
+ void togglePlane(int enable);
void setHeightMapData(bool enable);
void toggleGridSliderLock(bool enable);
void setGridSliderX(QSlider *slider) { m_gridSliderX = slider; }
@@ -123,7 +123,7 @@ public:
void testDataOrdering();
void setAspectRatio(int ratio);
void setHorizontalAspectRatio(int ratio);
- void setSurfaceTexture(bool enabled);
+ void setSurfaceTexture(int enabled);
public Q_SLOTS:
void changeShadowQuality(int quality);
@@ -138,11 +138,11 @@ public Q_SLOTS:
void handleAxisZChanged(QValue3DAxis *axis);
void handleFpsChange(qreal fps);
void changeLabelRotation(int rotation);
- void toggleAxisTitleVisibility(bool enabled);
- void toggleAxisTitleFixed(bool enabled);
- void toggleXAscending(bool enabled);
- void toggleZAscending(bool enabled);
- void togglePolar(bool enabled);
+ void toggleAxisTitleVisibility(int enabled);
+ void toggleAxisTitleFixed(int enabled);
+ void toggleXAscending(int enabled);
+ void toggleZAscending(int enabled);
+ void togglePolar(int enabled);
void setCameraTargetX(int value);
void setCameraTargetY(int value);
void setCameraTargetZ(int value);
diff --git a/tests/manual/surfacetest/main.cpp b/tests/manual/surfacetest/main.cpp
index 239a6eba..bad8e75b 100644
--- a/tests/manual/surfacetest/main.cpp
+++ b/tests/manual/surfacetest/main.cpp
@@ -28,6 +28,8 @@
****************************************************************************/
#include "graphmodifier.h"
+#include "buttonwrapper.h"
+#include "checkboxwrapper.h"
#include <QtDataVisualization/q3dtheme.h>
#include <QApplication>
@@ -580,49 +582,66 @@ int main(int argc, char *argv[])
QObject::connect(series4VisibleCB, &QCheckBox::stateChanged,
modifier, &GraphModifier::toggleSeries4Visible);
+ CheckBoxWrapper *series1SmoothCBWrapper = new CheckBoxWrapper(smoothCB);
+ CheckBoxWrapper *series1SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridCB);
+ CheckBoxWrapper *series1surfaceCBWrapper = new CheckBoxWrapper(surfaceCB);
+ CheckBoxWrapper *series1VisibleCBWrapper = new CheckBoxWrapper(seriesVisibleCB);
QObject::connect(series1CB, &QCheckBox::stateChanged,
modifier, &GraphModifier::toggleSeries1);
QObject::connect(series1CB, &QCheckBox::stateChanged,
- smoothCB, &QPushButton::setEnabled);
+ series1SmoothCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series1CB, &QCheckBox::stateChanged,
- surfaceGridCB, &QPushButton::setEnabled);
+ series1SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series1CB, &QCheckBox::stateChanged,
- surfaceCB, &QPushButton::setEnabled);
+ series1surfaceCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series1CB, &QCheckBox::stateChanged,
- seriesVisibleCB, &QPushButton::setEnabled);
+ series1VisibleCBWrapper, &CheckBoxWrapper::setEnabled);
+
+ CheckBoxWrapper *series2SmoothCBWrapper = new CheckBoxWrapper(smoothS2CB);
+ CheckBoxWrapper *series2SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS2CB);
+ CheckBoxWrapper *series2surfaceCBWrapper = new CheckBoxWrapper(surfaceS2CB);
+ CheckBoxWrapper *series2VisibleCBWrapper = new CheckBoxWrapper(series2VisibleCB);
QObject::connect(series2CB, &QCheckBox::stateChanged,
modifier, &GraphModifier::toggleSeries2);
QObject::connect(series2CB, &QCheckBox::stateChanged,
- smoothS2CB, &QPushButton::setEnabled);
+ series2SmoothCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series2CB, &QCheckBox::stateChanged,
- surfaceGridS2CB, &QPushButton::setEnabled);
+ series2SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series2CB, &QCheckBox::stateChanged,
- surfaceS2CB, &QPushButton::setEnabled);
+ series2surfaceCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series2CB, &QCheckBox::stateChanged,
- series2VisibleCB, &QPushButton::setEnabled);
+ series2VisibleCBWrapper, &CheckBoxWrapper::setEnabled);
+ CheckBoxWrapper *series3SmoothCBWrapper = new CheckBoxWrapper(smoothS3CB);
+ CheckBoxWrapper *series3SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS3CB);
+ CheckBoxWrapper *series3surfaceCBWrapper = new CheckBoxWrapper(surfaceS3CB);
+ CheckBoxWrapper *series3VisibleCBWrapper = new CheckBoxWrapper(series3VisibleCB);
QObject::connect(series3CB, &QCheckBox::stateChanged,
modifier, &GraphModifier::toggleSeries3);
QObject::connect(series3CB, &QCheckBox::stateChanged,
- smoothS3CB, &QPushButton::setEnabled);
+ series3SmoothCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series3CB, &QCheckBox::stateChanged,
- surfaceGridS3CB, &QPushButton::setEnabled);
+ series3SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series3CB, &QCheckBox::stateChanged,
- surfaceS3CB, &QPushButton::setEnabled);
+ series3surfaceCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series3CB, &QCheckBox::stateChanged,
- series3VisibleCB, &QPushButton::setEnabled);
+ series3VisibleCBWrapper, &CheckBoxWrapper::setEnabled);
+ CheckBoxWrapper *series4SmoothCBWrapper = new CheckBoxWrapper(smoothS4CB);
+ CheckBoxWrapper *series4SurfaceGridCBWrapper = new CheckBoxWrapper(surfaceGridS4CB);
+ CheckBoxWrapper *series4surfaceCBWrapper = new CheckBoxWrapper(surfaceS4CB);
+ CheckBoxWrapper *series4VisibleCBWrapper = new CheckBoxWrapper(series4VisibleCB);
QObject::connect(series4CB, &QCheckBox::stateChanged,
modifier, &GraphModifier::toggleSeries4);
QObject::connect(series4CB, &QCheckBox::stateChanged,
- smoothS4CB, &QPushButton::setEnabled);
+ series4SmoothCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series4CB, &QCheckBox::stateChanged,
- surfaceGridS4CB, &QPushButton::setEnabled);
+ series4SurfaceGridCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series4CB, &QCheckBox::stateChanged,
- surfaceS4CB, &QPushButton::setEnabled);
+ series4surfaceCBWrapper, &CheckBoxWrapper::setEnabled);
QObject::connect(series4CB, &QCheckBox::stateChanged,
- series4VisibleCB, &QPushButton::setEnabled);
+ series4VisibleCBWrapper, &CheckBoxWrapper::setEnabled);
#else
QObject::connect(sqrtSinCB, &QRadioButton::toggled,
modifier, &GraphModifier::toggleSqrtSin);