Import Upstream version 5.15.3+dfsg

This commit is contained in:
openKylinBot 2022-05-24 09:23:06 +08:00
commit 1f52805ebb
4310 changed files with 323531 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,894 @@
QT AUTOMOTIVE SUITE LICENSE AGREEMENT
Agreement version 3.0
This Qt Automotive Suite License Agreement (“Agreement”) is a legal agreement
between The Qt Company (as defined below) and the Licensee (as defined below)
for the license of Licensed Software (as defined below). Capitalized terms used
herein are defined in Section 1.
WHEREAS:
(A) Licensee wishes to use the Licensed Software for the purpose of developing
and distributing Applications and/or Devices; and
(B) The Qt Company is willing to grant the Licensee a right to use Licensed
Software for such purpose pursuant to term and conditions of this Agreement.
NOW, THEREFORE, THE PARTIES HEREBY AGREE AS FOLLOWS:
1. DEFINITIONS
"Affiliate" of a Party shall mean an entity (i) which is directly or indirectly
controlling such Party; (ii) which is under the same direct or indirect
ownership or control as such Party; or (iii) which is directly or indirectly
owned or controlled by such Party. For these purposes, an entity shall be
treated as being controlled by another if that other entity has fifty percent
(50 %) or more of the votes in such entity, is able to direct its affairs and/or
to control the composition of its board of directors or equivalent body.
"Applications" shall mean Licensee's software products created using the
Licensed Software in connection with the Program, which may include the
Redistributables, or part thereof.
"Contractor(s)" shall mean third party consultants, distributors and contractors
performing services to a Party under applicable contractual arrangement.
"Customer(s)" shall mean Licensee's end users to whom Licensee, directly or
indirectly, distributes copies of the Redistributables.
"Deployment Platforms" shall mean operating systems specified in the License
Certificate, in which the Redistributables can be distributed pursuant to the
terms and conditions of this Agreement.
"Designated User(s)" shall mean the employee(s) of Licensee or Licensee's
Affiliates acting within the scope of their employment or Licensee's
Contractors acting within the scope of their services for Licensee and on behalf
of Licensee. Designated Users shall be named in the License Certificate.
"Development License" shall mean the license needed by the Licensee for each
Designated User to use the Licensed Software under the license grant described
in Section 3.1 of this Agreement.
"Development Platforms" shall mean those operating systems specified in the
License Certificate, in which the Licensed Software can be used under the
Development License, but not distributed in any form or used for any other
purpose.
"Devices" shall mean hardware devices or products that 1) are manufactured
and/or distributed by the Licensee or its Affiliates or Contractors in
connection with the Program, and (2)(i) incorporate or integrate the
Redistributables or parts thereof; or (ii) do not incorporate or integrate
the Redistributables at the time of distribution, but where, when used by a
Customer, the main user interface or substantial functionality of such
device is provided by Application(s) or otherwise depends on the Licensed
Software.
"Distribution License(s)" shall mean the license required for distribution of
Redistributables in accordance with the license grant described in Section
3.2(ii)-(iii) of this Agreement.
"Distribution License Packs" shall mean set of prepaid Distribution Licenses
for distribution of Redistributables, as defined in The Qt Company's standard
price list, quote, Purchase Order confirmation or in an appendix hereto, as the
case may be.
"Initial Support Term" shall mean a time period of twelve (12) months,
calculated from the effective date of this Agreement.
"Intellectual Property Rights" shall mean patents (including utility models),
design patents, and designs (whether or not capable of registration), chip
topography rights and other like protection, copyrights, trademarks, service
marks, trade names, logos or other words or symbols and any other form of
statutory protection of any kind and applications for any of the foregoing
as well as any trade secrets.
"Licensee" shall mean the individual or legal entity that is party to this
Agreement, as identified on the signature page hereof.
"License Certificate" shall mean a certificate accompanying the Licensed
Software and generated for each Designated User respectively. License
Certificate will specify the Designated User, the Development Platforms,
Deployment Platforms, Program and the Term of this Agreement. The terms of the
License Certificate are considered part of this Agreement and shall be updated
from time to time to reflect any changes to the foregoing terms relating to
Licensee's rights to the Licensed Software.
"Licensee's Records" shall mean books and records that are likely to contain
information bearing on Licensee's compliance with this Agreement or the payments
due to The Qt Company under this Agreement, including, but not limited to:
assembly logs, sales records and distribution records.
"Licensee´s SDK Contractors" shall mean Contractors of Licensee, who have
purchased or received SDK from the Licensee relating to the Program.
"License Fee" shall mean the fee charged to the Licensee for rights granted
under the terms of this Agreement.
"Licensed Software" shall mean all versions of The Qt Company's computer
software products, online or electronic documentation, associated media and
printed materials, including the source code, example programs and the
documentation, licensed to the Licensee under this Agreement. Licensed Software
does not include Third Party Software (as defined in Section 4) or Open Source
Qt.
"Modified Software" shall mean bug-fixes, error corrections, patches or
modifications made to the Licensed Software by Licensee, including documentation
related thereto.
"Online Services" shall mean any services or access to systems made available
by The Qt Company to the Licensee over the Internet relating to the Licensed
Software or for the purpose of use by the Licensee of the Licensed Software or
Support. Use of any such Online Services is discretionary for the Licensee and
some of them may be subject to additional fees.
"Open Source Qt" shall mean all versions of The Qt Company's Qt computer
software products, online or electronic documentation, associated media and
printed materials, including the source code, example programs and the
documentation available under the terms of the GNU Lesser General Public
License, version 2.1 or later ("LGPL") or the GNU General Public License,
version 2.0 or later ("GPL").
"Party" or "Parties" shall mean Licensee and/or The Qt Company.
"Program" shall mean Licensee´s business program for which purpose the Licensee
is entitled to use the Licensed Software and grant the Licensee's SDK
Contractors a right to use the Licensed Software as part of a SDK.
"Redistributables" shall mean the portions of the Licensed Software set forth
in Appendix 1, Section 1 that may be distributed pursuant to the terms of this
Agreement in object code form only, including any relevant documentation. Where
relevant, any reference to Licensed Software in this Agreement shall include and
refer also to Redistributables.
"SDK" or "Software Development Kit" shall mean a combination of software modules
including Licensed Software intended to be utilized in connection with the
Program.
"Submitted Modified Software" shall have the meaning as set forth in Section
2.3.
"Support" shall mean standard developer support that is provided by
The Qt Company to assist Designated Users in using the Licensed Software in
accordance with The Qt Company's standard support terms.
"Support Renewal Term" shall mean a time period of twelve (12) months,
calculated from the end of the Initial Support Term or previous Support Renewal
Term, as applicable.
"Support Term" shall mean the Initial Support Term and any possible Support
Renewal Terms(s) during which time the Licensee is eligible to receive for
Support for the Licensed Software.
"Taxes" shall have the meaning set forth in Section 10.5.
"Term" shall mean the validity period of this Agreement, as set forth in the
License Certificate.
“The Qt Company” shall mean:
(i) in the event Licensee is an individual residing in the United States or a
legal entity incorporated in the United States or having its headquarters in the
United States, The Qt Company Inc., a Delaware corporation with its office at
2350 Mission College Blvd., Suite 1020, Santa Clara, CA 95054, USA.; or
(ii) in the event the Licensee is an individual residing outside of the United
States or a legal entity incorporated outside of the United States or having its
registered office outside of the United States, The Qt Company Ltd., a Finnish
company with its registered office at Bertel Jungin aukio D3A, 02600 Espoo,
Finland.
"Updates" shall mean a release or version of the Licensed Software containing
bug fixes, error corrections and other changes that are generally made available
to users of the Licensed Software that have contracted for Support. Updates are
generally depicted as a change to the digits following the decimal in the
Licensed Software version number. The Qt Company shall make Updates available to
the Licensee under the Support. Updates shall be considered as part of the
Licensed Software hereunder.
"Upgrades" shall mean a release or version of the Licensed Software containing
enhancements and new features and are generally depicted as a change to the
first digit of the Licensed Software version number. In the event Upgrades are
provided to the Licensee under this Agreement, they shall be considered as part
of the Licensed Software hereunder.
2. OWNERSHIP 2.1
Ownership of The Qt Company
The Licensed Software is protected by copyright laws and international copyright
treaties, as well as other intellectual property laws and treaties. The Licensed
Software is licensed, not sold.
All The Qt Company's Intellectual Property Rights are and shall remain the
exclusive property of The Qt Company or its licensors respectively.
2.2 Ownership of Licensee
All the Licensee's Intellectual Property Rights are and shall remain the
exclusive property of the Licensee or its licensors respectively.
All Intellectual Property Rights to the Modified Software, Applications and
Devices shall remain with the Licensee and no rights thereto shall be granted by
the Licensee to The Qt Company under this Agreement (except as set forth in
Section 2.3 below).
2.3 Modified Software
Licensee may create Modified Software that breaks the source or binary
compatibility with the Licensed Software. This includes, but is not limited to,
changing the application programming interfaces ("API") by adding, changing or
deleting any variable, method, or class signature in the Licensed Software
and/or any inter-process protocols, services or standards in the Licensed
Software libraries. To the extent that Licensee breaks source or binary
compatibility with the Licensed Software, Licensee acknowledges that The Qt
Company's ability to provide Support may be prevented or limited and Licensee's
ability to make use of Updates may be restricted.
To the extent Licensee submits Modified Software to The Qt Company ("Submitted
Modified Software"), Licensee hereby grants The Qt Company a sublicensable,
assignable, irrevocable, perpetual, worldwide, non-exclusive, royalty-free and
fully paid-up license, under all of Licensee's Intellectual Property Rights, to
reproduce, adapt, translate, modify, and prepare derivative works of, publicly
display, publicly perform, sublicense, make available and distribute such
Submitted Modified Software as The Qt Company sees fit at its free and absolute
discretion. For the sake of clarity, the Licensee shall have no obligation to
provide Modified Software to The Qt Company.
3. LICENSES GRANTED
3.1 Development with Licensed Software
Subject to the terms of this Agreement, The Qt Company grants to Licensee a
personal, worldwide, non- exclusive, non-transferable license, valid for the
Term, to use, modify and copy the Licensed Software by Designated Users on the
Development Platforms for the sole purposes of designing, developing,
demonstrating and testing Application(s) and/or Devices, and to provide thereto
related support and other services to end-user Customers.
Licensee may install copies of the Licensed Software on an unlimited number of
computers provided that (i) only the Designated Users may use the Licensed
Software, and (ii) all Designated Users must have a valid Development License to
use Licensed Software.
Licensee may at any time designate another Designated User to replace a
then-current Designated User by notifying The Qt Company in writing, provided
that any Designated User may be replaced only once during any six-month period.
3.2 Distribution of Redistributables
Subject to the terms of this Agreement, The Qt Company grants to Licensee a
personal, worldwide, non- exclusive, non-transferable license, valid for the
Term, to (i) distribute, by itself or through its Contractors, Redistributables
as installed, incorporated or integrated into Applications for execution on the
Deployment Platforms, and (ii) distribute, by itself or through one or more
tiers of Contractors, Redistributables as installed, incorporated or integrated,
or intended to be installed, incorporated or integrated into Devices for
execution on the Deployment Platforms, and (iii) grant sublicenses to
Redistributables, as distributed hereunder, for Customers solely for Customer's
internal use and to the extent necessary in order for the Customers to use the
Applications and/or Devices for their respective intended purposes.
Right to distribute the Redistributables as provided herein is conditional upon
the Licensee having purchased and paid the appropriate amount of Development and
Distribution Licenses from The Qt Company before distributing any
Redistributables to Customers.
For the avoidance of any doubt it is specifically acknowledged and agreed that
distribution of Redistributables solely as installed, incorporated or integrated
into Applications for execution on the Deployment Platform(s), as specified in
(i) of the first paragraph of Section 3.2 above, i.e. with no connection to
Devices or intention to use in connection therewith, shall not require a
Distribution License.
3.3 SDK License
The Qt Company grants to Licensee a personal, worldwide, non-exclusive,
non-transferable license, valid for the Term, to (i) distribute Licensed
Software as a part of the SDK to Licensee´s SDK Contractors in connection with
the Program and (ii) in connection with the Program, by itself or by Licensee's
SDK Contractors, combine, incorporate or integrate Licensed Software with, or
use Licensed Software for creation of, any software created with or
incorporating Open Source Qt, provided, however, that:
(i) the Licensee´s SDK Contractors are only entitled to use the Licensed
Software as part of SDK and for the sole purpose of developing software for
Devices that are distributed under the Program; and
(ii) Licensee´s SDK Contractors shall not be entitled to distribute the SDK or
any part thereof to any third parties.
For the avoidance of any doubt, the distribution of such software development
tools that do not contain Licensed Software shall not be covered by this
Agreement.
3.4 Further Requirements
The licenses granted above in this Section 3 by The Qt Company to Licensee are
conditional and subject to Licensee's compliance with the following terms:
(i) Licensee shall not remove or alter any copyright, trademark or other
proprietary rights notice contained in any portion of the Licensed Software;
(ii) Applications and SDKs must add primary and substantial functionality to the
Licensed Software;
(iii) Applications may not pass on functionality which in any way makes it
possible for others to create software with the Licensed Software; provided
however that Licensee may use the Licensed Software's scripting and QML ("Qt
Quick") functionality solely in order to enable scripting, themes and styles
that augment the functionality and appearance of the Application(s) without
adding primary and substantial functionality to the Application(s);
(iv) Applications and SDKs must not compete with the Licensed Software;
(v) Licensee shall not use The Qt Company's or any of its suppliers' names,
logos, or trademarks to market Applications or SDKs, except that Licensee may
use "Built with Qt" logo to indicate that Application(s) was developed using
the Licensed Software;
(vi) Except as expressly provided in Section 3.3, Licensee shall not
distribute, sublicense or disclose source code of Licensed Software to any third
party (provided however that Licensee may appoint employee(s) of Contractors as
Designated Users to use Licensed Software pursuant to this Agreement);
(vii) Licensee shall not grant the Customers a right to (i) make copies of the
Redistributables except when and to the extent required to use the Applications
and/or Devices for their intended purpose, (ii) modify the Redistributables or
create derivative works thereof, (iii) decompile, disassemble or otherwise
reverse engineer Redistributables, or (iv) redistribute any copy or portion of
the Redistributables to any third party, except as part of the onward sale of
the Device on which the Redistributables are installed;
(viii) Except as expressly provided in Section 3.3, Licensee shall not and
shall cause that its Affiliates, Contractors and Licensee's SDK Contractors
shall not a) in any way, combine, incorporate or integrate Licensed Software
with, or use Licensed Software for creation of, any software created with or
incorporating Open Source Qt or b) incorporate or integrate Applications into a
hardware device or product other than a Device, unless Licensee has received an
advance written permission from The Qt Company to do so. Unless specifically
otherwise agreed, any and all distribution by the Licensee during the Term of
a hardware device or product a) which incorporate or integrate any part of
Licensed Software or Open Source Qt; or b) where the main user interface or
substantial functionality is provided by software build with Licensed
Software or Open Source Qt or otherwise depends on the Licensed Software or Open
Open Source Qt, shall be considered as distribution under this Agreement and
dependent on compliance thereof (including but not limited to obligation to
pay applicable License Fees for such distribution);
(ix) Licensee shall cause all of its Affiliates and Contractors entitled to make
use of the licenses granted under this Agreement, to be contractually bound to
comply with the relevant terms of this Agreement and not to use the Licensed
Software beyond the terms hereof and for any purposes other than operating
within the scope of their services for Licensee. Licensee shall be responsible
for any and all actions and omissions of its Affiliates and Contractors relating
to the Licensed Software and use thereof (including but not limited to payment
of all applicable License Fees);
(x) Except when and to the extent explicitly provided in this Section 3,
Licensee shall not transfer, publish, disclose, display or otherwise make
available the Licensed Software;
(xi) Licensee shall not take any action inconsistent with The Qt Company's
Intellectual Property Rights; and
(xii) Attempt or enlist a third party to conduct or attempt to conduct any of
the above.
Above terms shall not be applicable if and to the extent they conflict with any
mandatory provisions of any applicable laws.
Any use of Licensed Software beyond the provisions of this Agreement is strictly
prohibited and requires an additional license from The Qt Company.
4. THIRD PARTY SOFTWARE
The Licensed Software may provide links to third party libraries or code
(collectively "Third Party Software") to implement various functions. Third
Party Software does not comprise part of the Licensed Software. In some cases,
access to Third Party Software may be included in the Licensed Software. Such
Third Party Software will be listed in the ".../src/3rdparty" source tree
delivered with the Licensed Software or documented in the Licensed Software, as
such may be amended from time to time. Licensee acknowledges that use or
distribution of Third Party Software is in all respects subject to applicable
license terms of applicable third party right holders. 5. PRE-RELEASE CODE
The Licensed Software may contain pre-release code and functionality marked or
otherwise stated as "Technology Preview", "Alpha", "Beta" or similar
designation. Such pre-release code may be present in order to provide
experimental support for new platforms or preliminary versions of one or more
new functionalities. The pre-release code may not be at the level of performance
and compatibility of a final, generally available, product offering of the
Licensed Software. The pre-release parts of the Licensed Software may not
operate correctly, may contain errors and may be substantially modified by The
Qt Company prior to the first commercial product release, if any. The Qt Company
is under no obligation to make pre-release code commercially available, or
provide any Support or Updates relating thereto. The Qt Company assumes no
liability whatsoever regarding any pre-release code, but any use thereof is
exclusively at Licensee's own risk and expense.
6. LIMITED WARRANTY AND WARRANTY DISCLAIMER
The Qt Company hereby represents and warrants that it has the power and
authority to grant the rights and licenses granted to Licensee under this
Agreement.
Except as set forth above, the Licensed Software is licensed to Licensee "as
is".
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE QT COMPANY ON BEHALF OF
ITSELF AND ITS LICENSORS, SUPPLIERS AND AFFILIATES, DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT
WITH REGARD TO THE LICENSED SOFTWARE. THE QT COMPANY DOES NOT WARRANT THAT THE
LICENSED SOFTWARE WILL SATISFY LICENSEE'S REQUIREMENTS OR THAT IT WILL OPERATE
WITHOUT DEFECT OR ERROR OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED. ALL
USE OF AND RELIANCE ON THE LICENSED SOFTWARE IS AT THE SOLE RISK OF AND
RESPONSIBILITY OF LICENSEE.
Licensee's exclusive remedy and The Qt Company's entire liability for Licensed
Software shall be limited, at The Qt Company's option, to correction of the
error, replacement of the Licensed Software or return of the applicable fees
paid for the defective Licensed Software for the time period during which the
License is not able to utilize the Licensed Software under the terms of this
Agreement.
7. INDEMNIFICATION AND LIMITATION OF LIABILITY
7.1 Limitation of Liability
EXCEPT FOR (I) CASES OF GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, (II)
LICENSEE'S DUTY TO PAY ALL APPLICABLE LICENSE FEES AND COMPENSATIONS, AND (III)
BREACH OF CONFIDENTIALITY, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO
EVENT SHALL EITHER PARTY BE LIABLE TO THE OTHER PARTY FOR ANY LOSS OF PROFIT,
LOSS OF DATA, LOSS OF BUSINESS OR GOODWILL OR ANY OTHER INDIRECT, SPECIAL,
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE COST, DAMAGES OR EXPENSE OF ANY KIND,
HOWSOEVER ARISING UNDER OR IN CONNECTION WITH THIS AGREEMENT.
EXCEPT FOR (I) CASES OF GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT, (II)
LICENSEE'S DUTY TO PAY ALL APPLICABLE LICENSE FEES AND COMPENSATIONS, AND (III)
BREACH OF CONFIDENTIALITY, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO
EVENT SHALL EITHER PARTY'S TOTAL AGGREGATE LIABILITY UNDER THIS AGREEMENT EXCEED
THE AGGREGATE LICENSE FEES RECEIVED BY THE QT COMPANY FROM LICENSEE DURING THE
PERIOD OF TWELVE (12) MONTHS IMMEDIATELY PRECEDING THE EVENT RESULTING IN SUCH
LIABILITY.
THE PROVISIONS OF THIS SECTION 7 ALLOCATE THE RISKS UNDER THIS AGREEMENT BETWEEN
THE QT COMPANY AND LICENSEE AND THE PARTIES HAVE RELIED UPON THE LIMITATIONS SET
FORTH HEREIN IN DETERMINING WHETHER TO ENTER INTO THIS AGREEMENT.
7.2 Licensee´s Indemnification
Licensee shall indemnify and hold harmless The Qt Company from and against any
claim, injury, judgment, settlement, loss or expense, including attorneys' fees
related to: (a) Licensee's misrepresentation in connection with The Qt Company
or the Licensed Software or breach of this Agreement, (b) the Application or
Device (except where such cause of liability is solely attributable to the
Licensed Software).
8. SUPPORT, UPDATES AND ONLINE SERVICES
Licensee will be eligible to receive Support and Updates and to use the Online
Services during the Support Term. Unless otherwise decided by The Company at its
free and absolute discretion, Upgrades will not be included in the Support but
may be available subject to additional fees.
Licenses granted under this Agreement shall include a prepaid Initial Support
Term.
Initial Support Term shall be automatically extended to one or more Support
Renewal Term(s), unless and until either Party notifies the other Party in
writing that it does not wish to continue the Support, such notification to be
provided to the other Party no less than ninety (90) days before expiry of the
Initial Support Term or respective Support Renewal Term. During any such Support
Renewal Term Support shall be available subject to prices and terms agreed
between the Parties or, if no advance agreement exists, subject to The Qt
Company's standard pricing applicable at the commencement date of any such
Support Renewal Term. From time to time The Qt Company may change Support
provided within each Support plan; provided that during the respective Initial
Support Term or Support Renewal Term (as the case may be), the level of Support
provided by The Qt Company may not be reduced without the consent of the
Licensee.
Unless otherwise agreed, The Qt Company shall not be responsible for providing
any service or support to the Customers.
9. CONFIDENTIALITY
Each Party acknowledges that during the Term of this Agreement each Party may
receive information about the other Party's business, business methods, business
plans, customers, business relations, technology, and other information,
including the terms of this Agreement, that is confidential and of great value
to the other Party, and the value of which would be significantly reduced if
disclosed to third parties ("Confidential Information"). Accordingly, when a
Party (the "Receiving Party") receives Confidential Information from the other
Party (the "Disclosing Party"), the Receiving Party shall only disclose such
information to employees and Contractors on a need to know basis, and shall
cause its employees and employees of its Affiliates to: (i) maintain any and all
Confidential Information in confidence; (ii) not disclose the Confidential
Information to a third party without the Disclosing Party's prior written
approval; and (iii) not, directly or indirectly, use the Confidential
Information for any purpose other than for exercising its rights and fulfilling
its responsibilities pursuant to this Agreement. Each Party shall take
reasonable measures to protect the Confidential Information of the other Party,
which measures shall not be less than the measures taken by such Party to
protect its own confidential and proprietary information.
Obligation of confidentiality shall not apply to information that (i) is or
becomes generally known to the public through no act or omission of the
Receiving Party; (ii) was in the Receiving Party's lawful possession prior to
the disclosure hereunder and was not subject to limitations on disclosure or
use; (iii) is developed independently by employees or Contractors of the
Receiving Party or other persons working for the Receiving Party who have not
had access to the Confidential Information of the Disclosing Party, as proven by
the written records of the Receiving Party; (iv) is lawfully disclosed to the
Receiving Party without restrictions, by a third party not under an obligation
of confidentiality; or (v) the Receiving Party is legally compelled to disclose,
in which case the Receiving Party shall notify the Disclosing Party of such
compelled disclosure and assert the privileged and confidential nature of the
information and cooperate fully with the Disclosing Party to limit the scope of
disclosure and the dissemination of disclosed Confidential Information to the
minimum extent necessary.
The obligations under this Section 9 shall continue to remain in force for a
period of five (5) years after the last disclosure, and, with respect to trade
secrets, for so long as such trade secrets are protected under applicable trade
secret laws.
10. FEES, DELIVERY AND PAYMENT
10.1 License Fees
License Fees are described in The Qt Company's standard price list, quote or
Purchase Order confirmation or in an appendix hereto, as the case may be. The
License Fees shall not be refunded or claimed as a credit, even on the ground
that Distribution Licenses are not used, i.e. Redistributables are not actually
distributed corresponding to the Distribution Licenses purchased, or for any
other reason.
10.2 Ordering Licenses
Licensee may purchase Development Licenses and Distribution Licenses pursuant to
agreed pricing terms or, if no specific pricing terms have been agreed upon, at
The Qt Company's standard pricing terms applicable at the time of purchase.
Licensee shall submit all purchase orders for Development Licenses and
Distribution Licenses to The Qt Company by email or any other method acceptable
to The Qt Company (each such order is referred to herein as a "Purchase Order")
for confirmation, whereupon the Purchase Order shall become binding between the
Parties.
10.3 Distribution
License Packs Unless otherwise agreed, the Distribution Licenses are bought by
way of Distribution License Packs.
Upon due payment of the ordered Distribution License Pack(s), the Licensee will
have an account of Distribution Licenses available for installing, bundling or
integrating (all jointly "installing") the Redistributables with the Devices or
for otherwise distributing the Redistributables in accordance with this
Agreement.
Each time Licensee "installs" or distributes a copy of Redistributables, then
one Distribution License is used, and Licensee's account of available
Distribution Licenses is decreased accordingly.
Licensee may "install" copies of the Redistributables so long as Licensee has
Distribution Licenses remaining on its account.
Redistributables will be deemed to have been "installed" into a Device when one
of the following circumstances shall have occurred: a) the Redistributables
have been loaded onto the Device and used outside of the Licensee's premises or
b) the Device has been fully tested and placed into Licensee's inventory (or
sold) for the first time (i.e., Licensee will not be required to use (or pay
for) more than one Distribution License for each individual Device, e.g. in a
situation where a Device is returned to Licensee's inventory after delivery to
a distributor or sale to a Customer). In addition, if Licensee includes a
back-up copy of the Redistributables on a CD-ROM or other storage medium
along with the product, that backup copy of the Redistributables will not
be deemed to have been "installed" and will not require an additional
Distribution License.
10.4 Payment Terms
License Fees and any other charges under this Agreement shall be paid by
Licensee no later than thirty (30) days from the date of the applicable invoice
from The Qt Company.
The Qt Company will submit an invoice to Licensee after the date of this
Agreement and/or after The Qt Company receives a Purchase Order from Licensee.
A late payment charge of the lower of (a) one percent per month; or (b) the
interest rate stipulated by applicable law, shall be charged on any unpaid
balances that remain past due.
The Qt Company shall have the right to suspend, terminate or withhold grants of
all rights to the Licensed Software hereunder, including but not limited to the
Developer License, Distribution License, and Support, should Licensee fail to
make payment in a timely fashion.
10.5 Taxes
All License Fees and other charges payable hereunder are gross amounts but
exclusive of any value added tax, use tax, sales tax and other taxes, duties or
tariffs ("Taxes"). Such applicable Taxes shall be paid by Licensee, or, where
applicable, in lieu of payment of such Taxes, Licensee shall provide an
exemption certificate to The Qt Company and any applicable authority.
11 RECORD-KEEPING AND REPORTING OBLIGATIONS; AUDIT RIGHTS
11.1 Licensee's Record-keeping
Licensee shall at all times maintain accurate and up-to-date written records of
Licensee's activities related to the use of Licensed Software and distribution
of Redistributables. The records shall be adequate to determine Licensee's
compliance with the provisions of this Agreement and to demonstrate the number
of Designated Users and Redistributables distributed by Licensee. The records
shall conform to good accounting practices reasonably acceptable to The Qt
Company.
Licensee shall, within thirty (30) days from the end of each calendar
quarter, deliver to The Qt Company a report detailing the number of Designated
Users and copies of Redistributables distributed by Licensee during that
calendar quarter, and also detailing the number of undistributed copies of
Redistributables made by Licensee and remaining in its account (i.e.,
undistributed copies for which Distribution Licenses have been or need to be
obtained from The Qt Company). Such report shall contain such other information
as The Qt Company shall reasonably require from time to time.
11.2. The Qt Company's Audit Rights
The Qt Company or an independent auditor acting on behalf of The Qt Company's,
may, upon at least five (5) business days' prior written notice and at its
expense, audit Licensee with respect to the use of the Redistributables, but
not more frequently than once during each 6-month period. Such audit may be
conducted by mail, electronic means or through an in-person visit to
Licensee's place of business. Any such in-person audit shall be conducted
during regular business hours at Licensee's facilities and shall not
unreasonably interfere with Licensee's business activities. The Qt Company or
the independent auditor acting on behalf of The Qt Company shall be entitled to
inspect Licensee's Records. All such Licensee's Records and use thereof shall be
subject to an obligation of confidentiality under this Agreement.
If an audit reveals that Licensee is using the Licensed Software beyond scope of
the licenses Licensee has paid for, Licensee agrees to immediately pay The Qt
Company any amounts owed for such unauthorized use.
In addition, in the event the audit reveals a material violation of the terms of
this Agreement (underpayment of more than 5% of License Fees shall always be
deemed a material violation for purposes of this section), then the Licensee
shall pay The Qt Company's reasonable cost of conducting such audit.
12 TERM AND TERMINATION
12.1 Term
This Agreement shall enter into force upon due acceptance by both Parties and
remain in force for the Term, unless and until terminated pursuant to the terms
of this Section 12.
12.2 Termination by The Qt Company
The Qt Company shall have the right to terminate this Agreement upon thirty
(30) days prior written notice if (i) the Licensee is in material breach of any
obligation of this Agreement and fails to remedy such breach within such notice
period; (ii) or Licensee or any of its Affiliates bring a suit before any court
or administrative agency or otherwise assert a claim against The Qt Company's
or any of its Affiliates' Intellectual Property Rights or validity thereof.
12.3 Mutual Right to Terminate
Either Party shall have the right to terminate this Agreement immediately upon
written notice in the event that the other Party becomes insolvent, files for
any form of bankruptcy, makes any assignment for the benefit of creditors, has a
receiver, administrative receiver or officer appointed over the whole or a
substantial part of its assets, ceases to conduct business, or an act equivalent
to any of the above occurs under the laws of the jurisdiction of the other
Party.
12.4 Parties´ Rights and Duties upon Termination
Upon expiry or termination of the Agreement for any reason, Licensee shall,
within 30 days after such termination, cease and shall cause all Designated
Users (including those of its Affiliates' and Contractors') and Licensee's SDK
Contractors to cease using the Licensed Software and distribution of the
Redistributables under this Agreement. Notwithstanding the above, in the event
the Agreement expires or is terminated for reason other than by The Qt Company
pursuant to Section 12.2, the Licensee is entitled, for a period of six (6)
months after the effective date of termination, to continue distribution of
Devices under the Distribution Licenses paid but unused at such effective date
of termination.
Upon any such termination the Licensee shall destroy or return to The Qt
Company all copies of the Licensed Software and all related materials and will
certify the same to The Qt Company upon its request, provided however that
Licensee may retain and exploit such copies of the Licensed Software as it may
reasonably require in providing continued support to Customers.
Expiry or termination of this Agreement for any reason whatsoever shall not
relieve Licensee of its obligation to pay any License Fees accrued or payable
to The Qt Company prior to the effective date of termination, and Licensee shall
immediately pay to The Qt Company all such fees upon the effective date of
termination. Termination of this Agreement shall not affect any rights of
Customers to continue use of Applications and Devices (and therein incorporated
Redistributables).
13.GOVERNING LAW AND LEGAL VENUE
In the event this Agreement is in the name of The Qt Company Inc., a Delaware
Corporation, then:
(i) this Agreement shall be construed and interpreted in accordance with the
laws of the State of California, USA, excluding its choice of law provisions;
(ii) the United Nations Convention on Contracts for the International Sale of
Goods will not apply to this Agreement; and
(iii) any dispute, claim or controversy arising out of or relating to this
Agreement or the breach, termination, enforcement, interpretation or validity
thereof, including the determination of the scope or applicability of this
Agreement to arbitrate, shall be determined by arbitration in San Francisco,
USA, before one arbitrator. The arbitration shall be administered by JAMS
pursuant to JAMS' Streamlined Arbitration Rules and Procedures. Judgment on the
Award may be entered in any court having jurisdiction. This Section shall not
preclude parties from seeking provisional remedies in aid of arbitration from a
court of appropriate jurisdiction.
In the event this Agreement is in the name of The Qt Company Ltd., a Finnish
Company, then:
(i) this Agreement shall be construed and interpreted in accordance with the
laws of Finland, excluding its choice of law provisions;
(ii) the United Nations Convention on Contracts for the International Sale of
Goods will not apply to this Agreement; and
(iii) any disputes, controversy or claim arising out of or relating to this
Agreement, or the breach, termination or validity thereof shall be shall be
finally settled by arbitration in accordance with the Arbitration Rules of
Finland Chamber of Commerce. The arbitration tribunal shall consist of one (1),
or if either Party so requires, of three (3), arbitrators. The award shall be
final and binding and enforceable in any court of competent jurisdiction. The
arbitration shall be held in Helsinki, Finland and the process shall be
conducted in the English language. This Section shall not preclude parties from
seeking provisional remedies in aid of arbitration from a court of appropriate
jurisdiction.
14. GENERAL PROVISIONS
14.1 No Assignment Licensee
shall not be entitled to assign or transfer all or any of its rights, benefits
and obligations under this Agreement without the prior written consent of The Qt
Company, which shall not be unreasonably withheld or delayed. The Qt Company
shall be entitled to freely assign or transfer any of its rights, benefits or
obligations under this Agreement.
14.2 No Third Party Representations
Licensee shall make no representations or warranties concerning the Licensed
Software on behalf of The Qt Company. Any representation or warranty Licensee
makes or purports to make on The Qt Company's behalf shall be void as to The Qt
Company.
14.3 Surviving Sections
Any terms and conditions that by their nature or otherwise reasonably should
survive termination of this Agreement shall so be deemed to survive.
14.4 Entire Agreement
This Agreement, the exhibits hereto, the License Certificate and any applicable
Purchase Order constitute the complete agreement between the Parties and
supersedes all prior or contemporaneous discussions, representations, and
proposals, written or oral, with respect to the subject matters discussed
herein. In the event of any conflict or inconsistency between this Agreement and
any Purchase Order, the terms of this Agreement will prevail over the terms of
the Purchase Order with respect to such conflict or inconsistency.
14.5 Modifications
No modification of this Agreement shall be effective unless contained in a
writing executed by an authorized representative of each Party. No term or
condition contained in Licensee's Purchase Order shall apply unless expressly
accepted by The Qt Company in writing.
14.6 Force Majeure
Except for the payment obligations hereunder, neither Party shall be liable to
the other for any delay or non-performance of its obligations hereunder in the
event and to the extent that such delay or non- performance is due to an event
of act of God, terrorist attack or other similar unforeseeable catastrophic
event that prevents either Party for fulfilling its obligations under this
Agreement and which such Party cannot avoid or circumvent ("Force Majeure
Event"). If the Force Majeure Event results in a delay or non- performance of a
Party for a period of three (3) months or longer, then either Party shall have
the right to terminate this Agreement with immediate effect without any
liability (except for the obligations of payment arising prior to the event of
Force Majeure) towards the other Party.
14.7 Notices
Any notice given by one Party to the other shall be deemed properly given and
deemed received if specifically acknowledged by the receiving Party in writing
or when successfully delivered to the recipient by hand, fax, or special courier
during normal business hours on a business day to the addresses specified for
The Qt Company in the beginning of this Agreement, and for the Licensee in the
Licensees account profile. Each communication and document made or delivered by
one Party to the other Party pursuant to this Agreement shall be in the English
language.
14.8 Export Control
Licensee acknowledges that the Redistributables may be subject to export
control restrictions under the applicable laws of respective countries.
Licensee shall fully comply with all applicable export license restrictions
and requirements as well as with all lawses hereunder and shall procure all
necessary governmental authorizations, including without limitation, all
necessary licenses, approvals, permissions or consents, where necessary for
the re- exportation of the Redistributables, Applications
and/or Devices.
14.9 No Implied License
There are no implied licenses or other implied rights granted under this
Agreement, and all rights, save for those expressly granted hereunder, shall
remain with The Qt Company and its licensors. In addition, no licenses or
immunities are granted to the combination of the Licensed Software with any
other software or hardware not delivered by The Qt Company under this Agreement.
14.10 Attorney Fees
The prevailing Party in any action to enforce this Agreement shall be entitled
to recover its attorney's fees and costs in connection with such action.
14.11 Severability
If any provision of this Agreement shall be adjudged by any court of competent
jurisdiction to be unenforceable or invalid, that provision shall be limited or
eliminated to the minimum extent necessary so that this Agreement shall
otherwise remain in full force and effect and enforceable.
IN WITNESS WHEREOF, the Parties hereto, intending to be legally bound hereby,
have caused this Agreement to be executed by Licensees authorized
representative installing the Licensed Software and accepting the terms hereof
in connection therewith.
Appendix 1
1. Parts of the Licensed Software that are permitted for distribution in object
code form only ("Redistributables") under this Agreement:
- The Licensed Software's essential and add-on libraries
- The Licensed Software's configuration tool ("qtconfig")
- The Licensed Software's help tool ("Qt Assistant")
- The Licensed Software's internationalization tools ("Qt Linguist", "lupdate",
"lrelease")
- The Licensed Software's QML ("Qt Quick") launcher tool ("qmlscene" and
"qmlviewer")
- The Licensed Software's installer framework
2. Parts of the Licensed Software that are not permitted for distribution
include, but are not limited to:
- The Licensed Software's source code and header files
- The Licensed Software's documentation
- The Licensed Software's documentation generation tool ("qdoc")
- The Licensed Software's tool for writing makefiles ("qmake")
- The Licensed Software's Meta Object Compiler ("moc")
- The Licensed Software's User Interface Compiler ("uic" or in the case of Qt Jambi: "juic")
- The Licensed Software's Resource Compiler ("rcc")
- The Licensed Software's generator (only in the case of Qt Jambi if applicable)
- The Licensed Software's parts of the IDE tool ("Qt Creator")
- The Licensed Software's Emulator
- Build scripts, recipes and other material for creating the
configuration of Licensed Software and/or 3rd party components, including the
reference operating system configuration delivered in conjunction with the

File diff suppressed because it is too large Load Diff

8
.qmake.conf Normal file
View File

@ -0,0 +1,8 @@
load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST
QQC2_SOURCE_TREE = $$PWD
MODULE_VERSION = 5.15.3

1
.tag Normal file
View File

@ -0,0 +1 @@
453e302ea51a9f628ccb1382e812b09f259f890b

450
LICENSE.FDL Normal file
View File

@ -0,0 +1,450 @@
GNU Free Documentation License
Version 1.3, 3 November 2008
Copyright (C) 2000, 2001, 2002, 2007, 2008 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.
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
http://www.gnu.org/copyleft/.
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.

339
LICENSE.GPL2 Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) 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
this service 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. 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.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.
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
convey 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 2 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, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision 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, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This 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.

674
LICENSE.GPL3 Normal file
View File

@ -0,0 +1,674 @@
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>.

686
LICENSE.GPLv3 Normal file
View File

@ -0,0 +1,686 @@
GNU GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2017 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3. That license references
the General Public License version 3, that is displayed below. Other
portions of the Qt Toolkit may be licensed directly under 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>.

165
LICENSE.LGPL3 Normal file
View File

@ -0,0 +1,165 @@
GNU LESSER 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.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser 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
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

174
LICENSE.LGPLv3 Normal file
View File

@ -0,0 +1,174 @@
GNU LESSER GENERAL PUBLIC LICENSE
The Qt Toolkit is Copyright (C) 2017 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the LICENSE.GPLv3 file.
-------------------------------------------------------------------------
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this
licensedocument, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, “this License” refers to version 3 of the GNU Lesser
General Public License, and the “GNU GPL” refers to version 3 of the
GNU General Public License.
“The Library” refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An “Application” is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A “Combined Work” is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the “Linked
Version”.
The “Minimal Corresponding Source” for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The “Corresponding Application Code” for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort
to ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this
license document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken
together, effectively do not restrict modification of the portions of
the Library contained in the Combined Work and reverse engineering for
debugging such modifications, if you also do each of the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this
license document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of
this License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with
the Library. A suitable mechanism is one that (a) uses at run
time a copy of the Library already present on the user's
computer system, and (b) will operate properly with a modified
version of the Library that is interface-compatible with the
Linked Version.
e) Provide Installation Information, but only if you would
otherwise be required to provide such information under section 6
of the GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the Application
with a modified version of the Linked Version. (If you use option
4d0, the Installation Information must accompany the Minimal
Corresponding Source and Corresponding Application Code. If you
use option 4d1, you must provide the Installation Information in
the manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the Library
side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities, conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of
it is a work based on the Library, and explaining where to find
the accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser 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 Library
as you received it specifies that a certain numbered version of the
GNU Lesser General Public License “or any later version” applies to
it, you have the option of following the terms and conditions either
of that published version or of any later version published by the
Free Software Foundation. If the Library as you received it does not
specify a version number of the GNU Lesser General Public License,
you may choose any version of the GNU Lesser General Public License
ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the Library.

55
README.md Normal file
View File

@ -0,0 +1,55 @@
Qt Quick Controls 2
===================
![Qt Quick Controls 2 Styles](https://doc.qt.io/qt-5/images/qtquickcontrols2-styles.png)
The Qt Quick Controls 2 module delivers the next generation user interface
controls based on Qt Quick. In comparison to the desktop-oriented Qt Quick
Controls 1, Qt Quick Controls 2 are an order of magnitude simpler, lighter and
faster, and are primarily targeted towards embedded and mobile platforms.
Qt Quick Controls 2 are based on a flexible template system that enables rapid
development of entire custom styles and user experiences. Qt Quick Controls 2
comes with a selection of built-in styles:
- Default style - a simple and minimal all-round style that offers the maximum performance
- Fusion style - a platform-agnostic style that offers a desktop-oriented look'n'feel
- Imagine style - a designer-friendly style based on image assets
- Material style - a style based on the Google Material Design Guidelines
- Universal style - a style based on the Microsoft Universal Design Guidelines
More information can be found in the following blog posts:
- http://blog.qt.io/blog/2015/03/31/qt-quick-controls-for-embedded/
- http://blog.qt.io/blog/2015/11/23/qt-quick-controls-re-engineered-status-update/
- http://blog.qt.io/blog/2016/06/10/qt-quick-controls-2-0-a-new-beginning/
- http://blog.qt.io/blog/2016/10/06/qt-quick-controls-2-1-and-beyond/
- http://blog.qt.io/blog/2017/05/31/ready-made-ui-controls-qt-quick-controls-2-summary/
- http://blog.qt.io/blog/2017/11/23/qt-quick-controls-2-imagine-style/
- http://blog.qt.io/blog/2017/11/23/ready-qt-quick-controls-2-3/
## Help
If you have problems or questions, don't hesitate to:
- ask on the Qt Interest mailing list http://lists.qt-project.org/mailman/listinfo/interest
- ask on the Qt Forum http://forum.qt.io/category/12/qt-quick
- report issues to the Qt Bug Tracker https://bugreports.qt.io (component: *Qt Quick: Controls 2*)
## Installation
The MINIMUM REQUIREMENT for building this project is to use the same branch
of Qt 5. The dependencies are *qtbase* and *qtdeclarative*.
To install the controls into your Qt directory (```QTDIR/qml```):
qmake
make
make install
If you are compiling against a system Qt on Linux, you might have to use
```sudo make install``` to install the project.
## Usage
Please refer to the [Getting Started with Qt Quick Controls 2](https://doc.qt.io/qt-5/qtquickcontrols2-gettingstarted.html) documentation.

6
configure.json Normal file
View File

@ -0,0 +1,6 @@
{
"subconfigs": [
"src/quickcontrols2",
"src/quicktemplates2"
]
}

166
dist/changes-5.10.0 vendored Normal file
View File

@ -0,0 +1,166 @@
Qt 5.10 introduces many new features and improvements as well as bugfixes
over the 5.9.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.10 series is binary compatible with the 5.10.x series.
Applications compiled for 5.9 will continue to run with 5.10.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- [QTBUG-58060] DialogButtonBox with Material style now uses the Android
button layout.
****************************************************************************
* Controls *
****************************************************************************
- AbstractButton:
* [QTBUG-49820] Added support for icons. The following properties are
now available for derived types to use: icon.name, icon.source,
icon.width, icon.height, icon.color.
* [QTBUG-49820] Added display property to allow control over how icons
and text are displayed within buttons, without having to implement
custom delegates.
* [QTBUG-50705] Added AbstractButton::action property.
- Action:
* [QTBUG-50705] Introduced Action, an abstract user interface action
that can have shortcuts and be assigned to buttons.
- ActionGroup:
* [QTBUG-50705] Introduced ActionGroup, a non-visual group of actions
that is mutually exclusive by default.
- ApplicationWindow:
* [QTBUG-61336] The attached activeFocusControl property has been made
functional with a plain QML Window to make the functionality available
when using QQuickWindow/View/Widget instead of ApplicationWindow.
* [QTBUG-61336] Deprecated the overlay grouped property in favor of the
newly introduced Overlay attached properties.
- ButtonGroup:
* Added exclusive property to allow creating non-exclusive button
groups.
- Container:
* Deprecated removeItem(int) in favor of removeItem(Item) and
takeItem(int) with clearer semantics. The former destroys the item,
whereas the latter transfers ownership to the caller.
- Dialog:
* Added "result" property that holds whether the dialog was previously
accepted or rejected.
* Added a standardButton() method for accessing the standard buttons in
the dialog's button box.
* [QTBUG-59423] Added missing applied(), discarded(), helpRequested(),
and reset() signals that are emitted when the respective standard
buttons are clicked.
- DialogButtonBox:
* [QTBUG-59423] Added missing applied(), reset(), and discarded()
signals.
- Menu:
* [QTBUG-50471] Added a popup() method that opens a menu at the mouse
cursor on desktop platforms that have a mouse cursor available, and
otherwise centers the menu over its parent item.
* Added support for declaring Actions. The new "delegate" property is
used to define a Component that is used to create menu items that
present the actions.
* Deprecated removeItem(int) in favor of removeItem(Item) and
takeItem(int) with clearer semantics. The former destroys the item,
whereas the latter transfers ownership to the caller.
* [QTBUG-60351] Added support for cascading sub-menus.
* Added addMenu(), insertMenu(), removeMenu(), and takeMenu() methods
for adding and removing sub-menus programmatically.
* Added addAction(), insertAction(), removeAction(), and takeAction()
methods for adding and removing actions programmatically.
* Added currentIndex property for styling purposes.
* Added actionAt() and menuAt() accessors.
* Added a dismiss() method. Unlike close() that only closes a menu and
its sub-menus, dismiss() closes the whole hierarchy of menus,
including the parent menus.
* Added "count" property.
- MenuBar:
* [QTBUG-60350] Introduced a MenuBar control.
- MenuItem:
* Added a "menu" property that provides access to the menu that contains
the menu item.
* Menu has been fixed to highlight its items while key navigating and
mouse hovering to ensure seamless item highlight between mouse hover
and key navigation. In order to provide appropriate highlighting that
works for key navigation and mouse hover, styles should bind their
visual highlight to MenuItem::highlighted instead of
Control::activeFocus or Control::hovered.
- Overlay:
* [QTBUG-61336] Introduced Overlay attached properties and signals that
supersede the overlay grouped property in Application Window. The
Overlay attached type allows providing background dimming for popups
without requiring an ApplicationWindow instance.
- Popup:
* Added an "opened" boolean property that holds whether a popup is fully
open. That is, the popup is visible and neither the enter nor exit
transitions are running.
* Added "enabled" property.
* Added a read-only "mirrored" property that is true when the popup's
locale is right-to-left.
- RangeSlider:
* Added horizontal and vertical properties to make it more convenient to
create orientation-dependent bindings in styles.
- ScrollBar:
* Added horizontal and vertical properties to make it more convenient to
create orientation-dependent bindings in styles.
- ScrollIndicator:
* Added horizontal and vertical properties to make it more convenient to
create orientation-dependent bindings in styles.
- Slider:
* Added horizontal and vertical properties to make it more convenient to
create orientation-dependent bindings in styles.
- SpinBox:
* [QTBUG-58760] Added wrap-property to allow wrapping circular
spinboxes.
- StackView:
* Allowed specifying a transition when clearing the stack view.
- SwipeView:
* Added horizontal and vertical properties to make it more convenient to
create orientation-dependent bindings in styles.
- TabBar:
* Added index/tabBar/position attached properties.
****************************************************************************
* Styles *
****************************************************************************
- Introduced a Fusion style that offers a platform agnostic
desktop-oriented look'n'feel.
- Added the Imagine style, which is based on image assets that can be
provided using a predefined naming convention.
- Added support for specifying the default font for different styles in
qtquickcontrols2.conf.
- Fixed the style selection mechanism so that now it is possible to
organize platform and locale-specific files into sub-directories, such
as "+linux", "+macos", and "+windows".

49
dist/changes-5.10.1 vendored Normal file
View File

@ -0,0 +1,49 @@
Qt 5.10.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.10.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.10 series is binary compatible with the 5.9.x series.
Applications compiled for 5.9 will continue to run with 5.10.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
This release contains all fixes included in the Qt 5.9.4 release.
****************************************************************************
* Qt 5.10.1 Changes *
****************************************************************************
Controls
--------
- AbstractButton:
* [QTBUG-65193] Made button's text win over action's when both are
specified.
- Action:
* [QTBUG-65108] Fixed an issue where a checkable action would toggle
twice when toggling an associated checkable button.
* [QTBUG-65889] Fixed shortcuts in Repeater.
Styles
------
- Imagine:
* [QTBUG-65500] Fixed to respect user font settings from
qtquickcontrols2.conf.
Third-Party Code
----------------
- [QTBUG-65409] Document constants from AngularJS in
src/imports/controls/material/ElevationEffect.qml

161
dist/changes-5.11.0 vendored Normal file
View File

@ -0,0 +1,161 @@
Qt 5.11 introduces many new features and improvements as well as bugfixes
over the 5.10.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.11.0 Changes *
****************************************************************************
Important Behavior Changes
--------------------------
- [QTBUG-56295] CheckBox and CheckDelegate no longer force the tristate
property to true when setting checkState to Qt.PartiallyChecked. This
allows the controls to present a partially checked state without being
interactively tri-state.
- [QTBUG-56295] CheckBox and CheckDelegate no longer consider the partially
checked state as a checked state. This fixes check state cycling for non-
tri-state controls so that the check state goes from partially checked to
fully checked state.
Controls
--------
- AbstractButton:
* The autoRepeat property was promoted from Button to AbstractButton.
* Added autoRepeatDelay and autoRepeatInterval properties.
* [QTBUG-62811] Added pressX and pressY properties.
* [QTBUG-66625] Fixed the icon property group type registration.
- Action:
* [QTBUG-65193] Made AbstractButton's icon properties win over Action's
when both are set.
* [QTBUG-66625] Fixed the icon property group type registration.
- ButtonGroup:
* [QTBUG-56295][QTBUG-63782] Added checkState property that indicates
the combined check state of the entire group.
- CheckBox:
* [QTBUG-63238] Made it possible to implement nextCheckState() in QML.
- CheckDelegate:
* [QTBUG-63238] Made it possible to implement nextCheckState() in QML.
- ComboBox:
* [QTBUG-61348] Fixed key search in the popup.
* [QTBUG-66044] Fixed wheel event propagation.
- Control:
* [QTBUG-66133] Fixed focus scope controls, such as Frame, GroupBox,
Page, and Pane, to respect click focus policy by clearing a potential
sub-focus child. This makes it possible to close the virtual keyboard
by clicking the background of a Pane that has Qt.ClickFocus set as its
focusPolicy, for example.
* [QTBUG-66133] Fixed focus scope controls to respect wheel focus
policy.
- Dial:
* [QTBUG-66637] Fixed to keep mouse grab on mouse press.
- DialogButtonBox:
* [QTBUG-59719] Fixed implicit size calculation with one button.
- Drawer:
* [QTBUG-66637] Fixed to no steal mouse/touch grab when e.g. dragging a
horizontal Slider in a horizontal Drawer.
- Label:
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.
- Popup:
* [QTBUG-66113] Fixed restoring focus for popups that did not originally
request focus, but gained focus after opening.
* Fixed Shortcuts in Popups with window context not being activated.
- RangeSlider:
* [QTBUG-66637] Fixed to keep mouse grab on mouse press.
- ScrollBar:
* [QTBUG-56557] Added minimumSize, visualSize, and visualPosition
properties.
- ScrollIndicator:
* [QTBUG-56557] Added minimumSize, visualSize, and visualPosition
properties.
- Slider:
* [QTBUG-66637] Fixed to keep mouse grab on mouse press.
- SpinBox:
* Added a displayText property that allows styles to create a simple
and efficient QML binding to display the textual value instead of
calling the textFromValue() JS-function.
* [QTBUG-66044] Fixed wheel event propagation.
- StackView:
* [QTBUG-51321] Fixed to transfer focus to the current item.
* [QTBUG-67118] Fixed a crash with initialItem.
- TextArea:
* [QTBUG-67334] Fixed the background to not scroll when TextArea is
placed in a ScrollView.
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.
- TextField:
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.
Styles
------
- [QTBUG-66430] Fixed to not override/reset platform default fonts and
palettes if :/qtquickcontrols2.conf exists but doesn't define fonts
or palettes.
- Fusion:
* [QTBUG-66752] Fixed BusyIndicator to show up when running is set to
true after creation.
* [QTBUG-66276] Added missing plugins.qmltypes.
- Material:
* Decreased Dial's handle size from 14 to 10.
* [QTBUG-64872] Made BusyIndicator's line size adapt to the size of the
control.
* [QTBUG-58646] Fixed artifacts in ripple effects.
* [QTBUG-67442] Fixed CheckBox's, CheckDelegate's, RadioButton's and
RadioDelegate's indicator in disabled state.
- Universal:
* Decreased Dial's handle size from 20 to 14.
Platform
--------
- ColorDialog:
* [QT3DS-1363] Fixed currentColor to get correctly updated when opening
the dialog first time.
- Menu:
* [QTBUG-55251] Fixed positioning on high-DPI screens.
* [QTBUG-66876] Fixed menu titles not being visible if they were defined
using qsTr() or bindings.
* [QTBUG-66889] Fixed a crash on exist with sub-menus on Windows.
- MenuItem:
* [QTBUG-66386] Fixed checked state handling.

25
dist/changes-5.11.1 vendored Normal file
View File

@ -0,0 +1,25 @@
Qt 5.11.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.11.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.11.1 Changes *
****************************************************************************
- [QTBUG-67684] ComboBox: don't block the escape/back key
- [QTBUG-67684] ComboBox: reset when hidden

32
dist/changes-5.11.2 vendored Normal file
View File

@ -0,0 +1,32 @@
Qt 5.11.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.11.0 through 5.11.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.11.2 Changes *
****************************************************************************
- [QTBUG-69897] StackView: fixed a crash in viewItemTransitionFinished()
- [QTBUG-69839] ColorDialog: fixed a crash when initializing the platform dialog helper
- [QTBUG-69506] IconImage: prevented the color from being applied twice
- [QTBUG-66483] Popup: fixed a crash on exit when using a shader
- [QTBUG-68219] Styles: fixed handling of QRC paths in QT_QUICK_CONTROLS_STYLE_PATH
- [QTBUG-68858] Menu: fixed items not being scrollable when using Window
- [QTBUG-68737] Tumbler: fixed to respect currentIndex changes in onModelChanged
- [QTBUG-68769] TextArea, TextField: fixed to use the control's renderType in placeholder text
- SpinBox: fixed "function expressions as statements" warnings

20
dist/changes-5.11.3 vendored Normal file
View File

@ -0,0 +1,20 @@
Qt 5.11.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.11.0 through 5.11.2.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.11 series is binary compatible with the 5.10.x series.
Applications compiled for 5.10 will continue to run with 5.11.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
- This release contains only minor code improvements.

171
dist/changes-5.12.0 vendored Normal file
View File

@ -0,0 +1,171 @@
Qt 5.12 introduces many new features and improvements as well as bugfixes
over the 5.11.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- AbstractButton:
* Added implicitIndicatorWidth and implicitIndicatorHeight properties.
- ComboBox:
* Added implicitIndicatorWidth and implicitIndicatorHeight properties.
- Control:
* Added horizontalPadding and verticalPadding properties as a convenient
way to set both left and right, or top and bottom paddings in one go.
* Unless explicitly specified, baselineOffset is now automatically
updated based on the top padding of the control and the baselineOffset
of the contentItem. Styles no longer need to specify the
baselineOffset in QML.
* [QTBUG-60156] Added implicitBackgroundWidth and
implicitBackgroundHeight properties that can be used to simplify
complex implicit size bindings.
* Added implicitContentWidth and implicitContentHeight properties that
can be used to simplify complex implicit size bindings.
* [QTBUG-60156] Added topInset, bottomInset, leftInset, and rightInset
properties to control the geometry of the background similarly to how
paddings control the geometry of the contentItem.
- Dial:
* [QTBUG-56323] Added the inputMode property. This property controls how
the dial is interacted with. The circular input mode (default, old
behavior) operates on an absolute input system, whereas the horizontal
and vertical input modes use a relative input system.
- Dialog:
* Added implicitHeaderWidth, implicitHeaderHeight, implicitFooterWidth,
and implicitFooterHeight properties.
- DialogButtonBox:
* Added buttonLayout property that can be used to arrange the buttons.
* Added contentWidth and contentHeight properties.
- GroupBox:
* Added implicitLabelWidth and implicitLabelHeight properties.
- Label:
* Added implicitBackgroundWidth and implicitBackgroundHeight properties
that can be used to simplify complex implicit size bindings.
[ChangeLog][Controls][TextArea] Added implicitBackgroundWidth and
implicitBackgroundHeight properties that can be used to simplify
complex implicit size bindings. [ChangeLog][Controls][TextField] Added
implicitBackgroundWidth and implicitBackgroundHeight properties that
can be used to simplify complex implicit size bindings.
* Added topInset, bottomInset, leftInset, and rightInset properties to
control the geometry of the background similarly to how paddings
control the geometry of the contentItem.
- Page:
* Added implicitHeaderWidth, implicitHeaderHeight, implicitFooterWidth,
and implicitFooterHeight properties.
- Popup:
* Added horizontalPadding and verticalPadding properties as a convenient
way to set both left and right, or top and bottom paddings in one go.
* [QTBUG-60354] Added anchors.centerIn to Popup to allow a covenient way
of centering a popup.
* Added implicitBackgroundWidth, implicitBackgroundHeight,
implicitContentWidth, and implicitContentHeight properties.
* [QTBUG-60156] Added topInset, bottomInset, leftInset, and rightInset
properties to control the geometry of the background similarly to how
paddings control the geometry of the contentItem.
- QQuickStyle:
* [QTBUG-67062] Added stylePathList() and addStylePath() methods for
managing the list of directories where Qt Quick Controls 2 searches
for available styles.
- RangeSlider:
* [QTBUG-67311] Added a moved() signal to each handle (similar to the
Slider's moved() signal) to react to the values being interactively
changed by the user.
* [QTBUG-67317] Added a valueAt() function to allow accessing each
handle's value when the live property is set to false.
* Added first.implicitHandleWidth, first.implicitHandleHeight,
second.implicitHandleWidth, and second.implicitHandleHeight
properties.
* [QTBUG-62784] Added touchDragThreshold property for configuring the
threshold to initiate the touch 'drag' of the handle of the slider. The
mouse 'drag' won't be affected by the property.
- Slider:
* Added implicitHandleWidth and implicitHandleHeight properties.
* [QTBUG-62784] Added touchDragThreshold property for configuring the
threshold to initiate the touch 'drag' of the handle of the slider. The
mouse 'drag' won't be affected by the property.
- SpinBox:
* Added up.implicitIndicatorWidth, up.implicitIndicatorHeight,
down.implicitIndicatorWidth, and down.implicitIndicatorHeight
properties.
- SwipeView:
* Added contentWidth and contentHeight properties.
- TextArea:
* Added topInset, bottomInset, leftInset, and rightInset properties to
control the geometry of the background similarly to how paddings
control the geometry of the contentItem.
* Added placeholderTextColor property for user convenience to customize
the placeholderText color to fit the backgrounds.
- TextField:
* Added topInset, bottomInset, leftInset, and rightInset properties to
control the geometry of the background similarly to how paddings
control the geometry of the contentItem.
* [QTBUG-66260] Added placeholderTextColor property for user convenience
to customize the placeholderText color to fit the backgrounds.
- ToolTip:
* [QTBUG-62890] Added non-attached show() and hide() methods to make it
more flexible to meet certain requirements.
- Tumbler:
* [QTBUG-66358] Added positionViewAtIndex() function that calls the
respective PathView/ListView function, depending on the value of wrap.
This allows changing currentIndex without animations.
****************************************************************************
* Material *
****************************************************************************
- [QTBUG-51109] Added Dense variant of the Material style for use on
desktop platforms. Some controls are slightly smaller in height and use
smaller font sizes. The variant can be enabled by setting
QT_QUICK_CONTROLS_MATERIAL_VARIANT to Dense or setting Variant=Dense in
the qtquickcontrols.conf file.
****************************************************************************
* Platform *
****************************************************************************
- Menu:
* [QTBUG-67730] Deprecated iconName and iconSource properties in favor
of icon.name and icon.source grouped properties.
* [QTBUG-67730] Added icon.mask grouped property.
[ChangeLog][Platform][MenuItem] Added icon.mask grouped property.
[ChangeLog][Platform][SystemTrayIcon] Added icon.mask grouped
property.
- MenuItem:
* [QTBUG-67730] Deprecated iconName and iconSource properties in favor
of icon.name and icon.source grouped properties.
- SystemTrayIcon:
* [QTBUG-67730] Deprecated iconName and iconSource properties in favor
of icon.name and icon.source grouped properties.

20
dist/changes-5.12.1 vendored Normal file
View File

@ -0,0 +1,20 @@
Qt 5.12.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
- This release contains only minor code improvements.

27
dist/changes-5.12.10 vendored Normal file
View File

@ -0,0 +1,27 @@
Qt 5.12.10 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.9.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5.12/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-84579] Fixed crash on exit when centering Popup within Overlay in
StackView item.
- [QTBUG-79464] QQuickPopup: fixed focus not being transferred to the
appropriate item when multiple popups were closing.

60
dist/changes-5.12.2 vendored Normal file
View File

@ -0,0 +1,60 @@
Qt 5.12.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-73849] Fixed incorrect documentation link to
Number.toLocaleString().
- [QTBUG-72536] Fixed bug with long text in ScrollView.
- [QTBUG-73447] Fixed Menu's appearance not changing when enabled state
changes
- [QTBUG-70181] Fixed disabled menu items getting focus.
- [QTBUG-69540] Fixed disabled sub-menu items being highlighted.
- [QTBUG-72023] Fixed font and palette settings in .conf files not being
respected.
- [QTBUG-69682] Fixed Menu not being dismissed when the triggered item
disables itself.
- [QTBUG-73412] Fixed Dial's new properties not being detected by Creator.
- [QTBUG-73202] Documented how to move active focus out of TextArea with
tab.
- [QTBUG-72786] Fixed palette colors not propagating to ComboBox's popup.
- [QTBUG-73179] Fixed Qt.labs.platform.FileDialog not honoring folder
property.
- [QTBUG-72811] Fixed AbstractButton's clicked() signal not being emitted
after long press.
- [QTBUG-72746] Fixed crash on exit when using popups.
- [QTBUG-72372] Fixed issue where a button would go outside of
DialogButtonBox.
- [QTBUG-71902] Fixed incorrect font size in certain styles on Windows.
- [QTBUG-72750] Fixed Slider's wheel event propagation.
****************************************************************************
* Controls *
****************************************************************************
Fusion
------
- [QTBUG-70819] Made Active and Disabled button colors closer to Widgets'
Fusion style.
- [QTBUG-70819] Use white ButtonText when a dark system theme is in use.
- [QTBUG-70652] Use system palette for highlightedText instead of a fixed
white color.

46
dist/changes-5.12.3 vendored Normal file
View File

@ -0,0 +1,46 @@
Qt 5.12.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.2.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-70451] DialogButtonBox: fixed buttons with equal roles being
randomly sorted.
- [QTBUG-70161] ComboBox: fixed popup immediately closing on iOS
- [QTBUG-72886] DialogButtonBox: fixed content size calculation
- [QTBUG-74226] Fixed attached ToolTips using the timeout of the last shown
tool tip
- [QTBUG-72536] ScrollView now respects the content size set on/by
the flickable
- [QTBUG-73354] Menu: enter/return can now be used to activate items,
rather than just space.
- [QTBUG-71290] Drawer: fixed infinite positioning loop
- [QTBUG-66494] Page: fixed binding loop
****************************************************************************
* Styles *
****************************************************************************
Default
--------
- [QTBUG-72786] Made ItemDelegate respect highlightedText and improved
highlightedText color so that text shows up against a highlighted background.
This also allows easily switching ComboBox to a dark style via palette
customization.

20
dist/changes-5.12.4 vendored Normal file
View File

@ -0,0 +1,20 @@
Qt 5.12.4 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.3.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
- This release contains only minor code improvements.

28
dist/changes-5.12.5 vendored Normal file
View File

@ -0,0 +1,28 @@
Qt 5.12.5 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.12.0 through 5.12.4.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.12 series is binary compatible with the 5.11.x series.
Applications compiled for 5.11 will continue to run with 5.12.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- TextArea:
* [QTBUG-76369] Fixed rendering issue using the Material style.
- Container
* [QTBUG-76164] Fixed crash when removing items.

33
dist/changes-5.13.0 vendored Normal file
View File

@ -0,0 +1,33 @@
Qt 5.13 introduces many new features and improvements as well as bugfixes
over the 5.12.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.13 series is binary compatible with the 5.12.x series.
Applications compiled for 5.12 will continue to run with 5.13.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- Added SplitView, a control that lays out items horizontally or vertically
with a draggable splitter between each item.
- Added cache property to icon.
- [QTBUG-75072] ScrollBar: fixed value not changing when scrolling via
VoiceOver.
- [QTBUG-74661] QQuickComboBox: we no longer hide popup when it's focused.
- [QTBUG-69096] Doc: expanded upon Pane's Content Sizing section.
- [QTBUG-74902] Doc: added a Size section to explain StackView's sizing
behavior.
- [QTBUG-74688] SpinBox: fixed indicators being hovered when mouse is moved
while pressed.
- [QTBUG-74276] Fix SplitView crash when using certain attached properties.

31
dist/changes-5.13.1 vendored Normal file
View File

@ -0,0 +1,31 @@
Qt 5.13.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.13.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.13 series is binary compatible with the 5.12.x series.
Applications compiled for 5.12 will continue to run with 5.13.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-76356] Accessibility: a Switch now has checkbox as its accessibleRole.
- [QTBUG-75572] Fixed an issue with transforming Shortcut.sequence to string.
- [QTBUG-75844] The text cursor no longer disappears while dragging it
around on iOS with the magnifier showing.
- [QTBUG-75972] The countChanged signal now will be emitted when a new
model is set on a ComboBox.
- [QTBUG-67343] It's now OK to use a ShaderEffect in a ComboBox delegate
(fixed in Qt Quick, tested in Controls 2)

25
dist/changes-5.13.2 vendored Normal file
View File

@ -0,0 +1,25 @@
Qt 5.13.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.13.0 through 5.13.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.13 series is binary compatible with the 5.12.x series.
Applications compiled for 5.12 will continue to run with 5.13.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- QQuickTextArea:
* Fixed rendering issue when using TextArea in a ScrollView.

51
dist/changes-5.14.0 vendored Normal file
View File

@ -0,0 +1,51 @@
Qt 5.14 introduces many new features and improvements as well as bugfixes
over the 5.13.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.14 series is binary compatible with the 5.13.x series.
Applications compiled for 5.13 will continue to run with 5.14.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- ComboBox:
* Added valueRole, currentValue and indexOfValue(). These allow
convenient management of data for a role associated with the text
role.
- QQuickMenuBar:
* Fixed issue with dynamically menu bar items not losing their highlight
when their menu was dismissed.
- QQuickPopup:
* Fixed the issue that Popup doesn't respond to CloseOnEscape if the
initial value of visible is true
- [QTBUG-79790] Fixed issue where font changes would result in an extra
signal being emitted.
- [QTBUG-59330] The documentation now advises against naming root resource
directories with the same name as a style name.
- [QTBUG-79302] SplitView: fix issue where Repeater items were not created.
- [QTBUG-79302] SplitView: fix cursor shape staying as Split*Cursor in some
cases.
- [QTBUG-79270] Fixed assertion failure when hiding a SplitView with only
one item.
****************************************************************************
* Universal *
****************************************************************************
- TabBar:
* Disabled wrapping. The Universal style TabBar now behaves like TabBar
from other styles.

29
dist/changes-5.14.1 vendored Normal file
View File

@ -0,0 +1,29 @@
Qt 5.14.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.14.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.14 series is binary compatible with the 5.13.x series.
Applications compiled for 5.13 will continue to run with 5.14.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- StackView:
* [QTBUG-80353] fixed crash when recursively removing items.
* [QTBUG-57267] fix an issue where the current item became hidden.
- SplitView:
* [QTBUG-79846] fixed hoverable child items breaking handle hover state.

40
dist/changes-5.14.2 vendored Normal file
View File

@ -0,0 +1,40 @@
Qt 5.14.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.14.0 through 5.14.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.14 series is binary compatible with the 5.13.x series.
Applications compiled for 5.13 will continue to run with 5.14.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-82032] AbstractButton: fixed clicked() being emitted after
doubleClicked().
- [QTBUG-81935] ToolTip: fixed timeout not activating if opened during exit
transition.
- [QTBUG-77202] Control: we now account for when a touch event is
synthesized by Qt as a mouse event.
- [QTBUG-81796] DialogButtonBox: fixed explicitly set button text not being
rendered.
- [QTBUG-75682] Fixed issue where Qt Quick Designer was not able to work
with the module on WebAssembly/static builds.
- [QTBUG-80970] RangeSlider: fixed errors in the documentation's example
code.
- [QDS-456] placeholderText is now set by default in Qt Design Studio
instead of text when dragging a TextField or TextArea onto the form
editor.
- [QTBUG-81216] Fixed QQuickStyle::setFallbackStyle() not working on
Android.

80
dist/changes-5.15.0 vendored Normal file
View File

@ -0,0 +1,80 @@
Qt 5.15 introduces many new features and improvements as well as bugfixes
over the 5.14.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5/index.html
The Qt version 5.15 series is binary compatible with the 5.14.x series.
Applications compiled for 5.14 will continue to run with 5.15.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
Qt 5.15 introduces many new features and improvements as well as bugfixes
over the 5.14.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
https://doc.qt.io/qt-5.15/index.html
The Qt version 5.15 series is binary compatible with the 5.14.x series.
Applications compiled for 5.14 will continue to run with 5.15.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- [QTBUG-72085] Old delegate items (background, contentItem, etc.) are no
longer destroyed, as they are technically owned by user code. Instead,
they are hidden, unparented from the control (QQuickItem parent, not
QObject), and Accessible.ignored is set to true. This prevents them from
being unintentionally visible and interfering with the accessibility
tree when a new delegate item is set.
See the following page for more information:
https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#considerations-for-custom-styles
****************************************************************************
* Controls *
****************************************************************************
- Added HorizontalHeaderView and VerticalHeaderView for use with TableView.
- Added selectTextByMouse property to ComboBox.
- [QTBUG-82473] Fixed Menu not taking padding into account when checking
if it is interactive.
- [QTBUG-73687] Fixed Menu positioning when a scale is set.
- [QTBUG-81867] Fixed hidden SplitView items causing visible items to not
be resizable.
- [QTBUG-82020] Fixed ComboBox text not being retranslated after a
translator is installed.
- [QTBUG-79501] Fixed keyboard navigation via tab in non-modal popups
(i.e. Drawer).
- [QTBUG-78858] Fixed Editable ComboBox's auto-completion performance.
****************************************************************************
* Styles *
****************************************************************************
Material
--------
- [QTBUG-70768] Added missing visual distinction between enabled and
disabled sliders.
- [QTBUG-70768] Aligned Slider's visuals closer to the Material Design
guidelines.
Imagine
-------
- [QTBUG-82463] Fixed squished Dial.

49
dist/changes-5.15.1 vendored Normal file
View File

@ -0,0 +1,49 @@
Qt 5.15.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.15.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5.15/index.html
The Qt version 5.15 series is binary compatible with the 5.14.x series.
Applications compiled for 5.14 will continue to run with 5.15.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-64151] QQuickSpinBox: fixed "function expressions as statements"
warning.
- [QTBUG-85804] SwipeDelegate: fixed being able to call close() when
pressed. This conflicts with the behavior of SwipeDelegate. The
released() or clicked() signals should be used instead.
- [QTBUG-85806] SwipeDelegate: fixed closed() being emitted when already
closed.
- [QTBUG-85884] Fixed Dialog not releasing focus when it was hidden as a
result of losing focus.
- [QTBUG-84488] Fixed ComboBox popup position jumping when opened with
styles that user enter transitions.
- [QTBUG-84579] Fixed crash on exit when centering Popup within Overlay in
StackView item.
- [QTBUG-81976][QTBUG-86131] Fixed various "Cannot read property 'width'
of null" errors.
- [QTBUG-84381] StackView: fixed heap-use-after-free when pushing after clear.
- [QTBUG-83554] ComboBox: fixed currentValue not being updated on model
changes.
Platform
--------
- MenuItem:
* [QTBUG-84102] Fix MenuItem.icon.* properties not being accessible when
importing version 1.1.

42
dist/changes-5.15.2 vendored Normal file
View File

@ -0,0 +1,42 @@
Qt 5.15.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.15.1.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
https://doc.qt.io/qt-5.15/index.html
The Qt version 5.15 series is binary compatible with the 5.14.x series.
Applications compiled for 5.14 will continue to run with 5.15.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-83698] Fixed issue where a menu opened by pressing enter (handled
via attached Keys property) would instantly trigger the first menu
item.
- [QTBUG-86851] QQuickMenu: fixed memory leak due to contentModel not being
deleted. Also fixed a heap-use-after-free that was exposed by the
previously mentioned fix.
- [QTBUG-85884] Fixed expected item not getting focus when a dialog closes.
- [QTBUG-85719] Fixed SpinBox failing to validate input correctly after
previous input was out of range.
****************************************************************************
* Styles *
****************************************************************************
Material
--------
- [QTBUG-85699] Fixed binding loops when binding between attached
properties.

196
dist/changes-5.7.1 vendored Normal file
View File

@ -0,0 +1,196 @@
Qt 5.7.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.7.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.7 series is binary compatible with the 5.6.x series.
Applications compiled for 5.6 will continue to run with 5.7.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- AbstractButton, Control, and Container now calculate their implicit size
based on the implicit size of the content item plus paddings, and the
implicit size of the background item. This makes it convenient to implement
custom controls and buttons, because the implicit size calculation for
these abstract/non-visual base types works as expected out of the box, but
may cause surprises if an application relies on the old behavior that a
custom control does not have any implicit size by default.
- Drawers have been changed to follow the same visibility rules than all
other types of popups do. This means that drawers no longer stay visible
at the window edge in order to intercept input events, because that caused
severe conflicts in input handling and stacking order between multiple
drawers and other popups.
- Popups have been fixed to respect explicitly set width and height.
Previously, explicitly set size was accidentally ignored when a popup had
implicit size set.
****************************************************************************
* Controls *
****************************************************************************
- ApplicationWindow:
* [QTBUG-55143] Fixed the content layout to take header and footer
visibility into account.
- ComboBox:
* [QTBUG-54573] Fixed a bug which caused ghost items, from outside the
popup's visible area, to appear in the popup.
* [QTBUG-55118] Fixed the display text to be properly updated on model
changes.
* [QTBUG-55050] Fixed the default delegates to respect the popup width.
* [QTBUG-55030] Fixed the highlighted item to be visible in the popup when
it is opened.
- Control:
* [QTBUG-56007] Fixed the hovered state to get cleared when hidden.
- Dial:
* [QTBUG-55228] Fixed step size and snap mode handling with ranges starting
from a non-zero value.
- Drawer:
* [QTBUG-54578] Fixed a closed drawer to not peek out from the window edge
while resizing the window.
* [QTBUG-54629] Fixed a bug in drag margin handling that allowed the user
to sometimes drag out the drawer even if dragging was disabled.
* Fixed a bug in the calculation of swipe velocity.
* [QTBUG-54800] Fixed conflicts between multiple drawers.
* [QTBUG-54794][QTBUG-55022] Fixed conflicts between drawers and other
popups.
* [QTBUG-55703] Fixed the stacking order of multiple drawers and popups.
* [QTBUG-55995] Fixed flickering on touch release.
* [QTBUG-55360] Made it possible to control the vertical position of
a horizontal drawer, and vice versa. This allows placing a drawer below
a header/toolbar, for instance.
- Page:
* [QTBUG-55143] Fixed the content layout to take header and footer
visibility into account.
- RangeSlider:
* [QTBUG-55015] Fixed step size and snap mode handling with ranges starting
from a non-zero value.
- Slider:
* [QTBUG-54140] Fixed step size and snap mode handling with ranges starting
from a non-zero value.
- Popup:
* [QTBUG-56025] Fixed to respect explicitly set width and height.
* [QTBUG-53419] Fixed hover events to not leak through popups or modal
background dimming.
* [QTBUG-55004] Fixed popups to appear above the QML-based dialogs from
QtQuick.Dialogs 1.x.
* [QTBUG-55347] Fixed a crash on dynamic parent item changes.
* [QTBUG-54797] Fixed the background dimming to update accordingly on
dynamic changes to the dim and modal properties.
* [QTBUG-55729] Fixed popups to close on touch events when using a plain
Window instead of ApplicationWindow.
* [QTBUG-54913] Fixed hover event delivery with plain Window.
* [QTBUG-55769] Fixed wheel events to not leak through modal background
dimming.
- ScrollIndicator:
* [QTBUG-55620] Fixed to respect the paddings when overshooting, so that
the indicator doesn't move outside the bounds of the attached flickable.
- SpinBox:
* [QTBUG-56215] Fixed valueFromText() to not get called for non-editable
spinboxes.
- StackView:
* Fixed the "unknown argument" warning when popping down to the current
item.
* [QTBUG-54552] Fixed to claim ownership of dynamically created items.
* [QTBUG-56158] Fixed a crash in pop() when attempting to pop an item that
is still activating from a previous popup.
* [QTBUG-55749] Allowed loading remote URLs.
- SwipeDelegate:
* [QTBUG-54648] Fixed the use of buttons or other interactive controls at
the sides or behind the delegate.
* [QTBUG-54660][QTBUG-54780] Fixed content re-layouting issues.
* [QTBUG-55040] Added a warning for conflicting anchors.
- Switch:
* [QTBUG-55647] Fixed focus on tap/click over the handle.
* Fixed missing pressed() and released() signals.
* Fixed dragging of the handle on touch.
- SwitchDelegate:
* Made the handle draggable.
- TabBar:
* [QTBUG-55129] Fixed a bug which caused ghost items, from outside the
tabbar's visible area, to appear in the tabbar.
* [QTBUG-55129] Improved the behavior of flickable tabs.
* [QTBUG-56265] Fixed mixing of fixed and implicitly resized tabs.
* Fixed to re-layout as appropriate when tabs are resized at run-time.
- TabButton:
* [QTBUG-55129] Fixed implicit width calculation.
- TextArea:
* [QTBUG-54615] Fixed mouse double click to select a word.
* [QTBUG-54897] Fixed to not intercept input events outside the visual
bounds when attached to a Flickable.
* Set a caret or ibeam mouse cursor, indicating that the control can accept
and display text input.
- TextField:
* [QTBUG-54615] Fixed mouse double click to select a word.
* Set a caret or ibeam mouse cursor, indicating that the control can accept
and display text input.
* [QTBUG-55684] Improved the implicit size calculation.
- ToolTip:
* Fixed the shared tooltip instance to get destructed when the associated
QML engine is destructed.
* [QTBUG-55347] Fixed attached properties to apply to the shared tooltip
instance only when the shared tooltip is visible for the respective item
that the property is attached to.
* [QTBUG-54206] Fixed a bug that caused the shared tooltip to sometimes
fade out when it should stay visible.
* [QTBUG-55572] Fixed delay and visibility handling for standlone tooltips.
Material
--------
- Fixed (optional) elevation effects for Frame, GroupBox, Pane, and TabBar.
- Fixed SpinBox text color in disabled state.
- [QTBUG-54269] Added documentation for Material.Shade and the related
parameter of Material.color().
- [QTBUG-54935] Fixed white text on white background in ComboBox that is
placed in a ToolBar.
- [QTBUG-54472] Fixed rendering issues with multiple BusyIndicators.
- [QTBUG-55366] Fixed the default foreground and background colors read from
:/qtquickcontrols2.conf or environment variables.
- [QTBUG-55687] Fixed several issues with accent and background inheritance.
- Fixed the accent color, where the shade depends on the theme, to update as
appropriate on run-time theme changes.
- [QTBUG-52631] Fixed style inheritance issues with popups.
- [QTBUG-53266] Fixed the background color of dialogs in the dark theme.
- Fixed text cursor blink period.
Universal
---------
- Fixed Dial press effect.
- [QTBUG-52738] Fixed editor colors in the dark theme.
- [QTBUG-55366] Fixed the default foreground and background colors read from
:/qtquickcontrols2.conf or environment variables.

208
dist/changes-5.8.0 vendored Normal file
View File

@ -0,0 +1,208 @@
Qt 5.8 introduces many new features and improvements as well as bugfixes
over the 5.7.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.8 series is binary compatible with the 5.7.x series.
Applications compiled for 5.7 will continue to run with 5.8.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- Control:
* Control::hoverEnabled has been made to inherit to children, to make it
possible to disable hover effects for a tree of controls in one place.
- Tumbler:
* Changed the default value of visibleItemCount to 5 to make it visually
clearer that it's a Tumbler.
* [QTBUG-53587] Changed the default value of wrap to be false when count
is less than visibleItemCount. Explicitly setting wrap overrides this
behavior.
****************************************************************************
* Controls *
****************************************************************************
- AbstractButton:
* A plain AbstractButton now calculates its implicit size based on the
implicit size of the content item plus paddings, and the implicit size
of the background item.
* [QTBUG-51554] The checkable property has been made accessible from
QML. Previously it was only exposed for Button and MenuItem, but it is
now available for any AbstractButton to make it possible to create
custom QML-based checkable buttons.
* [QTBUG-57085] Fixed auto-repeat to not cancel on the tiniest mouse/touch
move, but keep repeating until moved outside the button.
* Fixed press-and-hold for checkable buttons to not toggle the checked
state on release after press-and-hold.
- ButtonGroup:
* Added clicked(AbstractButton) signal for centralized click handling for
grouped buttons.
- ComboBox:
* [QTBUG-56884] Added handling for Home and End keys.
* [QTBUG-56884] Added missing keyboard search functionality.
* [QTBUG-54935] Added a flat property that provides more suitable looks
for using ComboBox in a ToolBar.
- Container:
* Added incrementCurrentIndex() and decrementCurrentIndex() methods for
changing the current index without losing its property binding.
* A plain Container now calculates its implicit size based on the
implicit size of the content item plus paddings, and the implicit size
of the background item.
- Control:
* A plain Control now calculates its implicit size based on the implicit
size of the content item plus paddings, and the implicit size of the
background item.
- Dialog:
* Added a new Dialog type to provide convenience for handling dialog
popups. Dialog integrates with DialogButtonBox, and provides convenient
accepted() and rejected() signals.
- DialogButtonBox:
* Added DialogButtonBox to provide convenience for handling dialog buttons.
DialogButtonBox is able to create a set of standard buttons with a single
line of QML code, and provides convenient accepted() and rejected() signals.
- Drawer:
* [QTBUG-55360] Made it possible to control the vertical position of a
horizontal drawer, and vice versa. This allows placing a drawer below
a header/toolbar, for instance.
- MenuSeparator:
* [QTBUG-54862] Added MenuSeparator to visually distinguish between groups
of items in a menu.
- Page:
* [QTBUG-56709] Page has been made to calculate its implicit size based
on the implicit size of the header, content, and footer plus paddings,
and the implicit size of the background item.
- Popup:
* [QTBUG-56025] Fixed to respect explicitly set width and height.
* [QTBUG-56562] The QML Shortcut type from QtQuick has been fixed to
respect modal popups from QtQuick Controls 2.
* [QTBUG-56755] Fixed binding loops with size-dependent positioning.
- RangeSlider:
* [QTBUG-50003] Added first.hovered and second.hovered properties that
hold whether the respective handles are hovered.
- RoundButton:
* [QTBUG-54967] Added RoundButton.
- Slider:
* [QTBUG-53847] Added valueAt() method for converting any position to a
value in the slider's range. It is also possible to use valueAt() to get
continuous value updates.
- SpinBox:
* [QTBUG-50003] Added up.hovered and down.hovered properties that hold
whether the respective buttons are hovered.
* [QTBUG-57085] Fixed auto-repeat to not cancel on the tiniest mouse/touch
move, but keep repeating until moved outside the button.
- StackView:
* Added attached StackView.activated(), StackView.deactivated(),
StackView.activating(), and StackView.deactivating() signals that are
convenient for initializing and cleaning up item-specific resources.
* [QTBUG-55405] Added StackView.removed() attached signal to provide a
way to delete items that StackView won't.
* Made it possible to choose the visual transition type for any operation.
This allows using for example push and pop transitions with replace(),
which allows implementing an "infinite" back and forward navigation
pattern while keeping the amount of instantiated items constant.
- SwipeDelegate:
* [QTBUG-54651] Added swipe.close() for setting swipe.position to 0.
* [QTBUG-54651] Added swipe.completed() for responding to completion of
swipes.
* [QTBUG-54651] Added attached SwipeDelegate.pressed property and
SwipeDelegate.clicked() signal for detecting when non-interactive
left/right/behind items are pressed and clicked.
* [QTBUG-56312][QTBUG-57285] Fixed spurious clicked() signal emission when
released outside the delegate.
* [QTBUG-57271] Fixed swipes that begin over a child item of a delegate.
- SwipeView:
* Added SwipeView.isNextItem and SwipeView.isPreviousItem attached
properties to make it straight-forward to use Loader for unloading
pages that are outside the reach.
* [QTBUG-54268] Added interactive property for controlling whether swipe
interaction is enabled.
- TextArea:
* [QTBUG-51009] Added pressed() and released() signals.
- TextField:
* [QTBUG-51009] Added pressed() and released() signals.
* Aligned the name of the pressAndHold() argument with TextArea
- ToolSeparator:
* [QTBUG-54862] Added ToolSeparator to visually distinguish between groups
of items in a toolbar by separating them with a line. It can be used in
horizontal or vertical toolbars.
- Tumbler:
* [QTBUG-53587] Added wrap property to control whether or not tumbler
wraps when it reaches the top and bottom.
****************************************************************************
* Styles *
****************************************************************************
- Added support for specifying the fallback style for custom styles via
:/qtquickcontrols2.conf, QT_QUICK_CONTROLS_FALLBACK_STYLE or
QQuickStyle::setFallbackStyle().
Material
--------
- [QTBUG-50003] Implemented ripple and hover effects.
- Fixed (optional) elevation effects for Frame, GroupBox, Pane, and
TabBar.
- Added Material.System theme enum value, that can be used to let the
Material style choose either the light or dark theme based on the
system theme colors.
Universal
---------
- [QTBUG-50003] Implemented hover effects
- Added Universal.System theme enum value, that can be used to let the
Universal style choose either the light or dark theme based on the
system theme colors.
****************************************************************************
* Platform *
****************************************************************************
- Introduced a new experimental Qt Labs Platform module that provides the
following native (Qt Widgets fallback when not available) QML types:
* ColorDialog
* FileDialog
* FolderDialog
* FontDialog
* Menu
* MenuBar
* MenuItem
* MenuItemGroup
* MenuSeparator
* MessageDialog
* StandardPaths
* SystemTrayIcon

208
dist/changes-5.9.0 vendored Normal file
View File

@ -0,0 +1,208 @@
Qt 5.9 introduces many new features and improvements as well as bugfixes
over the 5.8.x series. For more details, refer to the online documentation
included in this distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- Added multi-touch support for buttons and sliders. It is now possible to
touch-interact with multiple sliders and buttons at the same time.
- By popular demand, Slider, RangeSlider, and Dial have been changed to
report live value updates by default. This can be disabled by setting the
"live" property to false.
- [QTBUG-59920] Sliders and Dials now react immediately when using a
mouse. Now the initial drag threshold applies only on touch, to avoid
conflicting with flickables.
- [QTBUG-58667] ScrollBar now reacts immediately when using a mouse.
- [QTBUG-59629] Set explicit cursors on all interactive controls.
****************************************************************************
* Controls *
****************************************************************************
- AbstractButton:
* Added support for multi-touch.
* [QTBUG-57203] Added a toggled() signal that is emitted whenever a
checkable button is interactively toggled by the user by using either
touch, mouse, or keys.
- ApplicationWindow:
* [QTBUG-58932] The "data" property has been renamed to contentData, as it
was documented. Notice that a "data" property still exists in QML
Window, but is no longer overshadowed in ApplicationWindow.
- Control:
* [QTBUG-50992] Resolved the "Object destroyed during incubation" issue
that occurred randomly when customizing built-in delegates.
- ComboBox:
* [QTBUG-53876] Added "editable" property.
* Added "down" property.
- DelayButton:
* Added DelayButton that incorporates a delay before the button becomes
activated, to prevent accidental triggers.
- Dial:
* Added a "live" property that determines whether the dial provides live
updates for the "value" property while the handle is dragged.
* Added support for wheel handling when wheelEnabled is set to true.
* [QTBUG-57203] Added a moved() signal that is emitted whenever the dial
is interactively moved by the user by using either touch, mouse, or
keys.
* Fixed handling of inverted wheel events (natural touchpad scrolling
direction on macOS).
- Drawer:
* [QTBUG-53169] Added "interactive" property that specifies whether the
drawer reacts to swipes. This can be used to make drawer a
non-closable persistent side-bar.
- Menu:
* Fixed populating Menus with a Repeater.
- Popup:
* Allowed passing a Window as a parent when creating dynamic Popup
instances using eg. Component.createObject(). Previously, Popup
assumed the parent to be an Item, and would complain "cannot find
any window to open popup in" if a Window was passed.
* [QTBUG-58196] Allowed dynamic window changes after construction.
* Fixed the CloseOnRelease close policy for non-modal popups.
- RangeSlider:
* Added a "live" property that determines whether the range slider
provides live updates for the first.value and second.value properties
while the respective handle is dragged.
- ScrollBar:
* [QTBUG-56569] Added snapMode property for incremental or discrete
scrolling.
* Added an "interactive "property. A non-interactive ScrollBar is visually
and behaviorally similar to ScrollIndicator. This property is useful
for switching between typical mouse- and touch-orientated UIs with
interactive and non- interactive scroll bars, respectively.
* Added a "policy" property, which holds whether the scroll bar is shown
always/never/as needed (default).
- ScrollView:
* Added ScrollView. On touch, ScrollView enables flicking and makes
the scroll bars non-interactive. When interacted with a mouse device,
flicking is disabled and the scroll bars are interactive.
- Slider:
* Added support for multi-touch.
* Added a "live" property that determines whether the slider provides live
updates for the "value" property while the handle is dragged.
* [QTBUG-57203] Added a moved() signal that is emitted whenever the
slider is interactively moved by the user by using either touch,
mouse, wheel, or keys.
* Fixed handling of inverted wheel events (natural touchpad scrolling
direction on macOS).
- SpinBox:
* [QTBUG-56837] Added inputMethodHints and inputMethodComposing
properties for controlling the input method when using editable spin
boxes.
* [QTBUG-57203] Added a valueModified() signal that is emitted whenever
the value of a spin box has been interactively modified by the user by
using either touch, mouse, wheel, or keys.
* [QTBUG-60356] Forwarded focus to the internal editor of an editable
spin box.
- StackView:
* [QTBUG-56801] Added attached "StackView.visible" property that can be
used to control whether items below the top- most item are kept
visible.
* [QTBUG-57266] Prevented pushing duplicate items.
* [QTBUG-59034] Fixed pop/replace exit transition leak, sometimes leading
to random crashes since a transition could have been left running in the
background at destruction time.
* [QTBUG-59098] Prevented StackView filtering mouse ungrab events to avoid
MouseAreas being stuck in the pressed state.
* [QTBUG-59634] Improved component creation errors by using the standard
QML warning system that gives a context/location for the error.
- SwipeDelegate:
* [QTBUG-57192] Added "swipe.enabled" property to allow disabling of
swiping.
* Added swipe.open(side) method that can be used to programmatically
open the side item on the specified side, which can be either
SwipeDelegate.Left or SwipeDelegate.Right.
* Added swipe.opened() and swipe.closed() signals, which are emitted
when the delegate has been opened or closed by swipe, and the
respective transition has finished.
* Added a swipe.transition property that holds the transition that is
applied when a swipe is released, or swipe.open() or swipe.close() is
called.
- SwipeView:
* [QTBUG-56031] Added "orientation" property.
- TabBar:
* [QTBUG-57858] Added contentWidth and contentHeight properties that are
automatically calculated based on the total size of the tab items, but
can be manually overridden if desired. This fixes an issue that TabBar
was not able to reliably calculate an implicit size, and could in
certain scenarios enter an infinite loop due to a circular dependency
between the items' sizes and the tabbar's size.
- TextArea:
* [QTBUG-55999] Fixed the horizontal alignment of the placeholder text
in right-to-left UIs.
* TextArea has been made to work inside ScrollView, providing necessary
scroll bars out of the box.
- TextField:
* [QTBUG-55999] Fixed the horizontal alignment of the placeholder text
in right-to-left UIs.
- Tumbler:
* Added a "moving" property that describes whether the tumbler is
currently moving, due to the user either dragging or flicking the
tumbler.
****************************************************************************
* Styles *
****************************************************************************
- Added support for a QT_QUICK_CONTROLS_STYLE_PATH environment variable,
which can be used to specify lookup paths for Qt Quick Controls 2
styles. This allows device manufacturers and Linux distributions to
specify a system-wide style installation folder that may be located
outside the Qt installation tree.
- Added support for a QT_QUICK_CONTROLS_STYLE_CONF environment variable,
which can be used to override the default location of the Qt Quick
2 Controls configuration file (:/qtquickcontrols2.conf).
- QQuickStyle:
* Added availableStyles() method that returns the list of available
built-in styles.
Default
--------
- Visualized RangeSliders's range.
Material
--------
- [QTBUG-58797] Fixed cursor visibility for read-only editors.
****************************************************************************
* Platform *
****************************************************************************
- Menu:
* Fixed sub-menu handling when using the Qt Widgets fallbacks on
platforms that do not support native menus (Windows, for example).

75
dist/changes-5.9.1 vendored Normal file
View File

@ -0,0 +1,75 @@
Qt 5.9.1 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* General *
****************************************************************************
- [QTBUG-58571] Enabled the use of QML caching at build time.
- [QTBUG-61144] Added a configure feature for disabling multi- touch
support (configure -no-feature-quicktemplates2-multitouch).
****************************************************************************
* Controls *
****************************************************************************
- ApplicationWindow:
* [QTBUG-60893] Fixed access to revisioned members in base classes.
- ComboBox:
* [QTBUG-60684] Fixed an empty popup being shown after model is cleared.
- Container:
* [QTBUG-61310] Fixed a crash that occurred with Repeater under certain
circumstances.
- Menu:
* Fixed key navigation to skip separators.
- Page:
* [QTBUG-61109] Fixed the initial content layouting of dynamically created
Page instances.
- Popup:
* [QTBUG-61114] Fixed font inheritance for popups.
- SpinBox:
* [QTBUG-61426] Fixed valueModified() to get emitted on repeated value
changes during long press.
- StackView:
* Fixed clear() to not emit depthChanged() when the view is empty.
****************************************************************************
* Styles *
****************************************************************************
- QQuickStyle:
* [QTBUG-60973] Fixed availableStyles() to exclude debug symbol folders
(.dSYM) on macOS.
Default
--------
- RangeSlider:
* Fixed the second handle to visualize its pressed state.
Material & Universal
--------------------
- ScrollBar:
* Fixed flashing when calling decrease() or increase() for key navigation.

79
dist/changes-5.9.2 vendored Normal file
View File

@ -0,0 +1,79 @@
Qt 5.9.2 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Controls *
****************************************************************************
- BusyIndicator:
* [QTBUG-61785] Fixed busy indicators to not block touch events.
- Control:
* [QTBUG-63119] Fixed font inheritance in item views.
- Drawer:
* [QTBUG-61581] Fixed multi-touch leaking through modal overlay.
* [QTBUG-59652] Fixed non-modal drawer drag/swipe open and close.
- Menu:
* [QTBUG-61608] Fixed press-and-hold support by removing OnReleaseOutside
from the default close policy, to avoid closing on release when opened
from an onPressAndHold signal handler.
- Popup:
* [QTBUG-61698] Fixed multi-touch leaking through modal overlay
* Fixed focus handling for chained popups. When a popup is closed, focus
is now restored to the next popup in chain instead of transferring focus
to the window content.
* [QTBUG-62158] Fixed popups to take Window::contentOrientation into
account.
- PageIndicator:
* Fixed interactive page indicators to work on touch.
* [QTBUG-61785] Fixed non-interactive page indicators to not block touch
events.
- ScrollIndicator:
* [QTBUG-61785] Fixed scroll indicators to not block touch events.
- SpinBox:
* [QTBUG-61426] Fixed to emit valueModified() on long press.
* [QTBUG-62508] Fixed initial value validation.
- StackView:
* [QTBUG-62153] Fixed a crash that would occur when pushing new items
from a StackView.onRemoved signal handler.
* Fixed resolving of the initialItem URL.
- TextArea:
- TextField:
* [QTBUG-62854] Improved the Default style.
- ToolTip:
* [QTBUG-60492] Fixed tooltips to not block shortcuts.
- Tumbler:
* [QTBUG-61374] Fixed a regression with currentIndex and currentItem.
****************************************************************************
* Calendar *
****************************************************************************
- MonthGrid:
* [QTBUG-61585] Fixed the clicked() signal to be emitted on touch.

52
dist/changes-5.9.3 vendored Normal file
View File

@ -0,0 +1,52 @@
Qt 5.9.3 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.9.3 Changes *
****************************************************************************
- ButtonGroup:
* [QTBUG-62946][QTBUG-63470] Fixed an issue in tracking of the currently
checked button that caused a crash under certain circumstances.
- DialogButtonBox:
* [QTBUG-63898] Fixed a potential crash when using DialogButtonBox without
a contentItem.
- Popup:
* [QTBUG-63672] Fixed a dangling QML context that was causing random
crashes in the QML engine debug service.
- ScrollView:
* [QTBUG-62325] Fixed a binding loop when using a wrapping TextArea as
content.
- StackView:
* Fixed a resource leak that occurred when the creation of the initial
item failed.
- TextArea & TextField:
* [QTBUG-62854] Improved the Default style.
- Removed top-level opacity assignments to allow full customization.
- Added more distinction between disabled and placeholder text.
- Made disabled text more visible.
- ToolTip:
* [QTBUG-63644] Disabled hover to avoid tooltips blocking hover events,
which are typically used for showing tooltips on desktop platforms.

63
dist/changes-5.9.4 vendored Normal file
View File

@ -0,0 +1,63 @@
Qt 5.9.4 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- As a fix to QTBUG-50992, execution of delegates, such as contentItem and
background, is deferred until the construction of a control is complete,
or a delegate is accessed. Consequently, if a delegate is replaced with
a custom delegate, the default delegate is not created. Previously, when
a default delegate was replaced by a custom delegate, the default
delegate was nevertheless created and destroyed during the construction
of the control.
****************************************************************************
* Controls *
****************************************************************************
- [QTBUG-64548] Fixed shortcuts in QQuickWidget
- [QTBUG-65016] Fixed QQuickStyle::setFallbackStyle() in static builds
- [QTBUG-50992] Fixed a bug which caused delegates of customized controls
to often be "destroyed during incubation" when asynchronously incubated
by item views or asynchronous loaders.
- BusyIndicator:
* [QTBUG-62874] Fixed busy animation in QQuickWidget
- ProgressBar:
* [QTBUG-62874] Fixed indeterminate animation in QQuickWidget
- StackView:
* [QTBUG-65084] Fixed to not block touch events.
- SwipeView:
* [QTBUG-62110] Fixed slow swiping in large views
- ToolButton:
* [QTBUG-65052] Fixed round ripple for square buttons in the Material style
- Tumbler:
* [QTBUG-65165] Made currentIndex animations take a constant amount of
time (1 second) regardless of how many items are in the model. This
prevents Tumblers with large amounts of items from scrolling too
slowly when changing the currentIndex.

56
dist/changes-5.9.5 vendored Normal file
View File

@ -0,0 +1,56 @@
Qt 5.9.5 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.9.5 Changes *
****************************************************************************
Controls
--------
- Control:
* [QTBUG-65880] Fixed a bug in deferred execution, that caused the
background item to not follow the size of the control under certain
circumstances, leading to a visually missing background.
* [QTBUG-66133] Fixed focus scope controls, such as Frame, GroupBox,
Page, and Pane, to respect click and wheel focus policies by clearing
a potential sub-focus child. This makes it possible to close the virtual
keyboard by clicking the background of a Pane that has Qt.ClickFocus
set as its focusPolicy, for example.
- ComboBox:
* [QTBUG-65962] Fixed a bug in deferred execution, that caused the popup's
bindings to not get finalized under certain circumstances, leading to
a visually missing popup.
- Popup:
* [QTBUG-66113] Fixed restoring focus to popups that did not request
focus when opened, but gained focus later.
Platform
--------
- Menu:
* [QTBUG-55251] Fixed opening position on high-DPI screens.
Third-Party Code
----------------
- [QTBUG-65409] Document constants from AngularJS in
src/imports/controls/material/ElevationEffect.qml

39
dist/changes-5.9.6 vendored Normal file
View File

@ -0,0 +1,39 @@
Qt 5.9.6 is a bug-fix release. It maintains both forward and backward
compatibility (source and binary) with Qt 5.9.0 through 5.9.5.
For more details, refer to the online documentation included in this
distribution. The documentation is also available online:
http://doc.qt.io/qt-5/index.html
The Qt version 5.9 series is binary compatible with the 5.8.x series.
Applications compiled for 5.8 will continue to run with 5.9.
Some of the changes listed in this file include issue tracking numbers
corresponding to tasks in the Qt Bug Tracker:
https://bugreports.qt.io/
Each of these identifiers can be entered in the bug tracker to obtain more
information about a particular change.
****************************************************************************
* Qt 5.9.6 Changes *
****************************************************************************
Controls
--------
- Label:
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.
- TextArea:
* [QTBUG-67334] Fixed the background to not scroll when TextArea is
placed in a ScrollView.
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.
- TextField:
* [QTBUG-65880] Fixed a background size regression caused by deferred
execution.

3
examples/examples.pro Normal file
View File

@ -0,0 +1,3 @@
TEMPLATE = subdirs
SUBDIRS += \
quickcontrols2

View File

@ -0,0 +1,11 @@
TEMPLATE = app
QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter1-settingup
INSTALLS += target

View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}

View File

@ -0,0 +1,70 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
width: 540
height: 960
visible: true
Page {
anchors.fill: parent
header: Label {
padding: 10
text: qsTr("Contacts")
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}

View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,12 @@
TEMPLATE = app
QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc \
../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter2-lists
INSTALLS += target

View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}

View File

@ -0,0 +1,92 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
width: 540
height: 960
visible: true
Page {
anchors.fill: parent
header: Label {
padding: 10
text: qsTr("Contacts")
font.pixelSize: 20
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
ListView {
id: listView
anchors.fill: parent
topMargin: 48
leftMargin: 48
bottomMargin: 48
rightMargin: 48
spacing: 20
model: ["Albert Einstein", "Ernest Hemingway", "Hans Gude"]
delegate: ItemDelegate {
text: modelData
width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight
leftPadding: avatar.implicitWidth + 32
Image {
id: avatar
source: "qrc:/" + modelData.replace(" ", "_") + ".png"
}
}
}
}
}

View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,88 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
Page {
id: root
header: ToolBar {
Label {
text: qsTr("Contacts")
font.pixelSize: 20
anchors.centerIn: parent
}
}
ListView {
id: listView
anchors.fill: parent
topMargin: 48
leftMargin: 48
bottomMargin: 48
rightMargin: 48
spacing: 20
model: ["Albert Einstein", "Ernest Hemingway", "Hans Gude"]
delegate: ItemDelegate {
text: modelData
width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight
leftPadding: avatar.implicitWidth + 32
onClicked: root.StackView.view.push("qrc:/ConversationPage.qml", { inConversationWith: modelData })
Image {
id: avatar
source: "qrc:/" + modelData.replace(" ", "_") + ".png"
}
}
}
}

View File

@ -0,0 +1,143 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
Page {
id: root
property string inConversationWith
header: ToolBar {
ToolButton {
text: qsTr("Back")
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
onClicked: root.StackView.view.pop()
}
Label {
id: pageTitle
text: inConversationWith
font.pixelSize: 20
anchors.centerIn: parent
}
}
ColumnLayout {
anchors.fill: parent
ListView {
id: listView
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: pane.leftPadding + messageField.leftPadding
displayMarginBeginning: 40
displayMarginEnd: 40
verticalLayoutDirection: ListView.BottomToTop
spacing: 12
model: 10
delegate: Row {
readonly property bool sentByMe: index % 2 == 0
anchors.right: sentByMe ? listView.contentItem.right : undefined
spacing: 6
Rectangle {
id: avatar
width: height
height: parent.height
color: "grey"
visible: !sentByMe
}
Rectangle {
width: 80
height: 40
color: sentByMe ? "lightgrey" : "steelblue"
Label {
anchors.centerIn: parent
text: index
color: sentByMe ? "black" : "white"
}
}
}
ScrollBar.vertical: ScrollBar {}
}
Pane {
id: pane
Layout.fillWidth: true
RowLayout {
width: parent.width
TextArea {
id: messageField
Layout.fillWidth: true
placeholderText: qsTr("Compose message")
wrapMode: TextArea.Wrap
}
Button {
id: sendButton
text: qsTr("Send")
enabled: messageField.length > 0
}
}
}
}
}

View File

@ -0,0 +1,12 @@
TEMPLATE = app
QT += qml quick
CONFIG += c++11
SOURCES += main.cpp
RESOURCES += qml.qrc \
../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter3-navigation
INSTALLS += target

View File

@ -0,0 +1,65 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}

View File

@ -0,0 +1,66 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
id: window
width: 540
height: 960
visible: true
StackView {
id: stackView
anchors.fill: parent
initialItem: ContactPage {}
}
}

View File

@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>ContactPage.qml</file>
<file>ConversationPage.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,90 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
import io.qt.examples.chattutorial 1.0
Page {
id: root
header: ToolBar {
Label {
text: qsTr("Contacts")
font.pixelSize: 20
anchors.centerIn: parent
}
}
ListView {
id: listView
anchors.fill: parent
topMargin: 48
leftMargin: 48
bottomMargin: 48
rightMargin: 48
spacing: 20
model: SqlContactModel {}
delegate: ItemDelegate {
text: model.display
width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight
leftPadding: avatar.implicitWidth + 32
onClicked: root.StackView.view.push("qrc:/ConversationPage.qml", { inConversationWith: model.display })
Image {
id: avatar
source: "qrc:/" + model.display.replace(" ", "_") + ".png"
}
}
}
}

View File

@ -0,0 +1,165 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import io.qt.examples.chattutorial 1.0
Page {
id: root
property string inConversationWith
header: ToolBar {
ToolButton {
text: qsTr("Back")
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
onClicked: root.StackView.view.pop()
}
Label {
id: pageTitle
text: inConversationWith
font.pixelSize: 20
anchors.centerIn: parent
}
}
ColumnLayout {
anchors.fill: parent
ListView {
id: listView
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: pane.leftPadding + messageField.leftPadding
displayMarginBeginning: 40
displayMarginEnd: 40
verticalLayoutDirection: ListView.BottomToTop
spacing: 12
model: SqlConversationModel {
recipient: inConversationWith
}
delegate: Column {
anchors.right: sentByMe ? listView.contentItem.right : undefined
spacing: 6
readonly property bool sentByMe: model.recipient !== "Me"
Row {
id: messageRow
spacing: 6
anchors.right: sentByMe ? parent.right : undefined
Image {
id: avatar
source: !sentByMe ? "qrc:/" + model.author.replace(" ", "_") + ".png" : ""
}
Rectangle {
width: Math.min(messageText.implicitWidth + 24,
listView.width - (!sentByMe ? avatar.width + messageRow.spacing : 0))
height: messageText.implicitHeight + 24
color: sentByMe ? "lightgrey" : "steelblue"
Label {
id: messageText
text: model.message
color: sentByMe ? "black" : "white"
anchors.fill: parent
anchors.margins: 12
wrapMode: Label.Wrap
}
}
}
Label {
id: timestampText
text: Qt.formatDateTime(model.timestamp, "d MMM hh:mm")
color: "lightgrey"
anchors.right: sentByMe ? parent.right : undefined
}
}
ScrollBar.vertical: ScrollBar {}
}
Pane {
id: pane
Layout.fillWidth: true
RowLayout {
width: parent.width
TextArea {
id: messageField
Layout.fillWidth: true
placeholderText: qsTr("Compose message")
wrapMode: TextArea.Wrap
}
Button {
id: sendButton
text: qsTr("Send")
enabled: messageField.length > 0
onClicked: {
listView.model.sendMessage(inConversationWith, messageField.text);
messageField.text = "";
}
}
}
}
}
}

View File

@ -0,0 +1,18 @@
TEMPLATE = app
QT += qml quick sql
CONFIG += c++11
HEADERS += sqlcontactmodel.h \
sqlconversationmodel.h
SOURCES += main.cpp \
sqlcontactmodel.cpp \
sqlconversationmodel.cpp
RESOURCES += \
qml.qrc \
../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter4-models
INSTALLS += target

View File

@ -0,0 +1,100 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGuiApplication>
#include <QStandardPaths>
#include <QSqlDatabase>
#include <QSqlError>
#include <QtQml>
#include "sqlcontactmodel.h"
#include "sqlconversationmodel.h"
static void connectToDatabase()
{
QSqlDatabase database = QSqlDatabase::database();
if (!database.isValid()) {
database = QSqlDatabase::addDatabase("QSQLITE");
if (!database.isValid())
qFatal("Cannot add database: %s", qPrintable(database.lastError().text()));
}
const QDir writeDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
if (!writeDir.mkpath("."))
qFatal("Failed to create writable directory at %s", qPrintable(writeDir.absolutePath()));
// Ensure that we have a writable location on all devices.
const QString fileName = writeDir.absolutePath() + "/chat-database.sqlite3";
// When using the SQLite driver, open() will create the SQLite database if it doesn't exist.
database.setDatabaseName(fileName);
if (!database.open()) {
qFatal("Cannot open database: %s", qPrintable(database.lastError().text()));
QFile::remove(fileName);
}
}
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
qmlRegisterType<SqlContactModel>("io.qt.examples.chattutorial", 1, 0, "SqlContactModel");
qmlRegisterType<SqlConversationModel>("io.qt.examples.chattutorial", 1, 0, "SqlConversationModel");
connectToDatabase();
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}

View File

@ -0,0 +1,66 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
id: window
width: 540
height: 960
visible: true
StackView {
id: stackView
anchors.fill: parent
initialItem: ContactPage {}
}
}

View File

@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>ContactPage.qml</file>
<file>ConversationPage.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,90 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "sqlcontactmodel.h"
#include <QDebug>
#include <QSqlError>
#include <QSqlQuery>
static void createTable()
{
if (QSqlDatabase::database().tables().contains(QStringLiteral("Contacts"))) {
// The table already exists; we don't need to do anything.
return;
}
QSqlQuery query;
if (!query.exec(
"CREATE TABLE IF NOT EXISTS 'Contacts' ("
" 'name' TEXT NOT NULL,"
" PRIMARY KEY(name)"
")")) {
qFatal("Failed to query database: %s", qPrintable(query.lastError().text()));
}
query.exec("INSERT INTO Contacts VALUES('Albert Einstein')");
query.exec("INSERT INTO Contacts VALUES('Ernest Hemingway')");
query.exec("INSERT INTO Contacts VALUES('Hans Gude')");
}
SqlContactModel::SqlContactModel(QObject *parent) :
QSqlQueryModel(parent)
{
createTable();
QSqlQuery query;
if (!query.exec("SELECT * FROM Contacts"))
qFatal("Contacts SELECT query failed: %s", qPrintable(query.lastError().text()));
setQuery(query);
if (lastError().isValid())
qFatal("Cannot set query on SqlContactModel: %s", qPrintable(lastError().text()));
}

View File

@ -0,0 +1,62 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef SQLCONTACTMODEL_H
#define SQLCONTACTMODEL_H
#include <QSqlQueryModel>
class SqlContactModel : public QSqlQueryModel
{
public:
SqlContactModel(QObject *parent = 0);
};
#endif // SQLCONTACTMODEL_H

View File

@ -0,0 +1,154 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "sqlconversationmodel.h"
#include <QDateTime>
#include <QDebug>
#include <QSqlError>
#include <QSqlRecord>
#include <QSqlQuery>
static const char *conversationsTableName = "Conversations";
static void createTable()
{
if (QSqlDatabase::database().tables().contains(conversationsTableName)) {
// The table already exists; we don't need to do anything.
return;
}
QSqlQuery query;
if (!query.exec(
"CREATE TABLE IF NOT EXISTS 'Conversations' ("
"'author' TEXT NOT NULL,"
"'recipient' TEXT NOT NULL,"
"'timestamp' TEXT NOT NULL,"
"'message' TEXT NOT NULL,"
"FOREIGN KEY('author') REFERENCES Contacts ( name ),"
"FOREIGN KEY('recipient') REFERENCES Contacts ( name )"
")")) {
qFatal("Failed to query database: %s", qPrintable(query.lastError().text()));
}
query.exec("INSERT INTO Conversations VALUES('Me', 'Ernest Hemingway', '2016-01-07T14:36:06', 'Hello!')");
query.exec("INSERT INTO Conversations VALUES('Ernest Hemingway', 'Me', '2016-01-07T14:36:16', 'Good afternoon.')");
query.exec("INSERT INTO Conversations VALUES('Me', 'Albert Einstein', '2016-01-01T11:24:53', 'Hi!')");
query.exec("INSERT INTO Conversations VALUES('Albert Einstein', 'Me', '2016-01-07T14:36:16', 'Good morning.')");
query.exec("INSERT INTO Conversations VALUES('Hans Gude', 'Me', '2015-11-20T06:30:02', 'God morgen. Har du fått mitt maleri?')");
query.exec("INSERT INTO Conversations VALUES('Me', 'Hans Gude', '2015-11-20T08:21:03', 'God morgen, Hans. Ja, det er veldig fint. Tusen takk! "
"Hvor mange timer har du brukt på den?')");
}
SqlConversationModel::SqlConversationModel(QObject *parent) :
QSqlTableModel(parent)
{
createTable();
setTable(conversationsTableName);
setSort(2, Qt::DescendingOrder);
// Ensures that the model is sorted correctly after submitting a new row.
setEditStrategy(QSqlTableModel::OnManualSubmit);
}
QString SqlConversationModel::recipient() const
{
return m_recipient;
}
void SqlConversationModel::setRecipient(const QString &recipient)
{
if (recipient == m_recipient)
return;
m_recipient = recipient;
const QString filterString = QString::fromLatin1(
"(recipient = '%1' AND author = 'Me') OR (recipient = 'Me' AND author='%1')").arg(m_recipient);
setFilter(filterString);
select();
emit recipientChanged();
}
QVariant SqlConversationModel::data(const QModelIndex &index, int role) const
{
if (role < Qt::UserRole)
return QSqlTableModel::data(index, role);
const QSqlRecord sqlRecord = record(index.row());
return sqlRecord.value(role - Qt::UserRole);
}
QHash<int, QByteArray> SqlConversationModel::roleNames() const
{
QHash<int, QByteArray> names;
names[Qt::UserRole] = "author";
names[Qt::UserRole + 1] = "recipient";
names[Qt::UserRole + 2] = "timestamp";
names[Qt::UserRole + 3] = "message";
return names;
}
void SqlConversationModel::sendMessage(const QString &recipient, const QString &message)
{
const QString timestamp = QDateTime::currentDateTime().toString(Qt::ISODate);
QSqlRecord newRecord = record();
newRecord.setValue("author", "Me");
newRecord.setValue("recipient", recipient);
newRecord.setValue("timestamp", timestamp);
newRecord.setValue("message", message);
if (!insertRecord(rowCount(), newRecord)) {
qWarning() << "Failed to send message:" << lastError().text();
return;
}
submitAll();
}

View File

@ -0,0 +1,79 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef SQLCONVERSATIONMODEL_H
#define SQLCONVERSATIONMODEL_H
#include <QSqlTableModel>
class SqlConversationModel : public QSqlTableModel
{
Q_OBJECT
Q_PROPERTY(QString recipient READ recipient WRITE setRecipient NOTIFY recipientChanged)
public:
SqlConversationModel(QObject *parent = 0);
QString recipient() const;
void setRecipient(const QString &recipient);
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE void sendMessage(const QString &recipient, const QString &message);
signals:
void recipientChanged();
private:
QString m_recipient;
};
#endif // SQLCONVERSATIONMODEL_H

View File

@ -0,0 +1,56 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick.Controls 2.12
import QtQuick.Controls.Material 2.12
ToolBar {
Material.theme: Material.Dark
}

View File

@ -0,0 +1,54 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick.Controls 2.12
ToolBar {
}

View File

@ -0,0 +1,90 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
import io.qt.examples.chattutorial 1.0
Page {
id: root
header: ChatToolBar {
Label {
text: qsTr("Contacts")
font.pixelSize: 20
anchors.centerIn: parent
}
}
ListView {
id: listView
anchors.fill: parent
topMargin: 48
leftMargin: 48
bottomMargin: 48
rightMargin: 48
spacing: 20
model: SqlContactModel {}
delegate: ItemDelegate {
text: model.display
width: listView.width - listView.leftMargin - listView.rightMargin
height: avatar.implicitHeight
leftPadding: avatar.implicitWidth + 32
onClicked: root.StackView.view.push("qrc:/ConversationPage.qml", { inConversationWith: model.display })
Image {
id: avatar
source: "qrc:/" + model.display.replace(" ", "_") + ".png"
}
}
}
}

View File

@ -0,0 +1,164 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls 2.12
import io.qt.examples.chattutorial 1.0
Page {
id: root
property string inConversationWith
header: ChatToolBar {
ToolButton {
text: qsTr("Back")
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
onClicked: root.StackView.view.pop()
}
Label {
id: pageTitle
text: inConversationWith
font.pixelSize: 20
anchors.centerIn: parent
}
}
ColumnLayout {
anchors.fill: parent
ListView {
id: listView
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: pane.leftPadding + messageField.leftPadding
displayMarginBeginning: 40
displayMarginEnd: 40
verticalLayoutDirection: ListView.BottomToTop
spacing: 12
model: SqlConversationModel {
recipient: inConversationWith
}
delegate: Column {
anchors.right: sentByMe ? listView.contentItem.right : undefined
spacing: 6
readonly property bool sentByMe: model.recipient !== "Me"
Row {
id: messageRow
spacing: 6
anchors.right: sentByMe ? parent.right : undefined
Image {
id: avatar
source: !sentByMe ? "qrc:/" + model.author.replace(" ", "_") + ".png" : ""
}
Rectangle {
width: Math.min(messageText.implicitWidth + 24, listView.width - avatar.width - messageRow.spacing)
height: messageText.implicitHeight + 24
color: sentByMe ? "lightgrey" : "steelblue"
Label {
id: messageText
text: model.message
color: sentByMe ? "black" : "white"
anchors.fill: parent
anchors.margins: 12
wrapMode: Label.Wrap
}
}
}
Label {
id: timestampText
text: Qt.formatDateTime(model.timestamp, "d MMM hh:mm")
color: "lightgrey"
anchors.right: sentByMe ? parent.right : undefined
}
}
ScrollBar.vertical: ScrollBar {}
}
Pane {
id: pane
Layout.fillWidth: true
RowLayout {
width: parent.width
TextArea {
id: messageField
Layout.fillWidth: true
placeholderText: qsTr("Compose message")
wrapMode: TextArea.Wrap
}
Button {
id: sendButton
text: qsTr("Send")
enabled: messageField.length > 0
onClicked: {
listView.model.sendMessage(inConversationWith, messageField.text);
messageField.text = "";
}
}
}
}
}
}

View File

@ -0,0 +1,18 @@
TEMPLATE = app
QT += qml quick sql
CONFIG += c++11
HEADERS += sqlcontactmodel.h \
sqlconversationmodel.h
SOURCES += main.cpp \
sqlcontactmodel.cpp \
sqlconversationmodel.cpp
RESOURCES += \
qml.qrc \
../shared/shared.qrc
target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/chattutorial/chapter5-styling
INSTALLS += target

View File

@ -0,0 +1,100 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QGuiApplication>
#include <QStandardPaths>
#include <QSqlDatabase>
#include <QSqlError>
#include <QtQml>
#include "sqlcontactmodel.h"
#include "sqlconversationmodel.h"
static void connectToDatabase()
{
QSqlDatabase database = QSqlDatabase::database();
if (!database.isValid()) {
database = QSqlDatabase::addDatabase("QSQLITE");
if (!database.isValid())
qFatal("Cannot add database: %s", qPrintable(database.lastError().text()));
}
const QDir writeDir = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
if (!writeDir.mkpath("."))
qFatal("Failed to create writable directory at %s", qPrintable(writeDir.absolutePath()));
// Ensure that we have a writable location on all devices.
const QString fileName = writeDir.absolutePath() + "/chat-database.sqlite3";
// When using the SQLite driver, open() will create the SQLite database if it doesn't exist.
database.setDatabaseName(fileName);
if (!database.open()) {
qFatal("Cannot open database: %s", qPrintable(database.lastError().text()));
QFile::remove(fileName);
}
}
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
qmlRegisterType<SqlContactModel>("io.qt.examples.chattutorial", 1, 0, "SqlContactModel");
qmlRegisterType<SqlConversationModel>("io.qt.examples.chattutorial", 1, 0, "SqlConversationModel");
connectToDatabase();
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}

View File

@ -0,0 +1,66 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.12
import QtQuick.Controls 2.12
ApplicationWindow {
id: window
width: 540
height: 960
visible: true
StackView {
id: stackView
anchors.fill: parent
initialItem: ContactPage {}
}
}

View File

@ -0,0 +1,10 @@
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>ContactPage.qml</file>
<file>ConversationPage.qml</file>
<file>qtquickcontrols2.conf</file>
<file>ChatToolBar.qml</file>
<file>+material/ChatToolBar.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,7 @@
[material]
Primary=Indigo
Accent=Indigo
Theme=Dark
[Universal]
Theme=Dark

View File

@ -0,0 +1,90 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "sqlcontactmodel.h"
#include <QDebug>
#include <QSqlError>
#include <QSqlQuery>
static void createTable()
{
if (QSqlDatabase::database().tables().contains(QStringLiteral("Contacts"))) {
// The table already exists; we don't need to do anything.
return;
}
QSqlQuery query;
if (!query.exec(
"CREATE TABLE IF NOT EXISTS 'Contacts' ("
" 'name' TEXT NOT NULL,"
" PRIMARY KEY(name)"
")")) {
qFatal("Failed to query database: %s", qPrintable(query.lastError().text()));
}
query.exec("INSERT INTO Contacts VALUES('Albert Einstein')");
query.exec("INSERT INTO Contacts VALUES('Ernest Hemingway')");
query.exec("INSERT INTO Contacts VALUES('Hans Gude')");
}
SqlContactModel::SqlContactModel(QObject *parent) :
QSqlQueryModel(parent)
{
createTable();
QSqlQuery query;
if (!query.exec("SELECT * FROM Contacts"))
qFatal("Contacts SELECT query failed: %s", qPrintable(query.lastError().text()));
setQuery(query);
if (lastError().isValid())
qFatal("Cannot set query on SqlContactModel: %s", qPrintable(lastError().text()));
}

View File

@ -0,0 +1,62 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef SQLCONTACTMODEL_H
#define SQLCONTACTMODEL_H
#include <QSqlQueryModel>
class SqlContactModel : public QSqlQueryModel
{
public:
SqlContactModel(QObject *parent = 0);
};
#endif // SQLCONTACTMODEL_H

View File

@ -0,0 +1,154 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "sqlconversationmodel.h"
#include <QDateTime>
#include <QDebug>
#include <QSqlError>
#include <QSqlRecord>
#include <QSqlQuery>
static const char *conversationsTableName = "Conversations";
static void createTable()
{
if (QSqlDatabase::database().tables().contains(conversationsTableName)) {
// The table already exists; we don't need to do anything.
return;
}
QSqlQuery query;
if (!query.exec(
"CREATE TABLE IF NOT EXISTS 'Conversations' ("
"'author' TEXT NOT NULL,"
"'recipient' TEXT NOT NULL,"
"'timestamp' TEXT NOT NULL,"
"'message' TEXT NOT NULL,"
"FOREIGN KEY('author') REFERENCES Contacts ( name ),"
"FOREIGN KEY('recipient') REFERENCES Contacts ( name )"
")")) {
qFatal("Failed to query database: %s", qPrintable(query.lastError().text()));
}
query.exec("INSERT INTO Conversations VALUES('Me', 'Ernest Hemingway', '2016-01-07T14:36:06', 'Hello!')");
query.exec("INSERT INTO Conversations VALUES('Ernest Hemingway', 'Me', '2016-01-07T14:36:16', 'Good afternoon.')");
query.exec("INSERT INTO Conversations VALUES('Me', 'Albert Einstein', '2016-01-01T11:24:53', 'Hi!')");
query.exec("INSERT INTO Conversations VALUES('Albert Einstein', 'Me', '2016-01-07T14:36:16', 'Good morning.')");
query.exec("INSERT INTO Conversations VALUES('Hans Gude', 'Me', '2015-11-20T06:30:02', 'God morgen. Har du fått mitt maleri?')");
query.exec("INSERT INTO Conversations VALUES('Me', 'Hans Gude', '2015-11-20T08:21:03', 'God morgen, Hans. Ja, det er veldig fint. Tusen takk! "
"Hvor mange timer har du brukt på den?')");
}
SqlConversationModel::SqlConversationModel(QObject *parent) :
QSqlTableModel(parent)
{
createTable();
setTable(conversationsTableName);
setSort(2, Qt::DescendingOrder);
// Ensures that the model is sorted correctly after submitting a new row.
setEditStrategy(QSqlTableModel::OnManualSubmit);
}
QString SqlConversationModel::recipient() const
{
return m_recipient;
}
void SqlConversationModel::setRecipient(const QString &recipient)
{
if (recipient == m_recipient)
return;
m_recipient = recipient;
const QString filterString = QString::fromLatin1(
"(recipient = '%1' AND author = 'Me') OR (recipient = 'Me' AND author='%1')").arg(m_recipient);
setFilter(filterString);
select();
emit recipientChanged();
}
QVariant SqlConversationModel::data(const QModelIndex &index, int role) const
{
if (role < Qt::UserRole)
return QSqlTableModel::data(index, role);
const QSqlRecord sqlRecord = record(index.row());
return sqlRecord.value(role - Qt::UserRole);
}
QHash<int, QByteArray> SqlConversationModel::roleNames() const
{
QHash<int, QByteArray> names;
names[Qt::UserRole] = "author";
names[Qt::UserRole + 1] = "recipient";
names[Qt::UserRole + 2] = "timestamp";
names[Qt::UserRole + 3] = "message";
return names;
}
void SqlConversationModel::sendMessage(const QString &recipient, const QString &message)
{
const QString timestamp = QDateTime::currentDateTime().toString(Qt::ISODate);
QSqlRecord newRecord = record();
newRecord.setValue("author", "Me");
newRecord.setValue("recipient", recipient);
newRecord.setValue("timestamp", timestamp);
newRecord.setValue("message", message);
if (!insertRecord(rowCount(), newRecord)) {
qWarning() << "Failed to send message:" << lastError().text();
return;
}
submitAll();
}

View File

@ -0,0 +1,79 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** 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.
**
** BSD License Usage
** Alternatively, you may use this file under the terms of the BSD license
** as follows:
**
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
** * Neither the name of The Qt Company Ltd nor the names of its
** contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.
**
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef SQLCONVERSATIONMODEL_H
#define SQLCONVERSATIONMODEL_H
#include <QSqlTableModel>
class SqlConversationModel : public QSqlTableModel
{
Q_OBJECT
Q_PROPERTY(QString recipient READ recipient WRITE setRecipient NOTIFY recipientChanged)
public:
SqlConversationModel(QObject *parent = 0);
QString recipient() const;
void setRecipient(const QString &recipient);
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE void sendMessage(const QString &recipient, const QString &message);
signals:
void recipientChanged();
private:
QString m_recipient;
};
#endif // SQLCONVERSATIONMODEL_H

View File

@ -0,0 +1,8 @@
TEMPLATE = subdirs
SUBDIRS += \
chapter1-settingup \
chapter2-lists \
chapter3-navigation \
chapter4-models \
chapter5-styling

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Some files were not shown because too many files have changed in this diff Show More