Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83b51369ae | ||
|
|
e35af90d58 | ||
|
|
a84ff57cba | ||
|
|
5ffc1bed64 | ||
|
|
0b2bf24645 | ||
|
|
cc32d1cd2f | ||
|
|
faa6ee5aa9 | ||
|
|
87b0d75767 | ||
|
|
526697d2f7 | ||
|
|
1b7f177ee0 | ||
|
|
816b86c170 | ||
|
|
9d4c41442f | ||
|
|
a973982976 | ||
|
|
130f73b5c5 | ||
|
|
ce21872bee | ||
|
|
26a4767680 | ||
|
|
81266cc1d5 |
|
After Width: | Height: | Size: 80 KiB |
@@ -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>.
|
||||
@@ -1,42 +1,49 @@
|
||||
# notepad--
|
||||
这是一个使用C++编写的文本编辑器Notepad--,可以支持Win/Linux/Mac平台。
|
||||
我们的目标是要替换Notepad++,重点在国产Uos系统、Mac 系统上发展。
|
||||
|
||||
一个支持windows/linux/mac的文本编辑器,目标是要替换notepad++,来自中国。
|
||||
|
||||
对比Notepad++而言,我们的优势是可以跨平台,支持linux mac操作系统。
|
||||
|
||||
<h4>鉴于Notepad++作者的错误言论,Notepad--的意义在于:减少一点错误言论,减少一点自以为是。</h4>
|
||||
**鉴于Notepad++作者的错误言论,Notepad--的意义在于:减少一点错误言论,减少一点自以为是。**
|
||||
|
||||
<h4>严正声明,台湾是中国的一部分。</h4>
|
||||
**严正声明,台湾是中国的一部分。**
|
||||
|
||||
当前最新版下载:
|
||||
您可以在这个项目提交bug或反馈问题。
|
||||
|
||||
https://github.com/cxasm/notepad--/releases/tag/notepad-v1.15
|
||||
|
||||
国内用户访问gitee https://gitee.com/cxasm/notepad--
|
||||
|
||||
<h3>说明1:windows下关联文件右键菜单“以Notepad--打开”的操作。</h3>
|
||||
|
||||
对于非安装版本,现在是个单文件,可以随意存放位置。关联文件右键打开菜单的操作如下:
|
||||
|
||||
1)你只需要把 Notepad--放在一个固定位置,然后不要移动程序位置。
|
||||
2)找到notepad--的位置,右键,以管理员权限运行,运行一次后,就会把当前右键位置注册到右键菜单中区。
|
||||
|
||||

|
||||
|
||||
只需要这样执行一次后,windows下就自动关联所有文件了。
|
||||
如果你移动了notepad--位置,都以管理员权限运行一次即可。
|
||||
|
||||
<h3>说明2:打开yaml后缀类型文件时显示看起来乱码,是以16进制打开的,怎么办?</h3>
|
||||
|
||||
这是因为Notepad--检测到该文件可能是二进制,以二进制只读打开,避免修改二进制文件而破坏文件。
|
||||
两个解决方式:
|
||||
1)右键文件标签,选择“重新以文本模式”打开。可以解决。
|
||||
2)永远解决办法:在选项-文件关联-中,把后缀yaml的自定义添加到关联中去。下次遇到yaml的文件,软件会自动识别为文本模式。
|
||||
最新版本下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v1.21
|
||||
|
||||
|
||||
支持mac m1 x64系统:
|
||||

|
||||
由于github访问经常断网,几乎没法提交代码。国内用户请访问 https://gitee.com/cxasm/notepad--
|
||||
|
||||
支持皮肤切换:
|
||||

|
||||
**国内下载地址:**
|
||||
|
||||
最新版本下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v1.21
|
||||
|
||||
最新开发预览版本下载地址:https://gitee.com/cxasm/notepad--/releases/tag/v1.21
|
||||
|
||||
**做中国人自己的免费编辑器,离不开您的支持,请通过微信捐赠我们。**
|
||||
|
||||

|
||||
|
||||
|
||||
### 编译说明:
|
||||
|
||||
1)使用qtcreator 或 vs 先打开qscint/src/qscintilla.pro 。先编译出这个qscintlla的依赖库。
|
||||
|
||||
2)再打开RealCompare.pro 加载后编译。
|
||||
|
||||
3)由于编译的平台较多,涉及windows/linux/mac,有任何编译问题,还请加qq群 959439826 。欢迎广大网友实现新功能后提交代码给我们。
|
||||
|
||||
代码上线不久,删除了商业的对比功能和注册功能(这部分有商业原因,请理解),除此以外,所有功能全部保留。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
1.17.0 发布 20221108
|
||||
1.17 win10版本发布了,完成如下功能
|
||||
1 完成自定义编程语言风格 -- 给出一个基础版本,可自定义语言,添加关键词。
|
||||
2 语言风格全局设置,快捷一键全部弄成一样的字体样式
|
||||
3 查询关键字计数
|
||||
4 增加大小写转换功能
|
||||
5 使用了boot的正则表达式
|
||||
6 增加移除空行功能
|
||||
7 其它小改进。
|
||||
|
||||
|
||||
|
||||
//5 1.3
|
||||
//6 1.4 20211027日
|
||||
//7 1.5 20211110日发布,是第一个真正意义上的稳定版本。
|
||||
//8 1.6 20211201发布,增加了网络消息中的6和7命令。第一次发布了notebook版本。
|
||||
//9 1.7 20211224日发布,增加了bin二进制的对比方式。暂时先在www.itdp.cn发布。
|
||||
//10 没有使用,单独给mac的一个版本做尝试
|
||||
//11 20210118日发布,单独发布ccompare和ccnotepad。notepad暂时在www.itdp.cn发布。这个版本中的linux 和 windows的 VERIFY_CODE 做了不同的区别。将二者分离出来
|
||||
//12 1.9 发布。
|
||||
//13 1.9.1 20220225发布,bin对比背景高亮。调整了界面美观度
|
||||
//版本号没有修改,换皮。20220525重新发布,不再继续维护修改了。
|
||||
因为编辑器的市场已经是红海,没必要死磕,考虑其它途径。就这样吧。
|
||||
//15 1.9.0 20220530左右发布。在uos上面第一次发布。
|
||||
//16 1.10.0 20220616左右发布。在uos上面发布了。增加查找高亮、Uos上右键关联打开等。
|
||||
//17 1.11.0 20220629左右编译发布,在Uos也发布了。增加单词高亮、自动保存、前后位置跳转等。
|
||||
//18 1.11.0 20220630 linux uos下面重新编译了下,版本直接修改为18,在网站发布。因为已经提交到uos商店中去了,后续再提交时,不修改版本,直接保持为18即可。
|
||||
//18 1.12.0 20220707 只发布了windows版本,修改为多线程、取消数据库db,修改为json存储格式。加速第一次运行时的速度处理。
|
||||
//19 1.13.0 20220802 只发布了windows版本,增加文件夹查找功能,美化界面。马上要发布uos版本。
|
||||
//19 1.13.0 20220803 大幅度改善查找文件框的设置,优化其显示。20220804发布了uos 1.13版本
|
||||
//21 1.14.0 20220901 大幅完善细节,中间有个20的版本做了皮肤风格的。本次对查找扩展、大量细节做了完善。已经发布了win10版本。
|
||||
//22 1.14.0 202209010 先发布了windows下面的版本、自动检测二进制文件或文本,支持大文本分块显示、合入文件对比的功能、提交了第一个版本的注册界面。
|
||||
理论上这个版本应该是一个里程碑式样的版本。先只发布了windows版本。mac和uos的在后面等稳定后再发布。
|
||||
//23 1.16.0 20221008 完善了大量细节,应该是更加完善的一个里程碑版本。目前windows mac 都已经发布,uos的还没有提交到商场,预计月底提交。
|
||||
//23 1.16.1 20221011 1.16里面存在问题,对比时会卡死,紧急解决了这个故障。使用nsis进行了打包,只发布了win10,后续还需要uos mac发布。
|
||||
@@ -0,0 +1,92 @@
|
||||
#pragma once
|
||||
#include <qobject.h>
|
||||
#include<QVector>
|
||||
#include<QMap>
|
||||
#include <QFuture>
|
||||
|
||||
#include <functional>
|
||||
#include "rcglobal.h"
|
||||
#include "Encode.h"
|
||||
|
||||
|
||||
class BlockUserData;
|
||||
class QFile;
|
||||
|
||||
|
||||
const int LEFT = 0;
|
||||
const int RIGHT = 1;
|
||||
|
||||
//对比bin二进制文件。
|
||||
const int MAX_BIN_SIZE = 1024 * 1024 * 10; //最大10M
|
||||
|
||||
typedef void(* CALL_FUNC)(void *, uchar *, int);
|
||||
|
||||
typedef struct lineFileInfo_ {
|
||||
qint32 lineNums; //行号码
|
||||
bool isLcsExist;//是否属于lcsline的一部分
|
||||
bool isEmptyLine; //是否是空白行,只包含换行符的行
|
||||
int code; //该行的字符编码
|
||||
int lineEndFormat; //行尾:见RC_LINE_FORM
|
||||
QByteArray md4;
|
||||
QString unicodeStr; //这个是包含行尾的换行符的
|
||||
lineFileInfo_()
|
||||
{
|
||||
isLcsExist = false;
|
||||
isEmptyLine = false;
|
||||
code = UNKOWN;
|
||||
lineEndFormat = UNKNOWN_LINE;
|
||||
}
|
||||
}LineFileInfo;
|
||||
|
||||
|
||||
|
||||
const int EMPTY_FILE = 0;
|
||||
const int SCAN_SUCCESS = 1;
|
||||
|
||||
class CmpareMode;
|
||||
|
||||
typedef struct ThreadFileCmpParameter_ {
|
||||
QString leftPath;
|
||||
QString rightPath;
|
||||
CmpareMode *resultCmpObj;
|
||||
|
||||
ThreadFileCmpParameter_(QString leftPath_, QString rightPath_)
|
||||
{
|
||||
leftPath = leftPath_;
|
||||
rightPath = rightPath_;
|
||||
resultCmpObj = nullptr;
|
||||
}
|
||||
|
||||
}ThreadFileCmpParameter;
|
||||
|
||||
class CmpareMode :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CmpareMode();
|
||||
virtual ~CmpareMode();
|
||||
|
||||
static CODE_ID readLineFromFile(uchar * m_fileFpr, const int fileLength, const CODE_ID fileCode, QList<LineFileInfo>& lineInfoVec, QList<LineFileInfo>& blankLineInfoVec, int mode, int& maxLineSize);
|
||||
static CODE_ID judgeFinalTextCode(CODE_ID code, bool isExistUnKownCode, bool isExistGbk, bool isExistUtf8);
|
||||
static CODE_ID readLineFromFile(uchar * m_fileFpr, const int fileLength, const CODE_ID fileCode, QList<LineFileInfo>& lineInfoVec,int& maxLineSize, int& charsNums, bool &isMaybeHexFile);
|
||||
|
||||
static CODE_ID scanFileRealCode(QString filePath);
|
||||
static CODE_ID scanFileOutPut(CODE_ID code, QString filePath, QList<LineFileInfo>& outputLineInfoVec, int & maxLineSize, int & charsNums, bool &isHexFile);
|
||||
|
||||
|
||||
inline QList<LineFileInfo>* getLeftLineInfo();
|
||||
inline QList<LineFileInfo>* getRightLineInfo();
|
||||
|
||||
|
||||
void getLines(RC_DIRECTION direction, QList<LineFileInfo>& lines);
|
||||
void getLinesExternInfo(QList<BlockUserData*>*& leftExternBlockInfo, QList<BlockUserData*>*& rightExternBlockInfo);
|
||||
|
||||
private:
|
||||
|
||||
static bool recognizeTextCode(QByteArray & text, LineFileInfo & lineInfo, QString & outUnicodeText);
|
||||
static CODE_ID getTextFileEncodeType(uchar* fileFpr, int fileLength, QString filePath);
|
||||
CODE_ID static readLineFromFileWithUnicodeLe(uchar* m_fileFpr, const int fileLength, QList<LineFileInfo>& lineInfoVec, QList<LineFileInfo>& blankLineInfoVec,int mode, int &maxLineSize);
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,399 @@
|
||||
#include "Encode.h"
|
||||
#include <QTextCodec>
|
||||
#include <QtDebug>
|
||||
|
||||
/* 检查字符串编码的类。看了大量文献,结论如下:
|
||||
*如果是UTF BOM格式,或者UNICODE格式,其文件头部前几个字节(2-3)有一定的标识。由此标识直接按对应编码处理。
|
||||
*如果没有标识,默认就是UTF8(NO BOM) 与 ANSI(现在只考虑GBK)进行对比。
|
||||
*此时需要做统计分析。对所有行进行UTF8解析,如果按照UTF8解析错位再按照GBK解析。如果解析出GBK那么大概率认为文件是GBK编码的。
|
||||
*/
|
||||
|
||||
Encode::Encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Encode::~Encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CODE_ID Encode::getCodeByName(QString name)
|
||||
{
|
||||
CODE_ID id;
|
||||
|
||||
if (name == "unknown")
|
||||
{
|
||||
id = CODE_ID::UNKOWN;
|
||||
}
|
||||
else if (name == "UTF16-LE")
|
||||
{
|
||||
id = CODE_ID::UNICODE_LE;
|
||||
}
|
||||
else if (name == "UTF16-BE")
|
||||
{
|
||||
id = CODE_ID::UNICODE_BE;
|
||||
}
|
||||
else if (name == "UTF8")
|
||||
{
|
||||
id = CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
else if (name == "UTF8-BOM")
|
||||
{
|
||||
id = CODE_ID::UTF8_BOM;
|
||||
}
|
||||
else if (name == "GBK")
|
||||
{
|
||||
id = CODE_ID::GBK;
|
||||
}
|
||||
else if (name == "EUC-JP")
|
||||
{
|
||||
id = CODE_ID::EUC_JP;
|
||||
}
|
||||
else if (name == "Shift-JIS")
|
||||
{
|
||||
id = CODE_ID::Shift_JIS;
|
||||
}
|
||||
else if (name == "EUC-KR")
|
||||
{
|
||||
id = CODE_ID::EUC_KR;
|
||||
}
|
||||
else if (name == "KOI8-R")
|
||||
{
|
||||
id = CODE_ID::KOI8_R;
|
||||
}
|
||||
else if (name == "TSCII")
|
||||
{
|
||||
id = CODE_ID::TSCII;
|
||||
}
|
||||
else if (name == "TIS-620")
|
||||
{
|
||||
id = CODE_ID::TIS_620;
|
||||
}
|
||||
else
|
||||
{
|
||||
id = CODE_ID::UNKOWN;
|
||||
}
|
||||
|
||||
return id;
|
||||
|
||||
}
|
||||
|
||||
QString Encode::getLineEndById(RC_LINE_FORM id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case PAD_LINE:
|
||||
case UNKNOWN_LINE:
|
||||
#ifdef WIN32
|
||||
ret = "Windows(CR LF)";
|
||||
#else
|
||||
ret = "Unix(LF)";
|
||||
#endif
|
||||
ret = "NULL";
|
||||
break;
|
||||
case UNIX_LINE:
|
||||
ret = "Unix(LF)";
|
||||
break;
|
||||
case DOS_LINE:
|
||||
ret = "Windows(CR LF)";
|
||||
break;
|
||||
case MAC_LINE:
|
||||
ret = "Mac(CR)";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString Encode::getCodeNameById(CODE_ID id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case UNKOWN:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case ANSI:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case UNICODE_LE:
|
||||
ret = "UTF16-LE";
|
||||
break;
|
||||
case UNICODE_BE:
|
||||
ret = "UTF16-BE";
|
||||
break;
|
||||
case UTF8_NOBOM:
|
||||
ret = "UTF8";
|
||||
break;
|
||||
case UTF8_BOM:
|
||||
ret = "UTF8-BOM";
|
||||
break;
|
||||
case GBK:
|
||||
ret = "GBK";
|
||||
break;
|
||||
case EUC_JP:
|
||||
ret = "EUC-JP";
|
||||
break;
|
||||
case Shift_JIS:
|
||||
ret = "Shift-JIS";
|
||||
break;
|
||||
case EUC_KR:
|
||||
ret = "EUC-KR";
|
||||
break;
|
||||
case KOI8_R:
|
||||
ret = "KOI8-R";
|
||||
break;
|
||||
case TSCII:
|
||||
ret = "TSCII";
|
||||
break;
|
||||
case TIS_620:
|
||||
ret = "TIS-620";
|
||||
break;
|
||||
default:
|
||||
ret = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray Encode::getEncodeStartFlagByte(CODE_ID code)
|
||||
{
|
||||
QByteArray ret;
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case UNICODE_LE:
|
||||
{
|
||||
ret.append((char)0xFF);
|
||||
ret.append((char)0xFE);
|
||||
}
|
||||
break;
|
||||
|
||||
case UNICODE_BE:
|
||||
{
|
||||
ret.append((char)0xFE);
|
||||
ret.append((char)0xFF);
|
||||
}
|
||||
break;
|
||||
|
||||
case UTF8_BOM:
|
||||
{
|
||||
ret.append((char)0xEF);
|
||||
ret.append((char)0xBB);
|
||||
ret.append((char)0xBF);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
CODE_ID Encode::DetectEncode(const uchar* pBuffer, int length, int &skip)
|
||||
{
|
||||
if (pBuffer[0] == 0xFF && pBuffer[1] == 0xFE)
|
||||
{
|
||||
skip = 2;
|
||||
return CODE_ID::UNICODE_LE; //skip 2
|
||||
}
|
||||
if (pBuffer[0] == 0xFE && pBuffer[1] == 0xFF)
|
||||
{
|
||||
skip = 2;
|
||||
return CODE_ID::UNICODE_BE; //skip 2
|
||||
}
|
||||
if (pBuffer[0] == 0xEF && pBuffer[1] == 0xBB && pBuffer[2] == 0xBF)
|
||||
{
|
||||
skip = 3;
|
||||
return CODE_ID::UTF8_BOM; //skip 3 with BOM
|
||||
}
|
||||
|
||||
// 不能知道是不是UTF8
|
||||
CODE_ID code = CheckUnicodeWithoutBOM(pBuffer, length);
|
||||
|
||||
skip = 0;
|
||||
return code; //skip 0
|
||||
|
||||
}
|
||||
|
||||
bool Encode::tranGbkToUNICODE(const char* pText, int length, QString &out)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
|
||||
QTextCodec *codec = QTextCodec::codecForName("GBK");
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Encode::tranUtf8ToUNICODE(const char* pText, int length, QString &out)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//与getCodeNameById类似,但是返回的是QT系统支持的编码的字符串名称
|
||||
QString Encode::getQtCodecNameById(CODE_ID id)
|
||||
{
|
||||
QString ret;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case UNKOWN:
|
||||
case ANSI:
|
||||
ret = "unknown";
|
||||
break;
|
||||
case UNICODE_LE:
|
||||
ret = "UTF16-LE";
|
||||
break;
|
||||
case UNICODE_BE:
|
||||
ret = "UTF16-BE";
|
||||
break;
|
||||
case UTF8_NOBOM://qt没有这种
|
||||
case UTF8_BOM:
|
||||
ret = "UTF8";
|
||||
break;
|
||||
case GBK:
|
||||
ret = "GBK";
|
||||
break;
|
||||
case EUC_JP:
|
||||
ret = "EUC-JP";
|
||||
break;
|
||||
case Shift_JIS:
|
||||
ret = "Shift-JIS";
|
||||
break;
|
||||
case EUC_KR:
|
||||
ret = "EUC-KR";
|
||||
break;
|
||||
case KOI8_R:
|
||||
ret = "KOI8-R";
|
||||
break;
|
||||
case TSCII:
|
||||
ret = "TSCII";
|
||||
break;
|
||||
case TIS_620:
|
||||
ret = "TIS-620";
|
||||
break;
|
||||
default:
|
||||
ret = "unknown";
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//将指定编码的字符串转换到unicode
|
||||
bool Encode::tranStrToUNICODE(CODE_ID code, const char* pText, int length, QString &out)
|
||||
{
|
||||
if (length < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = nullptr;
|
||||
|
||||
QString textCodeName = getQtCodecNameById(code);
|
||||
if (textCodeName.isEmpty() || textCodeName == "unknown")
|
||||
{
|
||||
//对于其它非识别编码,统一转换为utf8。减去让用户选择的麻烦
|
||||
//这里其实是有问题的。先这样简单处理
|
||||
codec = QTextCodec::codecForName("UTF-8");
|
||||
}
|
||||
else
|
||||
{
|
||||
codec = QTextCodec::codecForName(textCodeName.toStdString().c_str());
|
||||
}
|
||||
|
||||
if (codec == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
out = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 这里其实是穷举字符串的字符编码;ASNI utf8。目前只检测GBK和utf8;其它语种没有穷举
|
||||
*GB2312 GBK GB18030 三种差别见https://cloud.tencent.com/developer/article/1343240
|
||||
*关于编码的详细说明,见https://blog.csdn.net/libaineu2004/article/details/19245205
|
||||
*/
|
||||
//这里是有限检查utf8的,如果出现gbk,说明一定不是utf8,因为utf8检查到错误码。
|
||||
CODE_ID Encode::CheckUnicodeWithoutBOM(const uchar* pText, int length)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
const QString text = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
/*不是UTF-8格式的文件,这里优先判断是不是UTF8,再判断是不是GBK;我们先做中文版;如果后续要做
|
||||
*国际版,其实不应该只检查GBK,而是应该检查本地ASCI码,包括ascii码*/
|
||||
QTextCodec::ConverterState state1;
|
||||
QTextCodec *codec1 = QTextCodec::codecForName("GBK");
|
||||
codec1->toUnicode((const char *)pText, length, &state1);
|
||||
if (state1.invalidChars > 0) {
|
||||
return CODE_ID::ANSI;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CODE_ID::GBK;
|
||||
}
|
||||
}
|
||||
|
||||
return CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
|
||||
CODE_ID Encode::CheckUnicodeWithoutBOM(const uchar* pText, int length, QString &outUnicodeText)
|
||||
{
|
||||
QTextCodec::ConverterState state;
|
||||
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
|
||||
outUnicodeText = codec->toUnicode((const char *)pText, length, &state);
|
||||
if (state.invalidChars > 0) {
|
||||
/*不是UTF-8格式的文件,这里优先判断是不是UTF8,再判断是不是GBK;我们先做中文版;如果后续要做
|
||||
*国际版,其实不应该只检查GBK,而是因为检查本地ASCI码,包括ascii码*/
|
||||
QTextCodec::ConverterState state1;
|
||||
QTextCodec *codec1 = QTextCodec::codecForName("GBK");
|
||||
QString gbkStr = codec1->toUnicode((const char *)pText, length, &state1);
|
||||
if (state1.invalidChars > 0) {
|
||||
//如果也不是gbk,姑且按照utf8直接返回
|
||||
return CODE_ID::ANSI;
|
||||
}
|
||||
else
|
||||
{
|
||||
outUnicodeText = gbkStr;
|
||||
return CODE_ID::GBK;
|
||||
}
|
||||
}
|
||||
|
||||
return CODE_ID::UTF8_NOBOM;
|
||||
}
|
||||
|
||||
//检查是否全是ascii字符码
|
||||
bool Encode::CheckTextIsAllAscii(const uchar* pText, int length)
|
||||
{
|
||||
for (int i = 0; i < length; ++i)
|
||||
{
|
||||
if (*(pText + i) < 0 || *(pText + i) > 0x7F)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
#include <QtGlobal>
|
||||
|
||||
//#define GBK_
|
||||
#include "rcglobal.h"
|
||||
|
||||
|
||||
class Encode
|
||||
{
|
||||
public:
|
||||
Encode();
|
||||
~Encode();
|
||||
static CODE_ID getCodeByName(QString name);
|
||||
static QString getLineEndById(RC_LINE_FORM id);
|
||||
static QString getCodeNameById(CODE_ID id);
|
||||
static QByteArray getEncodeStartFlagByte(CODE_ID code);
|
||||
static CODE_ID DetectEncode(const uchar* pBuffer, int length,int &skip);
|
||||
static bool tranGbkToUNICODE(const char* pText, int length, QString &out);
|
||||
static bool tranUtf8ToUNICODE(const char * pText, int length, QString & out);
|
||||
static QString getQtCodecNameById(CODE_ID id);
|
||||
static bool tranStrToUNICODE(CODE_ID code, const char * pText, int length, QString & out);
|
||||
static CODE_ID CheckUnicodeWithoutBOM(const uchar * pText, int length);
|
||||
static CODE_ID CheckUnicodeWithoutBOM(const uchar * pText, int length, QString & outUnicodeText);
|
||||
static bool CheckTextIsAllAscii(const uchar * pText, int length);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
#include "MediatorDisplay.h"
|
||||
|
||||
|
||||
//这里如果直接让左右互相同步,互相影响,可能导致混乱。需要一个中间调停者模式,作为中间人去控制同步消息
|
||||
//中介者模式意图:用一个中介对象来封装一系列的对象交互,中介者使各对象不需要显式地相互引用,从而使其耦合松散,而且可以独立地改变它们之间的交互。
|
||||
//主要解决:对象与对象之间存在大量的关联关系,这样势必会导致系统的结构变得很复杂,同时若一个对象发生改变,我们也需要跟踪与之相关联的对象,同时做出相应的处理。
|
||||
//之前不使用该模式时,左右显示同步互相交互,时而发生消息混乱
|
||||
|
||||
MediatorDisplay::MediatorDisplay():QObject(nullptr)
|
||||
{
|
||||
m_leftLineNum = 0;
|
||||
m_rightLineNum = 0;
|
||||
m_leftScrollValue = 0;
|
||||
m_rightScrollValue = 0;
|
||||
|
||||
}
|
||||
|
||||
MediatorDisplay::~MediatorDisplay()
|
||||
{
|
||||
}
|
||||
|
||||
void MediatorDisplay::setLeftNum(int value)
|
||||
{
|
||||
m_leftLineNum = value;
|
||||
if (m_leftLineNum != m_rightLineNum)
|
||||
{
|
||||
emit syncCurLineNum(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightNum(int value)
|
||||
{
|
||||
m_rightLineNum = value;
|
||||
if (m_leftLineNum != m_rightLineNum)
|
||||
{
|
||||
emit syncCurLineNum(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftNum()
|
||||
{
|
||||
return m_leftLineNum;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightNum()
|
||||
{
|
||||
return m_rightLineNum;
|
||||
}
|
||||
|
||||
void MediatorDisplay::setLeftScrollValue(int value)
|
||||
{
|
||||
if (m_leftScrollValue != value)
|
||||
{
|
||||
m_leftScrollValue = value;
|
||||
}
|
||||
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightScrollValue(int value)
|
||||
{
|
||||
if (m_rightScrollValue != value)
|
||||
{
|
||||
m_rightScrollValue = value;
|
||||
}
|
||||
|
||||
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftScrollValue()
|
||||
{
|
||||
return m_leftScrollValue;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightScrollValue()
|
||||
{
|
||||
return m_rightScrollValue;
|
||||
}
|
||||
|
||||
|
||||
void MediatorDisplay::setLeftScrollXValue(int value)
|
||||
{
|
||||
if (m_leftScrollXValue != value)
|
||||
{
|
||||
m_leftScrollXValue = value;
|
||||
}
|
||||
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollXValue != m_rightScrollXValue)
|
||||
{
|
||||
emit syncCurScrollXValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorDisplay::setRightScrollXValue(int value)
|
||||
{
|
||||
if (m_rightScrollXValue != value)
|
||||
{
|
||||
m_rightScrollXValue = value;
|
||||
}
|
||||
|
||||
|
||||
if (m_leftScrollXValue != m_rightScrollXValue)
|
||||
{
|
||||
emit syncCurScrollXValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorDisplay::getLeftScrollXValue()
|
||||
{
|
||||
return m_leftScrollXValue;
|
||||
}
|
||||
|
||||
int MediatorDisplay::getRightScrollXValue()
|
||||
{
|
||||
return m_rightScrollXValue;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
#pragma once
|
||||
#include <QObject>
|
||||
|
||||
class MediatorDisplay:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MediatorDisplay();
|
||||
virtual ~MediatorDisplay();
|
||||
|
||||
void setLeftNum(int value);
|
||||
void setRightNum(int value);
|
||||
|
||||
int getLeftNum();
|
||||
int getRightNum();
|
||||
|
||||
void setLeftScrollValue(int value);
|
||||
void setRightScrollValue(int value);
|
||||
|
||||
int getLeftScrollValue();
|
||||
int getRightScrollValue();
|
||||
|
||||
void setLeftScrollXValue(int value);
|
||||
|
||||
void setRightScrollXValue(int value);
|
||||
|
||||
int getLeftScrollXValue();
|
||||
|
||||
int getRightScrollXValue();
|
||||
|
||||
signals:
|
||||
//当前行同步
|
||||
void syncCurLineNum(int direction);
|
||||
|
||||
//滚动条同步
|
||||
void syncCurScrollValue(int direction);
|
||||
|
||||
void syncCurScrollXValue(int direction);
|
||||
|
||||
private:
|
||||
//左右当前行的值
|
||||
int m_leftLineNum;
|
||||
int m_rightLineNum;
|
||||
|
||||
//左右滚动条的值
|
||||
int m_leftScrollValue;
|
||||
int m_rightScrollValue;
|
||||
|
||||
//左右滚动条的值x
|
||||
int m_leftScrollXValue;
|
||||
int m_rightScrollXValue;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#include "MediatorFileTree.h"
|
||||
|
||||
/* 文件夹对比界面的中介者,使用中介者是为了让消息经过中介对象统一调度,避免左右互相依赖导致交互混乱
|
||||
*/
|
||||
|
||||
MediatorFileTree::MediatorFileTree() :QObject(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MediatorFileTree::~MediatorFileTree()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MediatorFileTree::setLeftScrollValue(int value)
|
||||
{
|
||||
m_leftScrollValue = value;
|
||||
|
||||
//如果左右不相等,则推动对方去同步
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void MediatorFileTree::setRightScrollValue(int value)
|
||||
{
|
||||
m_rightScrollValue = value;
|
||||
|
||||
if (m_leftScrollValue != m_rightScrollValue)
|
||||
{
|
||||
emit syncCurScrollValue(1);
|
||||
}
|
||||
}
|
||||
|
||||
int MediatorFileTree::getLeftScrollValue()
|
||||
{
|
||||
return m_leftScrollValue;
|
||||
}
|
||||
|
||||
int MediatorFileTree::getRightScrollValue()
|
||||
{
|
||||
return m_rightScrollValue;
|
||||
}
|
||||
|
||||
|
||||
//设置item。中介本身不保存ITEM,因为太多,发送消息给外面空间
|
||||
void MediatorFileTree::setLeftItemStatus(QString name, int status)
|
||||
{
|
||||
emit syncExpandStatus(name, RC_LEFT, status);
|
||||
}
|
||||
|
||||
void MediatorFileTree::setRightItemStatus(QString name, int status)
|
||||
{
|
||||
emit syncExpandStatus(name, RC_RIGHT, status);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include <qobject.h>
|
||||
#include "rcglobal.h"
|
||||
|
||||
class MediatorFileTree :public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MediatorFileTree();
|
||||
virtual ~MediatorFileTree();
|
||||
|
||||
void setLeftScrollValue(int value);
|
||||
void setRightScrollValue(int value);
|
||||
int getLeftScrollValue();
|
||||
int getRightScrollValue();
|
||||
|
||||
void setLeftItemStatus(QString name, int status);
|
||||
void setRightItemStatus(QString name, int status);
|
||||
|
||||
|
||||
signals:
|
||||
//滚动条同步
|
||||
void syncCurScrollValue(int direction);
|
||||
|
||||
//同步展开和收起状态
|
||||
void syncExpandStatus(QString name, int direction, int status);
|
||||
|
||||
private:
|
||||
int m_leftScrollValue;
|
||||
int m_rightScrollValue;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "QTreeWidgetSortItem.h"
|
||||
#include "rcglobal.h"
|
||||
|
||||
/* 自己重新实现一个QTreeWidgetSortItem,主要是为了重载函数的排序功能,不适应默认的名字排序,而是使用
|
||||
* 每个项自带的tip字符串排序。这样做是因为对齐的时候,有些空白对齐项目,并没有名称,就会导致无法排序
|
||||
*/
|
||||
int QTreeWidgetSortItem::s_sortType = 0;
|
||||
|
||||
bool QTreeWidgetSortItem::s_syncOrder = false;
|
||||
|
||||
QTreeWidgetSortItem::QTreeWidgetSortItem(int type):QTreeWidgetItem(type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTreeWidgetSortItem::QTreeWidgetSortItem(const QStringList &strings, int type):QTreeWidgetItem(strings, type)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QTreeWidgetSortItem::~QTreeWidgetSortItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool QTreeWidgetSortItem::operator<(const QTreeWidgetItem & other) const
|
||||
{
|
||||
if (s_sortType == 0)
|
||||
{
|
||||
if (!s_syncOrder) //按名称排序
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
goto cmp_name;
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
cmp_name:
|
||||
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//同步序号,按序号进行排序
|
||||
#if 0
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return !(a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
cmp_index:
|
||||
#endif
|
||||
//同步对方的操作。
|
||||
int a = this->data(0, Item_Index).toInt();
|
||||
int b = other.data(0, Item_Index).toInt();
|
||||
|
||||
return(a > b);
|
||||
}
|
||||
}
|
||||
else if (s_sortType == 1) //按大小排序
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
|
||||
qint64 a = this->data(0, DIR_ITEM_MAXSIZE_FILE).toULongLong();
|
||||
qint64 b = other.data(0, DIR_ITEM_MAXSIZE_FILE).toULongLong();
|
||||
|
||||
return(a > b);
|
||||
#if 0
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
#endif
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
int leftSize = this->text(1).toInt();
|
||||
int rightSize = other.text(1).toInt();
|
||||
|
||||
return(leftSize > rightSize);
|
||||
}
|
||||
else if (s_sortType == 2) //by 修改日期
|
||||
{
|
||||
//目录最大,放在文件前面。都是目录则按照名称排序
|
||||
if ((type() == RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
QString a = this->data(0, Item_RelativePath).toString();
|
||||
QString b = other.data(0, Item_RelativePath).toString();
|
||||
|
||||
return (a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
else if ((type() == RC_DIR) && (other.type() != RC_DIR))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((type() != RC_DIR) && (other.type() == RC_DIR))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
QString a = this->text(2);
|
||||
QString b = other.text(2);
|
||||
|
||||
return(a.compare(b, Qt::CaseInsensitive) > 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
#include <qtreewidget.h>
|
||||
class QTreeWidgetSortItem : public QTreeWidgetItem
|
||||
{
|
||||
public:
|
||||
QTreeWidgetSortItem(int type);
|
||||
QTreeWidgetSortItem(const QStringList &strings, int type);
|
||||
virtual ~QTreeWidgetSortItem();
|
||||
virtual bool operator<(const QTreeWidgetItem &other) const override;
|
||||
|
||||
static void setSortColumn(int index)
|
||||
{
|
||||
s_sortType = index;
|
||||
}
|
||||
static void setSyncOrder(bool v)
|
||||
{
|
||||
s_syncOrder = v;
|
||||
}
|
||||
private :
|
||||
static int s_sortType;
|
||||
static bool s_syncOrder;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
#include "RcTreeWidget.h"
|
||||
#include "MediatorFileTree.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
#include <QMenu>
|
||||
#include <QProcess>
|
||||
|
||||
RcTreeWidget::RcTreeWidget(QWidget *parent):QTreeWidget(parent), m_userAddMenu(nullptr)
|
||||
{
|
||||
|
||||
connect(this->verticalScrollBar(), &QScrollBar::valueChanged, this, &RcTreeWidget::slot_scrollValueChange);
|
||||
|
||||
//收起和伸开子项
|
||||
connect(this, &QTreeWidget::itemCollapsed, this, &RcTreeWidget::slot_itemCollapsed);
|
||||
connect(this, &QTreeWidget::itemExpanded, this, &RcTreeWidget::slot_itemExpanded);
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu); //设置枚举值
|
||||
connect(this, &QTreeWidget::customContextMenuRequested, this, &RcTreeWidget::slot_ShowPopMenu);
|
||||
}
|
||||
|
||||
RcTreeWidget::~RcTreeWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//给用户进行菜单增加的回调函数
|
||||
void RcTreeWidget::setContextUserDefineItemMenuCallBack(std::function<void(int dire,QMenu*, QTreeWidgetItem*)>* userAddMenu)
|
||||
{
|
||||
m_userAddMenu = userAddMenu;
|
||||
}
|
||||
|
||||
|
||||
//右键菜单
|
||||
void RcTreeWidget::slot_ShowPopMenu(const QPoint& pos)
|
||||
{
|
||||
QTreeWidgetItem* curItem = this->itemAt(pos);
|
||||
if (curItem != nullptr)
|
||||
{
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
|
||||
if (m_userAddMenu != nullptr)
|
||||
{
|
||||
(*m_userAddMenu)(m_direction, menu, curItem);
|
||||
}
|
||||
|
||||
QAction* action = menu->addAction(tr("Show File in Explorer"), this, [&]() {
|
||||
QString path, cmd;
|
||||
|
||||
path = QString("%1/%2").arg(m_rootDir).arg(curItem->data(0, Qt::ToolTipRole).toString());
|
||||
#ifdef _WIN32
|
||||
path = path.replace("/", "\\");
|
||||
cmd = QString("explorer.exe /select,%1").arg(path);
|
||||
#else
|
||||
path = path.replace("\\", "/");
|
||||
cmd = QString("open -R %1").arg(path);
|
||||
#endif
|
||||
QProcess process;
|
||||
process.startDetached(cmd);
|
||||
});
|
||||
|
||||
//没有名称表示是对齐的item,不存在对应的文件,只是占位
|
||||
if (curItem->text(0).isEmpty())
|
||||
{
|
||||
action->setEnabled(false);
|
||||
}
|
||||
|
||||
if (menu)
|
||||
{
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
menu->exec(QCursor::pos());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//点击收起的槽函数
|
||||
void RcTreeWidget::slot_itemCollapsed(QTreeWidgetItem *item)
|
||||
{
|
||||
QString name = item->data(0, Qt::ToolTipRole).toString();
|
||||
//左边变化,通知右边去改变
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
//通知右边去收起
|
||||
m_mediator->setRightItemStatus(name,RC_COLLAPSED);
|
||||
}
|
||||
else
|
||||
{
|
||||
//通知左边去收起
|
||||
m_mediator->setLeftItemStatus(name, RC_COLLAPSED);
|
||||
}
|
||||
}
|
||||
|
||||
//点击展开的槽函数
|
||||
void RcTreeWidget::slot_itemExpanded(QTreeWidgetItem *item)
|
||||
{
|
||||
QString name = item->data(0, Qt::ToolTipRole).toString();
|
||||
|
||||
//左边变化,通知右边去改变
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
//右边展开
|
||||
m_mediator->setRightItemStatus(name, RC_EXPANDED);
|
||||
}
|
||||
else
|
||||
{
|
||||
//左边收起
|
||||
m_mediator->setLeftItemStatus(name, RC_EXPANDED);
|
||||
}
|
||||
}
|
||||
|
||||
void RcTreeWidget::setDirection(RC_DIRECTION direction)
|
||||
{
|
||||
m_direction = direction;
|
||||
}
|
||||
|
||||
void RcTreeWidget::setMediator(MediatorFileTree *mediator)
|
||||
{
|
||||
m_mediator = mediator;
|
||||
|
||||
}
|
||||
|
||||
//滚动条值变化后的槽函数。一旦滚动则会出发这里,发送消息给中介,让中介去同步另外一方
|
||||
void RcTreeWidget::slot_scrollValueChange(int value)
|
||||
{
|
||||
if (m_direction == RC_LEFT)
|
||||
{
|
||||
if (m_mediator->getLeftScrollValue() != value)
|
||||
{
|
||||
m_mediator->setLeftScrollValue(value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_mediator->getRightScrollValue() != value)
|
||||
{
|
||||
m_mediator->setRightScrollValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//注意,这里一旦开始调整后,又会引发滚动条值的变化
|
||||
void RcTreeWidget::setVerticalValue(int value)
|
||||
{
|
||||
//不相等才需要设置
|
||||
if (verticalScrollBar()->value() != value)
|
||||
{
|
||||
//超过最大值,只能设置为最大值
|
||||
if (value > verticalScrollBar()->maximum())
|
||||
{
|
||||
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
|
||||
}
|
||||
else
|
||||
{
|
||||
verticalScrollBar()->setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#include <qtreewidget.h>
|
||||
#include <QPoint>
|
||||
#include <functional>
|
||||
#include <QMenu>
|
||||
|
||||
#include "rcglobal.h"
|
||||
|
||||
class MediatorFileTree;
|
||||
|
||||
class RcTreeWidget :public QTreeWidget
|
||||
{
|
||||
|
||||
public:
|
||||
RcTreeWidget(QWidget *parent=nullptr);
|
||||
~RcTreeWidget();
|
||||
|
||||
void setContextUserDefineItemMenuCallBack(std::function<void(int dire, QMenu*, QTreeWidgetItem*)>* userAddMenu);
|
||||
|
||||
void setDirection(RC_DIRECTION direction);
|
||||
void setMediator(MediatorFileTree * mediator);
|
||||
void setVerticalValue(int value);
|
||||
|
||||
void setRootDir(QString dir)
|
||||
{
|
||||
m_rootDir = dir;
|
||||
}
|
||||
|
||||
QString getRootDir()
|
||||
{
|
||||
return m_rootDir;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void slot_scrollValueChange(int value);
|
||||
void slot_itemCollapsed(QTreeWidgetItem * item);
|
||||
void slot_itemExpanded(QTreeWidgetItem * item);
|
||||
void slot_ShowPopMenu(const QPoint& pos);
|
||||
private:
|
||||
MediatorFileTree * m_mediator;
|
||||
RC_DIRECTION m_direction;
|
||||
QString m_rootDir;
|
||||
|
||||
std::function<void(int dire, QMenu*, QTreeWidgetItem*)>* m_userAddMenu;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# ----------------------------------------------------
|
||||
# This file is generated by the Qt Visual Studio Tools.
|
||||
# ------------------------------------------------------
|
||||
|
||||
# This is a reminder that you are using a generated .pro file.
|
||||
# Remove it when you are finished editing this file.
|
||||
message("You are running qmake on a generated .pro file. This may not work!")
|
||||
|
||||
|
||||
HEADERS += ./RealCompare.h \
|
||||
$$PWD/diff.h \
|
||||
./CompareWin.h
|
||||
SOURCES += ./CompareWin.cpp \
|
||||
./main.cpp \
|
||||
./RealCompare.cpp
|
||||
FORMS += ./CompareWin.ui \
|
||||
./RealCompare.ui
|
||||
RESOURCES += RealCompare.qrc
|
||||
@@ -0,0 +1,83 @@
|
||||
TEMPLATE = app
|
||||
LANGUAGE = C++
|
||||
|
||||
TARGET = Notepad--
|
||||
|
||||
CONFIG += qt warn_on release
|
||||
|
||||
QT += core gui widgets concurrent network
|
||||
|
||||
|
||||
HEADERS += *.h \
|
||||
cceditor/ccnotepad.h \
|
||||
cceditor/filemanager.h
|
||||
|
||||
|
||||
SOURCES += *.cpp \
|
||||
cceditor/ccnotepad.cpp \
|
||||
cceditor/filemanager.cpp
|
||||
|
||||
|
||||
FORMS += *.ui \
|
||||
cceditor/ccnotepad.ui
|
||||
|
||||
|
||||
RESOURCES += RealCompare.qrc
|
||||
|
||||
INCLUDEPATH += qscint/src
|
||||
INCLUDEPATH += qscint/src/Qsci
|
||||
INCLUDEPATH += qscint/scintilla/include
|
||||
INCLUDEPATH += cceditor
|
||||
|
||||
DEFINES += QSCINTILLA_DLL
|
||||
|
||||
TRANSLATIONS += realcompare_zh.ts
|
||||
|
||||
if(contains(QMAKE_HOST.arch, x86_64)){
|
||||
CONFIG(Debug, Debug|Release){
|
||||
DESTDIR = x64/Debug
|
||||
LIBS += -Lx64/Debug
|
||||
LIBS += -lqmyedit_qt5d
|
||||
}else{
|
||||
DESTDIR = x64/Release
|
||||
LIBS += -Lx64/Release
|
||||
LIBS += -lqmyedit_qt5
|
||||
QMAKE_CXXFLAGS += /openmp
|
||||
}
|
||||
}
|
||||
unix{
|
||||
if(CONFIG(debug, debug|release)){
|
||||
LIBS += -L/home/yzw/build/CCNotePad/lib -lprotobuf
|
||||
LIBS += -L/home/yzw/build/CCNotePad/x64/Debug -lqmyedit_qt5
|
||||
|
||||
QMAKE_CXXFLAGS += -fopenmp
|
||||
LIBS += -lgomp -lpthread
|
||||
}else{
|
||||
LIBS += -L/home/yzw/build/CCNotePad/lib -lprotobuf
|
||||
LIBS += -L/home/yzw/build/CCNotePad/x64/Release -lqmyedit_qt5
|
||||
DESTDIR = x64/Release
|
||||
|
||||
QMAKE_CXXFLAGS += -fopenmp -O2
|
||||
LIBS += -lgomp -lpthread
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RC_FILE += RealCompare.rc
|
||||
unix
|
||||
{
|
||||
unix:!macx: LIBS += -L$$PWD/lib/ -lprotobuf
|
||||
|
||||
INCLUDEPATH += $$PWD/.
|
||||
DEPENDPATH += $$PWD/.
|
||||
|
||||
unix:!macx: PRE_TARGETDEPS += $$PWD/lib/libprotobuf.a
|
||||
|
||||
unix:!macx: LIBS += -L$$PWD/x64/Release/ -lqmyedit_qt5
|
||||
|
||||
INCLUDEPATH += $$PWD/x64/Release
|
||||
DEPENDPATH += $$PWD/x64/Release
|
||||
|
||||
unix:!macx: PRE_TARGETDEPS += $$PWD/x64/Release/libqmyedit_qt5.a
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Resources/img/dir.png</file>
|
||||
<file>Resources/img/file.png</file>
|
||||
<file>Resources/img/open.png</file>
|
||||
<file>Resources/img/open1.png</file>
|
||||
<file>Resources/img/save.png</file>
|
||||
<file>Resources/img/all.png</file>
|
||||
<file>Resources/img/same1.png</file>
|
||||
<file>Resources/img/diff1.png</file>
|
||||
<file>Resources/img/swap.png</file>
|
||||
<file>Resources/img/reload.png</file>
|
||||
<file>Resources/img/rule.png</file>
|
||||
<file>Resources/img/left3.png</file>
|
||||
<file>Resources/img/right3.png</file>
|
||||
<file>Resources/img/point.png</file>
|
||||
<file>Resources/img/main.png</file>
|
||||
<file>Resources/img/showchar.png</file>
|
||||
<file>Resources/img/hidechar.png</file>
|
||||
<file>Resources/img/reload2.png</file>
|
||||
<file>Resources/img/tran.png</file>
|
||||
<file>Resources/img/6688.png</file>
|
||||
<file>Resources/img/clear.png</file>
|
||||
<file>Resources/img/undo.png</file>
|
||||
<file>Resources/img/redo.png</file>
|
||||
<file>Resources/edit/global/close.png</file>
|
||||
<file>Resources/edit/global/closehover.png</file>
|
||||
<file>Resources/edit/global/needsave.png</file>
|
||||
<file>Resources/edit/global/noneedsave.png</file>
|
||||
<file>Resources/edit/styleblack/closeall.png</file>
|
||||
<file>Resources/edit/styleblack/closefile.png</file>
|
||||
<file>Resources/edit/styleblack/crlf.png</file>
|
||||
<file>Resources/edit/styleblack/cut.png</file>
|
||||
<file>Resources/edit/styleblack/dircompare.png</file>
|
||||
<file>Resources/edit/styleblack/filecompare.png</file>
|
||||
<file>Resources/edit/styleblack/find.png</file>
|
||||
<file>Resources/edit/styleblack/needsavebar.png</file>
|
||||
<file>Resources/edit/styleblack/newfile.png</file>
|
||||
<file>Resources/edit/styleblack/noneedsaveallbar.png</file>
|
||||
<file>Resources/edit/styleblack/noneedsavebar.png</file>
|
||||
<file>Resources/edit/styleblack/openfile.png</file>
|
||||
<file>Resources/edit/styleblack/paste.png</file>
|
||||
<file>Resources/edit/styleblack/redo.png</file>
|
||||
<file>Resources/edit/styleblack/replace.png</file>
|
||||
<file>Resources/edit/styleblack/transcode.png</file>
|
||||
<file>Resources/edit/styleblack/undo.png</file>
|
||||
<file>Resources/edit/styleblack/white.png</file>
|
||||
<file>Resources/edit/styleblack/zoomin.png</file>
|
||||
<file>Resources/edit/styleblack/zoomout.png</file>
|
||||
<file>Resources/edit/styleblack/copy.png</file>
|
||||
<file>Resources/edit/styleblack/needsaveallbar.png</file>
|
||||
<file>Resources/edit/styledeepblue/closeall.png</file>
|
||||
<file>Resources/edit/styledeepblue/closefile.png</file>
|
||||
<file>Resources/edit/styledeepblue/copy.png</file>
|
||||
<file>Resources/edit/styledeepblue/crlf.png</file>
|
||||
<file>Resources/edit/styledeepblue/cut.png</file>
|
||||
<file>Resources/edit/styledeepblue/dircompare.png</file>
|
||||
<file>Resources/edit/styledeepblue/filecompare.png</file>
|
||||
<file>Resources/edit/styledeepblue/find.png</file>
|
||||
<file>Resources/edit/styledeepblue/needsaveallbar.png</file>
|
||||
<file>Resources/edit/styledeepblue/needsavebar.png</file>
|
||||
<file>Resources/edit/styledeepblue/newfile.png</file>
|
||||
<file>Resources/edit/styledeepblue/noneedsaveallbar.png</file>
|
||||
<file>Resources/edit/styledeepblue/noneedsavebar.png</file>
|
||||
<file>Resources/edit/styledeepblue/openfile.png</file>
|
||||
<file>Resources/edit/styledeepblue/paste.png</file>
|
||||
<file>Resources/edit/styledeepblue/redo.png</file>
|
||||
<file>Resources/edit/styledeepblue/replace.png</file>
|
||||
<file>Resources/edit/styledeepblue/transcode.png</file>
|
||||
<file>Resources/edit/styledeepblue/undo.png</file>
|
||||
<file>Resources/edit/styledeepblue/white.png</file>
|
||||
<file>Resources/edit/styledeepblue/zoomin.png</file>
|
||||
<file>Resources/edit/styledeepblue/zoomout.png</file>
|
||||
<file>Resources/edit/global/notebook.png</file>
|
||||
<file>Resources/img/next.png</file>
|
||||
<file>Resources/img/pre.png</file>
|
||||
<file>Resources/edit/styledeepblue/rename.png</file>
|
||||
<file>realcompare_zh.qm</file>
|
||||
<file>Resources/edit/styleblack/rename.png</file>
|
||||
<file>Resources/img/bin.png</file>
|
||||
<file>Resources/img/info.png</file>
|
||||
<file>Resources/edit/styledeepblue/next.png</file>
|
||||
<file>Resources/edit/styledeepblue/pre.png</file>
|
||||
<file>Resources/edit/styledeepblue/goto.png</file>
|
||||
<file>Resources/edit/styledeepblue/bincmp.png</file>
|
||||
<file>Resources/img/strict.png</file>
|
||||
<file>Resources/img/1.png</file>
|
||||
<file>Resources/img/2.png</file>
|
||||
<file>Resources/img/3.png</file>
|
||||
<file>Resources/img/4.png</file>
|
||||
<file>Resources/img/5.png</file>
|
||||
<file>Resources/img/6.png</file>
|
||||
<file>Resources/img/next2.png</file>
|
||||
<file>Resources/img/pre2.png</file>
|
||||
<file>Resources/img/zoomin.png</file>
|
||||
<file>Resources/img/zoomout.png</file>
|
||||
<file>Resources/img/unequaldir.png</file>
|
||||
<file>Resources/img/unequalfile.png</file>
|
||||
<file>Resources/img/onlyfile.png</file>
|
||||
<file>Resources/img/showall.png</file>
|
||||
<file>Resources/img/diff.png</file>
|
||||
<file>Resources/img/tolerant.png</file>
|
||||
<file>Resources/img/needsave.png</file>
|
||||
<file>Resources/img/break.png</file>
|
||||
<file>Resources/img/pullopen.png</file>
|
||||
<file>notepad/closeAll.png</file>
|
||||
<file>notepad/closeFile.png</file>
|
||||
<file>notepad/closeTabButton.png</file>
|
||||
<file>notepad/closeTabButton_hover.png</file>
|
||||
<file>notepad/closeTabButton_inact.png</file>
|
||||
<file>notepad/closeTabButton_push.png</file>
|
||||
<file>notepad/copy.png</file>
|
||||
<file>notepad/cut.png</file>
|
||||
<file>notepad/find.png</file>
|
||||
<file>notepad/findReplace.png</file>
|
||||
<file>notepad/indentGuide.png</file>
|
||||
<file>notepad/invisibleChar.png</file>
|
||||
<file>notepad/newFile.png</file>
|
||||
<file>notepad/openFile.png</file>
|
||||
<file>notepad/paste.png</file>
|
||||
<file>notepad/redo.png</file>
|
||||
<file>notepad/saveAll.png</file>
|
||||
<file>notepad/saveFile.png</file>
|
||||
<file>notepad/undo.png</file>
|
||||
<file>notepad/wrap.png</file>
|
||||
<file>notepad/zoomIn.png</file>
|
||||
<file>notepad/zoomOut.png</file>
|
||||
<file>notepad/savetab.png</file>
|
||||
<file>notepad/close.png</file>
|
||||
<file>notepad/closehover.png</file>
|
||||
<file>notepad/cmpbin.png</file>
|
||||
<file>notepad/cmpdir.png</file>
|
||||
<file>notepad/cmpfile.png</file>
|
||||
<file>notepad/cmpfile1.png</file>
|
||||
<file>notepad/ecg.png</file>
|
||||
<file>notepad/go.png</file>
|
||||
<file>notepad/needsave.png</file>
|
||||
<file>notepad/next.png</file>
|
||||
<file>notepad/noneedsave.png</file>
|
||||
<file>notepad/pre.png</file>
|
||||
<file>notepad/rename.png</file>
|
||||
<file>Resources/edit/global/ndd.ico</file>
|
||||
<file>notepad/mark.png</file>
|
||||
<file>notepad/sign.png</file>
|
||||
<file>notepad/clearsign.png</file>
|
||||
<file>notepad/autosave.png</file>
|
||||
<file>qss/lightblue/arrow_bottom.png</file>
|
||||
<file>qss/lightblue/add_bottom.png</file>
|
||||
<file>qss/mystyle.qss</file>
|
||||
<file>qss/lightbluestyle.qss</file>
|
||||
<file>qss/lightblue/add_top.png</file>
|
||||
<file>mac.icns</file>
|
||||
<file>Resources/img/register.png</file>
|
||||
<file>notepad/rightClose.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 650 B |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 735 B |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1653643519286" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8215" width="48" height="48" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M648.479968 0.00064h-511.99968A48.959969 48.959969 0 0 0 100.64031 15.36063 54.399966 54.399966 0 0 0 85.28032 51.200608v921.599424a48.959969 48.959969 0 0 0 15.35999 35.839978A50.559968 50.559968 0 0 0 136.480288 1024h751.039531a49.279969 49.279969 0 0 0 35.839977-15.35999 50.559968 50.559968 0 0 0 15.359991-35.839978V290.240459z" fill="#A5D940" p-id="8216"></path><path d="M938.719787 290.240459H699.679936a52.479967 52.479967 0 0 1-51.199968-51.199968V0.00064l290.239819 290.239819z" fill="#C4EAFF" p-id="8217"></path><path d="M407.520119 459.520353v29.759981H331.360166v198.719876H296.800188v-198.719876H220.320236v-29.759981zM462.240084 459.520353l55.679966 82.559948 55.679965-82.559948h42.559973l-77.439951 110.399931 82.879948 118.079926h-42.559974l-61.119961-90.559943-61.119962 90.559943h-42.559974l82.239949-118.079926-76.799952-110.399931zM815.199864 459.520353v29.759981h-76.159953v198.719876h-34.559978v-198.719876H629.27998v-29.759981z" fill="#FFFFFF" p-id="8218"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 735 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 922 B |
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> <image id="image0" width="16" height="16" x="0" y="0"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABX1BMVEUAAACgpKDQ1NDAxc/P
|
||||
zs/AxMCwwLCfoJCfop/AmI+vh4+Ql5Dg6ODg4uDg5+/Q2N/Q2tCgr6+wn6DAoJ+PaHCQmJDAv8C/
|
||||
v7+wv6+gr7+gp7/w9//Qz9DAr5/fx5D/+M+fkIDPx8+fnJ/w9PC/t7+wt6/P0MDAx9+vqL+gn5+w
|
||||
qJC/oEDw31+/r0/AyLDf3d/v9ODw/P//9///9/D/8MDfz3/v0DDgyE/Av3/QyLDAt2DfyEDv0CCf
|
||||
gEDw5+Dw9O+gqKDPz8DAt8/Qt9DfsH/gxyDgwBCQkH/f3M+/t7D//P/g39/f0NDgwJ/fuC+ggEC/
|
||||
v6/v79/QzM/P1M/Q2ODAwKDQwC+vkEDQyMCwqGDg2DCvly//6O/w/fD///Df0M/At2+voF/v4NDQ
|
||||
4NDf3OBfT0Dg3+Dv7e+Pj4///+/g5/Dv6OD/8ODg9/Dv/++vr6+Ah4BweHBwdXBvbG////8Y2q+X
|
||||
AAAAAXRSTlMAQObYZgAAAAFiS0dEdN9tqG0AAAAHdElNRQfmBRsIAQRTVKkxAAAA+klEQVQY0y2L
|
||||
Z1PCQBRFH5tsRCEaC6KuWPLErgmo2NDYxWcHuwYbmlgJ8P9nzM54v90z50CEMUXlWlMU5JpbIBbX
|
||||
W9sMjbez8Hd0dkFC17qTPVpvn+hPDQwODYOJyZH0KB8bn5icmp6ZhRBYum5nsnPzC7nFpTCLIrOY
|
||||
wZTlldX82noITGeDs82t7Z3dvf3CQQgixA85Ozo+yZ2encdkQmqxdHF5lb++KdgSmKgWmXJ7d//g
|
||||
OmVVlYnjZh+fnl+E7SDGpGG8Vt5S71j2BJIvjTh+0Gfli4gEpSXwvsXPr0uYIeGWAKpI6Fm8avpB
|
||||
rVZPAPhBo1EPTA3+9wcoICtzAO/bXwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNS0yN1QwODow
|
||||
MTowNCswMDowMHQN1joAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDUtMjdUMDg6MDE6MDQrMDA6
|
||||
MDAFUG6GAAAAAElFTkSuQmCC" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655351318268" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8004" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M192 0h448.1536L960 320v576c0 70.6944-57.3056 128-128 128H192C121.3056 1024 64 966.6944 64 896V128C64 57.3056 121.3056 0 192 0z" fill="#2696FF" p-id="8005"></path><path d="M417.7536 546.176h-60.8256v170.5728h-40.9216V546.176H256V512h161.7536v34.176z m94.3872 36.416L549.376 512h47.0528l-57.8304 101.5296 59.328 103.2192h-47.6032l-38.1824-71.7184-38.1952 71.7184h-47.6032l59.3408-103.2192L427.8528 512h47.0528l37.2352 70.592zM768 546.176h-60.8256v170.5728H666.24V546.176h-60.0064V512H768v34.176z" fill="#FFFFFF" opacity=".9" p-id="8006"></path><path d="M640 0l320 320H768c-70.6944 0-128-57.3056-128-128V0z" fill="#8FC6FE" p-id="8007"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1655351271993" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3721" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
|
||||
</style></defs><path d="M147.2 0C102.4 0 65.6 35.2 65.6 80v862.4c0 44.8 35.2 81.6 81.6 81.6h731.2c44.8 0 81.6-36.8 81.6-81.6V324.8L657.6 0H147.2z" fill="#F9CA06" p-id="3722"></path><path d="M960 324.8v16H755.2s-100.8-19.2-97.6-107.2c0 0 3.2 91.2 96 91.2H960z" fill="#F7BC04" p-id="3723"></path><path d="M657.6 0v232c0 27.2 17.6 92.8 97.6 92.8H960L657.6 0z" fill="#FFFFFF" p-id="3724"></path><path d="M364.8 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z m187.2 172.8c-4.8 0-8 0-9.6-3.2l-59.2-80-60.8 80c-1.6 3.2-4.8 3.2-8 3.2-6.4 0-11.2-4.8-11.2-11.2 0-1.6 0-4.8 1.6-6.4l62.4-81.6-57.6-78.4c-1.6-1.6-1.6-3.2-1.6-6.4 0-4.8 3.2-11.2 11.2-11.2 3.2 0 6.4 1.6 9.6 4.8l54.4 73.6 54.4-73.6c3.2-3.2 6.4-4.8 9.6-4.8 6.4 0 11.2 4.8 11.2 11.2 0 3.2 0 4.8-1.6 6.4l-57.6 76.8 62.4 83.2c0 1.6 1.6 4.8 1.6 6.4 0 6.4-4.8 11.2-11.2 11.2zM731.2 688h-52.8v161.6c0 6.4-4.8 11.2-12.8 11.2-6.4 0-11.2-4.8-11.2-11.2V688h-52.8c-4.8 0-9.6-3.2-9.6-9.6 0-6.4 4.8-11.2 9.6-11.2h129.6c4.8 0 9.6 4.8 9.6 11.2 0 6.4-4.8 9.6-9.6 9.6z" fill="#FFFFFF" p-id="3725"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 329 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 779 B |
|
After Width: | Height: | Size: 617 B |
|
After Width: | Height: | Size: 355 B |
|
After Width: | Height: | Size: 977 B |
|
After Width: | Height: | Size: 259 B |
|
After Width: | Height: | Size: 765 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 655 B |
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 591 B |
|
After Width: | Height: | Size: 325 B |
|
After Width: | Height: | Size: 333 B |
|
After Width: | Height: | Size: 543 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 364 B |
|
After Width: | Height: | Size: 626 B |
|
After Width: | Height: | Size: 499 B |
|
After Width: | Height: | Size: 874 B |
|
After Width: | Height: | Size: 603 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 873 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 499 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 662 B |
|
After Width: | Height: | Size: 607 B |
|
After Width: | Height: | Size: 915 B |
|
After Width: | Height: | Size: 781 B |
|
After Width: | Height: | Size: 422 B |
|
After Width: | Height: | Size: 755 B |
|
After Width: | Height: | Size: 930 B |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 592 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 849 B |
|
After Width: | Height: | Size: 925 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 978 B |