First update source
This commit is contained in:
parent
01df734fbe
commit
c2bede36e8
625
LICENSE
Normal file
625
LICENSE
Normal file
@ -0,0 +1,625 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||
document, but changing it is not allowed.
|
||||
|
||||
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 <https://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 <https://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 <https://www.gnu.org/
|
||||
licenses /why-not-lgpl.html>.
|
||||
75
SCallback.cpp
Normal file
75
SCallback.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
#include "SCallback.h"
|
||||
|
||||
|
||||
CSCallback::CSCallback()
|
||||
{
|
||||
m_MapString.insert(map<int, QString>::value_type(SET_TRANSPORT_LAYER_TYPE, "Set Transport Layer Type"));
|
||||
m_MapString.insert(map<int, QString>::value_type(SET_PRESENTATION_ADDRESSES, "Set Presentation Addresses"));
|
||||
m_MapString.insert(map<int, QString>::value_type(ADD_PRESENTATION_CONTEXT, "Add Presentation Context"));
|
||||
m_MapString.insert(map<int, QString>::value_type(REQUEST_ASSOCIATION, "Request Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(COUNT_ACCEPTED_PRESENTATION_CONTEXTS, "Count Accepted Presentation Contexts"));
|
||||
m_MapString.insert(map<int, QString>::value_type(CHECK_USER_IDENTITY_RESPONSE, "Check User Identity Response"));
|
||||
m_MapString.insert(map<int, QString>::value_type(ABORT_ASSOCIATION, "Abort Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(REJECTED_ASSOCIATION, "Release Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(UNKNOWN_ERROR_ASSOCIATION, "Unknown Error Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(RELEASE_ASSOCIATION, "Release Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(DESTROY_ASSOCIATION, "Destroy Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(PEER_REQUESTED_RELEASE, "Peer Requested Release"));
|
||||
m_MapString.insert(map<int, QString>::value_type(PEER_ABORTED_ASSOCIATION, "Peer Aboarted Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(CONNECTION_ERROR, "Connection Error"));
|
||||
m_MapString.insert(map<int, QString>::value_type(DROP_NETWORK, "Drop Network"));
|
||||
m_MapString.insert(map<int, QString>::value_type(COMPLETED, "Completed"));
|
||||
m_MapString.insert(map<int, QString>::value_type(COMPLETE, "Complete"));
|
||||
m_MapString.insert(map<int, QString>::value_type(CREATE_ASSOCIATION, "Create Association"));
|
||||
m_MapString.insert(map<int, QString>::value_type(TRY_FINDSCU, "Try Find SCU"));
|
||||
m_MapString.insert(map<int, QString>::value_type(INITIALIZE_NETWORK, "Initialize Network"));
|
||||
m_MapString.insert(map<int, QString>::value_type(CREATE_ASSOCIATION_PARAMETERS, "Create Association Parameters"));
|
||||
m_MapString.insert(map<int, QString>::value_type(SET_APTITLES, "Set AP Titles"));
|
||||
m_MapString.insert(map<int, QString>::value_type(ADD_STORAGE_PRESENTATION_CONTEXTS, "Add Storage Presentation Contexts"));
|
||||
m_MapString.insert(map<int, QString>::value_type(TRY_STORE_SCU, "Try Store SCU"));
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
|
||||
CSCallback::~CSCallback()
|
||||
{
|
||||
}
|
||||
|
||||
void CSCallback::ProgressInfo(int nState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallback::ProgressError(int nState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallback::ProgressComplete()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallback::ProgressState(int nProgressBytes, int nTotalBytes)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString CSCallback::GetStateString(int nState)
|
||||
{
|
||||
nState = (nState & ~SDCM_ERROR);
|
||||
map<int, QString>::iterator it = m_MapString.find(nState);
|
||||
QString strComment = it->second;
|
||||
|
||||
return strComment;
|
||||
}
|
||||
|
||||
void CSCallback::Clear()
|
||||
{
|
||||
m_bErrorExist = FALSE;
|
||||
m_nErrorCode = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
78
SCallback.h
Normal file
78
SCallback.h
Normal file
@ -0,0 +1,78 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef CSCALLBACK_H
|
||||
#define CSCALLBACK_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
#define CALLBACK_INFO(pInfo, nState)\
|
||||
{\
|
||||
if (pInfo != NULL)\
|
||||
{\
|
||||
pInfo->ProgressInfo(nState);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define CALLBACK_STATE(pInfo, nProgressBytes, nTotalBytes)\
|
||||
{\
|
||||
if (pInfo != NULL)\
|
||||
{\
|
||||
pInfo->ProgressState(nProgressBytes, nTotalBytes);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define CALLBACK_ERROR(pInfo, nState)\
|
||||
{\
|
||||
if (pInfo != NULL)\
|
||||
{\
|
||||
pInfo->ProgressError(nState);\
|
||||
}\
|
||||
}
|
||||
|
||||
#define CALLBACK_COMPLETE(pInfo)\
|
||||
{\
|
||||
if (pInfo != NULL)\
|
||||
{\
|
||||
pInfo->ProgressComplete();\
|
||||
}\
|
||||
}
|
||||
|
||||
//#include "SDCMState.h"
|
||||
|
||||
#include "dcmtk/dcmdata/dctag.h"
|
||||
#include "dcmtk/dcmdata/dcdeftag.h"
|
||||
|
||||
#include "SDCMCommonStructure.h"
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
using namespace std;
|
||||
|
||||
class CSCallback
|
||||
{
|
||||
public:
|
||||
CSCallback();
|
||||
virtual ~CSCallback();
|
||||
|
||||
virtual void ProgressInfo(int nState);
|
||||
virtual void ProgressError(int nState);
|
||||
virtual void ProgressComplete();
|
||||
|
||||
virtual void ProgressState(int nProgressBytes, int nTotalBytes);
|
||||
|
||||
QString GetStateString(int nState);
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
map<int, QString> m_MapString;
|
||||
|
||||
|
||||
|
||||
BOOL m_bErrorExist;
|
||||
int m_nErrorCode;
|
||||
};
|
||||
|
||||
#endif
|
||||
657
SDCMCommonStructure.h
Normal file
657
SDCMCommonStructure.h
Normal file
@ -0,0 +1,657 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SDCM_COMMON_STRUCTURE_H
|
||||
#define SDCM_COMMON_STRUCTURE_H
|
||||
|
||||
#include "dcmtk/ofstd/ofstring.h"
|
||||
#include "dcmtk/dcmdata/dcdeftag.h"
|
||||
#include "dcmtk/dcmdata/dctag.h"
|
||||
|
||||
#include "csdcm.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef enum _SDCM_SCU_STATE
|
||||
{
|
||||
NONE = 0,
|
||||
INITIALIZE_NETWORK,
|
||||
CREATE_ASSOCIATION_PARAMETERS,
|
||||
SET_AP_TITLES,
|
||||
SET_TRANSPORT_LAYER_TYPE,
|
||||
SET_PRESENTATION_ADDRESSES,
|
||||
REQUEST_ASSOCIATION,
|
||||
COUNT_ACCEPTED_PRESENTATION_CONTEXTS,
|
||||
CHECK_USER_IDENTITY_RESPONSE,
|
||||
RELEASE_ASSOCIATION,
|
||||
DESTROY_ASSOCIATION,
|
||||
DROP_NETWORK,
|
||||
COMPLETED,
|
||||
COMPLETE,
|
||||
ADD_PRESENTATION_CONTEXT,
|
||||
ABORT_ASSOCIATION,
|
||||
REJECTED_ASSOCIATION,
|
||||
UNKNOWN_ERROR_ASSOCIATION,
|
||||
PEER_REQUESTED_RELEASE,
|
||||
PEER_ABORTED_ASSOCIATION,
|
||||
CONNECTION_ERROR,
|
||||
CREATE_ASSOCIATION,
|
||||
TRY_FINDSCU,
|
||||
SET_APTITLES,
|
||||
ADD_STORAGE_PRESENTATION_CONTEXTS,
|
||||
TRY_STORE_SCU,
|
||||
SDCM_ERROR=0x1000,
|
||||
}SDCM_SCU_STATE;
|
||||
|
||||
struct SDATA_SCHEDULED_DATA
|
||||
{
|
||||
public:
|
||||
QString strScheduledStationAETitle;
|
||||
QString strScheduledProcedureStepStartDate;
|
||||
QString strScheduledProcedureStepStartTime;
|
||||
QString strScheduledPerformingPhysicianName;
|
||||
QString strScheduledStepDescription;
|
||||
QString strScheduledCodeValue;
|
||||
|
||||
SDATA_SCHEDULED_DATA()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strScheduledStationAETitle = "";
|
||||
strScheduledProcedureStepStartDate = "";
|
||||
strScheduledProcedureStepStartTime = "";
|
||||
strScheduledPerformingPhysicianName = "";
|
||||
strScheduledStepDescription = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_ScheduledProcedureStepDescription)
|
||||
{
|
||||
SetData(strScheduledStepDescription, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledStationAETitle)
|
||||
{
|
||||
SetData(strScheduledStationAETitle, strData);
|
||||
}
|
||||
else if (tag == DCM_PerformedProcedureStepStartDate)// || tag==DCM_ScheduledProcedureStepStartDate)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartDate, strData);
|
||||
}
|
||||
else if (tag == DCM_PerformedProcedureStepStartTime)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartTime, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledPerformingPhysicianName)
|
||||
{
|
||||
SetData(strScheduledPerformingPhysicianName, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepStartDate)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartDate, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepStartTime)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartTime, strData);
|
||||
}
|
||||
else if (tag == DCM_CodeValue)
|
||||
{
|
||||
SetData(strScheduledCodeValue, strData);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(QString& strTagData, OFString strData)
|
||||
{
|
||||
if(strData.size()>0)
|
||||
{
|
||||
strTagData = strData.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct SDATA_PATIENT
|
||||
{
|
||||
public:
|
||||
QString strPatientID;
|
||||
QString strPatientName;
|
||||
QString strPatientSex;
|
||||
QString strPatientAge;
|
||||
|
||||
//Database New
|
||||
QString strPatientBirthDate;
|
||||
QString strPatientBirthTime;
|
||||
QString strPatientWeight;
|
||||
QString strPatientComments;
|
||||
QString strPatientLocation; //외래, 입원 구분
|
||||
|
||||
QString m_strTestString;
|
||||
|
||||
SDATA_PATIENT()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strPatientID = "";
|
||||
strPatientName = "";
|
||||
strPatientSex = "";
|
||||
strPatientBirthDate = "";
|
||||
strPatientBirthTime = "";
|
||||
strPatientWeight = "";
|
||||
strPatientComments = "";
|
||||
strPatientAge = "";
|
||||
strPatientLocation = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_PatientID)
|
||||
{
|
||||
strPatientID = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientName)
|
||||
{
|
||||
strPatientName = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientAge)
|
||||
{
|
||||
strPatientAge = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepLocation)
|
||||
{
|
||||
strPatientLocation = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientSex)
|
||||
{
|
||||
OFString strTmp;
|
||||
strTmp = strData.c_str();
|
||||
|
||||
if(strTmp.size()>0)
|
||||
{
|
||||
if (strTmp.at(0) == 'M')
|
||||
{
|
||||
strPatientSex = "M";
|
||||
}
|
||||
else if (strTmp.at(0) == 'F')
|
||||
{
|
||||
strPatientSex = "F";
|
||||
}
|
||||
else if (strTmp.at(0) == 'O')
|
||||
{
|
||||
strPatientSex = "O";
|
||||
}
|
||||
else
|
||||
{
|
||||
strPatientSex = strData.c_str();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (tag == DCM_PatientBirthDate)
|
||||
{
|
||||
strPatientBirthDate = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientBirthTime)
|
||||
{
|
||||
strPatientBirthTime = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientWeight)
|
||||
{
|
||||
strPatientWeight = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientComments)
|
||||
{
|
||||
strPatientComments = strData.c_str();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct SDATA_STUDY
|
||||
{
|
||||
public:
|
||||
int nPatientIndex;
|
||||
QString strStudyInstanceUID;
|
||||
QString strStudyDate;
|
||||
QString strStudyTime;
|
||||
|
||||
//Database New
|
||||
QString strAccessionNumber;
|
||||
QString strStudyDescription;
|
||||
QString strReferringPhysiciansName;
|
||||
|
||||
SDATA_STUDY()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strAccessionNumber = "";
|
||||
strStudyInstanceUID = "";
|
||||
strStudyDate = "";
|
||||
strStudyTime = "";
|
||||
strStudyDescription = "";
|
||||
strReferringPhysiciansName = "";
|
||||
nPatientIndex = 0;
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_AccessionNumber)
|
||||
{
|
||||
strAccessionNumber = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_StudyInstanceUID)
|
||||
{
|
||||
strStudyInstanceUID = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepDescription)
|
||||
{
|
||||
strStudyDescription = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_StudyDate)
|
||||
{
|
||||
strStudyDate = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_StudyTime)
|
||||
{
|
||||
strStudyTime = strData.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct SDATA_SERIES
|
||||
{
|
||||
public:
|
||||
int nStudyIndex;
|
||||
int nSeriesNumber;
|
||||
QString strSeriesInstanceUID;
|
||||
QString strModality;
|
||||
QString strLaterality;
|
||||
QString strSeriesDate;
|
||||
QString strSeriesTime;
|
||||
|
||||
//Database New
|
||||
QString strBodyPartExamined;
|
||||
QString strSeriesDescription;
|
||||
QString strOperatorsName;
|
||||
|
||||
SDATA_SERIES()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
nStudyIndex = 0;
|
||||
nSeriesNumber = 0;
|
||||
strBodyPartExamined = "";
|
||||
strSeriesInstanceUID = "";
|
||||
strSeriesDescription = "";
|
||||
strModality = "";
|
||||
strOperatorsName = "";
|
||||
strLaterality = "";
|
||||
strSeriesDate = "";
|
||||
strSeriesTime = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_RequestedProcedureDescription)
|
||||
{
|
||||
strSeriesDescription = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_BodyPartExamined)
|
||||
{
|
||||
strBodyPartExamined = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_Modality)
|
||||
{
|
||||
strModality = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_OperatorsName)
|
||||
{
|
||||
strOperatorsName = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_Laterality)
|
||||
{
|
||||
strLaterality = strData.c_str();
|
||||
}
|
||||
else if(tag == DCM_SeriesDate)
|
||||
{
|
||||
strSeriesDate = strData.c_str();
|
||||
}
|
||||
else if(tag == DCM_SeriesTime)
|
||||
{
|
||||
strSeriesTime = strData.c_str();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct SDATA_IMAGE
|
||||
{
|
||||
public:
|
||||
int nSeriesIndex;
|
||||
int nImageIndex;
|
||||
int nImageNumber;
|
||||
int bDelete;
|
||||
int nFileType;
|
||||
QString strFileLocation;
|
||||
QString strInstanceUID;
|
||||
|
||||
//Database New
|
||||
QString strImageType;
|
||||
QString strAcquisitionDate;
|
||||
QString strAcquisitionTime;
|
||||
QString strContentDate; // Pixel Creation Date
|
||||
QString strContentTime; // Pixel Creation Time
|
||||
int nAcquisitionNumber;
|
||||
int nInstanceNumber;
|
||||
QString strPatientOrientation;
|
||||
QString strImageLaterality;
|
||||
QString strImageComments; // Option
|
||||
//(0088, 0200) Icon Image Sequence : usage or not
|
||||
//Burned In Annotation
|
||||
|
||||
SDATA_IMAGE()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
nImageIndex = 0;
|
||||
nSeriesIndex = 0;
|
||||
nImageNumber = 0;
|
||||
bDelete = 0;
|
||||
nFileType = 0;
|
||||
strFileLocation = "";
|
||||
strInstanceUID = "";
|
||||
{
|
||||
strImageType = "DERIVED";
|
||||
strImageType += char(0x5c);
|
||||
strImageType += "PRIMARY";
|
||||
}
|
||||
|
||||
strAcquisitionDate = "";
|
||||
strAcquisitionTime = "";
|
||||
strContentDate = ""; // Pixel Creation Date
|
||||
strContentTime = ""; // Pixel Creation Time
|
||||
nAcquisitionNumber = 0;
|
||||
nInstanceNumber = 0;
|
||||
strPatientOrientation = "";
|
||||
strImageLaterality = "";
|
||||
strImageComments = ""; // Option
|
||||
//(0088, 0200) Icon Image Sequence : usage or not
|
||||
//Burned In Annotation
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_ImageLaterality)
|
||||
{
|
||||
strImageLaterality = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_ImageType)
|
||||
{
|
||||
strImageType = strData.c_str();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class WorklistResponseData
|
||||
{
|
||||
public:
|
||||
WorklistResponseData()
|
||||
{
|
||||
strRequestedProcedureID = "";
|
||||
strReferringPhysicianName = "";
|
||||
strRequestingPhysician = "";
|
||||
strRequestedProcedureDescription = "";
|
||||
strAdmissionID = "";
|
||||
strEnc = "";
|
||||
|
||||
m_Study.Init();
|
||||
m_Series.Init();
|
||||
m_Image.Init();
|
||||
m_Patient.Init();
|
||||
m_ScheduledData.Init();
|
||||
|
||||
strPatientOrientation = "";
|
||||
}
|
||||
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
//Uint16 nGroup = tag.getGroup();
|
||||
//Uint16 nElement = tag.getElement();
|
||||
|
||||
m_Study.InsertData(tag, strData);
|
||||
m_Series.InsertData(tag, strData);
|
||||
m_Image.InsertData(tag, strData);
|
||||
m_Patient.InsertData(tag, strData);
|
||||
m_ScheduledData.InsertData(tag, strData);
|
||||
|
||||
if(tag==DCM_RequestedProcedureID)
|
||||
{
|
||||
|
||||
}
|
||||
if (tag.getEVR() == EVR_DA)
|
||||
{
|
||||
OFString strTmp;
|
||||
strTmp = strData.c_str();
|
||||
|
||||
/*
|
||||
int nFind = strTmp.Find("-");
|
||||
if (nFind > 0)
|
||||
{
|
||||
strTmp = strTmp.Left(nFind);
|
||||
}
|
||||
*/
|
||||
strData = strTmp.c_str();
|
||||
}
|
||||
|
||||
else if (tag == DCM_SpecificCharacterSet)
|
||||
{
|
||||
strEnc = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_RequestedProcedureDescription)
|
||||
{
|
||||
strRequestedProcedureDescription = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_RequestingPhysician)
|
||||
{
|
||||
strRequestingPhysician = strData.c_str();
|
||||
}
|
||||
|
||||
else if (tag == DCM_RequestedProcedureID)
|
||||
{
|
||||
strRequestedProcedureID = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_ReferringPhysicianName)
|
||||
{
|
||||
strReferringPhysicianName = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_AdmissionID)
|
||||
{
|
||||
strAdmissionID = strData.c_str();
|
||||
}
|
||||
else if (tag == DCM_PatientOrientation)
|
||||
{
|
||||
strPatientOrientation = strData.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
QString strPatientOrientation;
|
||||
QString strRequestingPhysician;
|
||||
QString strRequestedProcedureID;
|
||||
QString strRequestedProcedureDescription;
|
||||
QString strReferringPhysicianName;
|
||||
QString strAdmissionID;
|
||||
QString strEnc;
|
||||
|
||||
SDATA_PATIENT m_Patient;
|
||||
SDATA_STUDY m_Study;
|
||||
SDATA_SERIES m_Series;
|
||||
SDATA_IMAGE m_Image;
|
||||
SDATA_SCHEDULED_DATA m_ScheduledData;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct MPPSRequestData
|
||||
{
|
||||
MPPSRequestData()
|
||||
{
|
||||
m_strPatientID.clear();
|
||||
m_strPatientName.clear();
|
||||
m_strPatientBirthDate.clear();
|
||||
m_strPatientSex.clear();
|
||||
m_strAccessionNumber.clear();
|
||||
m_strReferencedSOPClassUID.clear();
|
||||
m_strReferencedSOPInstanceUID.clear();
|
||||
}
|
||||
|
||||
MPPSRequestData(const WorklistResponseData& wr, OFString strReferencedSOPClassUID="")
|
||||
{
|
||||
m_strPatientID = wr.m_Patient.strPatientID.toStdString().c_str();
|
||||
m_strPatientName = wr.m_Patient.strPatientName.toStdString().c_str();
|
||||
m_strPatientBirthDate = wr.m_Patient.strPatientBirthDate.toStdString().c_str();
|
||||
m_strPatientSex = wr.m_Patient.strPatientSex.toStdString().c_str();
|
||||
m_strAccessionNumber = wr.m_Study.strAccessionNumber.toStdString().c_str();
|
||||
m_strReferencedSOPClassUID = strReferencedSOPClassUID;
|
||||
m_strReferencedSOPInstanceUID = wr.m_Study.strStudyInstanceUID.toStdString().c_str();
|
||||
}
|
||||
|
||||
OFString m_strPatientID;
|
||||
OFString m_strPatientName;
|
||||
OFString m_strPatientBirthDate;
|
||||
OFString m_strPatientSex;
|
||||
OFString m_strAccessionNumber;
|
||||
OFString m_strReferencedSOPClassUID;
|
||||
OFString m_strReferencedSOPInstanceUID;
|
||||
};
|
||||
|
||||
typedef enum _STRENC_TYPE
|
||||
{
|
||||
STRENC_ANSI = 0,
|
||||
STRENC_KOR,
|
||||
STRENC_UTF8
|
||||
}STRENC_TYPE;
|
||||
|
||||
typedef struct _SDCM_AGE
|
||||
{
|
||||
_SDCM_AGE()
|
||||
{
|
||||
m_nYears = -1;
|
||||
m_nMonths = -1;
|
||||
m_nDays = -1;
|
||||
}
|
||||
int m_nYears;
|
||||
int m_nMonths;
|
||||
int m_nDays;
|
||||
}SDCM_AGE;
|
||||
|
||||
typedef struct _SDCM_SERVER_INFO
|
||||
{
|
||||
QString m_strServer_IP;
|
||||
int m_nServer_Port;
|
||||
QString m_strServer_AETitle;
|
||||
QString m_strClient_AETitle;
|
||||
}SDCM_SERVER_INFO;
|
||||
|
||||
typedef struct _ImageFormat
|
||||
{
|
||||
_ImageFormat()
|
||||
{
|
||||
m_pData = NULL;
|
||||
m_nWidth = -1;
|
||||
m_nHeight = -1;
|
||||
}
|
||||
|
||||
_ImageFormat(int** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_pData = pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
_ImageFormat(unsigned char** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
_ImageFormat(void** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
~_ImageFormat()
|
||||
{
|
||||
if (m_pData != NULL)
|
||||
{
|
||||
if (*m_pData != NULL)
|
||||
{
|
||||
delete[] * m_pData;
|
||||
*m_pData = NULL;
|
||||
}
|
||||
|
||||
|
||||
// delete m_pData;
|
||||
m_pData = NULL;
|
||||
}
|
||||
m_nWidth = 0;
|
||||
m_nHeight = 0;
|
||||
}
|
||||
int** m_pData;
|
||||
int m_nWidth;
|
||||
int m_nHeight;
|
||||
}ImageFormat, *PImageFormat;
|
||||
|
||||
|
||||
|
||||
typedef struct _SDCM_GROUP_ELEMENT
|
||||
{
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
WORD m_wGroup;
|
||||
WORD m_wElement;
|
||||
|
||||
_SDCM_GROUP_ELEMENT()
|
||||
{
|
||||
m_wGroup = 0;
|
||||
m_wElement = 0;
|
||||
}
|
||||
_SDCM_GROUP_ELEMENT(WORD wGroup, WORD wElement)
|
||||
{
|
||||
m_wGroup = wGroup;
|
||||
m_wElement = wElement;
|
||||
}
|
||||
|
||||
BOOL operator==(const _SDCM_GROUP_ELEMENT& rhs)
|
||||
{
|
||||
BOOL bSame = FALSE;
|
||||
if(m_wGroup==rhs.m_wGroup && m_wElement==rhs.m_wElement)
|
||||
{
|
||||
bSame = TRUE;
|
||||
}
|
||||
return bSame;
|
||||
}
|
||||
#pragma pack(pop)
|
||||
}SDCM_GROUP_ELEMENT, *PSDCM_GROUP_ELEMENT;
|
||||
|
||||
|
||||
#endif
|
||||
657
SDCMCommonStructure.h.old
Normal file
657
SDCMCommonStructure.h.old
Normal file
@ -0,0 +1,657 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef SDCM_COMMON_STRUCTURE_H
|
||||
#define SDCM_COMMON_STRUCTURE_H
|
||||
|
||||
#include "dcmtk/ofstd/ofstring.h"
|
||||
#include "dcmtk/dcmdata/dcdeftag.h"
|
||||
#include "dcmtk/dcmdata/dctag.h"
|
||||
|
||||
#include "csdcm.h"
|
||||
#include "common.h"
|
||||
|
||||
typedef enum _SDCM_SCU_STATE
|
||||
{
|
||||
NONE = 0,
|
||||
INITIALIZE_NETWORK,
|
||||
CREATE_ASSOCIATION_PARAMETERS,
|
||||
SET_AP_TITLES,
|
||||
SET_TRANSPORT_LAYER_TYPE,
|
||||
SET_PRESENTATION_ADDRESSES,
|
||||
REQUEST_ASSOCIATION,
|
||||
COUNT_ACCEPTED_PRESENTATION_CONTEXTS,
|
||||
CHECK_USER_IDENTITY_RESPONSE,
|
||||
RELEASE_ASSOCIATION,
|
||||
DESTROY_ASSOCIATION,
|
||||
DROP_NETWORK,
|
||||
COMPLETED,
|
||||
COMPLETE,
|
||||
ADD_PRESENTATION_CONTEXT,
|
||||
ABORT_ASSOCIATION,
|
||||
REJECTED_ASSOCIATION,
|
||||
UNKNOWN_ERROR_ASSOCIATION,
|
||||
PEER_REQUESTED_RELEASE,
|
||||
PEER_ABORTED_ASSOCIATION,
|
||||
CONNECTION_ERROR,
|
||||
CREATE_ASSOCIATION,
|
||||
TRY_FINDSCU,
|
||||
SET_APTITLES,
|
||||
ADD_STORAGE_PRESENTATION_CONTEXTS,
|
||||
TRY_STORE_SCU,
|
||||
SDCM_ERROR=0x1000,
|
||||
}SDCM_SCU_STATE;
|
||||
|
||||
struct SDATA_SCHEDULED_DATA
|
||||
{
|
||||
public:
|
||||
OFString strScheduledStationAETitle;
|
||||
OFString strScheduledProcedureStepStartDate;
|
||||
OFString strScheduledProcedureStepStartTime;
|
||||
OFString strScheduledPerformingPhysicianName;
|
||||
OFString strScheduledStepDescription;
|
||||
OFString strScheduledCodeValue;
|
||||
|
||||
SDATA_SCHEDULED_DATA()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strScheduledStationAETitle = "";
|
||||
strScheduledProcedureStepStartDate = "";
|
||||
strScheduledProcedureStepStartTime = "";
|
||||
strScheduledPerformingPhysicianName = "";
|
||||
strScheduledStepDescription = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_ScheduledProcedureStepDescription)
|
||||
{
|
||||
SetData(strScheduledStepDescription, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledStationAETitle)
|
||||
{
|
||||
SetData(strScheduledStationAETitle, strData);
|
||||
}
|
||||
else if (tag == DCM_PerformedProcedureStepStartDate)// || tag==DCM_ScheduledProcedureStepStartDate)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartDate, strData);
|
||||
}
|
||||
else if (tag == DCM_PerformedProcedureStepStartTime)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartTime, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledPerformingPhysicianName)
|
||||
{
|
||||
SetData(strScheduledPerformingPhysicianName, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepStartDate)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartDate, strData);
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepStartTime)
|
||||
{
|
||||
SetData(strScheduledProcedureStepStartTime, strData);
|
||||
}
|
||||
else if (tag == DCM_CodeValue)
|
||||
{
|
||||
SetData(strScheduledCodeValue, strData);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(OFString& strTagData, OFString strData)
|
||||
{
|
||||
if(strData.size()>0)
|
||||
{
|
||||
strTagData = strData;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct SDATA_PATIENT
|
||||
{
|
||||
public:
|
||||
OFString strPatientID;
|
||||
OFString strPatientName;
|
||||
OFString strPatientSex;
|
||||
OFString strPatientAge;
|
||||
|
||||
//Database New
|
||||
OFString strPatientBirthDate;
|
||||
OFString strPatientBirthTime;
|
||||
OFString strPatientWeight;
|
||||
OFString strPatientComments;
|
||||
OFString strPatientLocation; //외래, 입원 구분
|
||||
|
||||
QString m_strTestString;
|
||||
|
||||
SDATA_PATIENT()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strPatientID = "";
|
||||
strPatientName = "";
|
||||
strPatientSex = "";
|
||||
strPatientBirthDate = "";
|
||||
strPatientBirthTime = "";
|
||||
strPatientWeight = "";
|
||||
strPatientComments = "";
|
||||
strPatientAge = "";
|
||||
strPatientLocation = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_PatientID)
|
||||
{
|
||||
strPatientID = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientName)
|
||||
{
|
||||
strPatientName = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientAge)
|
||||
{
|
||||
strPatientAge = strData;
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepLocation)
|
||||
{
|
||||
strPatientLocation = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientSex)
|
||||
{
|
||||
OFString strTmp;
|
||||
strTmp = strData.c_str();
|
||||
|
||||
if(strTmp.size()>0)
|
||||
{
|
||||
if (strTmp.at(0) == 'M')
|
||||
{
|
||||
strPatientSex = "M";
|
||||
}
|
||||
else if (strTmp.at(0) == 'F')
|
||||
{
|
||||
strPatientSex = "F";
|
||||
}
|
||||
else if (strTmp.at(0) == 'O')
|
||||
{
|
||||
strPatientSex = "O";
|
||||
}
|
||||
else
|
||||
{
|
||||
strPatientSex = strData;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (tag == DCM_PatientBirthDate)
|
||||
{
|
||||
strPatientBirthDate = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientBirthTime)
|
||||
{
|
||||
strPatientBirthTime = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientWeight)
|
||||
{
|
||||
strPatientWeight = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientComments)
|
||||
{
|
||||
strPatientComments = strData;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct SDATA_STUDY
|
||||
{
|
||||
public:
|
||||
int nPatientIndex;
|
||||
OFString strStudyInstanceUID;
|
||||
OFString strStudyDate;
|
||||
OFString strStudyTime;
|
||||
|
||||
//Database New
|
||||
OFString strAccessionNumber;
|
||||
OFString strStudyDescription;
|
||||
OFString strReferringPhysiciansName;
|
||||
|
||||
SDATA_STUDY()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
strAccessionNumber = "";
|
||||
strStudyInstanceUID = "";
|
||||
strStudyDate = "";
|
||||
strStudyTime = "";
|
||||
strStudyDescription = "";
|
||||
strReferringPhysiciansName = "";
|
||||
nPatientIndex = 0;
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_AccessionNumber)
|
||||
{
|
||||
strAccessionNumber = strData;
|
||||
}
|
||||
else if (tag == DCM_StudyInstanceUID)
|
||||
{
|
||||
strStudyInstanceUID = strData;
|
||||
}
|
||||
else if (tag == DCM_ScheduledProcedureStepDescription)
|
||||
{
|
||||
strStudyDescription = strData;
|
||||
}
|
||||
else if (tag == DCM_StudyDate)
|
||||
{
|
||||
strStudyDate = strData;
|
||||
}
|
||||
else if (tag == DCM_StudyTime)
|
||||
{
|
||||
strStudyTime = strData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct SDATA_SERIES
|
||||
{
|
||||
public:
|
||||
int nStudyIndex;
|
||||
int nSeriesNumber;
|
||||
OFString strSeriesInstanceUID;
|
||||
OFString strModality;
|
||||
OFString strLaterality;
|
||||
OFString strSeriesDate;
|
||||
OFString strSeriesTime;
|
||||
|
||||
//Database New
|
||||
OFString strBodyPartExamined;
|
||||
OFString strSeriesDescription;
|
||||
OFString strOperatorsName;
|
||||
|
||||
SDATA_SERIES()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
nStudyIndex = 0;
|
||||
nSeriesNumber = 0;
|
||||
strBodyPartExamined = "";
|
||||
strSeriesInstanceUID = "";
|
||||
strSeriesDescription = "";
|
||||
strModality = "";
|
||||
strOperatorsName = "";
|
||||
strLaterality = "";
|
||||
strSeriesDate = "";
|
||||
strSeriesTime = "";
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_RequestedProcedureDescription)
|
||||
{
|
||||
strSeriesDescription = strData;
|
||||
}
|
||||
else if (tag == DCM_BodyPartExamined)
|
||||
{
|
||||
strBodyPartExamined = strData;
|
||||
}
|
||||
else if (tag == DCM_Modality)
|
||||
{
|
||||
strModality = strData;
|
||||
}
|
||||
else if (tag == DCM_OperatorsName)
|
||||
{
|
||||
strOperatorsName = strData;
|
||||
}
|
||||
else if (tag == DCM_Laterality)
|
||||
{
|
||||
strLaterality = strData;
|
||||
}
|
||||
else if(tag == DCM_SeriesDate)
|
||||
{
|
||||
strSeriesDate = strData;
|
||||
}
|
||||
else if(tag == DCM_SeriesTime)
|
||||
{
|
||||
strSeriesTime = strData;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct SDATA_IMAGE
|
||||
{
|
||||
public:
|
||||
int nSeriesIndex;
|
||||
int nImageIndex;
|
||||
int nImageNumber;
|
||||
int bDelete;
|
||||
int nFileType;
|
||||
OFString strFileLocation;
|
||||
OFString strInstanceUID;
|
||||
|
||||
//Database New
|
||||
OFString strImageType;
|
||||
OFString strAcquisitionDate;
|
||||
OFString strAcquisitionTime;
|
||||
OFString strContentDate; // Pixel Creation Date
|
||||
OFString strContentTime; // Pixel Creation Time
|
||||
int nAcquisitionNumber;
|
||||
int nInstanceNumber;
|
||||
OFString strPatientOrientation;
|
||||
OFString strImageLaterality;
|
||||
OFString strImageComments; // Option
|
||||
//(0088, 0200) Icon Image Sequence : usage or not
|
||||
//Burned In Annotation
|
||||
|
||||
SDATA_IMAGE()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
nImageIndex = 0;
|
||||
nSeriesIndex = 0;
|
||||
nImageNumber = 0;
|
||||
bDelete = 0;
|
||||
nFileType = 0;
|
||||
strFileLocation = "";
|
||||
strInstanceUID = "";
|
||||
{
|
||||
strImageType = "DERIVED";
|
||||
strImageType += char(0x5c);
|
||||
strImageType += "PRIMARY";
|
||||
}
|
||||
|
||||
strAcquisitionDate = "";
|
||||
strAcquisitionTime = "";
|
||||
strContentDate = ""; // Pixel Creation Date
|
||||
strContentTime = ""; // Pixel Creation Time
|
||||
nAcquisitionNumber = 0;
|
||||
nInstanceNumber = 0;
|
||||
strPatientOrientation = "";
|
||||
strImageLaterality = "";
|
||||
strImageComments = ""; // Option
|
||||
//(0088, 0200) Icon Image Sequence : usage or not
|
||||
//Burned In Annotation
|
||||
}
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
if (tag == DCM_ImageLaterality)
|
||||
{
|
||||
strImageLaterality = strData;
|
||||
}
|
||||
else if (tag == DCM_ImageType)
|
||||
{
|
||||
strImageType = strData;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class WorklistResponseData
|
||||
{
|
||||
public:
|
||||
WorklistResponseData()
|
||||
{
|
||||
strRequestedProcedureID = "";
|
||||
strReferringPhysicianName = "";
|
||||
strRequestingPhysician = "";
|
||||
strRequestedProcedureDescription = "";
|
||||
strAdmissionID = "";
|
||||
strEnc = "";
|
||||
|
||||
m_Study.Init();
|
||||
m_Series.Init();
|
||||
m_Image.Init();
|
||||
m_Patient.Init();
|
||||
m_ScheduledData.Init();
|
||||
|
||||
strPatientOrientation = "";
|
||||
}
|
||||
|
||||
|
||||
void InsertData(DcmTag tag, OFString strData)
|
||||
{
|
||||
//Uint16 nGroup = tag.getGroup();
|
||||
//Uint16 nElement = tag.getElement();
|
||||
|
||||
m_Study.InsertData(tag, strData);
|
||||
m_Series.InsertData(tag, strData);
|
||||
m_Image.InsertData(tag, strData);
|
||||
m_Patient.InsertData(tag, strData);
|
||||
m_ScheduledData.InsertData(tag, strData);
|
||||
|
||||
if(tag==DCM_RequestedProcedureID)
|
||||
{
|
||||
|
||||
}
|
||||
if (tag.getEVR() == EVR_DA)
|
||||
{
|
||||
OFString strTmp;
|
||||
strTmp = strData.c_str();
|
||||
|
||||
/*
|
||||
int nFind = strTmp.Find("-");
|
||||
if (nFind > 0)
|
||||
{
|
||||
strTmp = strTmp.Left(nFind);
|
||||
}
|
||||
*/
|
||||
strData = strTmp;
|
||||
}
|
||||
|
||||
else if (tag == DCM_SpecificCharacterSet)
|
||||
{
|
||||
strEnc = strData;
|
||||
}
|
||||
else if (tag == DCM_RequestedProcedureDescription)
|
||||
{
|
||||
strRequestedProcedureDescription = strData;
|
||||
}
|
||||
else if (tag == DCM_RequestingPhysician)
|
||||
{
|
||||
strRequestingPhysician = strData;
|
||||
}
|
||||
|
||||
else if (tag == DCM_RequestedProcedureID)
|
||||
{
|
||||
strRequestedProcedureID = strData;
|
||||
}
|
||||
else if (tag == DCM_ReferringPhysicianName)
|
||||
{
|
||||
strReferringPhysicianName = strData;
|
||||
}
|
||||
else if (tag == DCM_AdmissionID)
|
||||
{
|
||||
strAdmissionID = strData;
|
||||
}
|
||||
else if (tag == DCM_PatientOrientation)
|
||||
{
|
||||
strPatientOrientation = strData;
|
||||
}
|
||||
}
|
||||
|
||||
OFString strPatientOrientation;
|
||||
OFString strRequestingPhysician;
|
||||
OFString strRequestedProcedureID;
|
||||
OFString strRequestedProcedureDescription;
|
||||
OFString strReferringPhysicianName;
|
||||
OFString strAdmissionID;
|
||||
OFString strEnc;
|
||||
|
||||
SDATA_PATIENT m_Patient;
|
||||
SDATA_STUDY m_Study;
|
||||
SDATA_SERIES m_Series;
|
||||
SDATA_IMAGE m_Image;
|
||||
SDATA_SCHEDULED_DATA m_ScheduledData;
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct MPPSRequestData
|
||||
{
|
||||
MPPSRequestData()
|
||||
{
|
||||
m_strPatientID.clear();
|
||||
m_strPatientName.clear();
|
||||
m_strPatientBirthDate.clear();
|
||||
m_strPatientSex.clear();
|
||||
m_strAccessionNumber.clear();
|
||||
m_strReferencedSOPClassUID.clear();
|
||||
m_strReferencedSOPInstanceUID.clear();
|
||||
}
|
||||
|
||||
MPPSRequestData(const WorklistResponseData& wr, OFString strReferencedSOPClassUID="")
|
||||
{
|
||||
m_strPatientID = wr.m_Patient.strPatientID;
|
||||
m_strPatientName = wr.m_Patient.strPatientName;
|
||||
m_strPatientBirthDate = wr.m_Patient.strPatientBirthDate;
|
||||
m_strPatientSex = wr.m_Patient.strPatientSex;
|
||||
m_strAccessionNumber = wr.m_Study.strAccessionNumber;
|
||||
m_strReferencedSOPClassUID = strReferencedSOPClassUID;
|
||||
m_strReferencedSOPInstanceUID = wr.m_Study.strStudyInstanceUID;
|
||||
}
|
||||
|
||||
OFString m_strPatientID;
|
||||
OFString m_strPatientName;
|
||||
OFString m_strPatientBirthDate;
|
||||
OFString m_strPatientSex;
|
||||
OFString m_strAccessionNumber;
|
||||
OFString m_strReferencedSOPClassUID;
|
||||
OFString m_strReferencedSOPInstanceUID;
|
||||
};
|
||||
|
||||
typedef enum _STRENC_TYPE
|
||||
{
|
||||
STRENC_ANSI = 0,
|
||||
STRENC_KOR,
|
||||
STRENC_UTF8
|
||||
}STRENC_TYPE;
|
||||
|
||||
typedef struct _SDCM_AGE
|
||||
{
|
||||
_SDCM_AGE()
|
||||
{
|
||||
m_nYears = -1;
|
||||
m_nMonths = -1;
|
||||
m_nDays = -1;
|
||||
}
|
||||
int m_nYears;
|
||||
int m_nMonths;
|
||||
int m_nDays;
|
||||
}SDCM_AGE;
|
||||
|
||||
typedef struct _SDCM_SERVER_INFO
|
||||
{
|
||||
QString m_strServer_IP;
|
||||
int m_nServer_Port;
|
||||
QString m_strServer_AETitle;
|
||||
QString m_strClient_AETitle;
|
||||
}SDCM_SERVER_INFO;
|
||||
|
||||
typedef struct _ImageFormat
|
||||
{
|
||||
_ImageFormat()
|
||||
{
|
||||
m_pData = NULL;
|
||||
m_nWidth = -1;
|
||||
m_nHeight = -1;
|
||||
}
|
||||
|
||||
_ImageFormat(int** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_pData = pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
_ImageFormat(unsigned char** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
_ImageFormat(void** pData, int nWidth, int nHeight)
|
||||
{
|
||||
m_pData = new int*;
|
||||
*m_pData = (int*)*pData;
|
||||
m_nWidth = nWidth;
|
||||
m_nHeight = nHeight;
|
||||
}
|
||||
|
||||
~_ImageFormat()
|
||||
{
|
||||
if (m_pData != NULL)
|
||||
{
|
||||
if (*m_pData != NULL)
|
||||
{
|
||||
delete[] * m_pData;
|
||||
*m_pData = NULL;
|
||||
}
|
||||
|
||||
|
||||
// delete m_pData;
|
||||
m_pData = NULL;
|
||||
}
|
||||
m_nWidth = 0;
|
||||
m_nHeight = 0;
|
||||
}
|
||||
int** m_pData;
|
||||
int m_nWidth;
|
||||
int m_nHeight;
|
||||
}ImageFormat, *PImageFormat;
|
||||
|
||||
|
||||
|
||||
typedef struct _SDCM_GROUP_ELEMENT
|
||||
{
|
||||
#pragma pack(push)
|
||||
#pragma pack(2)
|
||||
WORD m_wGroup;
|
||||
WORD m_wElement;
|
||||
|
||||
_SDCM_GROUP_ELEMENT()
|
||||
{
|
||||
m_wGroup = 0;
|
||||
m_wElement = 0;
|
||||
}
|
||||
_SDCM_GROUP_ELEMENT(WORD wGroup, WORD wElement)
|
||||
{
|
||||
m_wGroup = wGroup;
|
||||
m_wElement = wElement;
|
||||
}
|
||||
|
||||
BOOL operator==(const _SDCM_GROUP_ELEMENT& rhs)
|
||||
{
|
||||
BOOL bSame = FALSE;
|
||||
if(m_wGroup==rhs.m_wGroup && m_wElement==rhs.m_wElement)
|
||||
{
|
||||
bSame = TRUE;
|
||||
}
|
||||
return bSame;
|
||||
}
|
||||
#pragma pack(pop)
|
||||
}SDCM_GROUP_ELEMENT, *PSDCM_GROUP_ELEMENT;
|
||||
|
||||
|
||||
#endif
|
||||
1954
SDCMImage.cpp
Normal file
1954
SDCMImage.cpp
Normal file
File diff suppressed because it is too large
Load Diff
111
SDCMImage.h
Normal file
111
SDCMImage.h
Normal file
@ -0,0 +1,111 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
#include "common.h"
|
||||
#include "SDCMCommonStructure.h"
|
||||
|
||||
#include "dcmtk/dcmdata/dcdatset.h"
|
||||
|
||||
|
||||
class CSDCMImage
|
||||
{
|
||||
public:
|
||||
CSDCMImage(void);
|
||||
virtual ~CSDCMImage(void);
|
||||
|
||||
virtual int WriteDCM(OFString strInputImageFile, OFString strDcmFilename, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID, OFString strNewStudyInstanceUID);
|
||||
virtual int WriteDCM(QString strInputImageFile, QString strDcmFilename, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID, QString strNewStudyInstanceUID);
|
||||
|
||||
virtual int WriteDCM(OFString strInputImageFile, OFString strDcmFilename, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID, OFString strNewStudyInstanceUID, BOOL bUsePDFCompress);
|
||||
|
||||
|
||||
virtual int WriteDCM(OFString strInputImageFile, OFString strDcmFilename, OFString strContentDate, OFString strContentTime, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID, OFString strNewStudyInstanceUID);
|
||||
|
||||
virtual int WriteDCM(QString strInputImageFile, QString strDcmFilename, QString strContentDate, QString strContentTime, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID, QString strNewStudyInstanceUID);
|
||||
|
||||
void SetTransferSyntax(E_TransferSyntax nTransferSyntax);
|
||||
|
||||
static SDCM_AGE ComputeAge(QString strBirthdate);
|
||||
|
||||
void LoadImage(OFString strFilename, BOOL bGray);
|
||||
void LoadImage(QString strFilename, BOOL bGray);
|
||||
|
||||
int LoadDCMFile(OFString strFilename);
|
||||
|
||||
void RegisterPrivateTags();
|
||||
void AddPrivateElements(DcmItem &item, OFString strFileLocation);
|
||||
|
||||
OFCondition PutAndInsertString(DcmDataset* pDcmDataset, const DcmTag &tag, QString strValue);
|
||||
OFCondition PutAndInsertString(DcmDataset* pDcmDataset, const DcmTag &tag, const char *value);
|
||||
OFCondition PutAndInsertString(DcmDataset* pDcmDataset, const DcmTag &tag, OFString strValue);
|
||||
|
||||
|
||||
|
||||
void InsertCreationDate(DcmDataset* pDcmDataset);
|
||||
void InsertCreationTime(DcmDataset* pDcmDataset);
|
||||
|
||||
QString GetCurrentDate();
|
||||
QString GetCurrentTime();
|
||||
|
||||
virtual void WritePatientInfo(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData);
|
||||
virtual void WriteStudyInfo(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID=FALSE, OFString strNewStudyInstanceUID="");
|
||||
virtual void WriteStudyInfo(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData, int nSeriesNumber, int nImageNumber, BOOL bChangeUID=FALSE, QString strNewStudyInstanceUID="");
|
||||
virtual void WriteLaterality(DcmDataset* pDcmDataset, OFString strLaterality, OFString strImageLaterality);
|
||||
virtual void WriteLaterality(DcmDataset* pDcmDataset, QString strLaterality, QString strImageLaterality);
|
||||
virtual void WriteImageType(DcmDataset* pDcmDataset, OFString strImageType="");
|
||||
virtual void WriteImageType(DcmDataset* pDcmDataset, QString strImageType="");
|
||||
virtual void WriteImageInfo(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData, int nImageNumber);
|
||||
virtual void WriteImageInfo(DcmDataset* pDcmDataset, OFString strContentDate, OFString strContentTime, WorklistResponseData* pWorklistData, int nImageNumber);
|
||||
virtual void WriteImageInfo(DcmDataset* pDcmDataset, QString strContentDate, QString strContentTime, WorklistResponseData* pWorklistData, int nImageNumber);
|
||||
virtual void WriteScheduledProcedureStep(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData);
|
||||
|
||||
virtual void WriteDeviceInfo(DcmDataset* pDcmDataset);
|
||||
|
||||
virtual void WriteDateTime(DcmDataset* pDcmDataset, WorklistResponseData* pWorklistData);
|
||||
|
||||
OFString CreateStudyInstanceUID();
|
||||
|
||||
//void SetStrEncType(STRENC_TYPE strEnc);
|
||||
|
||||
void CharacterSetConversion(DcmDataset* pDcmDataset);
|
||||
|
||||
list<OFString>* GetListInputFile();
|
||||
|
||||
public:
|
||||
list<OFString>* m_pListInputFile;
|
||||
OFString m_strDcmOutputFilename;
|
||||
WorklistResponseData* m_pWorklistData;
|
||||
int m_nSeriesNumber;
|
||||
int m_nImageNumber;
|
||||
BOOL m_bChangeUID;
|
||||
OFString m_strNewStudyInstanceUID;
|
||||
BOOL m_bUsePDFCompress;
|
||||
|
||||
OFString m_strImplementationClassUID;
|
||||
OFString m_strImplementationVersionName;
|
||||
|
||||
//STRENC_TYPE m_StrEncType;
|
||||
|
||||
protected:
|
||||
int m_nWidth;
|
||||
int m_nHeight;
|
||||
uint8_t* m_pData;
|
||||
|
||||
int m_nWindowWidth;
|
||||
int m_nWindowLevel;
|
||||
OFString m_strFilename;
|
||||
|
||||
int m_nInputFileFormat;
|
||||
int m_nOutputFileFormat;
|
||||
|
||||
OFString m_strLoadFilename;
|
||||
|
||||
E_TransferSyntax m_TransferSyntaxOutput;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
1874
SDCMSendImpl.cpp
Normal file
1874
SDCMSendImpl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
171
SDCMSendImpl.h
Normal file
171
SDCMSendImpl.h
Normal file
@ -0,0 +1,171 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef UNICODE
|
||||
#undef UNICODE
|
||||
#undef _UNICODE
|
||||
#define UNICODE_DEFINED
|
||||
#endif
|
||||
|
||||
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
|
||||
#include "dcmtk/ofstd/ofcond.h" /* for class OFCondition */
|
||||
#include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */
|
||||
#include "dcmtk/dcmnet/dimse.h" /* for T_DIMSE_BlockingMode */
|
||||
#include "dcmtk/dcmnet/dcasccfg.h"
|
||||
#include "dcmtk/ofstd/ofcmdln.h"
|
||||
|
||||
#include "csdcm.h"
|
||||
|
||||
//#include "SDCMNetBase.h"
|
||||
|
||||
#include "SCallback.h"
|
||||
|
||||
#ifdef UNICODE_DEFINED
|
||||
#define UNICODE
|
||||
#define _UNICODE
|
||||
#undef UNICODE_DEFINED
|
||||
#endif
|
||||
|
||||
typedef enum _SNETWORK_CONNECTION
|
||||
{
|
||||
SCONNECT_NORMAL = 0,
|
||||
SCONNECT_TLS
|
||||
}SNETWORK_CONNECTION, *PSNETWORK_CONNECTION;
|
||||
|
||||
typedef enum _SNETWORK_BLOCK_MODE
|
||||
{
|
||||
SNETWORK_BLOCKING = 0,
|
||||
SNETWORK_NONBLOCKING
|
||||
}SNETWORK_BLOCK_MODE, *PSNETWORK_BLOCK_MODE;
|
||||
|
||||
class CSDCMSendImpl
|
||||
{
|
||||
public:
|
||||
CSDCMSendImpl();
|
||||
virtual ~CSDCMSendImpl();
|
||||
|
||||
virtual void Stop();
|
||||
|
||||
OFCondition DIMSE_storeUser(
|
||||
T_ASC_Association *assoc, T_ASC_PresentationContextID presId,
|
||||
T_DIMSE_C_StoreRQ *request,
|
||||
const char *imageFileName, DcmDataset *imageDataSet,
|
||||
DIMSE_StoreUserCallback callback, void *callbackData,
|
||||
T_DIMSE_BlockingMode blockMode, int timeout,
|
||||
T_DIMSE_C_StoreRSP *response,
|
||||
DcmDataset **statusDetail,
|
||||
T_DIMSE_DetectedCancelParameters *checkForCancelParams,
|
||||
long imageFileTotalBytes);
|
||||
|
||||
OFCondition
|
||||
DIMSE_sendMessage(
|
||||
T_ASC_Association *assoc,
|
||||
T_ASC_PresentationContextID presID,
|
||||
T_DIMSE_Message *msg,
|
||||
DcmDataset *statusDetail,
|
||||
DcmDataset *dataObject,
|
||||
const char *dataFileName,
|
||||
DIMSE_ProgressCallback callback,
|
||||
void *callbackContext,
|
||||
DcmDataset **commandSet);
|
||||
|
||||
void SetAETitle(OFString strAETitle);
|
||||
void SetServerInfo(OFString strServerAETitle, OFString strClientAETitle, OFString strIP, int nPort, int nConnectionType=SCONNECT_NORMAL, int nBlockingMethod=SNETWORK_BLOCKING);
|
||||
void SetServerInfo(QString strServerAETitle, QString strClientAETitle, QString strIP, int nPort, int nConnectionType=SCONNECT_NORMAL, int nBlockingMethod=SNETWORK_BLOCKING);
|
||||
|
||||
int InitNetwork(OFString strServerAETitle, OFString strClientAETitle, OFString strHostIP, int nPort, int nConnectType=SCONNECT_NORMAL, int nBlock=SNETWORK_BLOCKING, int nTimeoutDIMSE=0, int nTimeoutACSE=0, E_TransferSyntax networkTransferSyntax = EXS_Unknown);
|
||||
|
||||
//int Send(CSThread* pCallbackThread, int nTimeoutDIMSE=0, int nTimeoutACSE=0, E_TransferSyntax networkTransferSyntax = EXS_Unknown);
|
||||
vector<QString> Send(CSCallback* pCallback, int nTimeoutDIMSE = -1, int nTimeoutACSE = -1, E_TransferSyntax networkTransferSyntax = EXS_Unknown);
|
||||
|
||||
void AddImageFilename(OFString strFilename);
|
||||
void AddMpegFilename(OFString strFilename);
|
||||
|
||||
void ClearFileList();
|
||||
void ClearImageFileList();
|
||||
void ClearMpegFileList();
|
||||
|
||||
OFBool IsaListMember(OFList<OFString> &lst, OFString &s);
|
||||
OFCondition AddStoragePresentationContexts(T_ASC_Parameters *params, OFList<OFString> &sopClasses);
|
||||
|
||||
OFCondition AddPresentationContext(T_ASC_Parameters *params, int presentationContextId, const OFString &abstractSyntax, const OFString &transferSyntax, T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT);
|
||||
OFCondition AddPresentationContext(T_ASC_Parameters *params, int presentationContextId, const OFString &abstractSyntax, const OFList<OFString> &transferSyntaxList, T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT);
|
||||
|
||||
OFCondition CheckUserIdentityResponse(T_ASC_Parameters *params);
|
||||
|
||||
OFCondition cstore(T_ASC_Association *assoc, const OFString &fname);
|
||||
OFCondition storeSCU(T_ASC_Association *assoc, const char *fname);
|
||||
|
||||
void ReplaceSOPInstanceInformation(DcmDataset *dataset);
|
||||
|
||||
OFBool FindSOPClassAndInstanceInFile(const char *fname, char *sopClass, char *sopInstance);
|
||||
|
||||
static void ProgressCallback(void * callbackData, T_DIMSE_StoreProgress *progress, T_DIMSE_C_StoreRQ * req);
|
||||
|
||||
|
||||
void SetCurrentFilenameList(int nCurrent=0); // 0:NULL, 1:Image, 2:Mpeg
|
||||
|
||||
int GetImageFileCount();
|
||||
int GetMpegFileCount();
|
||||
|
||||
void SetLogLevel(int nLevel);
|
||||
|
||||
OFLogger* GetLogger();
|
||||
protected:
|
||||
OFLogger* m_pLoggerStoreSCU;
|
||||
CSCallback* m_pCallback;
|
||||
//CSDCMNetBase* m_pNetClass;
|
||||
//CSThread* m_pCallbackThread;
|
||||
OFString m_strHostIP;
|
||||
OFString m_strAETitle;
|
||||
OFString m_strServerAETitle;
|
||||
int m_nPort;
|
||||
SNETWORK_CONNECTION m_ConnectType;
|
||||
SNETWORK_BLOCK_MODE m_BlockMode;
|
||||
E_TransferSyntax m_NetworkTransferSyntax;
|
||||
|
||||
OFList<OFString> m_ImageFileNameList;
|
||||
OFList<OFString> m_MpegFileNameList;
|
||||
|
||||
OFList<OFString>* m_pCurrentFileNameList;
|
||||
|
||||
T_ASC_UserIdentityNegotiationMode m_IdentMode;
|
||||
|
||||
OFBool m_bIdentResponse;
|
||||
|
||||
|
||||
OFBool m_bProposeOnlyRequiredPresentationContexts;
|
||||
OFBool m_bCombineProposedTransferSyntaxes;
|
||||
|
||||
int m_nTimeoutACSE;
|
||||
int m_nTimeoutDIMSE;
|
||||
|
||||
OFCmdUnsignedInt m_nMaxReceivePDULength;
|
||||
|
||||
T_ASC_Network* m_pNetwork;
|
||||
T_ASC_Parameters* m_pNetworkParams;
|
||||
DIC_NODENAME m_LocalHost;
|
||||
DIC_NODENAME m_PeerHost;
|
||||
T_ASC_Association* m_pAssoc;
|
||||
DcmAssociationConfiguration m_pAssocConfig; // handler for association configuration profiles
|
||||
|
||||
int m_nRepeatCount;
|
||||
|
||||
OFBool m_bHaltOnUnsuccessfulStore;
|
||||
OFBool m_bUnsuccessfulStoreEncountered;
|
||||
|
||||
E_FileReadMode m_ReadMode;
|
||||
OFBool m_bInventSOPInstanceInformation;
|
||||
|
||||
OFBool m_bCorrectUIDPadding;
|
||||
|
||||
T_DIMSE_BlockingMode m_DIMSEBlockMode;
|
||||
|
||||
int m_nLastStatusCode;
|
||||
|
||||
bool m_bAbortAssociation;
|
||||
|
||||
|
||||
|
||||
vector<QString> OnDCMSend();
|
||||
};
|
||||
|
||||
306
SVG5.pro
Normal file
306
SVG5.pro
Normal file
@ -0,0 +1,306 @@
|
||||
QT += core gui sql
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets network
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
CONFIG += rtti
|
||||
CONFIG += exceptions
|
||||
|
||||
CONFIG += recheck
|
||||
|
||||
QMAKE_CXXFLAGS += -fPIC -fexceptions -frtti
|
||||
|
||||
#CONFIG -= app_bundle
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
# any Qt feature that has been marked deprecated (the exact warnings
|
||||
# depend on your compiler). Please consult the documentation of the
|
||||
# deprecated API in order to know how to port your code away from it.
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
|
||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
|
||||
|
||||
SOURCES += \
|
||||
SCallback.cpp \
|
||||
SDCMImage.cpp \
|
||||
SDCMSendImpl.cpp \
|
||||
acquisition_info.cpp \
|
||||
charconvert.cpp \
|
||||
commondata.cpp \
|
||||
cscallbacksendprogress.cpp \
|
||||
csdcm.cpp \
|
||||
dialogadvancedsetting.cpp \
|
||||
dialogcalendar.cpp \
|
||||
dialogprogress.cpp \
|
||||
dialogsettingtable.cpp \
|
||||
formcalendarview.cpp \
|
||||
formcapture.cpp \
|
||||
formcaptureimageselect.cpp \
|
||||
formcheckcaptureselect.cpp \
|
||||
formheadertype1.cpp \
|
||||
formhistory.cpp \
|
||||
formimageselect.cpp \
|
||||
formitemselection.cpp \
|
||||
formlistwidget.cpp \
|
||||
formlistwidgethistory.cpp \
|
||||
formlistwidgetworklist.cpp \
|
||||
formmainmenu.cpp \
|
||||
formsetting.cpp \
|
||||
formviewer.cpp \
|
||||
formworklist.cpp \
|
||||
headertype1.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
qglslshader.cpp \
|
||||
qgstreamerplayer.cpp \
|
||||
qgstreamerplayer2.cpp \
|
||||
qopenglbufferbase.cpp \
|
||||
qopenglbuffermenu.cpp \
|
||||
qopenglbufferthumbnail.cpp \
|
||||
qopengltexturebutton.cpp \
|
||||
qrtspthread.cpp \
|
||||
qsthread.cpp \
|
||||
qvideoshader.cpp \
|
||||
qvideowidget.cpp \
|
||||
qvideowidget_720_yuy2.cpp \
|
||||
qvideowidget_rgb.cpp \
|
||||
qvideowidget_uyvy.cpp \
|
||||
qvideowidget_yuy2.cpp \
|
||||
scalendarmenuview.cpp \
|
||||
sdatabase.cpp \
|
||||
sdayview.cpp \
|
||||
sdcmfindscu.cpp \
|
||||
sdcmfindscudatacallback.cpp \
|
||||
sdcmworklist.cpp \
|
||||
slistwidget.cpp \
|
||||
slistwidgetsetting.cpp \
|
||||
sslidebar.cpp \
|
||||
sslidebarhorizontal.cpp \
|
||||
stableheader.cpp \
|
||||
stextedit.cpp \
|
||||
sthreadimagesave.cpp \
|
||||
sthreadwatchvideolink.cpp \
|
||||
sthreadworklistsearch.cpp \
|
||||
sv4l2device.cpp \
|
||||
dialogemergengy.cpp \
|
||||
dialogexportusb.cpp \
|
||||
dialogpowerbutton.cpp \
|
||||
sthreadwatchport.cpp \
|
||||
dialogmisscapture.cpp \
|
||||
dialoglogin.cpp \
|
||||
dialogchecksumerror.cpp \
|
||||
dialogsettingnetworkshare.cpp \
|
||||
dialogexportsamba.cpp \
|
||||
singlebutton.cpp \
|
||||
sambaclient.cpp \
|
||||
dialogloginuseradd.cpp \
|
||||
sthreadsenddicom.cpp \
|
||||
formscreensaver.cpp \
|
||||
seventfilter.cpp \
|
||||
sexception.cpp \
|
||||
sapplication.cpp \
|
||||
scurl.cpp
|
||||
|
||||
HEADERS += \
|
||||
SCallback.h \
|
||||
SDCMCommonStructure.h \
|
||||
SDCMImage.h \
|
||||
SDCMSendImpl.h \
|
||||
acquisition_info.h \
|
||||
charconvert.h \
|
||||
common.h \
|
||||
common.hpp \
|
||||
commondata.h \
|
||||
cscallbacksendprogress.h \
|
||||
csdcm.h \
|
||||
cuda_utils.h \
|
||||
dialogadvancedsetting.h \
|
||||
dialogcalendar.h \
|
||||
dialogprogress.h \
|
||||
dialogsettingtable.h \
|
||||
formcalendarview.h \
|
||||
formcapture.h \
|
||||
formcaptureimageselect.h \
|
||||
formcheckcaptureselect.h \
|
||||
formheadertype1.h \
|
||||
formhistory.h \
|
||||
formimageselect.h \
|
||||
formitemselection.h \
|
||||
formlistwidget.h \
|
||||
formlistwidgethistory.h \
|
||||
formlistwidgetworklist.h \
|
||||
formmainmenu.h \
|
||||
formsetting.h \
|
||||
formviewer.h \
|
||||
formworklist.h \
|
||||
headertype1.h \
|
||||
logging.h \
|
||||
macros.h \
|
||||
mainwindow.h \
|
||||
preprocess.h \
|
||||
qglslshader.h \
|
||||
qgstreamerplayer.h \
|
||||
qgstreamerplayer2.h \
|
||||
qopenglbufferbase.h \
|
||||
qopenglbuffermenu.h \
|
||||
qopenglbufferthumbnail.h \
|
||||
qopengltexturebutton.h \
|
||||
qrtspthread.h \
|
||||
qsthread.h \
|
||||
qvideoshader.h \
|
||||
qvideowidget.h \
|
||||
qvideowidget_720_yuy2.h \
|
||||
qvideowidget_rgb.h \
|
||||
qvideowidget_uyvy.h \
|
||||
qvideowidget_yuy2.h \
|
||||
scalendarmenuview.h \
|
||||
sdatabase.h \
|
||||
sdayview.h \
|
||||
sdcmfindscu.h \
|
||||
sdcmfindscudatacallback.h \
|
||||
sdcmworklist.h \
|
||||
slistwidget.h \
|
||||
slistwidgetsetting.h \
|
||||
sslidebar.h \
|
||||
sslidebarhorizontal.h \
|
||||
stableheader.h \
|
||||
stextedit.h \
|
||||
sthreadimagesave.h \
|
||||
sthreadwatchvideolink.h \
|
||||
sthreadworklistsearch.h \
|
||||
sv4l2device.h \
|
||||
utils.h \
|
||||
dialogemergengy.h \
|
||||
dialogexportusb.h \
|
||||
dialogpowerbutton.h \
|
||||
sthreadwatchport.h \
|
||||
dialogmisscapture.h \
|
||||
dialoglogin.h \
|
||||
dialogchecksumerror.h \
|
||||
dialogexportsamba.h \
|
||||
dialogsettingnetworkshare.h \
|
||||
dialogexportsamba.h \
|
||||
singlebutton.h \
|
||||
sambaclient.h \
|
||||
dialogloginuseradd.h \
|
||||
sthreadsenddicom.h \
|
||||
common.h \
|
||||
formscreensaver.h \
|
||||
seventfilter.h \
|
||||
sexception.h \
|
||||
sapplication.h \
|
||||
scurl.h
|
||||
|
||||
|
||||
FORMS += \
|
||||
dialogadvancedsetting.ui \
|
||||
dialogcalendar.ui \
|
||||
dialogprogress.ui \
|
||||
dialogsettingtable.ui \
|
||||
formcalendarview.ui \
|
||||
formcapture.ui \
|
||||
formcaptureimageselect.ui \
|
||||
formcheckcaptureselect.ui \
|
||||
formheadertype1.ui \
|
||||
formhistory.ui \
|
||||
formimageselect.ui \
|
||||
formitemselection.ui \
|
||||
formlistwidget.ui \
|
||||
formmainmenu.ui \
|
||||
formsetting.ui \
|
||||
formviewer.ui \
|
||||
formworklist.ui \
|
||||
mainwindow.ui \
|
||||
dialogemergengy.ui \
|
||||
dialogexportusb.ui \
|
||||
dialogpowerbutton.ui \
|
||||
dialogmisscapture.ui \
|
||||
dialoglogin.ui \
|
||||
dialogchecksumerror.ui \
|
||||
dialogsettingnetworkshare.ui \
|
||||
dialogexportsamba.ui \
|
||||
dialogloginuseradd.ui \
|
||||
formscreensaver.ui
|
||||
|
||||
TRANSLATIONS += \
|
||||
SVG5_ko_KR.ts
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
|
||||
RESOURCES += \
|
||||
assets.qrc
|
||||
|
||||
|
||||
unix: CONFIG += link_pkgconfig
|
||||
unix: PKGCONFIG += gstreamer-1.0
|
||||
unix: PKGCONFIG += gstreamer-app-1.0
|
||||
unix: PKGCONFIG += glib-2.0
|
||||
|
||||
|
||||
warning("target architecture: $$QMAKE_TARGET.arch")
|
||||
warning("Target architecture (QT_ARCH): $$QT_ARCH")
|
||||
warning("Target architecture (QT_SYSROOT): $$QT_SYSROOT")
|
||||
|
||||
contains(QT_ARCH, x86_64){
|
||||
|
||||
QT_SYSROOT = /
|
||||
#x86_64 pc
|
||||
DEFINES += _GSTREAMER_1_0 _SYOLOV5_NO _PC #_CROP
|
||||
INCLUDEPATH += /usr/local/include
|
||||
INCLUDEPATH += /usr/local/curl/include
|
||||
INCLUDEPATH += /usr/local/dcmtk-3.6.8/include
|
||||
|
||||
#LIBS += -l/lib/x86_64-linux-gnu/sqlite3
|
||||
|
||||
LIBS += -L/usr/local/dcmtk-3.6.8/lib -lofstd -loflog -ldcmnet -ldcmtls -ldcmdata -ldcmtkcharls -lijg8 -lijg12 -lijg16 -ldcmimgle -ldcmimage -ldcmjpeg -ldcmjpls -lv4l2 -ljpeg
|
||||
LIBS += -L/usr/local/curl/lib -lcurl
|
||||
LIBS += -L/usr/local/openjpeg/lib -lopenjp2
|
||||
|
||||
#LIBS += -L$$[QT_SYSROOT]/usr/local/sqlite3/lib -lsqlite3
|
||||
|
||||
|
||||
} else: contains(QT_ARCH, arm64) { # <-- 이렇게 '}'와 'else:'를 한 줄에 붙여야 합니다.
|
||||
#_JETSON_TX2_NX #_XAVIER_NX #_TEST_CODE #_PC
|
||||
DEFINES += _GSTREAMER_1_0 _SYOLOV5_NO _JETSON_TX2_NX #_LT6911UXE #_4K#_JETSON_DEV _XAVIER_NX # _JETSON_TX2_NX
|
||||
#DEFINES += _GSTREAMER_1_0 _SYOLOV5_NO _JETSON_DEV _XAVIER_NX #_4K# _SAVE_LOG _CROP_NO _NEW_WIDTH_LEVEL_NO
|
||||
|
||||
#aarch64 xavier nx
|
||||
#/work/rootfs_tx2_nx_qt5
|
||||
#$$[QT_SYSROOT]
|
||||
|
||||
#INCLUDEPATH += $$[QT_SYSROOT]/usr/local/STensorRTLibrtest_250620_1.dbary/include
|
||||
#LIBS += -L$$[QT_SYSROOT]/usr/local/STensorRTLibrary/lib -lSTensorRTLibrary
|
||||
INCLUDEPATH += $$[QT_SYSROOT]/usr/lib/aarch64-linux-gnu/glib-2.0/include
|
||||
INCLUDEPATH += $$[QT_SYSROOT]/usr/local/dcmtk/include
|
||||
INCLUDEPATH += $$[QT_SYSROOT]/usr/include/gstreamer-1.0
|
||||
INCLUDEPATH += $$[QT_SYSROOT]/usr/local/curl/include
|
||||
#LIBS += -L$$[QT_SYSROOT]/usr/local/dcmtk/lib -lofstd -loflog -ldcmnet -ldcmtls -ldcmdata -ldcmtkcharls -lijg8 -lijg12 -lijg16 -ldcmimgle -dcmimage -ldcmjpeg -ldcmjpls -lsqlite3 -lv4l2 -lopenjp2 -ljpeg
|
||||
LIBS += -L$$[QT_SYSROOT]/usr/local/dcmtk/lib -lofstd -loflog -ldcmnet -ldcmtls -ldcmdata -ldcmtkcharls -lijg8 -lijg12 -lijg16 -ldcmimgle -dcmimage -ldcmjpeg -ldcmjpls -lsqlite3 -lv4l2 -ljpeg
|
||||
#LIBS += -L$$[QT_SYSROOT]/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcublasLt -lnvinfer -lnvinfer_plugin -lopencv_core -lopencv_highgui lopencv_imgproc -lopencv_imgcodecs
|
||||
LIBS += -L$$[QT_SYSROOT]/usr/local/curl/lib -lcurl
|
||||
#LIBS += -L$$[QT_SYSROOT]/usr/local/openssl/lib -lssl -lcrypto
|
||||
|
||||
|
||||
} else: contains(QT_ARCH, aarch64) { # <-- 이렇게 '}'와 'else:'를 한 줄에 붙여야 합니다.
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
822
SVG5.pro.user
Normal file
822
SVG5.pro.user
Normal file
@ -0,0 +1,822 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.11.0, 2025-09-30T09:44:56. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{3a243a73-ea17-4771-b85f-1fdeacbd6112}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||
<value type="QString" key="language">Cpp</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||
<value type="QString" key="language">QmlJS</value>
|
||||
<valuemap type="QVariantMap" key="value">
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||
<value type="int" key="EditorConfiguration.TabKeyBehavior">1</value>
|
||||
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f7d46842-a65d-4757-86ce-31fb87c001e2}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-Desktop-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges">
|
||||
<value type="QString">LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/usr/local/qt5-5.15.16-pc/lib:$LD_LIBRARY_PATH</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-Desktop-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-Desktop-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes">
|
||||
<value type="QString">LD_LIBRARY_PATH=/usr/local/qt5-5.15.16-pc/lib:/usr/local/sqlite3/lib:/usr/local/dcmtk-3.6.8/lib:/usr/local/curl/lib:/usr/local/qt5-5.15.16-pc/lib</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SVG52</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/work/project/qt/SVG5_QDatabase/SVG5.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/work/project/qt/SVG5_QDatabase/SVG5.pro</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments">-platform xcb</value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseTerminal">false</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/work/project/qt/build-SVG5-Desktop-Debug</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.1</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">tx2_nx_5.15.5</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">tx2_nx_5.15.5</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{c9c66302-bd0a-416a-a684-d430621db5df}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_5-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_5-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_5-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CheckForFreeDiskSpaceStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<value type="QString" key="RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck">/</value>
|
||||
<value type="qlonglong" key="RemoteLinux.CheckForFreeDiskSpaceStep.RequiredSpace">5242880</value>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.KillAppStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.RsyncDeployStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
<value type="QString" key="RemoteLinux.RsyncDeployStep.Flags">-av</value>
|
||||
<value type="bool" key="RemoteLinux.RsyncDeployStep.IgnoreMissingFiles">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">DeployToGenericLinux</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">0</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes">
|
||||
<value type="QString">DISPLAY=:0</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SVG5 (on tx2_nx)2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinuxRunConfiguration:/work/project/qt/SVG5_QDatabase/SVG5.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/work/project/qt/SVG5_QDatabase/SVG5.pro</value>
|
||||
<value type="int" key="RemoteLinux.EnvironmentAspect.Version">1</value>
|
||||
<value type="QString" key="RemoteLinux.RunConfig.AlternateRemoteExecutable"></value>
|
||||
<value type="bool" key="RemoteLinux.RunConfig.UseAlternateRemoteExecutable">false</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments">-platform xcb</value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseX11Forwarding">false</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory"></value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
|
||||
<value type="QString" key="RunConfiguration.X11Forwarding">:0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.2</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">tx2_nx_5.15.16</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">tx2_nx_5.15.16</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{d16e6fe4-714a-4834-882a-5b7a332a6c6f}</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_16-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_16-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/work/project/qt/build-SVG5-tx2_nx_5_15_16-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">true</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.BuildTargets"/>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||
<value type="bool" key="Qt4ProjectManager.MakeStep.OverrideMakeflags">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CheckForFreeDiskSpaceStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<value type="QString" key="RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck">/</value>
|
||||
<value type="qlonglong" key="RemoteLinux.CheckForFreeDiskSpaceStep.RequiredSpace">5242880</value>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.KillAppStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.RsyncDeployStep</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
|
||||
<valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
|
||||
<value type="QString" key="RemoteLinux.RsyncDeployStep.Flags">-av</value>
|
||||
<value type="bool" key="RemoteLinux.RsyncDeployStep.IgnoreMissingFiles">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">DeployToGenericLinux</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.KCachegrindExecutable">kcachegrind</value>
|
||||
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
|
||||
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
|
||||
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||
<value type="int">0</value>
|
||||
<value type="int">1</value>
|
||||
<value type="int">2</value>
|
||||
<value type="int">3</value>
|
||||
<value type="int">4</value>
|
||||
<value type="int">5</value>
|
||||
<value type="int">6</value>
|
||||
<value type="int">7</value>
|
||||
<value type="int">8</value>
|
||||
<value type="int">9</value>
|
||||
<value type="int">10</value>
|
||||
<value type="int">11</value>
|
||||
<value type="int">12</value>
|
||||
<value type="int">13</value>
|
||||
<value type="int">14</value>
|
||||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">1</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes">
|
||||
<value type="QString">DISPLAY=:0</value>
|
||||
</valuelist>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SVG5 (on tx2_nx)</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinuxRunConfiguration:/work/project/qt/SVG5/SVG5.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/work/project/qt/SVG5/SVG5.pro</value>
|
||||
<value type="int" key="RemoteLinux.EnvironmentAspect.Version">1</value>
|
||||
<value type="QString" key="RemoteLinux.RunConfig.AlternateRemoteExecutable"></value>
|
||||
<value type="bool" key="RemoteLinux.RunConfig.UseAlternateRemoteExecutable">false</value>
|
||||
<value type="QString" key="RunConfiguration.Arguments">-platform xcb</value>
|
||||
<value type="bool" key="RunConfiguration.Arguments.multi">false</value>
|
||||
<value type="QString" key="RunConfiguration.OverrideDebuggerStartup"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseX11Forwarding">false</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory">/home/birdhead</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default"></value>
|
||||
<value type="QString" key="RunConfiguration.X11Forwarding">:0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">3</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>Version</variable>
|
||||
<value type="int">22</value>
|
||||
</data>
|
||||
</qtcreator>
|
||||
3
SVG5_ko_KR.ts
Normal file
3
SVG5_ko_KR.ts
Normal file
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="SVG_ko_KR"></TS>
|
||||
77
acquisition_info.cpp
Normal file
77
acquisition_info.cpp
Normal file
@ -0,0 +1,77 @@
|
||||
#include "acquisition_info.h"
|
||||
|
||||
ACQUISITION_INFO::ACQUISITION_INFO()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::Clear()
|
||||
{
|
||||
m_Patient.Init();
|
||||
m_Study.Init();
|
||||
m_Series.Init();
|
||||
m_Image.Init();
|
||||
|
||||
m_strImageFilename = "";
|
||||
m_strVideoFilename = "";
|
||||
|
||||
m_nIndexPatient = 0;
|
||||
m_nIndexStudy = 0;
|
||||
m_nIndexSeries_Image = 0;
|
||||
m_nIndexSeries_Video = 0;
|
||||
|
||||
m_nSeriesNumber = 0;
|
||||
|
||||
m_nAcquisitionImageMax = 0;
|
||||
m_nAcquisitionVideoMax = 0;
|
||||
}
|
||||
|
||||
SDATA_PATIENT* ACQUISITION_INFO::GetPatientInfo()
|
||||
{
|
||||
return &m_Patient;
|
||||
}
|
||||
|
||||
SDATA_STUDY* ACQUISITION_INFO::GetStudyInfo()
|
||||
{
|
||||
return &m_Study;
|
||||
}
|
||||
|
||||
SDATA_SERIES* ACQUISITION_INFO::GetSeriesInfo()
|
||||
{
|
||||
return &m_Series;
|
||||
}
|
||||
|
||||
SDATA_IMAGE* ACQUISITION_INFO::GetImageInfo()
|
||||
{
|
||||
return &m_Image;
|
||||
}
|
||||
|
||||
SDATA_SCHEDULED_DATA* ACQUISITION_INFO::GetScheduledDataInfo()
|
||||
{
|
||||
return &m_ScheduledData;
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::SetDataPatient(SDATA_PATIENT data)
|
||||
{
|
||||
m_Patient = data;
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::SetDataStudy(SDATA_STUDY data)
|
||||
{
|
||||
m_Study = data;
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::SetDataSeries(SDATA_SERIES data)
|
||||
{
|
||||
m_Series = data;
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::SetDataImage(SDATA_IMAGE data)
|
||||
{
|
||||
m_Image = data;
|
||||
}
|
||||
|
||||
void ACQUISITION_INFO::SetDataScheduledData(SDATA_SCHEDULED_DATA data)
|
||||
{
|
||||
m_ScheduledData = data;
|
||||
}
|
||||
47
acquisition_info.h
Normal file
47
acquisition_info.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef ACQUSITION_INFO_H
|
||||
#define ACQUSITION_INFO_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "SDCMCommonStructure.h"
|
||||
|
||||
class ACQUISITION_INFO
|
||||
{
|
||||
public:
|
||||
ACQUISITION_INFO();
|
||||
|
||||
void Clear();
|
||||
|
||||
SDATA_PATIENT* GetPatientInfo();
|
||||
SDATA_STUDY* GetStudyInfo();
|
||||
SDATA_SERIES* GetSeriesInfo();
|
||||
SDATA_IMAGE* GetImageInfo();
|
||||
SDATA_SCHEDULED_DATA* GetScheduledDataInfo();
|
||||
|
||||
int m_nIndexPatient;
|
||||
int m_nIndexStudy;
|
||||
int m_nIndexSeries_Image;
|
||||
int m_nSeriesNumber;
|
||||
int m_nIndexSeries_Video;
|
||||
|
||||
int m_nAcquisitionImageMax;
|
||||
int m_nAcquisitionVideoMax;
|
||||
|
||||
QString m_strImageFilename;
|
||||
QString m_strVideoFilename;
|
||||
|
||||
void SetDataPatient(SDATA_PATIENT data);
|
||||
void SetDataStudy(SDATA_STUDY data);
|
||||
void SetDataSeries(SDATA_SERIES data);
|
||||
void SetDataImage(SDATA_IMAGE data);
|
||||
void SetDataScheduledData(SDATA_SCHEDULED_DATA data);
|
||||
|
||||
protected:
|
||||
SDATA_PATIENT m_Patient;
|
||||
SDATA_STUDY m_Study;
|
||||
SDATA_SERIES m_Series;
|
||||
SDATA_IMAGE m_Image;
|
||||
SDATA_SCHEDULED_DATA m_ScheduledData;
|
||||
};
|
||||
|
||||
#endif // ACQUSITION_INFO_H
|
||||
41
assets.qrc
Normal file
41
assets.qrc
Normal file
@ -0,0 +1,41 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>image/Arrow_top_2.png</file>
|
||||
<file>image/Arrow_under_2.png</file>
|
||||
<file>image/Arrow_top_3.png</file>
|
||||
<file>image/Arrow_under_3.png</file>
|
||||
<file>image/Scroll_bar_1.png</file>
|
||||
<file>image/cancel_arrow.png</file>
|
||||
<file>image/month_next.png</file>
|
||||
<file>image/month_prev.png</file>
|
||||
<file>image/scrollbar_down.png</file>
|
||||
<file>image/scrollbar_horizontal_bg.png</file>
|
||||
<file>image/scrollbar_left.png</file>
|
||||
<file>image/scrollbar_right.png</file>
|
||||
<file>image/scrollbar_up.png</file>
|
||||
<file>image/scrollbar_vertical_bg.png</file>
|
||||
<file>image/ScrollBar_Horizontal_Icon.png</file>
|
||||
<file>image/ScrollBar_Vertical_Icon.png</file>
|
||||
<file>image/select_indicator.png</file>
|
||||
<file>image/2/capture_close all_button_icon.png</file>
|
||||
<file>image/2/capture_close all_clicked_button_icon.png</file>
|
||||
<file>image/2/capture_close_button_icon.png</file>
|
||||
<file>image/2/capture_close_clicked_button_icon.png</file>
|
||||
<file>image/2/capture_delete all_button_icon.png</file>
|
||||
<file>image/2/capture_delete all_clicked_button_icon.png</file>
|
||||
<file>image/2/capture_delete_button_icon.png</file>
|
||||
<file>image/2/capture_delete_clicked_button_icon.png</file>
|
||||
<file>image/2/capture_next_button_icon.png</file>
|
||||
<file>image/2/capture_prev_button_icon.png</file>
|
||||
<file>image/2/capture_send_icon_button.png</file>
|
||||
<file>image/2/capture_send_icon_clicked_button.png</file>
|
||||
<file>image/2/capture_send_icon_check box_button.png</file>
|
||||
<file>image/2/next-icon.png</file>
|
||||
<file>image/2/next-icon_clicked.png</file>
|
||||
<file>image/2/preview-icon.png</file>
|
||||
<file>image/2/preview-icon_clicked.png</file>
|
||||
<file>image/2/capture_check box.png</file>
|
||||
<file>image/2/capture_send all_clicked_button.png</file>
|
||||
<file>image/2/capture_send all_button_clicked.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
46
charconvert.cpp
Normal file
46
charconvert.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "charconvert.h"
|
||||
|
||||
|
||||
CharConvert::CharConvert()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString CharConvert::EUCKRtoUTF8(const char* pData)
|
||||
{
|
||||
QByteArray encodedString = pData;
|
||||
QTextCodec* codec = QTextCodec::codecForName("eucKR");
|
||||
QString strData = codec->toUnicode(encodedString);
|
||||
|
||||
return strData;
|
||||
}
|
||||
|
||||
QByteArray CharConvert::UTF8toEUCKR(QString encodedString)
|
||||
{
|
||||
QTextCodec* codec = QTextCodec::codecForName("eucKR");
|
||||
QByteArray strData = codec->fromUnicode(encodedString);
|
||||
|
||||
//QByteArray testEncoded = encodedString.toStdString().c_str();
|
||||
|
||||
//QString strTest = codec->toUnicode(testEncoded);
|
||||
|
||||
|
||||
return strData;//.toStdString().c_str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
QString CharConvert::Convert(const char* pData, QString strEnc)
|
||||
{
|
||||
if(strEnc=="EUC-KR")
|
||||
{
|
||||
return UTF8toEUCKR(pData);
|
||||
}
|
||||
else if(strEnc=="UTF-8")
|
||||
{
|
||||
return EUCKRtoUTF8(pData);
|
||||
}
|
||||
|
||||
|
||||
return pData;
|
||||
}
|
||||
19
charconvert.h
Normal file
19
charconvert.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef CHARCONVERT_H
|
||||
#define CHARCONVERT_H
|
||||
|
||||
#include "common.h"
|
||||
#include <QTextCodec>
|
||||
#include <QByteArray>
|
||||
|
||||
class CharConvert
|
||||
{
|
||||
public:
|
||||
CharConvert();
|
||||
|
||||
static QString EUCKRtoUTF8(const char* pData);
|
||||
static QByteArray UTF8toEUCKR(QString encodedString);
|
||||
|
||||
static QString Convert(const char* pData, QString strEnc);
|
||||
};
|
||||
|
||||
#endif // CHARCONVERT_H
|
||||
701
common.h
Normal file
701
common.h
Normal file
@ -0,0 +1,701 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#include <QImage>
|
||||
#include <QString>
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
typedef vector<QString> RowData;
|
||||
#define SendListFilename RowData
|
||||
|
||||
#include <QImage>
|
||||
#include <QString>
|
||||
#include <QDate>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
|
||||
#define SAFE_DELETE(x) { if(x!=NULL) { delete x; x = NULL; }}
|
||||
#define SAFE_ARRAY_DELETE(x) { if(x!=NULL) { delete[] x; x = NULL; }}
|
||||
|
||||
#define MOVIE_FILE_EXTENSION ".mp4"
|
||||
|
||||
enum SMENU
|
||||
{
|
||||
SMENU_WORKLIST = 0x01,
|
||||
SMENU_HISTORY = 0x02,
|
||||
SMENU_SETTING = 0x04,
|
||||
SMENU_CAPTURE = 0x10,
|
||||
SMENU_VIEWER = 0x20
|
||||
};
|
||||
|
||||
enum SWIDGET
|
||||
{
|
||||
SWIDGET_WORKLIST = 0,
|
||||
SWIDGET_HISTORY,
|
||||
SWIDGET_SETTING,
|
||||
SWIDGET_CAPTURE,
|
||||
SWIDGET_VIEWER
|
||||
};
|
||||
|
||||
#ifndef __SDCM_DISPLAY_INDEX
|
||||
#define __SDCM_DISPLAY_INDEX
|
||||
typedef enum _SDCM_DISPLAY_INDEX
|
||||
{
|
||||
SDI_PATIENT_ID = 0,
|
||||
SDI_PATIENT_NAME,
|
||||
SDI_PATIENT_SEX,
|
||||
SDI_PATIENT_WEIGHT,
|
||||
SDI_PATIENT_BIRTH_DATE,
|
||||
SDI_PATIENT_AGE,
|
||||
SDI_PATIENT_LOCATION,
|
||||
|
||||
SDI_STUDY_INSTANCE_UID,
|
||||
SDI_STUDY_DESCRIPTION,
|
||||
SDI_STUDY_DATE,
|
||||
SDI_STUDY_TIME,
|
||||
SDI_STUDY_CREATE_DATE,
|
||||
SDI_STUDY_REFERRING_PHYSICIAN_NAME,
|
||||
|
||||
SDI_SERIES_INSTANCE_UID,
|
||||
SDI_SERIES_OPERATOR,
|
||||
SDI_SERIES_MODALITY,
|
||||
SDI_SERIES_BODYPART,
|
||||
SDI_SERIES_DESCRIPTION,
|
||||
|
||||
SDI_IMAGE_INSTANCE_UID,
|
||||
SDI_IMAGE_CREATE_DATE,
|
||||
SDI_IMAGE_CREATE_TIME,
|
||||
|
||||
SDI_SCHEDULED_DATE,
|
||||
SDI_SCHEDULED_TIME,
|
||||
SDI_SCHEDULED_PROCEDURE_STEP_ID,
|
||||
SDI_SCHEDULED_PROCEDURE_ID,
|
||||
|
||||
|
||||
SDI_REQUESTED_PROCEDURE_COMMENTS,
|
||||
|
||||
SDI_INDEX,
|
||||
SDI_SAVE_IMAGE_COUNT,
|
||||
SDI_SEND_IMAGE_COUNT,
|
||||
SDI_SAVE_MOVIE_COUNT,
|
||||
SDI_SAVE_TOTAL_COUNT,
|
||||
SDI_ACCESSION_NUMBER,
|
||||
SDI_SCHEDULED_PERFORMING_PHYSICIAN_NAME,
|
||||
SDI_SCHEDULED_CODE_VALUE,
|
||||
|
||||
SDI_TOTAL, // No use!!, this is end tag!!
|
||||
|
||||
}SDCM_DISPLAY_INDEX;
|
||||
#endif
|
||||
|
||||
#ifndef __SDCM_HISTORY_DISPLAY_INDEX
|
||||
#define __SDCM_HISTORY_DISPLAY_INDEX
|
||||
typedef enum _SDCM_HISTORY_DISPLAY_INDEX
|
||||
{
|
||||
HDI_INDEX = 0,
|
||||
HDI_PATIENT_INDEX,
|
||||
HDI_PATIENT_ID,
|
||||
HDI_PATIENT_NAME,
|
||||
HDI_PATIENT_AGE,
|
||||
HDI_PATIENT_SEX,
|
||||
HDI_PATIENT_BIRTH_DATE,
|
||||
HDI_PATIENT_WEIGHT,
|
||||
HDI_STUDY_CREATE_DATE_TIME,
|
||||
HDI_STUDY_DATE,
|
||||
HDI_STUDY_TIME,
|
||||
HDI_SCHEDULED_CODE_VALUE,
|
||||
HDI_PATIENT_LOCATION,
|
||||
HDI_ACCESSION_NUMBER,
|
||||
HDI_STUDY_REFERRING_PHYSICIAN_NAME,
|
||||
HDI_STUDY_INSTANCE_UID,
|
||||
HDI_SERIES_INSTANCE_UID,
|
||||
HDI_STUDY_DESCRIPTION,
|
||||
HDI_SERIES_DESCRIPTION,
|
||||
HDI_SERIES_OPERATOR,
|
||||
HDI_SAVE_IMAGE_COUNT,
|
||||
HDI_SEND_IMAGE_COUNT,
|
||||
HDI_SERIES_MODALITY,
|
||||
HDI_SERIES_DATE,
|
||||
HDI_SERIES_TIME,
|
||||
HDI_SERIES_NUMBER,
|
||||
HDI_SAVE_MOVIE_COUNT,
|
||||
|
||||
|
||||
HDI_TOTAL, // No use!!, this is end tag!!
|
||||
|
||||
}SDCM_HISTORY_DISPLAY_INDEX;
|
||||
#endif
|
||||
|
||||
|
||||
enum SDISPLAY_TYPE
|
||||
{
|
||||
SDISPLAY_1920X1080 = 0,
|
||||
SDISPLAY_1280X1024
|
||||
};
|
||||
|
||||
struct SearchDate
|
||||
{
|
||||
QDate m_DateStart;
|
||||
QDate m_DateEnd;
|
||||
};
|
||||
|
||||
enum DISPLAY_TYPE
|
||||
{
|
||||
DISPLAY_NONE = 0,
|
||||
DISPLAY_IMAGE = 1,
|
||||
DISPLAY_VIDEO = 2
|
||||
};
|
||||
|
||||
struct TableHeader
|
||||
{
|
||||
bool m_bSelect;
|
||||
int m_nIndexDefault;
|
||||
int m_nIndex;
|
||||
int m_nWidth;
|
||||
QString m_strText;
|
||||
};
|
||||
|
||||
struct RGB_Data
|
||||
{
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
};
|
||||
|
||||
struct RGBA_Data
|
||||
{
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
uint8_t a;
|
||||
};
|
||||
|
||||
struct NetworkShareInfo
|
||||
{
|
||||
QString m_strIP;
|
||||
QString m_strShareFolder;
|
||||
QString m_strID;
|
||||
QString m_strPassword;
|
||||
QString m_strVersion;
|
||||
bool m_bEnable;
|
||||
bool m_bAutoSend;
|
||||
};
|
||||
|
||||
struct ImageSelect
|
||||
{
|
||||
ImageSelect()
|
||||
{
|
||||
m_bSelect = false;
|
||||
m_bSend = false;
|
||||
m_bDelete = false;
|
||||
m_pImageData = NULL;
|
||||
//m_pImage = NULL;
|
||||
m_strFile = "";
|
||||
m_nType = DISPLAY_NONE;
|
||||
m_strDate = "";
|
||||
m_strTime = "";
|
||||
|
||||
m_strStudyInstanceUID = "";
|
||||
m_strSeriesInstanceUID = "";
|
||||
m_strImageInstanceUID = "";
|
||||
m_strPatientAge = "";
|
||||
m_nIndexStudy = 0;
|
||||
m_nIndexSeries = 0;
|
||||
m_nIndexImage = 0;
|
||||
m_nIndexPatient = 0;
|
||||
|
||||
m_nSeriesNumber = 0;
|
||||
m_nImageNumber = 0;
|
||||
|
||||
#ifdef _4K
|
||||
m_nImageWidth = 3840;
|
||||
m_nImageHeight = 2160;
|
||||
#else
|
||||
m_nImageWidth = 1920;
|
||||
m_nImageHeight = 1080;
|
||||
#endif
|
||||
}
|
||||
|
||||
void CreateImage(int nImageWidth, int nImageHeight, int nImageFormat)
|
||||
{
|
||||
m_nImageWidth = nImageWidth;
|
||||
m_nImageHeight = nImageHeight;
|
||||
m_nImageFormat = nImageFormat;
|
||||
|
||||
m_pImageData = new uint8_t[m_nImageWidth*m_nImageHeight*3];
|
||||
}
|
||||
|
||||
int GetWidth()
|
||||
{
|
||||
return m_nImageWidth;
|
||||
}
|
||||
|
||||
int GetHeight()
|
||||
{
|
||||
return m_nImageHeight;
|
||||
}
|
||||
|
||||
int GetFormat()
|
||||
{
|
||||
return m_nImageFormat;
|
||||
}
|
||||
|
||||
void DeleteImageData()
|
||||
{
|
||||
SAFE_ARRAY_DELETE(m_pImageData);
|
||||
m_bDelete = true;
|
||||
}
|
||||
|
||||
~ImageSelect()
|
||||
{
|
||||
SAFE_ARRAY_DELETE(m_pImageData);
|
||||
//SAFE_DELETE(m_pImage);
|
||||
m_bSelect = false;
|
||||
m_bSend = false;
|
||||
m_bDelete = false;
|
||||
m_strFile = "";
|
||||
m_nType = DISPLAY_NONE;
|
||||
m_strDate = "";
|
||||
m_strTime = "";
|
||||
|
||||
m_strStudyInstanceUID = "";
|
||||
m_strSeriesInstanceUID = "";
|
||||
m_strImageInstanceUID = "";
|
||||
m_strPatientAge = "";
|
||||
m_nIndexStudy = 0;
|
||||
m_nIndexSeries = 0;
|
||||
m_nIndexImage = 0;
|
||||
m_nIndexPatient = 0;
|
||||
|
||||
m_nSeriesNumber = 0;
|
||||
m_nImageNumber = 0;
|
||||
}
|
||||
bool m_bSelect;
|
||||
bool m_bSend;
|
||||
bool m_bDelete;
|
||||
//QImage* m_pImage;
|
||||
uint8_t* m_pImageData;
|
||||
QString m_strFile;
|
||||
DISPLAY_TYPE m_nType;
|
||||
QString m_strDate;
|
||||
QString m_strTime;
|
||||
QString m_strStudyInstanceUID;
|
||||
QString m_strSeriesInstanceUID;
|
||||
QString m_strImageInstanceUID;
|
||||
QString m_strPatientAge;
|
||||
int m_nIndexStudy;
|
||||
int m_nIndexSeries;
|
||||
int m_nIndexImage;
|
||||
int m_nIndexPatient;
|
||||
|
||||
int m_nSeriesNumber;
|
||||
int m_nImageNumber;
|
||||
|
||||
int m_nImageWidth;
|
||||
int m_nImageHeight;
|
||||
|
||||
int m_nImageFormat;
|
||||
};
|
||||
|
||||
struct DisplayImage
|
||||
{
|
||||
DisplayImage()
|
||||
{
|
||||
m_pImage = NULL;
|
||||
m_strFilename = "";
|
||||
m_bCheck = false;
|
||||
m_nType = DISPLAY_IMAGE;
|
||||
}
|
||||
|
||||
DisplayImage(QString strFilename, QImage* pImage, DISPLAY_TYPE nType, bool bCheck)
|
||||
{
|
||||
m_strFilename = strFilename;
|
||||
m_pImage = pImage;
|
||||
m_nType = nType;
|
||||
m_bCheck = bCheck;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QImage* m_pImage;
|
||||
QString m_strFilename;
|
||||
bool m_bCheck;
|
||||
DISPLAY_TYPE m_nType;
|
||||
};
|
||||
|
||||
struct CAPTURE_IMAGE
|
||||
{
|
||||
CAPTURE_IMAGE()
|
||||
{
|
||||
m_pImage = NULL;
|
||||
m_pImageSmall = NULL;
|
||||
m_strImageFilename = "";
|
||||
m_strVideoFilename = "";
|
||||
m_pImageCaptureRaw = NULL;
|
||||
m_pImageCaptureColor = NULL;
|
||||
m_nType = DISPLAY_NONE;
|
||||
m_nIndex = -1;
|
||||
m_bCheck = false;
|
||||
m_bSaveFile = false;
|
||||
m_bDelete = false;
|
||||
m_bSend = false;
|
||||
m_pImageData = NULL;
|
||||
m_nImageWidth = 0;
|
||||
m_nImageHeight = 0;
|
||||
m_nImageFormat = 0;
|
||||
m_nAcquisitionNumber = 0;
|
||||
m_bBackup = false;
|
||||
}
|
||||
|
||||
~CAPTURE_IMAGE()
|
||||
{
|
||||
SAFE_DELETE(m_pImage);
|
||||
SAFE_DELETE(m_pImageSmall);
|
||||
SAFE_ARRAY_DELETE(m_pImageCaptureRaw);
|
||||
SAFE_ARRAY_DELETE(m_pImageCaptureColor);
|
||||
m_strImageFilename = "";
|
||||
m_nType = DISPLAY_NONE;
|
||||
m_nIndex = -1;
|
||||
m_bCheck = false;
|
||||
m_bDelete = false;
|
||||
m_bSend = false;
|
||||
}
|
||||
|
||||
void CreateImage(int nImageWidth, int nImageHeight, int nImageFormat)
|
||||
{
|
||||
m_nImageWidth = nImageWidth;
|
||||
m_nImageHeight = nImageHeight;
|
||||
m_nImageFormat = nImageFormat;
|
||||
|
||||
m_pImageData = new uint8_t[m_nImageWidth*m_nImageHeight*3];
|
||||
}
|
||||
|
||||
int GetWidth()
|
||||
{
|
||||
return m_nImageWidth;
|
||||
}
|
||||
|
||||
int GetHeight()
|
||||
{
|
||||
return m_nImageHeight;
|
||||
}
|
||||
|
||||
int GetFormat()
|
||||
{
|
||||
return m_nImageFormat;
|
||||
}
|
||||
|
||||
void DeleteImageData()
|
||||
{
|
||||
SAFE_ARRAY_DELETE(m_pImageData);
|
||||
m_bDelete = true;
|
||||
}
|
||||
|
||||
bool IsBackup()
|
||||
{
|
||||
return m_bBackup;
|
||||
}
|
||||
|
||||
QImage* m_pImage;
|
||||
QImage* m_pImageSmall;
|
||||
QString m_strImageFilename;
|
||||
QString m_strVideoFilename;
|
||||
QDateTime m_DateTime;
|
||||
bool m_bSaveFile;
|
||||
uint8_t* m_pImageCaptureRaw;
|
||||
RGB_Data* m_pImageCaptureColor;
|
||||
bool m_bCheck;
|
||||
bool m_bDelete;
|
||||
DISPLAY_TYPE m_nType;
|
||||
int m_nIndex;
|
||||
int m_nAcquisitionNumber;
|
||||
bool m_bSend;
|
||||
bool m_bBackup;
|
||||
|
||||
uint8_t* m_pImageData;
|
||||
int m_nImageWidth;
|
||||
int m_nImageHeight;
|
||||
int m_nImageFormat;
|
||||
};
|
||||
|
||||
struct SEARCH_ITEM
|
||||
{
|
||||
SEARCH_ITEM()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
m_strStudyDate.clear();
|
||||
m_strPatientName.clear();
|
||||
m_strPatientID.clear();
|
||||
}
|
||||
|
||||
QString m_strStudyDate;
|
||||
QString m_strPatientName;
|
||||
QString m_strPatientID;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct LOCAL_DATA
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct NETWORK_DIRECTORY
|
||||
{
|
||||
QString m_strNetworkDirectory;
|
||||
QString m_strID;
|
||||
QString m_strPassword;
|
||||
};
|
||||
|
||||
|
||||
struct HISTORY_STUDY
|
||||
{
|
||||
QString* pStrStudyIndex;
|
||||
QString* pStrPatientIndex;
|
||||
QString* pStrPatientID;
|
||||
QString* pStrPatientName;
|
||||
QString* pStrPatientAge;
|
||||
QString* pStrPatientSex;
|
||||
QString* pStrPatientBirthDate;
|
||||
QString* pStrPatientWeight;
|
||||
QString* pStrCreateDateTime;
|
||||
QString* pStrStudyDate;
|
||||
QString* pStrStudyTime;
|
||||
QString* pStrStudyCodeValue;
|
||||
QString* pStrPatientLocation;
|
||||
QString* pStrAccessionNumber;
|
||||
QString* pStrReferringPhysiciansName;
|
||||
QString* pStrStudyInstanceUID;
|
||||
QString* pStrSeriesInstanceUID;
|
||||
QString* pStrStudyDescription;
|
||||
QString* pStrSeriesDescription;
|
||||
QString* pStrOperatorsName;
|
||||
QString* pStrImageCount;
|
||||
QString* pStrImageSend;
|
||||
QString* pStrModality;
|
||||
QString* pStrSeriesDate;
|
||||
QString* pStrSeriesTime;
|
||||
QString* pStrSeriesNumber;
|
||||
QString* pStrMovieCount;
|
||||
|
||||
vector<QString*> m_List;
|
||||
|
||||
map<int, int> m_ListTableHistoryViewMap;
|
||||
|
||||
vector<int> m_ListEnableHeader;
|
||||
|
||||
|
||||
|
||||
HISTORY_STUDY()
|
||||
{
|
||||
if(m_ListTableHistoryViewMap.empty()==true)
|
||||
{
|
||||
InitMap();
|
||||
|
||||
}
|
||||
QString* pStrData = NULL;
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyIndex = pStrData; //0
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientIndex = pStrData; //1
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientID = pStrData;//2
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientName = pStrData;//3
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientAge = pStrData;//4
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientSex = pStrData;//5
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientBirthDate = pStrData;//6
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientWeight = pStrData;//7
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrCreateDateTime = pStrData;//8
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyDate = pStrData;//9
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyTime = pStrData;//10
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyCodeValue = pStrData;//11
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrPatientLocation = pStrData;//12
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrAccessionNumber = pStrData;//13
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrReferringPhysiciansName = pStrData;//14
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyInstanceUID = pStrData;//15
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrSeriesInstanceUID = pStrData;//16
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrStudyDescription = pStrData;//17
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrSeriesDescription = pStrData;//18
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrOperatorsName = pStrData;//19
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrImageCount = pStrData;//20
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrImageSend = pStrData;//21
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrModality = pStrData;//22
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrSeriesDate = pStrData;//23
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrSeriesTime = pStrData;//24
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrSeriesNumber = pStrData;//25
|
||||
pStrData = new QString; m_List.push_back(pStrData); pStrMovieCount = pStrData;//26
|
||||
}
|
||||
|
||||
~HISTORY_STUDY()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void InitMap()
|
||||
{
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_INDEX, HDI_INDEX));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_ID, HDI_PATIENT_ID));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_NAME, HDI_PATIENT_NAME));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_AGE, HDI_PATIENT_AGE));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_SEX, HDI_PATIENT_SEX));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_BIRTH_DATE, HDI_PATIENT_BIRTH_DATE));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_WEIGHT, HDI_PATIENT_WEIGHT));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_CREATE_DATE, HDI_STUDY_CREATE_DATE_TIME));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_DATE, HDI_STUDY_DATE));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_TIME, HDI_STUDY_TIME));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SCHEDULED_CODE_VALUE, HDI_SCHEDULED_CODE_VALUE));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_LOCATION, HDI_PATIENT_LOCATION));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_ACCESSION_NUMBER, HDI_ACCESSION_NUMBER));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_REFERRING_PHYSICIAN_NAME, HDI_STUDY_REFERRING_PHYSICIAN_NAME));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_INSTANCE_UID, HDI_STUDY_INSTANCE_UID));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_INSTANCE_UID, HDI_SERIES_INSTANCE_UID));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_STUDY_DESCRIPTION, HDI_STUDY_DESCRIPTION));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_DESCRIPTION, HDI_SERIES_DESCRIPTION));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_OPERATOR, HDI_SERIES_OPERATOR));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SAVE_IMAGE_COUNT, HDI_SAVE_IMAGE_COUNT));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SEND_IMAGE_COUNT, HDI_SEND_IMAGE_COUNT));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_MODALITY, HDI_SERIES_MODALITY));
|
||||
m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SAVE_MOVIE_COUNT, HDI_SAVE_MOVIE_COUNT));
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_DATE, HDI_SERIES_DATE)); //Not Display
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SERIES_TIME, HDI_SERIES_TIME)); //Not Display
|
||||
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SCHEDULED_PERFORMING_PHYSICIAN_NAME, nIndex)); nIndex++;
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_SCHEDULED_CODE_VALUE, nIndex)); nIndex++;
|
||||
|
||||
//skip
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_LOCATION, -1));
|
||||
//m_ListTableHistoryViewMap.insert(map<int, int>::value_type(SDI_PATIENT_LOCATION, -1));
|
||||
|
||||
map<int, int>::iterator it;
|
||||
for(it=m_ListTableHistoryViewMap.begin() ; it!=m_ListTableHistoryViewMap.end() ; ++it)
|
||||
{
|
||||
int nIDEnable = (*it).first;
|
||||
m_ListEnableHeader.push_back(nIDEnable);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int GetHDIWithSDI(int nDisplayIndex)
|
||||
{
|
||||
int nIndex = -1;
|
||||
map<int, int>::iterator it = m_ListTableHistoryViewMap.find(nDisplayIndex);
|
||||
nIndex = it->second;
|
||||
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
QString GetData(int nDisplayIndex)
|
||||
{
|
||||
if(nDisplayIndex==SDI_SCHEDULED_CODE_VALUE)
|
||||
{
|
||||
|
||||
}
|
||||
int i=0;
|
||||
bool bEnable = false;
|
||||
for(i=0 ; i<m_ListEnableHeader.size() ; i++)
|
||||
{
|
||||
int nIDEnable = m_ListEnableHeader[i];
|
||||
if(nIDEnable==nDisplayIndex)
|
||||
{
|
||||
bEnable = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(bEnable==false)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
map<int, int>::iterator it = m_ListTableHistoryViewMap.find(nDisplayIndex);
|
||||
int nIndex = it->second;
|
||||
if(nIndex>=0)
|
||||
{
|
||||
return *m_List[nIndex];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
int i=0;
|
||||
for(i=0 ; i<m_List.size() ; i++)
|
||||
{
|
||||
QString* pStrData = m_List[i];
|
||||
SAFE_DELETE(pStrData);
|
||||
}
|
||||
m_List.clear();
|
||||
m_ListTableHistoryViewMap.clear();
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef _WORD
|
||||
#define _WORD
|
||||
typedef unsigned short WORD;
|
||||
#endif
|
||||
|
||||
#ifndef _DWORD
|
||||
#define _DWORD
|
||||
typedef unsigned int DWORD;
|
||||
#endif
|
||||
|
||||
#ifndef _BOOL
|
||||
#define _BOOL
|
||||
typedef bool BOOL;
|
||||
#endif
|
||||
|
||||
#ifndef _TRUE
|
||||
#define _TRUE
|
||||
#define TRUE true
|
||||
#endif
|
||||
|
||||
#ifndef _FALSE
|
||||
#define _FLASE
|
||||
#define FALSE false
|
||||
#endif
|
||||
|
||||
struct __attribute__((packed)) BITMAPFILEHADER
|
||||
{
|
||||
__attribute__((aligned(2))) WORD bfType;
|
||||
__attribute__((aligned(2))) DWORD bfSize;
|
||||
__attribute__((aligned(2))) WORD bfReserved1;
|
||||
__attribute__((aligned(2))) WORD bfReserved2;
|
||||
__attribute__((aligned(2))) DWORD bfOffBits;
|
||||
};
|
||||
|
||||
struct __attribute__((packed)) BITMAPINFOHEADER
|
||||
{
|
||||
|
||||
DWORD biSize;
|
||||
DWORD biWidth;
|
||||
DWORD biHeight;
|
||||
WORD biPlanes;
|
||||
WORD biBitCount;
|
||||
DWORD biCompression;
|
||||
DWORD biSizeImage;
|
||||
DWORD biXPelsPerMeter;
|
||||
DWORD biYPelsPerMeter;
|
||||
DWORD biClrUsed;
|
||||
DWORD biClrImportant;
|
||||
|
||||
};
|
||||
|
||||
typedef enum _TYPE_SEARCH_DURATION
|
||||
{
|
||||
SEARCH_TODAY = 0,
|
||||
SEARCH_3DAY,
|
||||
SEARCH_WEEK,
|
||||
SEARCH_2WEEK,
|
||||
SEARCH_3WEEK,
|
||||
SEARCH_1MONTH,
|
||||
SEARCH_2MONTH,
|
||||
SEARCH_USER_DEFINED,
|
||||
}TYPE_SEARCH_DURATION;
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // COMMON_H
|
||||
327
common.hpp
Normal file
327
common.hpp
Normal file
@ -0,0 +1,327 @@
|
||||
#ifndef YOLOV5_COMMON_H_
|
||||
#define YOLOV5_COMMON_H_
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include "NvInfer.h"
|
||||
#include "yololayer.h"
|
||||
|
||||
using namespace nvinfer1;
|
||||
|
||||
cv::Rect get_rect(cv::Mat& img, float bbox[4]) {
|
||||
float l, r, t, b;
|
||||
float r_w = Yolo::INPUT_W / (img.cols * 1.0);
|
||||
float r_h = Yolo::INPUT_H / (img.rows * 1.0);
|
||||
if (r_h > r_w) {
|
||||
l = bbox[0] - bbox[2] / 2.f;
|
||||
r = bbox[0] + bbox[2] / 2.f;
|
||||
t = bbox[1] - bbox[3] / 2.f - (Yolo::INPUT_H - r_w * img.rows) / 2;
|
||||
b = bbox[1] + bbox[3] / 2.f - (Yolo::INPUT_H - r_w * img.rows) / 2;
|
||||
l = l / r_w;
|
||||
r = r / r_w;
|
||||
t = t / r_w;
|
||||
b = b / r_w;
|
||||
} else {
|
||||
l = bbox[0] - bbox[2] / 2.f - (Yolo::INPUT_W - r_h * img.cols) / 2;
|
||||
r = bbox[0] + bbox[2] / 2.f - (Yolo::INPUT_W - r_h * img.cols) / 2;
|
||||
t = bbox[1] - bbox[3] / 2.f;
|
||||
b = bbox[1] + bbox[3] / 2.f;
|
||||
l = l / r_h;
|
||||
r = r / r_h;
|
||||
t = t / r_h;
|
||||
b = b / r_h;
|
||||
}
|
||||
return cv::Rect(round(l), round(t), round(r - l), round(b - t));
|
||||
}
|
||||
|
||||
float iou(float lbox[4], float rbox[4]) {
|
||||
float interBox[] = {
|
||||
(std::max)(lbox[0] - lbox[2] / 2.f , rbox[0] - rbox[2] / 2.f), //left
|
||||
(std::min)(lbox[0] + lbox[2] / 2.f , rbox[0] + rbox[2] / 2.f), //right
|
||||
(std::max)(lbox[1] - lbox[3] / 2.f , rbox[1] - rbox[3] / 2.f), //top
|
||||
(std::min)(lbox[1] + lbox[3] / 2.f , rbox[1] + rbox[3] / 2.f), //bottom
|
||||
};
|
||||
|
||||
if (interBox[2] > interBox[3] || interBox[0] > interBox[1])
|
||||
return 0.0f;
|
||||
|
||||
float interBoxS = (interBox[1] - interBox[0])*(interBox[3] - interBox[2]);
|
||||
return interBoxS / (lbox[2] * lbox[3] + rbox[2] * rbox[3] - interBoxS);
|
||||
}
|
||||
|
||||
bool cmp(const Yolo::Detection& a, const Yolo::Detection& b) {
|
||||
return a.conf > b.conf;
|
||||
}
|
||||
|
||||
void nms(std::vector<Yolo::Detection>& res, float *output, float conf_thresh, float nms_thresh = 0.5) {
|
||||
int det_size = sizeof(Yolo::Detection) / sizeof(float);
|
||||
std::map<float, std::vector<Yolo::Detection>> m;
|
||||
for (int i = 0; i < output[0] && i < Yolo::MAX_OUTPUT_BBOX_COUNT; i++) {
|
||||
if (output[1 + det_size * i + 4] <= conf_thresh) continue;
|
||||
Yolo::Detection det;
|
||||
memcpy(&det, &output[1 + det_size * i], det_size * sizeof(float));
|
||||
if (m.count(det.class_id) == 0) m.emplace(det.class_id, std::vector<Yolo::Detection>());
|
||||
m[det.class_id].push_back(det);
|
||||
}
|
||||
for (auto it = m.begin(); it != m.end(); it++) {
|
||||
//std::cout << it->second[0].class_id << " --- " << std::endl;
|
||||
auto& dets = it->second;
|
||||
std::sort(dets.begin(), dets.end(), cmp);
|
||||
for (size_t m = 0; m < dets.size(); ++m) {
|
||||
auto& item = dets[m];
|
||||
res.push_back(item);
|
||||
for (size_t n = m + 1; n < dets.size(); ++n) {
|
||||
if (iou(item.bbox, dets[n].bbox) > nms_thresh) {
|
||||
dets.erase(dets.begin() + n);
|
||||
--n;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TensorRT weight files have a simple space delimited format:
|
||||
// [type] [size] <data x size in hex>
|
||||
std::map<std::string, Weights> loadWeights(const std::string file) {
|
||||
std::cout << "Loading weights: " << file << std::endl;
|
||||
std::map<std::string, Weights> weightMap;
|
||||
|
||||
// Open weights file
|
||||
std::ifstream input(file);
|
||||
assert(input.is_open() && "Unable to load weight file. please check if the .wts file path is right!!!!!!");
|
||||
|
||||
// Read number of weight blobs
|
||||
int32_t count;
|
||||
input >> count;
|
||||
assert(count > 0 && "Invalid weight map file.");
|
||||
|
||||
while (count--)
|
||||
{
|
||||
Weights wt{ DataType::kFLOAT, nullptr, 0 };
|
||||
uint32_t size;
|
||||
|
||||
// Read name and type of blob
|
||||
std::string name;
|
||||
input >> name >> std::dec >> size;
|
||||
wt.type = DataType::kFLOAT;
|
||||
|
||||
// Load blob
|
||||
uint32_t* val = reinterpret_cast<uint32_t*>(malloc(sizeof(val) * size));
|
||||
for (uint32_t x = 0, y = size; x < y; ++x)
|
||||
{
|
||||
input >> std::hex >> val[x];
|
||||
}
|
||||
wt.values = val;
|
||||
|
||||
wt.count = size;
|
||||
weightMap[name] = wt;
|
||||
}
|
||||
|
||||
return weightMap;
|
||||
}
|
||||
|
||||
IScaleLayer* addBatchNorm2d(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, std::string lname, float eps) {
|
||||
float *gamma = (float*)weightMap[lname + ".weight"].values;
|
||||
float *beta = (float*)weightMap[lname + ".bias"].values;
|
||||
float *mean = (float*)weightMap[lname + ".running_mean"].values;
|
||||
float *var = (float*)weightMap[lname + ".running_var"].values;
|
||||
int len = weightMap[lname + ".running_var"].count;
|
||||
|
||||
float *scval = reinterpret_cast<float*>(malloc(sizeof(float) * len));
|
||||
for (int i = 0; i < len; i++) {
|
||||
scval[i] = gamma[i] / sqrt(var[i] + eps);
|
||||
}
|
||||
Weights scale{ DataType::kFLOAT, scval, len };
|
||||
|
||||
float *shval = reinterpret_cast<float*>(malloc(sizeof(float) * len));
|
||||
for (int i = 0; i < len; i++) {
|
||||
shval[i] = beta[i] - mean[i] * gamma[i] / sqrt(var[i] + eps);
|
||||
}
|
||||
Weights shift{ DataType::kFLOAT, shval, len };
|
||||
|
||||
float *pval = reinterpret_cast<float*>(malloc(sizeof(float) * len));
|
||||
for (int i = 0; i < len; i++) {
|
||||
pval[i] = 1.0;
|
||||
}
|
||||
Weights power{ DataType::kFLOAT, pval, len };
|
||||
|
||||
weightMap[lname + ".scale"] = scale;
|
||||
weightMap[lname + ".shift"] = shift;
|
||||
weightMap[lname + ".power"] = power;
|
||||
IScaleLayer* scale_1 = network->addScale(input, ScaleMode::kCHANNEL, shift, scale, power);
|
||||
assert(scale_1);
|
||||
return scale_1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ILayer* convBlock(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int outch, int ksize, int s, int g, std::string lname) {
|
||||
Weights emptywts{ DataType::kFLOAT, nullptr, 0 };
|
||||
int p = ksize / 3;
|
||||
IConvolutionLayer* conv1 = network->addConvolutionNd(input, outch, DimsHW{ ksize, ksize }, weightMap[lname + ".conv.weight"], emptywts);
|
||||
assert(conv1);
|
||||
conv1->setStrideNd(DimsHW{ s, s });
|
||||
conv1->setPaddingNd(DimsHW{ p, p });
|
||||
conv1->setNbGroups(g);
|
||||
IScaleLayer* bn1 = addBatchNorm2d(network, weightMap, *conv1->getOutput(0), lname + ".bn", 1e-3);
|
||||
|
||||
// silu = x * sigmoid
|
||||
auto sig = network->addActivation(*bn1->getOutput(0), ActivationType::kSIGMOID);
|
||||
assert(sig);
|
||||
auto ew = network->addElementWise(*bn1->getOutput(0), *sig->getOutput(0), ElementWiseOperation::kPROD);
|
||||
assert(ew);
|
||||
return ew;
|
||||
}
|
||||
|
||||
ILayer* focus(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int inch, int outch, int ksize, std::string lname) {
|
||||
ISliceLayer *s1 = network->addSlice(input, Dims3{ 0, 0, 0 }, Dims3{ inch, Yolo::INPUT_H / 2, Yolo::INPUT_W / 2 }, Dims3{ 1, 2, 2 });
|
||||
ISliceLayer *s2 = network->addSlice(input, Dims3{ 0, 1, 0 }, Dims3{ inch, Yolo::INPUT_H / 2, Yolo::INPUT_W / 2 }, Dims3{ 1, 2, 2 });
|
||||
ISliceLayer *s3 = network->addSlice(input, Dims3{ 0, 0, 1 }, Dims3{ inch, Yolo::INPUT_H / 2, Yolo::INPUT_W / 2 }, Dims3{ 1, 2, 2 });
|
||||
ISliceLayer *s4 = network->addSlice(input, Dims3{ 0, 1, 1 }, Dims3{ inch, Yolo::INPUT_H / 2, Yolo::INPUT_W / 2 }, Dims3{ 1, 2, 2 });
|
||||
ITensor* inputTensors[] = { s1->getOutput(0), s2->getOutput(0), s3->getOutput(0), s4->getOutput(0) };
|
||||
auto cat = network->addConcatenation(inputTensors, 4);
|
||||
auto conv = convBlock(network, weightMap, *cat->getOutput(0), outch, ksize, 1, 1, lname + ".conv");
|
||||
return conv;
|
||||
}
|
||||
|
||||
ILayer* bottleneck(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, bool shortcut, int g, float e, std::string lname) {
|
||||
auto cv1 = convBlock(network, weightMap, input, (int)((float)c2 * e), 1, 1, 1, lname + ".cv1");
|
||||
auto cv2 = convBlock(network, weightMap, *cv1->getOutput(0), c2, 3, 1, g, lname + ".cv2");
|
||||
if (shortcut && c1 == c2) {
|
||||
auto ew = network->addElementWise(input, *cv2->getOutput(0), ElementWiseOperation::kSUM);
|
||||
return ew;
|
||||
}
|
||||
return cv2;
|
||||
}
|
||||
|
||||
ILayer* bottleneckCSP(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int n, bool shortcut, int g, float e, std::string lname) {
|
||||
Weights emptywts{ DataType::kFLOAT, nullptr, 0 };
|
||||
int c_ = (int)((float)c2 * e);
|
||||
auto cv1 = convBlock(network, weightMap, input, c_, 1, 1, 1, lname + ".cv1");
|
||||
auto cv2 = network->addConvolutionNd(input, c_, DimsHW{ 1, 1 }, weightMap[lname + ".cv2.weight"], emptywts);
|
||||
ITensor *y1 = cv1->getOutput(0);
|
||||
for (int i = 0; i < n; i++) {
|
||||
auto b = bottleneck(network, weightMap, *y1, c_, c_, shortcut, g, 1.0, lname + ".m." + std::to_string(i));
|
||||
y1 = b->getOutput(0);
|
||||
}
|
||||
auto cv3 = network->addConvolutionNd(*y1, c_, DimsHW{ 1, 1 }, weightMap[lname + ".cv3.weight"], emptywts);
|
||||
|
||||
ITensor* inputTensors[] = { cv3->getOutput(0), cv2->getOutput(0) };
|
||||
auto cat = network->addConcatenation(inputTensors, 2);
|
||||
|
||||
IScaleLayer* bn = addBatchNorm2d(network, weightMap, *cat->getOutput(0), lname + ".bn", 1e-4);
|
||||
auto lr = network->addActivation(*bn->getOutput(0), ActivationType::kLEAKY_RELU);
|
||||
lr->setAlpha(0.1);
|
||||
|
||||
auto cv4 = convBlock(network, weightMap, *lr->getOutput(0), c2, 1, 1, 1, lname + ".cv4");
|
||||
return cv4;
|
||||
}
|
||||
|
||||
ILayer* C3(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int n, bool shortcut, int g, float e, std::string lname) {
|
||||
int c_ = (int)((float)c2 * e);
|
||||
auto cv1 = convBlock(network, weightMap, input, c_, 1, 1, 1, lname + ".cv1");
|
||||
auto cv2 = convBlock(network, weightMap, input, c_, 1, 1, 1, lname + ".cv2");
|
||||
ITensor *y1 = cv1->getOutput(0);
|
||||
for (int i = 0; i < n; i++) {
|
||||
auto b = bottleneck(network, weightMap, *y1, c_, c_, shortcut, g, 1.0, lname + ".m." + std::to_string(i));
|
||||
y1 = b->getOutput(0);
|
||||
}
|
||||
|
||||
ITensor* inputTensors[] = { y1, cv2->getOutput(0) };
|
||||
auto cat = network->addConcatenation(inputTensors, 2);
|
||||
|
||||
auto cv3 = convBlock(network, weightMap, *cat->getOutput(0), c2, 1, 1, 1, lname + ".cv3");
|
||||
return cv3;
|
||||
}
|
||||
|
||||
ILayer* SPP(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int k1, int k2, int k3, std::string lname) {
|
||||
int c_ = c1 / 2;
|
||||
auto cv1 = convBlock(network, weightMap, input, c_, 1, 1, 1, lname + ".cv1");
|
||||
|
||||
auto pool1 = network->addPoolingNd(*cv1->getOutput(0), PoolingType::kMAX, DimsHW{ k1, k1 });
|
||||
pool1->setPaddingNd(DimsHW{ k1 / 2, k1 / 2 });
|
||||
pool1->setStrideNd(DimsHW{ 1, 1 });
|
||||
auto pool2 = network->addPoolingNd(*cv1->getOutput(0), PoolingType::kMAX, DimsHW{ k2, k2 });
|
||||
pool2->setPaddingNd(DimsHW{ k2 / 2, k2 / 2 });
|
||||
pool2->setStrideNd(DimsHW{ 1, 1 });
|
||||
auto pool3 = network->addPoolingNd(*cv1->getOutput(0), PoolingType::kMAX, DimsHW{ k3, k3 });
|
||||
pool3->setPaddingNd(DimsHW{ k3 / 2, k3 / 2 });
|
||||
pool3->setStrideNd(DimsHW{ 1, 1 });
|
||||
|
||||
ITensor* inputTensors[] = { cv1->getOutput(0), pool1->getOutput(0), pool2->getOutput(0), pool3->getOutput(0) };
|
||||
auto cat = network->addConcatenation(inputTensors, 4);
|
||||
|
||||
auto cv2 = convBlock(network, weightMap, *cat->getOutput(0), c2, 1, 1, 1, lname + ".cv2");
|
||||
return cv2;
|
||||
}
|
||||
|
||||
ILayer* SPPF(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, ITensor& input, int c1, int c2, int k, std::string lname) {
|
||||
int c_ = c1 / 2;
|
||||
auto cv1 = convBlock(network, weightMap, input, c_, 1, 1, 1, lname + ".cv1");
|
||||
|
||||
auto pool1 = network->addPoolingNd(*cv1->getOutput(0), PoolingType::kMAX, DimsHW{ k, k });
|
||||
pool1->setPaddingNd(DimsHW{ k / 2, k / 2 });
|
||||
pool1->setStrideNd(DimsHW{ 1, 1 });
|
||||
auto pool2 = network->addPoolingNd(*pool1->getOutput(0), PoolingType::kMAX, DimsHW{ k, k });
|
||||
pool2->setPaddingNd(DimsHW{ k / 2, k / 2 });
|
||||
pool2->setStrideNd(DimsHW{ 1, 1 });
|
||||
auto pool3 = network->addPoolingNd(*pool2->getOutput(0), PoolingType::kMAX, DimsHW{ k, k });
|
||||
pool3->setPaddingNd(DimsHW{ k / 2, k / 2 });
|
||||
pool3->setStrideNd(DimsHW{ 1, 1 });
|
||||
ITensor* inputTensors[] = { cv1->getOutput(0), pool1->getOutput(0), pool2->getOutput(0), pool3->getOutput(0) };
|
||||
auto cat = network->addConcatenation(inputTensors, 4);
|
||||
auto cv2 = convBlock(network, weightMap, *cat->getOutput(0), c2, 1, 1, 1, lname + ".cv2");
|
||||
return cv2;
|
||||
}
|
||||
|
||||
std::vector<std::vector<float>> getAnchors(std::map<std::string, Weights>& weightMap, std::string lname) {
|
||||
std::vector<std::vector<float>> anchors;
|
||||
Weights wts = weightMap[lname + ".anchor_grid"];
|
||||
int anchor_len = Yolo::CHECK_COUNT * 2;
|
||||
for (int i = 0; i < wts.count / anchor_len; i++) {
|
||||
auto *p = (const float*)wts.values + i * anchor_len;
|
||||
std::vector<float> anchor(p, p + anchor_len);
|
||||
anchors.push_back(anchor);
|
||||
}
|
||||
return anchors;
|
||||
}
|
||||
|
||||
IPluginV2Layer* addYoLoLayer(INetworkDefinition *network, std::map<std::string, Weights>& weightMap, std::string lname, std::vector<IConvolutionLayer*> dets) {
|
||||
auto creator = getPluginRegistry()->getPluginCreator("YoloLayer_TRT", "1");
|
||||
auto anchors = getAnchors(weightMap, lname);
|
||||
PluginField plugin_fields[2];
|
||||
int netinfo[4] = {Yolo::CLASS_NUM, Yolo::INPUT_W, Yolo::INPUT_H, Yolo::MAX_OUTPUT_BBOX_COUNT};
|
||||
plugin_fields[0].data = netinfo;
|
||||
plugin_fields[0].length = 4;
|
||||
plugin_fields[0].name = "netinfo";
|
||||
plugin_fields[0].type = PluginFieldType::kFLOAT32;
|
||||
int scale = 8;
|
||||
std::vector<Yolo::YoloKernel> kernels;
|
||||
for (size_t i = 0; i < anchors.size(); i++) {
|
||||
Yolo::YoloKernel kernel;
|
||||
kernel.width = Yolo::INPUT_W / scale;
|
||||
kernel.height = Yolo::INPUT_H / scale;
|
||||
memcpy(kernel.anchors, &anchors[i][0], anchors[i].size() * sizeof(float));
|
||||
kernels.push_back(kernel);
|
||||
scale *= 2;
|
||||
}
|
||||
plugin_fields[1].data = &kernels[0];
|
||||
plugin_fields[1].length = kernels.size();
|
||||
plugin_fields[1].name = "kernels";
|
||||
plugin_fields[1].type = PluginFieldType::kFLOAT32;
|
||||
PluginFieldCollection plugin_data;
|
||||
plugin_data.nbFields = 2;
|
||||
plugin_data.fields = plugin_fields;
|
||||
IPluginV2 *plugin_obj = creator->createPlugin("yololayer", &plugin_data);
|
||||
std::vector<ITensor*> input_tensors;
|
||||
for (auto det: dets) {
|
||||
input_tensors.push_back(det->getOutput(0));
|
||||
}
|
||||
auto yolo = network->addPluginV2(&input_tensors[0], input_tensors.size(), *plugin_obj);
|
||||
return yolo;
|
||||
}
|
||||
#endif
|
||||
|
||||
2289
commondata.cpp
Normal file
2289
commondata.cpp
Normal file
File diff suppressed because it is too large
Load Diff
2079
commondata.cpp.old
Normal file
2079
commondata.cpp.old
Normal file
File diff suppressed because it is too large
Load Diff
375
commondata.h
Normal file
375
commondata.h
Normal file
@ -0,0 +1,375 @@
|
||||
#ifndef COMMONDATA_H
|
||||
#define COMMONDATA_H
|
||||
|
||||
#include "common.h"
|
||||
#include "sdcmworklist.h"
|
||||
#include "sdcmfindscudatacallback.h"
|
||||
#include "qrtspthread.h"
|
||||
#include "sthreadimagesave.h"
|
||||
#include "sthreadsenddicom.h"
|
||||
#include "sthreadworklistsearch.h"
|
||||
#include "stableheader.h"
|
||||
#include "sdatabase.h"
|
||||
using namespace SUTIL;
|
||||
|
||||
#include "sambaclient.h"
|
||||
|
||||
#include "acquisition_info.h"
|
||||
|
||||
#include <QMutex>
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
#define WRITE_FUNCTION_LOG() { QString strLog; strLog = QString("[%1] %2:%3,%4\n").arg(QTime::currentTime().toString("HH:mm:ss")).arg(__FILE__).arg(__LINE__).arg(__FUNCTION__); MainWindow::GetCommonData()->WriteLog(strLog);}
|
||||
#define WRITE_FUNCTION_LOG_PARAM(X) { QString strLog; strLog = QString("[%1] %2:%3,%4(%5)\n").arg(QTime::currentTime().toString("HH:mm:ss")).arg(__FILE__).arg(__LINE__).arg(__FUNCTION__).arg(X); MainWindow::GetCommonData()->WriteLog(strLog);}
|
||||
|
||||
class CommonData
|
||||
{
|
||||
public:
|
||||
CommonData();
|
||||
virtual ~CommonData();
|
||||
|
||||
QString GetNewFilename(int nType);
|
||||
|
||||
static void RestartNetworkManager();
|
||||
|
||||
|
||||
|
||||
bool IsActiveDetect();
|
||||
void SetActiveDetect(bool bActive);
|
||||
|
||||
void Exit();
|
||||
|
||||
void SetSearchItemHistory(SEARCH_ITEM si);
|
||||
void SetHistorySearchStudyIndex(int nStudyIndex);
|
||||
|
||||
SEARCH_ITEM* GetSearchItemHistory();
|
||||
int GetHistorySearchStudyIndex();
|
||||
|
||||
void ClearHistorySearchItem();
|
||||
void ClearHistorySearchStudyIndex();
|
||||
|
||||
//void ReOpenDatabase();
|
||||
//SDatabase* GetDatabase();
|
||||
//void ReleaseDatabase();
|
||||
|
||||
ACQUISITION_INFO* GetAcquisitionInfo();
|
||||
void ReleaseAcquisitionInfo();
|
||||
|
||||
QDate GetDateSearchWorklistStart();
|
||||
QDate GetDateSearchWorklistEnd();
|
||||
|
||||
void SetDateSearchWorklistStart(QDate date);
|
||||
void SetDateSearchWorklistEnd(QDate date);
|
||||
|
||||
QString GetStorageDirectory();
|
||||
|
||||
|
||||
QDate GetDateSearchHistoryStart();
|
||||
QDate GetDateSearchHistoryEnd();
|
||||
|
||||
void SetDateSearchHistoryStart(QDate date);
|
||||
void SetDateSearchHistoryEnd(QDate date);
|
||||
|
||||
SEARCH_ITEM* GetSearchItemWorklist();
|
||||
|
||||
SDCMFindSCUDataCallback* GetFindSCUDataCallback();
|
||||
vector<WorklistResponseData>* GetWorklistData();
|
||||
void ReleaseWorklistData();
|
||||
vector<CSDCM*>* GetWorklistDump();
|
||||
|
||||
void SetRTSPThread(QRTSPThread* pThread);
|
||||
QRTSPThread* GetThreadRTSP();
|
||||
|
||||
void SetThreadCaptureImage(SThreadImageSave* pThread);
|
||||
void SetThreadSendDICOM(SThreadSendDICOM* pThread);
|
||||
void SetThreadWorklistSearch(SThreadWorklistSearch* pThread);
|
||||
SThreadImageSave* GetThreadCaptureImage();
|
||||
SThreadSendDICOM* GetThreadSendDICOM();
|
||||
SThreadWorklistSearch* GetThreadWorklistSearch();
|
||||
|
||||
|
||||
vector<ImageSelect*>* GetListHistoryImage();
|
||||
void ReleaseListHistoryImage();
|
||||
void ClearHistoryImage();
|
||||
|
||||
vector<CAPTURE_IMAGE*>* GetListCaptureImage();
|
||||
void ReleaseListCaptureImage();
|
||||
void ClearCaptureImage();
|
||||
CAPTURE_IMAGE* AddCaptureImage(uint8_t* pData, int nWidth, int nHeight, int nCaptureType);
|
||||
bool ConvertCaptureImage(CAPTURE_IMAGE* pCaptureImage, int nWidth, int nHeight);
|
||||
void ConvertCaptureImageRGBA(CAPTURE_IMAGE* pCaptureImage, int nWidth, int nHeight);
|
||||
|
||||
uint8_t* ConvertColor(uint8_t* pData, int nWidth, int nHeight);
|
||||
|
||||
void ConvertColor2(uint8_t* pSrcData, uint8_t* pDestData, int nOffsetX, int nOffsetY, int nWidth, int nHeight);
|
||||
|
||||
void AddCaptureImageWithHistory();
|
||||
void AddCaptureImageWithHistory_v1();
|
||||
|
||||
vector<HISTORY_STUDY*>* GetHistorySearchResult();
|
||||
void ClearHistorySearchResult();
|
||||
HISTORY_STUDY* GetCurrentHistoryStudy();
|
||||
void ReleaseCurrentHistoryStudy();
|
||||
void SetCurrentHistoryStudy(int nIndex);
|
||||
|
||||
void InitWorklistIndex();
|
||||
void UpdateWorklistIndex();
|
||||
|
||||
void InitHistoryIndex();
|
||||
void UpdateHistoryIndex();
|
||||
|
||||
|
||||
bool IsEncodingVideo();
|
||||
void SetEncodingVideo(bool bEncoding);
|
||||
|
||||
STableHeader* GetWorklistTableHeader();
|
||||
STableHeader* GetHistoryTableHeader();
|
||||
|
||||
int GetDisplayType();
|
||||
void SetDisplayType(int nType);
|
||||
|
||||
SDCMWorklist* GetWorklistClass();
|
||||
|
||||
SDCM_SERVER_INFO* GetServerWorklistInfo();
|
||||
void ReleaseServerWorklistInfo();
|
||||
|
||||
SDCM_SERVER_INFO* GetServerStorageInfo();
|
||||
void ReleaseServerStorageInfo();
|
||||
|
||||
|
||||
void UpdateSetting();
|
||||
void UpdateAdvancedSetting();
|
||||
void InitSetting();
|
||||
|
||||
QString GetModality();
|
||||
QString GetInstitutionName();
|
||||
QString GetStationName();
|
||||
int GetTransferSyntax();
|
||||
|
||||
void SetModality(QString strModality);
|
||||
void SetInstitutionName(QString strInstitutionName);
|
||||
void SetStationName(QString strStationName);
|
||||
void SetTransferSyntax(int nTransferSyntax);
|
||||
|
||||
bool GetEnableLog();
|
||||
QString GetLocalImageFolder();
|
||||
QString GetLogFolder();
|
||||
QString GetLocalHistoryFolder();
|
||||
|
||||
void SetEnableLog(int bEnable);
|
||||
void SetLocalImageFolder(QString strLocalImageFolder);
|
||||
void SetLogFolder(QString strLogFolder);
|
||||
void SetLocalHistoryFolder(QString strLocalHistoryFolder);
|
||||
|
||||
void Beep(bool bSound);
|
||||
|
||||
WorklistResponseData GetCurrentHistoryWorklistData();
|
||||
|
||||
WorklistResponseData GetCurrentWorklistData();
|
||||
void ReleaseCurrentWorklistData();
|
||||
|
||||
qint64 ComputeStorageSize();
|
||||
|
||||
int GetStorageSize();
|
||||
int GetStorageFreeSize();
|
||||
|
||||
vector<QString>* GetExportList();
|
||||
|
||||
QString* GetExternalDiskPath();
|
||||
|
||||
QString* GetImageExtension();
|
||||
|
||||
bool IsCapturing();
|
||||
|
||||
int GetHandSwitchValue();
|
||||
|
||||
bool IsAutoCloseSendFinish();
|
||||
void SetAutoCloseSendComplete(bool bEnable);
|
||||
|
||||
QString GetBeepGPIONumber();
|
||||
QString GetHandswitchGPIONumber();
|
||||
|
||||
void SetUseNetworkBackupVideo(bool bUse);
|
||||
bool IsUseNetworkBackupVideo();
|
||||
|
||||
NetworkShareInfo* GetNetworkShareInfo();
|
||||
|
||||
bool IsAutoExitCaptureSendDICOM();
|
||||
bool IsAutoCaptureSendDICOM();
|
||||
bool IsAutoVideoCapture();
|
||||
bool IsAutoLogin();
|
||||
|
||||
void SetAutoExitCaptureSendDICOM(bool bEnable);
|
||||
void SetAutoCaptureSendDICOM(bool bEnable);
|
||||
void SetAutoVideoCapture(bool bEnable);
|
||||
void SetAutoLogin(bool bEnable);
|
||||
|
||||
SambaClient* GetSambaClient();
|
||||
|
||||
void CreateSambaClient();
|
||||
|
||||
QString GetDICOMCharacterSet();
|
||||
void SetDICOMCharacterSet(QString strCharacterSet);
|
||||
|
||||
void WriteLog(QString strLog);
|
||||
QStringList* GetListLog();
|
||||
void ReleaseListLog();
|
||||
|
||||
void WriteLogFile(QString strLog);
|
||||
|
||||
void SetVideoMode(int nMode);
|
||||
int GetVideoMode();
|
||||
|
||||
void SetCropMode(int bCropMode);
|
||||
int GetCropMode();
|
||||
|
||||
void SetUseFixWidthLevel(int bFixWidthLevel);
|
||||
int GetUseFixWidthLevel();
|
||||
|
||||
void SetScreenSaverTime(int nMinutes);
|
||||
int GetScreenSaverTime();
|
||||
|
||||
void SetLogLevel(int nLevel);
|
||||
int GetLogLevel();
|
||||
|
||||
void SetUseUSBBackup(int nUSBBackup);
|
||||
int IsUseUSBBackup();
|
||||
|
||||
int GetVideoWidth();
|
||||
int GetVideoHeight();
|
||||
|
||||
void MakeBitmapHeader(int nWidth, int nHeight);
|
||||
bool WriteBitmapFile(QString strFile, QImage* pImage);
|
||||
bool WriteBitmapFile(QString strFile, uint8_t* pData, int nWidth, int nHeight);
|
||||
|
||||
bool WriteJPEG(QString strFile, uint8_t* pData, int nWidth, int nHeight, int nQualilty);
|
||||
|
||||
|
||||
void SetConnectHDMI(bool bConnect);
|
||||
bool IsConnectHDMI();
|
||||
|
||||
void GetSearchDateStartEnd(int nSearchDurationType, QDate& nDateStart, QDate& nDateEnd);
|
||||
|
||||
void SetUseWebDisplay(bool bUse);
|
||||
bool IsUseWebDisplay();
|
||||
|
||||
protected:
|
||||
|
||||
QStringList m_ListLog;
|
||||
|
||||
bool m_bConnectHDMI;
|
||||
|
||||
int m_nScreenSaverTime;
|
||||
|
||||
uint8_t* m_pBitmapData;
|
||||
|
||||
BITMAPFILEHADER m_bf;
|
||||
BITMAPINFOHEADER m_bi;
|
||||
|
||||
int m_nVideoWidth;
|
||||
int m_nVideoHeight;
|
||||
|
||||
QFile* m_pLogFile;
|
||||
|
||||
QString m_strDICOMCharacterSet;
|
||||
SambaClient* m_pSambaClient;
|
||||
NetworkShareInfo m_NetworkShareInfo;
|
||||
bool m_bActiveDetect;
|
||||
QString m_strGPIOBeep;
|
||||
QString m_strGPIOHandSwitch;
|
||||
bool m_bIsCapturing;
|
||||
QString m_strImageExtension;
|
||||
QString m_strExternalDiskPath;
|
||||
int m_nGPIO_Buzzer;
|
||||
int m_nGPIO_HandSwitch;
|
||||
|
||||
bool m_bAutoExitCaptureSendDICOM;
|
||||
bool m_bAutoCaptureSendDICOM;
|
||||
bool m_bAutoVideoCapture;
|
||||
bool m_bAutoLogin;
|
||||
|
||||
int m_nVideoMode;
|
||||
|
||||
int m_nCropMode;
|
||||
|
||||
int m_nUseFixWidthLevel;
|
||||
|
||||
int m_nUseLogLevel;
|
||||
|
||||
bool m_bAutoCloseSendFinish;
|
||||
|
||||
bool m_bEnableLog;
|
||||
int m_nUseUSBBackup;
|
||||
QString m_strLocalImageFolder;
|
||||
QString m_strLogFolder;
|
||||
QString m_strLocalHistoryFolder;
|
||||
QString m_strModality;
|
||||
QString m_strInstitutionName;
|
||||
QString m_strStationName;
|
||||
int m_nTransferSyntax;
|
||||
SDCM_SERVER_INFO m_ServerWorklistInfo;
|
||||
SDCM_SERVER_INFO m_ServerStorageInfo;
|
||||
int m_nDisplayType;
|
||||
STableHeader* m_pWorklistTableHeader;
|
||||
STableHeader* m_pHistoryTableHeader;
|
||||
//SDatabase* m_pDatabase;
|
||||
ACQUISITION_INFO m_AcquisitionInfo;
|
||||
|
||||
SThreadImageSave* m_pThreadCaptureImage;
|
||||
SThreadSendDICOM* m_pThreadSendDICOM;
|
||||
SThreadWorklistSearch* m_pThreadWorklistSearch;
|
||||
QRTSPThread* m_pRTSPThread;
|
||||
|
||||
QString m_strStorageDirectory;
|
||||
|
||||
SearchDate m_SearchDateWorklist;
|
||||
SearchDate m_SearchDateHistory;
|
||||
|
||||
SEARCH_ITEM m_SearchItemWorklist;
|
||||
SEARCH_ITEM m_SearchItemHistory;
|
||||
|
||||
int m_nSearchItemHistoryStudyIndex;
|
||||
|
||||
SDCMWorklist* m_pDCMWorklist;
|
||||
SDCMFindSCUDataCallback* m_pFindSCUDataCallback;
|
||||
vector<WorklistResponseData>* m_pWorklistData;
|
||||
vector<CSDCM*>* m_pDCMDumpList;
|
||||
WorklistResponseData* m_pCurrentWorklist;
|
||||
|
||||
vector<CAPTURE_IMAGE*>* m_pListCaptureImage;
|
||||
RGB_Data* m_pImageCapture;
|
||||
|
||||
vector<ImageSelect*>* m_pListHistoryImage;
|
||||
|
||||
|
||||
vector<HISTORY_STUDY*>* m_pListHistorySearch;
|
||||
HISTORY_STUDY* m_pCurrentHistoryStudy;
|
||||
|
||||
bool m_bVideoEncoding;
|
||||
|
||||
bool m_bUseWebDisplay;
|
||||
|
||||
|
||||
qint64 m_nStorageSize;
|
||||
|
||||
qint64 m_nStorageFreeSize;
|
||||
|
||||
vector<QString> m_ListExport;
|
||||
|
||||
QMutex m_LockAddCapture;
|
||||
QMutex m_LockAddHistory;
|
||||
QMutex m_LockLog;
|
||||
QMutex m_LockAcquisitionInfo;
|
||||
QMutex m_LockCurrentHistoryStudy;
|
||||
QMutex m_LockWorklistData;
|
||||
QMutex m_LockDatabase;
|
||||
|
||||
QMutex m_LockServerWorklistInfo;
|
||||
QMutex m_LockServerStorageInfo;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // COMMONDATA_H
|
||||
104
cscallbacksendprogress.cpp
Normal file
104
cscallbacksendprogress.cpp
Normal file
@ -0,0 +1,104 @@
|
||||
#include "cscallbacksendprogress.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
CSCallbackSendProgress::CSCallbackSendProgress()
|
||||
{
|
||||
m_nCount = 0;
|
||||
m_nPrevBytes = 1;
|
||||
m_bExitSend = false;
|
||||
}
|
||||
|
||||
CSCallbackSendProgress::~CSCallbackSendProgress()
|
||||
{
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::ProgressInfo(int nState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::ProgressError(int nState)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::ProgressComplete()
|
||||
{
|
||||
if(m_bExecBackground==true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
pMainWindow->UpdateSendComplete();
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::ProgressState(int nProgressBytes, int nTotalBytes)
|
||||
{
|
||||
if(m_bExecBackground==true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
//qDebug() << nProgressBytes << ", " << nTotalBytes;
|
||||
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
|
||||
if(nProgressBytes<m_nPrevBytes)
|
||||
{
|
||||
m_nCount++;
|
||||
pMainWindow->UpdateSendInfo(m_nCount, m_nTotalCount);
|
||||
}
|
||||
|
||||
m_nPrevBytes = nProgressBytes;
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::SetTotalCount(int nCount)
|
||||
{
|
||||
m_nTotalCount = nCount;
|
||||
}
|
||||
|
||||
|
||||
void CSCallbackSendProgress::ProgressDICOMMake(int nCurrentFile, int nTotalFile)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::SetExecBackground(bool bExecBackground)
|
||||
{
|
||||
m_bExecBackground = bExecBackground;
|
||||
}
|
||||
|
||||
|
||||
void CSCallbackSendProgress::SetExitSend(bool bExitSend)
|
||||
{
|
||||
m_Lock.lock();
|
||||
{
|
||||
m_bExitSend = bExitSend;
|
||||
}
|
||||
m_Lock.unlock();
|
||||
|
||||
}
|
||||
|
||||
bool CSCallbackSendProgress::IsExitSend()
|
||||
{
|
||||
bool bExitSend;
|
||||
m_Lock.lock();
|
||||
{
|
||||
bExitSend = m_bExitSend;
|
||||
}
|
||||
m_Lock.unlock();
|
||||
return bExitSend;
|
||||
}
|
||||
|
||||
void CSCallbackSendProgress::Clear()
|
||||
{
|
||||
CSCallback::Clear();
|
||||
|
||||
m_nCount = 0;
|
||||
m_nPrevBytes = 1;
|
||||
|
||||
SetExitSend(false);
|
||||
|
||||
}
|
||||
42
cscallbacksendprogress.h
Normal file
42
cscallbacksendprogress.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef CSCALLBACKSENDPROGRESS_H
|
||||
#define CSCALLBACKSENDPROGRESS_H
|
||||
|
||||
#include "SCallback.h"
|
||||
|
||||
#include <QMutex>
|
||||
|
||||
class CSCallbackSendProgress : public CSCallback
|
||||
{
|
||||
public:
|
||||
CSCallbackSendProgress();
|
||||
virtual ~CSCallbackSendProgress();
|
||||
|
||||
virtual void ProgressInfo(int nState);
|
||||
virtual void ProgressError(int nState);
|
||||
virtual void ProgressComplete();
|
||||
|
||||
virtual void ProgressState(int nProgressBytes, int nTotalBytes);
|
||||
|
||||
virtual void ProgressDICOMMake(int nCurrentFile, int nTotalFile);
|
||||
|
||||
void SetTotalCount(int nCount);
|
||||
|
||||
void SetExecBackground(bool bExecBackground);
|
||||
|
||||
void SetExitSend(bool bExitSend);
|
||||
bool IsExitSend();
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
protected:
|
||||
int m_nPrevBytes;
|
||||
int m_nCount;
|
||||
int m_nTotalCount;
|
||||
|
||||
bool m_bExecBackground;
|
||||
|
||||
QMutex m_Lock;
|
||||
bool m_bExitSend;
|
||||
};
|
||||
|
||||
#endif // CSCALLBACKSENDPROGRESS_H
|
||||
57
csdcm.cpp
Normal file
57
csdcm.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
#include "csdcm.h"
|
||||
|
||||
CSDCM::CSDCM()
|
||||
{
|
||||
m_pListTag = new map<DcmTagKey, OFString>;
|
||||
m_pListChild = new map<DcmTagKey, CSDCM*>;
|
||||
|
||||
m_DcmTagKey = DcmTagKey(0000, 0000);
|
||||
}
|
||||
|
||||
CSDCM::CSDCM(DcmTagKey nKey)
|
||||
{
|
||||
m_pListTag = new map<DcmTagKey, OFString>;
|
||||
m_pListChild = new map<DcmTagKey, CSDCM*>;
|
||||
|
||||
m_DcmTagKey = nKey;
|
||||
}
|
||||
|
||||
CSDCM::~CSDCM()
|
||||
{
|
||||
m_pListTag->clear();
|
||||
delete m_pListTag;
|
||||
m_pListTag = NULL;
|
||||
|
||||
if(m_pListChild!=NULL)
|
||||
{
|
||||
map<DcmTagKey, CSDCM*>::iterator it;
|
||||
for(it=m_pListChild->begin() ; it!=m_pListChild->end() ; ++it)
|
||||
{
|
||||
|
||||
delete (it->second);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CSDCM::InsertTagValue(DcmTagKey nKey, OFString& strData)
|
||||
{
|
||||
map<DcmTagKey, OFString>::iterator it = m_pListTag->find(nKey);
|
||||
if(it->first!=nKey)
|
||||
{
|
||||
m_pListTag->insert({ nKey, strData });
|
||||
}
|
||||
}
|
||||
|
||||
map<DcmTagKey, CSDCM*>* CSDCM::GetSequenceList()
|
||||
{
|
||||
return m_pListChild;
|
||||
}
|
||||
|
||||
CSDCM* CSDCM::InsertSequence(DcmTagKey nKey)
|
||||
{
|
||||
CSDCM* pChild = new CSDCM(nKey);
|
||||
m_pListChild->insert({nKey, pChild});
|
||||
|
||||
return pChild;
|
||||
}
|
||||
34
csdcm.h
Normal file
34
csdcm.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef CSDCM_H
|
||||
#define CSDCM_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "dcmtk/dcmdata/dctag.h"
|
||||
#include "dcmtk/dcmdata/dctagkey.h"
|
||||
#include "dcmtk/ofstd/ofstring.h"
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
class CSDCM
|
||||
{
|
||||
public:
|
||||
CSDCM();
|
||||
CSDCM(DcmTagKey nKey);
|
||||
virtual ~CSDCM();
|
||||
|
||||
map<DcmTagKey, CSDCM*>* GetSequenceList();
|
||||
|
||||
void InsertTagValue(DcmTagKey nKey, OFString& strData);
|
||||
|
||||
CSDCM* InsertSequence(DcmTagKey nKey);
|
||||
|
||||
protected:
|
||||
map<DcmTagKey, OFString>* m_pListTag;
|
||||
map<DcmTagKey, CSDCM*>* m_pListChild;
|
||||
|
||||
DcmTagKey m_DcmTagKey;
|
||||
};
|
||||
|
||||
#endif // CSDCM_H
|
||||
18
cuda_utils.h
Normal file
18
cuda_utils.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef TRTX_CUDA_UTILS_H_
|
||||
#define TRTX_CUDA_UTILS_H_
|
||||
|
||||
#include <cuda_runtime_api.h>
|
||||
|
||||
#ifndef CUDA_CHECK
|
||||
#define CUDA_CHECK(callstr)\
|
||||
{\
|
||||
cudaError_t error_code = callstr;\
|
||||
if (error_code != cudaSuccess) {\
|
||||
std::cerr << "CUDA error " << error_code << " at " << __FILE__ << ":" << __LINE__;\
|
||||
assert(0);\
|
||||
}\
|
||||
}
|
||||
#endif // CUDA_CHECK
|
||||
|
||||
#endif // TRTX_CUDA_UTILS_H_
|
||||
|
||||
196
dialogadvancedsetting.cpp
Normal file
196
dialogadvancedsetting.cpp
Normal file
@ -0,0 +1,196 @@
|
||||
#include "dialogadvancedsetting.h"
|
||||
#include "ui_dialogadvancedsetting.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogAdvancedSetting::DialogAdvancedSetting(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogAdvancedSetting)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->comboBox_DICOM_CharacterSet->addItem("EUC-KR");
|
||||
ui->comboBox_DICOM_CharacterSet->addItem("UTF-8");
|
||||
ui->comboBox_DICOM_CharacterSet->addItem("ASCII");
|
||||
|
||||
ui->comboBox_ScreenSaver->addItem("None");
|
||||
ui->comboBox_ScreenSaver->addItem("1");
|
||||
ui->comboBox_ScreenSaver->addItem("2");
|
||||
ui->comboBox_ScreenSaver->addItem("5");
|
||||
ui->comboBox_ScreenSaver->addItem("10");
|
||||
ui->comboBox_ScreenSaver->addItem("60");
|
||||
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
bool bIsAutoVideoCapture = pCommonData->IsAutoVideoCapture();
|
||||
bool bIsAutoCaptureSendDICOM = pCommonData->IsAutoCaptureSendDICOM();
|
||||
bool bIsAutoExitCaptureSendDICOM = pCommonData->IsAutoExitCaptureSendDICOM();
|
||||
bool bIsAutoCloseSendFinish = pCommonData->IsAutoCloseSendFinish();
|
||||
bool bIsAutoLogin = pCommonData->IsAutoLogin();
|
||||
bool bIsCropMode = (bool)pCommonData->GetCropMode();
|
||||
bool bIsUseFixWidthLevel = (bool)pCommonData->GetUseFixWidthLevel();
|
||||
bool bIsUseLogLevel = false;
|
||||
bool bIsUseUSBBackup = (bool)pCommonData->IsUseUSBBackup();
|
||||
int nScreenSaverTime = pCommonData->GetScreenSaverTime();
|
||||
if(pCommonData->GetLogLevel()>0)
|
||||
{
|
||||
bIsUseLogLevel = true;
|
||||
}
|
||||
QString strDICOMCharacterSet = pCommonData->GetDICOMCharacterSet();
|
||||
|
||||
ui->checkBox_AutoVideoCapture->setChecked(bIsAutoVideoCapture);
|
||||
ui->checkBox_AutoCaptureSendDICOM->setChecked(bIsAutoCaptureSendDICOM);
|
||||
ui->checkBox_AutoExitCaptureSendDICOM->setChecked(bIsAutoExitCaptureSendDICOM);
|
||||
ui->checkBox_AutoCloseSendFinish->setChecked(bIsAutoCloseSendFinish);
|
||||
ui->checkBox_AutoLogin->setChecked(bIsAutoLogin);
|
||||
ui->checkBox_Crop->setChecked(bIsCropMode);
|
||||
ui->checkBox_FixWidthLevel->setChecked(bIsUseFixWidthLevel);
|
||||
ui->checkBox_LogLevel->setChecked(bIsUseLogLevel);
|
||||
ui->checkBox_UsbBackup->setChecked(bIsUseUSBBackup);
|
||||
|
||||
|
||||
ui->comboBox_DICOM_CharacterSet->setCurrentText(strDICOMCharacterSet);
|
||||
|
||||
switch(nScreenSaverTime)
|
||||
{
|
||||
case 0:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(0);
|
||||
break;
|
||||
case 1:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(1);
|
||||
break;
|
||||
case 2:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(2);
|
||||
break;
|
||||
case 5:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(3);
|
||||
break;
|
||||
case 10:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(4);
|
||||
break;
|
||||
case 60:
|
||||
ui->comboBox_ScreenSaver->setCurrentIndex(5);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
DialogAdvancedSetting::~DialogAdvancedSetting()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogAdvancedSetting::on_comboBox_DICOM_CharacterSet_currentIndexChanged(const QString &arg1)
|
||||
{
|
||||
m_strCharacterSet = arg1;
|
||||
}
|
||||
|
||||
QString DialogAdvancedSetting::GetDICOM_CharacterSet()
|
||||
{
|
||||
return m_strCharacterSet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
bool DialogAdvancedSetting::IsAutoVideoCapture()
|
||||
{
|
||||
return ui->checkBox_AutoVideoCapture->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsAutoCaptureSendDICOM()
|
||||
{
|
||||
return ui->checkBox_AutoCaptureSendDICOM->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsAutoExitCaptureSendDICOM()
|
||||
{
|
||||
return ui->checkBox_AutoExitCaptureSendDICOM->isChecked();
|
||||
}
|
||||
|
||||
void DialogAdvancedSetting::on_pushButton_Save_clicked()
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogAdvancedSetting::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsAutoCloseSendFinish()
|
||||
{
|
||||
return ui->checkBox_AutoCloseSendFinish->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsAutoLogin()
|
||||
{
|
||||
return ui->checkBox_AutoLogin->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsCropMode()
|
||||
{
|
||||
return ui->checkBox_Crop->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsUseFixWidthLevel()
|
||||
{
|
||||
return ui->checkBox_FixWidthLevel->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsUseLogLevel()
|
||||
{
|
||||
return ui->checkBox_LogLevel->isChecked();
|
||||
}
|
||||
|
||||
bool DialogAdvancedSetting::IsUseUSBBackup()
|
||||
{
|
||||
return ui->checkBox_UsbBackup->isChecked();
|
||||
}
|
||||
|
||||
int DialogAdvancedSetting::GetScreenSaverTime()
|
||||
{
|
||||
int nTime = 0;
|
||||
|
||||
int nItem = ui->comboBox_ScreenSaver->currentIndex();
|
||||
|
||||
//ui->comboBox_ScreenSaver->addItem("None");
|
||||
//ui->comboBox_ScreenSaver->addItem("1");
|
||||
//ui->comboBox_ScreenSaver->addItem("2");
|
||||
//ui->comboBox_ScreenSaver->addItem("5");
|
||||
//ui->comboBox_ScreenSaver->addItem("10");
|
||||
//ui->comboBox_ScreenSaver->addItem("60");
|
||||
|
||||
switch(nItem)
|
||||
{
|
||||
case 0:
|
||||
nTime = 0;
|
||||
break;
|
||||
case 1:
|
||||
nTime = 1;
|
||||
break;
|
||||
case 2:
|
||||
nTime = 2;
|
||||
break;
|
||||
case 3:
|
||||
nTime = 5;
|
||||
break;
|
||||
case 4:
|
||||
nTime = 10;
|
||||
break;
|
||||
case 5:
|
||||
nTime = 60;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return nTime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
45
dialogadvancedsetting.h
Normal file
45
dialogadvancedsetting.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef DIALOGADVANCEDSETTING_H
|
||||
#define DIALOGADVANCEDSETTING_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogAdvancedSetting;
|
||||
}
|
||||
|
||||
class DialogAdvancedSetting : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogAdvancedSetting(QWidget *parent = nullptr);
|
||||
~DialogAdvancedSetting();
|
||||
|
||||
bool IsAutoVideoCapture();
|
||||
bool IsAutoCaptureSendDICOM();
|
||||
bool IsAutoExitCaptureSendDICOM();
|
||||
bool IsAutoCloseSendFinish();
|
||||
bool IsAutoLogin();
|
||||
bool IsCropMode();
|
||||
bool IsUseFixWidthLevel();
|
||||
bool IsUseLogLevel();
|
||||
bool IsUseUSBBackup();
|
||||
|
||||
int GetScreenSaverTime();
|
||||
|
||||
QString GetDICOM_CharacterSet();
|
||||
|
||||
protected:
|
||||
QString m_strCharacterSet;
|
||||
|
||||
private slots:
|
||||
void on_comboBox_DICOM_CharacterSet_currentIndexChanged(const QString &arg1);
|
||||
|
||||
void on_pushButton_Save_clicked();
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogAdvancedSetting *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGADVANCEDSETTING_H
|
||||
760
dialogadvancedsetting.ui
Normal file
760
dialogadvancedsetting.ui
Normal file
@ -0,0 +1,760 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogAdvancedSetting</class>
|
||||
<widget class="QDialog" name="DialogAdvancedSetting">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>725</width>
|
||||
<height>487</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Save">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>430</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #d0d0d0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
color: #202020;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>430</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}
|
||||
|
||||
QPushButton:disabled
|
||||
{
|
||||
background: #b4b4b4;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoLanguage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>30</y>
|
||||
<width>181</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DICOM CharacterSet</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_DICOM_CharacterSet">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
padding: 1px 18px 1px 3px;
|
||||
min-width: 6em;
|
||||
}
|
||||
|
||||
QComboBox:editable {
|
||||
background: white;
|
||||
}
|
||||
|
||||
QComboBox:!editable, QComboBox::drop-down:editable {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
|
||||
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
|
||||
}
|
||||
|
||||
/* QComboBox gets the "on" state when the popup is open */
|
||||
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
|
||||
stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
|
||||
}
|
||||
|
||||
QComboBox:on { /* shift the text when the popup opens */
|
||||
padding-top: 3px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: top right;
|
||||
width: 30px;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: darkgray;
|
||||
border-left-style: solid; /* just a single line */
|
||||
border-top-right-radius: 3px; /* same radius as the QComboBox */
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
border-image: url(://image/Arrow_under_3.png);
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:on { /* shift the arrow when popup is open */
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid darkgray;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox QListView::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
}
|
||||
|
||||
QComboBox::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
height: 40px;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox::item:selected
|
||||
{
|
||||
background: red;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoAutoSend">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>150</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Send on Capture</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoCaptureSendDICOM">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>150</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoAutoExitSend">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>200</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Send on Exit</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoExitCaptureSendDICOM">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>200</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoAutoVideoCapture">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>250</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Video Capture</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoVideoCapture">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>250</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoAutoCloseSendFinish">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>300</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Close Send Finish</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoCloseSendFinish">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>300</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoAutoLogin">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>350</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoLogin">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>350</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_Crop">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>150</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoCrop">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>150</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Crop</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Split">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>360</x>
|
||||
<y>140</y>
|
||||
<width>2</width>
|
||||
<height>271</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: black;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoFixWidthLevel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>200</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fix Width/Level</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_FixWidthLevel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>200</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_LogLevel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>250</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoLogLevel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>250</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use Log</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_ScreenSaver">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>510</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
padding: 1px 18px 1px 3px;
|
||||
min-width: 6em;
|
||||
}
|
||||
|
||||
QComboBox:editable {
|
||||
background: white;
|
||||
}
|
||||
|
||||
QComboBox:!editable, QComboBox::drop-down:editable {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
|
||||
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
|
||||
}
|
||||
|
||||
/* QComboBox gets the "on" state when the popup is open */
|
||||
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
|
||||
stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
|
||||
}
|
||||
|
||||
QComboBox:on { /* shift the text when the popup opens */
|
||||
padding-top: 3px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: top right;
|
||||
width: 30px;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: darkgray;
|
||||
border-left-style: solid; /* just a single line */
|
||||
border-top-right-radius: 3px; /* same radius as the QComboBox */
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
border-image: url(://image/Arrow_under_3.png);
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:on { /* shift the arrow when popup is open */
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid darkgray;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox QListView::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
}
|
||||
|
||||
QComboBox::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
height: 40px;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox::item:selected
|
||||
{
|
||||
background: red;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoScreenSaver">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>30</y>
|
||||
<width>111</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ScreenSaver</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoUsbBackup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>460</x>
|
||||
<y>300</y>
|
||||
<width>190</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USB Backup</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_UsbBackup">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>410</x>
|
||||
<y>300</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
446
dialogcalendar.cpp
Normal file
446
dialogcalendar.cpp
Normal file
@ -0,0 +1,446 @@
|
||||
#include "dialogcalendar.h"
|
||||
#include "ui_dialogcalendar.h"
|
||||
|
||||
#include <QShowEvent>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QScreen>
|
||||
#include <QGuiApplication>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
DialogCalendar::DialogCalendar(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogCalendar)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
//setWindowFlags(Qt::FramelessWindowHint);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->widget, SIGNAL(SetSearchDateUpdate(int)), parent, SLOT(SetSearchDateUpdate(int)));
|
||||
connect(ui->widget, SIGNAL(ExecuteClickDate()), this, SLOT(ExecuteClickDate()));
|
||||
|
||||
ui->verticalLayout->setSpacing(1);
|
||||
|
||||
QStringList strListText;
|
||||
/*
|
||||
strListText << "Today";
|
||||
strListText << "LAST 3 DAYS";
|
||||
strListText << "LAST WEEK";
|
||||
strListText << "LAST 2 WEEKS";
|
||||
strListText << "LAST MONTH";
|
||||
strListText << "LAST 6 MONTHS";
|
||||
strListText << "LAST YEAR";
|
||||
*/
|
||||
strListText << "Today";
|
||||
strListText << "LAST 3 DAYS";
|
||||
strListText << "LAST WEEK";
|
||||
strListText << "LAST 2 WEEKS";
|
||||
strListText << "LAST 3 WEEKS";
|
||||
strListText << "LAST MONTH";
|
||||
strListText << "LAST 2 MONTH";
|
||||
|
||||
int i=0;
|
||||
for(i=0 ; i<7 ; i++)
|
||||
{
|
||||
SCalendarMenuView* pItem = new SCalendarMenuView(this);
|
||||
pItem->SetData(i, strListText[i]);
|
||||
|
||||
ui->verticalLayout->addWidget(pItem);
|
||||
connect(pItem, SIGNAL(ExecuteMenu(int)), this, SLOT(ExecuteMenu(int)));
|
||||
|
||||
m_ListMenu.push_back(pItem);
|
||||
}
|
||||
|
||||
m_ListMonthName << "January" << "Februry" << "March" << "April" << "May" << "June" << "July" << "August" << "September" << "October" << "November" << "December";
|
||||
|
||||
move(0, 0);
|
||||
|
||||
}
|
||||
|
||||
DialogCalendar::~DialogCalendar()
|
||||
{
|
||||
int i=0;
|
||||
for(i=0 ; i<7 ; i++)
|
||||
{
|
||||
SCalendarMenuView* pItem = m_ListMenu[i];
|
||||
if(pItem!=NULL)
|
||||
{
|
||||
disconnect(pItem, SIGNAL(ExecuteMenu(int)), this, SLOT(ExecuteMenu(int)));
|
||||
}
|
||||
|
||||
pItem->deleteLater();
|
||||
|
||||
}
|
||||
|
||||
m_ListMenu.clear();
|
||||
|
||||
delete ui;
|
||||
|
||||
/*
|
||||
if(m_pImageBackground!=NULL)
|
||||
{
|
||||
delete m_pImageBackground;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void DialogCalendar::SetCalendarDate(int nYear, int nMonth, int nDay)
|
||||
{
|
||||
m_nYear = nYear;
|
||||
m_nMonth = nMonth;
|
||||
|
||||
QString strYear = QString::number(nYear);
|
||||
QString strMonth = QString("%1(%2)").arg(m_ListMonthName[nMonth-1]).arg(QString::number(nMonth));
|
||||
|
||||
strMonth = strMonth.left(3);
|
||||
|
||||
ui->label_Year->setText(strYear);
|
||||
ui->label_Month->setText(strMonth);
|
||||
|
||||
ui->widget->SetCalendar(nYear, nMonth);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DialogCalendar::ExecuteMenu(int nID)
|
||||
{
|
||||
int i=0;
|
||||
for(i=0 ; i<m_ListMenu.size() ; i++)
|
||||
{
|
||||
SCalendarMenuView* pItem = m_ListMenu[i];
|
||||
if(i!=nID)
|
||||
{
|
||||
if(pItem->IsSelected()==true)
|
||||
{
|
||||
pItem->Unselect();
|
||||
pItem->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QDate date = QDate::currentDate();
|
||||
int nYear = date.year();
|
||||
int nMonth = date.month();
|
||||
SetCalendarDate(nYear, nMonth, 1);
|
||||
|
||||
m_nTypeSearchDuration = nID;
|
||||
|
||||
|
||||
switch(nID)
|
||||
{
|
||||
case 0:
|
||||
ui->widget->SetToday();
|
||||
break;
|
||||
case 1:
|
||||
ui->widget->SetLast3Days();
|
||||
break;
|
||||
case 2:
|
||||
ui->widget->SetLastWeek();
|
||||
break;
|
||||
case 3:
|
||||
ui->widget->SetLast2Weeks();
|
||||
break;
|
||||
case 4:
|
||||
//ui->widget->SetLastMonth();
|
||||
ui->widget->SetLast3Weeks();
|
||||
break;
|
||||
case 5:
|
||||
//ui->widget->SetLast6Months();
|
||||
ui->widget->SetLastMonth();
|
||||
break;
|
||||
case 6:
|
||||
//ui->widget->SetLastYear();
|
||||
ui->widget->SetLast2Month();
|
||||
break;
|
||||
case 7:
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
SetSearchDateUpdate(m_nTypeSearchDuration);
|
||||
}
|
||||
|
||||
void DialogCalendar::on_pushButton_MonthPrev_clicked()
|
||||
{
|
||||
m_nMonth = m_nMonth-1;
|
||||
if(m_nMonth<=0)
|
||||
{
|
||||
m_nMonth = 12;
|
||||
m_nYear = m_nYear-1;
|
||||
}
|
||||
ui->widget->ClearDayState();
|
||||
//ui->widget->SetCalendar(m_nYear, m_nMonth);
|
||||
SetCalendarDate(m_nYear, m_nMonth, 1);
|
||||
ui->widget->UpdateDayState();
|
||||
}
|
||||
|
||||
void DialogCalendar::on_pushButton_MonthNext_clicked()
|
||||
{
|
||||
m_nMonth = m_nMonth+1;
|
||||
if(m_nMonth>12)
|
||||
{
|
||||
m_nMonth = 1;
|
||||
m_nYear = m_nYear+1;
|
||||
}
|
||||
ui->widget->ClearDayState();
|
||||
//ui->widget->SetCalendar(m_nYear, m_nMonth);
|
||||
SetCalendarDate(m_nYear, m_nMonth, 1);
|
||||
ui->widget->UpdateDayState();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void DialogCalendar::on_pushButton_OK_clicked()
|
||||
{
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void DialogCalendar::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void DialogCalendar::showEvent(QShowEvent *pEvent)
|
||||
{
|
||||
|
||||
if(pEvent->type()==QEvent::Show)
|
||||
{
|
||||
|
||||
}
|
||||
else if(pEvent->type()==QEvent::Hide)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DialogCalendar::SetModeChangeStart()
|
||||
{
|
||||
m_nModeChange = CHANGE_DATE_START;
|
||||
ui->widget->SetModeChangeStart();
|
||||
|
||||
SetSearchDateUpdate(SEARCH_USER_DEFINED);
|
||||
}
|
||||
|
||||
void DialogCalendar::SetModeChangeEnd()
|
||||
{
|
||||
m_nModeChange = CHANGE_DATE_END;
|
||||
ui->widget->SetModeChangeEnd();
|
||||
|
||||
SetSearchDateUpdate(SEARCH_USER_DEFINED);
|
||||
}
|
||||
|
||||
|
||||
void DialogCalendar::resizeEvent(QResizeEvent *pEvent)
|
||||
{
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
|
||||
int nFontSize = 22;
|
||||
int nFontSizeCancel = 18;
|
||||
int nFontMonth = 24;
|
||||
int nFontMenu = 18;
|
||||
int nFontYear = 20;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
float fRatioX = 1280.0f / 1920.0f;
|
||||
float fRatioY = 1024.0f / 1080.0f;
|
||||
|
||||
nFontMonth = 16;
|
||||
nFontSize = 16;
|
||||
nFontSizeCancel = 18 * fRatioX;
|
||||
nFontMenu = 14;
|
||||
|
||||
ui->frame_background->setGeometry(0*fRatioX, 0*fRatioX, 1920*fRatioX, 1080*fRatioY);
|
||||
ui->frame_calendar->setGeometry(300*fRatioX, 270*fRatioX, 1270*fRatioX, 712*fRatioX);
|
||||
{
|
||||
ui->frame_top->setGeometry(0, 0, 1270*fRatioX, 99*fRatioX);
|
||||
{
|
||||
ui->label_Month->setGeometry(582*fRatioX-30, 48*fRatioX, 60*fRatioX+60, 27*fRatioX);
|
||||
ui->label_Year->setGeometry(592*fRatioX-30, 24*fRatioX, 46*fRatioX+60, 24*fRatioX);
|
||||
ui->pushButton_Cancel->setGeometry(60*fRatioX, 30*fRatioX, 111*fRatioX, 33*fRatioX);
|
||||
{
|
||||
ui->frame_ImageCancel->setGeometry(0, 5, 17*fRatioX, 33*fRatioX-10);
|
||||
ui->label_Cancel->setGeometry(17*fRatioX, 0, 71*fRatioX, 33*fRatioX);
|
||||
}
|
||||
ui->pushButton_MonthNext->setGeometry(660*fRatioX, 52*fRatioX, 10*fRatioX, 18*fRatioX);
|
||||
{
|
||||
ui->frame_next->setGeometry(0, 0, 10*fRatioX, 18*fRatioX);
|
||||
}
|
||||
ui->pushButton_MonthPrev->setGeometry(557*fRatioX, 52*fRatioX, 10*fRatioX, 18*fRatioX);
|
||||
{
|
||||
ui->frame_prev->setGeometry(0*fRatioX, 0, 10*fRatioX, 18*fRatioX);
|
||||
}
|
||||
ui->pushButton_OK->setGeometry(1087*fRatioX, 26*fRatioX+5, 162*fRatioX, 48*fRatioX-10);
|
||||
}
|
||||
|
||||
ui->verticalLayoutWidget->setGeometry(0*fRatioX, 99*fRatioX, 200*fRatioX, 612*fRatioX);
|
||||
ui->widget->setGeometry(200*fRatioX, 99*fRatioX, 1084*fRatioX, 612*fRatioX);
|
||||
|
||||
}
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_background->setGeometry(0, 0, 1920, 1080);
|
||||
ui->frame_calendar->setGeometry(300, 260, 1270, 712);
|
||||
{
|
||||
ui->frame_top->setGeometry(0, 0, 1270, 99);
|
||||
{
|
||||
ui->label_Month->setGeometry(582, 48, 60, 27);
|
||||
ui->label_Year->setGeometry(592, 24, 46, 24);
|
||||
ui->pushButton_Cancel->setGeometry(60, 30, 111, 33);
|
||||
{
|
||||
ui->frame_ImageCancel->setGeometry(0, 0, 17, 33);
|
||||
ui->label_Cancel->setGeometry(17, 0, 71, 33);
|
||||
}
|
||||
ui->pushButton_MonthNext->setGeometry(660, 52, 10, 18);
|
||||
{
|
||||
ui->frame_next->setGeometry(0, 0, 10, 18);
|
||||
}
|
||||
ui->pushButton_MonthPrev->setGeometry(557, 52, 10, 18);
|
||||
{
|
||||
ui->frame_prev->setGeometry(0, 0, 10, 18);
|
||||
}
|
||||
ui->pushButton_OK->setGeometry(1087, 26, 162, 48);
|
||||
}
|
||||
|
||||
ui->verticalLayoutWidget->setGeometry(0, 99, 185, 612);
|
||||
ui->widget->setGeometry(185, 99, 1084, 612);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
QString strPushButton = QString(
|
||||
"QLabel \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: %1px; \n"
|
||||
" font-weight: bold; \n"
|
||||
" color: #102528; \n"
|
||||
"} \n").arg(nFontSizeCancel);
|
||||
|
||||
ui->label_Cancel->setStyleSheet(strPushButton);
|
||||
|
||||
|
||||
strPushButton = QString(
|
||||
"QPushButton#pushButton_OK \n"
|
||||
"{ \n"
|
||||
" qproperty-autoDefault: false; \n"
|
||||
" qproperty-flat: false; \n"
|
||||
" background: #FFFFFF; \n"
|
||||
" border: none; \n"
|
||||
" border-radius: 9px; \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: %1px; \n"
|
||||
" font-weight: bold; \n"
|
||||
"}").arg(nFontSizeCancel);
|
||||
ui->pushButton_OK->setStyleSheet(strPushButton);
|
||||
|
||||
strPushButton = QString(
|
||||
"QLabel#label_Month \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: %1px; \n"
|
||||
" font-weight: bold; \n"
|
||||
" color: white; \n"
|
||||
" qproperty-alignment: 'AlignHCenter | AlignVCenter'; \n"
|
||||
"}").arg(nFontMonth);
|
||||
ui->label_Month->setStyleSheet(strPushButton);
|
||||
|
||||
strPushButton = QString(
|
||||
"QLabel#label_Month \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: %1px; \n"
|
||||
" font-weight: bold; \n"
|
||||
" color: white; \n"
|
||||
" qproperty-alignment: 'AlignHCenter | AlignVCenter'; \n"
|
||||
"}").arg(nFontYear);
|
||||
ui->label_Year->setStyleSheet(strPushButton);
|
||||
|
||||
|
||||
int i=0;
|
||||
for(i=0 ; i<7 ; i++)
|
||||
{
|
||||
SCalendarMenuView* pItemView = m_ListMenu[i];
|
||||
pItemView->SetFontSize(nFontMenu);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void DialogCalendar::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
QSize nSize = size();
|
||||
int nPaddingLeft = 0;
|
||||
|
||||
QRect rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft, nSize.height());
|
||||
|
||||
QColor colorBackground;
|
||||
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
|
||||
colorBackground = Qt::white;
|
||||
if(m_pImageBackground!=NULL)
|
||||
{
|
||||
//painter.fillRect(QRect(0, 0, nSize.width(), nSize.height()), Qt::black);
|
||||
|
||||
painter.drawImage(rectDisplay, *m_pImageBackground);
|
||||
painter.fillRect(QRect(0, 0, nSize.width(), nSize.height()), QColor(0, 0, 0, 128));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void DialogCalendar::SetDateStart(QDate date)
|
||||
{
|
||||
ui->widget->SetDateStart(date);
|
||||
}
|
||||
|
||||
void DialogCalendar::SetDateEnd(QDate date)
|
||||
{
|
||||
ui->widget->SetDateEnd(date);
|
||||
}
|
||||
|
||||
|
||||
void DialogCalendar::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
int nKey = event->key();
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int DialogCalendar::GetTypeSearchDuration()
|
||||
{
|
||||
return m_nTypeSearchDuration;
|
||||
}
|
||||
|
||||
void DialogCalendar::ExecuteClickDate()
|
||||
{
|
||||
m_nTypeSearchDuration = 7;
|
||||
ExecuteMenu(m_nTypeSearchDuration);
|
||||
|
||||
}
|
||||
78
dialogcalendar.h
Normal file
78
dialogcalendar.h
Normal file
@ -0,0 +1,78 @@
|
||||
#ifndef DIALOGCALENDAR_H
|
||||
#define DIALOGCALENDAR_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "scalendarmenuview.h"
|
||||
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
namespace Ui {
|
||||
class DialogCalendar;
|
||||
}
|
||||
|
||||
enum _CALENDAR_CHANGE
|
||||
{
|
||||
CHANGE_DATE_START,
|
||||
CHANGE_DATE_END
|
||||
};
|
||||
|
||||
class DialogCalendar : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogCalendar(QWidget *parent = nullptr);
|
||||
~DialogCalendar();
|
||||
|
||||
void SetCalendarDate(int nYear, int nMonth, int nDay);
|
||||
|
||||
void showEvent(QShowEvent *) override;
|
||||
|
||||
void SetModeChangeStart();
|
||||
void SetModeChangeEnd();
|
||||
|
||||
void SetDateStart(QDate date);
|
||||
void SetDateEnd(QDate date);
|
||||
|
||||
int GetTypeSearchDuration();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *) override;
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
//virtual void paintEvent(QPaintEvent *event);
|
||||
|
||||
public slots:
|
||||
void ExecuteMenu(int nID);
|
||||
void ExecuteClickDate();
|
||||
|
||||
signals:
|
||||
void SetSearchDateUpdate(int nTypeSearchDuration);
|
||||
|
||||
protected:
|
||||
int m_nModeChange;
|
||||
int m_nTypeSearchDuration;
|
||||
vector<SCalendarMenuView*> m_ListMenu;
|
||||
int m_nYear;
|
||||
int m_nMonth;
|
||||
QStringList m_ListMonthName;
|
||||
|
||||
//QImage* m_pImageBackground;
|
||||
|
||||
private slots:
|
||||
void on_pushButton_MonthPrev_clicked();
|
||||
|
||||
void on_pushButton_MonthNext_clicked();
|
||||
|
||||
void on_pushButton_OK_clicked();
|
||||
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogCalendar *ui;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // DIALOGCALENDAR_H
|
||||
394
dialogcalendar.ui
Normal file
394
dialogcalendar.ui
Normal file
@ -0,0 +1,394 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogCalendar</class>
|
||||
<widget class="QDialog" name="DialogCalendar">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="windowOpacity">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: transparent;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #40202020;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_calendar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>300</x>
|
||||
<y>260</y>
|
||||
<width>1270</width>
|
||||
<height>712</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_calendar
|
||||
{
|
||||
background: #276678;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="FormCalendarView" name="widget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>185</x>
|
||||
<y>99</y>
|
||||
<width>1084</width>
|
||||
<height>612</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>99</y>
|
||||
<width>185</width>
|
||||
<height>612</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget#verticalLayoutWidget
|
||||
{
|
||||
background: #276678;
|
||||
border: 2px #276678;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_top">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1270</width>
|
||||
<height>99</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_top
|
||||
{
|
||||
background: #276678;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>30</y>
|
||||
<width>111</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_ImageCancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>17</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_ImageCancel
|
||||
{
|
||||
border-image: url("://image/cancel_arrow.png");
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>17</x>
|
||||
<y>0</y>
|
||||
<width>71</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #102528;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CANCEL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_OK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1087</x>
|
||||
<y>26</y>
|
||||
<width>162</width>
|
||||
<height>48</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton#pushButton_OK
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: false;
|
||||
background: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: 9px;
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Year">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>592</x>
|
||||
<y>24</y>
|
||||
<width>46</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#label_Year
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
|
||||
qproperty-alignment: 'AlignHCenter | AlignVCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>2021</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Month">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>582</x>
|
||||
<y>48</y>
|
||||
<width>60</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel#label_Month
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
|
||||
qproperty-alignment: 'AlignHCenter | AlignVCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>JUNE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_MonthNext">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>660</x>
|
||||
<y>52</y>
|
||||
<width>10</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton#pushButton_MonthNext
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_next">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>10</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_next
|
||||
{
|
||||
border-image: url("://image/month_next.png");
|
||||
background: none;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_MonthPrev">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>557</x>
|
||||
<y>52</y>
|
||||
<width>10</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton#pushButton_MonthPrev
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_prev">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>10</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_prev
|
||||
{
|
||||
border-image: url("://image/month_prev.png");
|
||||
background: none;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>FormCalendarView</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">formcalendarview.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
42
dialogchecksumerror.cpp
Normal file
42
dialogchecksumerror.cpp
Normal file
@ -0,0 +1,42 @@
|
||||
#include "dialogchecksumerror.h"
|
||||
#include "ui_dialogchecksumerror.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogCheckSumError::DialogCheckSumError(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogCheckSumError)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup | Qt::WindowStaysOnTopHint);
|
||||
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
DialogCheckSumError::~DialogCheckSumError()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogCheckSumError::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->frame_info->setGeometry(100, 400, 1080, 200);
|
||||
ui->label->setGeometry(0, 30, 1080, 80);
|
||||
ui->pushButton->setGeometry(1080/2-250/2, 124, 250, 60);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_info->setGeometry(100, 400, 1720, 200);
|
||||
ui->label->setGeometry(0, 30, 1720, 80);
|
||||
ui->pushButton->setGeometry(728, 124, 271, 61);
|
||||
}
|
||||
}
|
||||
|
||||
void DialogCheckSumError::on_pushButton_clicked()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
28
dialogchecksumerror.h
Normal file
28
dialogchecksumerror.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef DIALOGCHECKSUMERROR_H
|
||||
#define DIALOGCHECKSUMERROR_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogCheckSumError;
|
||||
}
|
||||
|
||||
class DialogCheckSumError : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogCheckSumError(QWidget *parent = 0);
|
||||
~DialogCheckSumError();
|
||||
|
||||
public:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogCheckSumError *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGCHECKSUMERROR_H
|
||||
115
dialogchecksumerror.ui
Normal file
115
dialogchecksumerror.ui
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogCheckSumError</class>
|
||||
<widget class="QDialog" name="DialogCheckSumError">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: transparent;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #40202020;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>400</y>
|
||||
<width>1720</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: white;</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>30</y>
|
||||
<width>1720</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignHCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check-sum Miss Matched!!!
|
||||
Program will be closed.</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>728</x>
|
||||
<y>124</y>
|
||||
<width>271</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
61
dialogemergengy.cpp
Normal file
61
dialogemergengy.cpp
Normal file
@ -0,0 +1,61 @@
|
||||
#include "dialogemergengy.h"
|
||||
#include "ui_dialogemergengy.h"
|
||||
|
||||
DialogEmergengy::DialogEmergengy(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogEmergengy)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
//setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);// | Qt::Popup);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Popup);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->comboBox_Sex->addItem("Male");
|
||||
ui->comboBox_Sex->addItem("Female");
|
||||
ui->comboBox_Sex->addItem("Other");
|
||||
}
|
||||
|
||||
DialogEmergengy::~DialogEmergengy()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
QString DialogEmergengy::GetPatientID()
|
||||
{
|
||||
return ui->plainTextEdit_PatientID->toPlainText();
|
||||
}
|
||||
|
||||
QString DialogEmergengy::GetPatientName()
|
||||
{
|
||||
return ui->plainTextEdit_PatientName->toPlainText();
|
||||
}
|
||||
|
||||
QString DialogEmergengy::GetPatientBirthDate()
|
||||
{
|
||||
return ui->plainTextEdit_PatientBirthDate->toPlainText();
|
||||
}
|
||||
|
||||
QString DialogEmergengy::GetPatientSex()
|
||||
{
|
||||
return ui->comboBox_Sex->currentText();
|
||||
|
||||
}
|
||||
|
||||
void DialogEmergengy::on_pushButton_Add_clicked()
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogEmergengy::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
|
||||
void DialogEmergengy::reject()
|
||||
{
|
||||
return;
|
||||
}
|
||||
34
dialogemergengy.h
Normal file
34
dialogemergengy.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef DIALOGEMERGENGY_H
|
||||
#define DIALOGEMERGENGY_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogEmergengy;
|
||||
}
|
||||
|
||||
class DialogEmergengy : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogEmergengy(QWidget *parent = 0);
|
||||
~DialogEmergengy();
|
||||
|
||||
QString GetPatientID();
|
||||
QString GetPatientName();
|
||||
QString GetPatientBirthDate();
|
||||
QString GetPatientSex();
|
||||
|
||||
virtual void reject();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Add_clicked();
|
||||
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogEmergengy *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGEMERGENGY_H
|
||||
512
dialogemergengy.ui
Normal file
512
dialogemergengy.ui
Normal file
@ -0,0 +1,512 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogEmergengy</class>
|
||||
<widget class="QDialog" name="DialogEmergengy">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>530</width>
|
||||
<height>397</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Emergency Dialog with New Patient</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: #A6B1C2;
|
||||
}
|
||||
|
||||
QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>530</width>
|
||||
<height>391</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #A6B1C2;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>35</y>
|
||||
<width>141</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="STextEdit" name="plainTextEdit_PatientID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>36</y>
|
||||
<width>221</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPlainTextEdit
|
||||
{
|
||||
qproperty-placeholderText: 'Patient ID';
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="backgroundVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_PatientID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>30</y>
|
||||
<width>241</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_PatientID
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Name">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>105</y>
|
||||
<width>141</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="STextEdit" name="plainTextEdit_PatientName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>106</y>
|
||||
<width>221</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPlainTextEdit
|
||||
{
|
||||
qproperty-placeholderText: 'Patient Name';
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="backgroundVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Patient Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_PatientName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>100</y>
|
||||
<width>241</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_PatientName
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_PatientBirthDate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>174</y>
|
||||
<width>241</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_PatientBirthDate
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_BirthDate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>179</y>
|
||||
<width>141</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BirthDate:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="STextEdit" name="plainTextEdit_PatientBirthDate">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>180</y>
|
||||
<width>221</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPlainTextEdit
|
||||
{
|
||||
qproperty-placeholderText: 'YYYY/MM/DD';
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="backgroundVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>YYYY/MM/DD</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Sex">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>250</y>
|
||||
<width>141</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sex:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="comboBox_Sex">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>244</y>
|
||||
<width>241</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QComboBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
padding: 1px 18px 1px 3px;
|
||||
min-width: 6em;
|
||||
}
|
||||
|
||||
QComboBox:editable {
|
||||
background: white;
|
||||
}
|
||||
|
||||
QComboBox:!editable, QComboBox::drop-down:editable {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,
|
||||
stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);
|
||||
}
|
||||
|
||||
/* QComboBox gets the "on" state when the popup is open */
|
||||
QComboBox:!editable:on, QComboBox::drop-down:editable:on {
|
||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||
stop: 0 #D3D3D3, stop: 0.4 #D8D8D8,
|
||||
stop: 0.5 #DDDDDD, stop: 1.0 #E1E1E1);
|
||||
}
|
||||
|
||||
QComboBox:on { /* shift the text when the popup opens */
|
||||
padding-top: 3px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
QComboBox::drop-down {
|
||||
subcontrol-origin: padding;
|
||||
subcontrol-position: top right;
|
||||
width: 30px;
|
||||
|
||||
border-left-width: 1px;
|
||||
border-left-color: darkgray;
|
||||
border-left-style: solid; /* just a single line */
|
||||
border-top-right-radius: 3px; /* same radius as the QComboBox */
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
QComboBox::down-arrow {
|
||||
border-image: url(://image/Arrow_under_3.png);
|
||||
}
|
||||
|
||||
QComboBox::down-arrow:on { /* shift the arrow when popup is open */
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
QComboBox QAbstractItemView {
|
||||
border: 2px solid darkgray;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox QListView::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
}
|
||||
|
||||
QComboBox::item
|
||||
{
|
||||
border: 2px solid darkgray;
|
||||
height: 40px;
|
||||
selection-background-color: red;
|
||||
}
|
||||
|
||||
QComboBox::item:selected
|
||||
{
|
||||
background: red;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>330</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}
|
||||
|
||||
QPushButton:disabled
|
||||
{
|
||||
background: #b4b4b4;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Add">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>330</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #f0f0f0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
color: #202020;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
<zorder>label_ID</zorder>
|
||||
<zorder>frame_PatientID</zorder>
|
||||
<zorder>label_Name</zorder>
|
||||
<zorder>frame_PatientName</zorder>
|
||||
<zorder>plainTextEdit_PatientName</zorder>
|
||||
<zorder>plainTextEdit_PatientID</zorder>
|
||||
<zorder>frame_PatientBirthDate</zorder>
|
||||
<zorder>label_BirthDate</zorder>
|
||||
<zorder>plainTextEdit_PatientBirthDate</zorder>
|
||||
<zorder>label_Sex</zorder>
|
||||
<zorder>comboBox_Sex</zorder>
|
||||
<zorder>pushButton_Cancel</zorder>
|
||||
<zorder>pushButton_Add</zorder>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>STextEdit</class>
|
||||
<extends>QPlainTextEdit</extends>
|
||||
<header location="global">stextedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
501
dialogexportsamba.cpp
Normal file
501
dialogexportsamba.cpp
Normal file
@ -0,0 +1,501 @@
|
||||
#include "dialogexportsamba.h"
|
||||
#include "ui_dialogexportsamba.h"
|
||||
|
||||
#include <QStorageInfo>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <QThread>
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogExportSamba::DialogExportSamba(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogExportSamba)
|
||||
{
|
||||
//setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
//setWindowFlags(Qt::FramelessWindowHint);
|
||||
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->label_InfoUSB->setGeometry(90, 60, 430, 190);
|
||||
|
||||
ui->label_InfoFile->hide();
|
||||
ui->label_InfoProgress->hide();
|
||||
ui->progressBar_File->hide();
|
||||
ui->progressBar_Progress->hide();
|
||||
|
||||
|
||||
m_nSyncCheckCount = 0;
|
||||
//done(QDialog::Accepted);
|
||||
ui->progressBar_Progress->setRange(0, 100);
|
||||
ui->progressBar_File->setRange(0, 100);
|
||||
|
||||
ui->progressBar_File->setValue(0);
|
||||
ui->progressBar_Progress->setValue(0);
|
||||
|
||||
ui->progressBar_Progress->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setFormat("%v / %m File Exports");
|
||||
|
||||
ui->pushButton_Retry->hide();
|
||||
|
||||
m_nTypeExport = 1;
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
connect(pThread, SIGNAL(SetProgressExportFile(int, int)), this, SLOT(SetProgressExportFile(int, int)));
|
||||
connect(pThread, SIGNAL(SetProgressExportPercent(quint64, quint64)), this, SLOT(SetProgressExportPercent(quint64, quint64)));
|
||||
connect(pThread, SIGNAL(SetProgressSync(bool)), this, SLOT(SetProgressSync(bool)));
|
||||
connect(pThread, SIGNAL(SetExportInit()), this, SLOT(SetExportInit()));
|
||||
connect(pThread, SIGNAL(SetExportComplete()), this, SLOT(SetExportComplete()));
|
||||
|
||||
connect(this, SIGNAL(StartExport(int)), pThread, SLOT(StartExport(int)));
|
||||
connect(this, SIGNAL(StopExport()), pThread, SLOT(StopExport()));
|
||||
|
||||
connect(&m_TimerSync, SIGNAL(timeout()), this, SLOT(SyncUpdate()));
|
||||
|
||||
connect(&m_TimerDeferred, SIGNAL(timeout()), this, SLOT(OnDeferredInit()));
|
||||
|
||||
//connect(&m_Process1, SIGNAL(finished(int)), this, SLOT(Process1Finish(int)));
|
||||
//connect(&m_Process1, SIGNAL(readyReadStandardOutput()), this, SLOT(Process1ReadyReadStandardOutput()));
|
||||
//connect(&m_Process1, SIGNAL(readyReadStandardError()), this, SLOT(Process1ReadyReadStandardError()));
|
||||
|
||||
//connect(&m_Process2, SIGNAL(finished(int)), this, SLOT(Process2Finish(int)));
|
||||
//connect(&m_Process2, SIGNAL(readyReadStandardOutput()), this, SLOT(Process2ReadyReadStandardOutput()));
|
||||
//connect(&m_Process2, SIGNAL(readyReadStandardError()), this, SLOT(Process2ReadyReadStandardError()));
|
||||
|
||||
m_TimerDeferred.setSingleShot(true);
|
||||
m_TimerDeferred.setInterval(100);
|
||||
m_TimerDeferred.start(100);
|
||||
|
||||
Umount();
|
||||
}
|
||||
|
||||
DialogExportSamba::~DialogExportSamba()
|
||||
{
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
disconnect(pThread, SIGNAL(SetProgressExportFile(int, int)), this, SLOT(SetProgressExportFile(int, int)));
|
||||
disconnect(pThread, SIGNAL(SetProgressExportPercent(quint64, quint64)), this, SLOT(SetProgressExportPercent(quint64, quint64)));
|
||||
disconnect(pThread, SIGNAL(SetProgressSync(bool)), this, SLOT(SetProgressSync(bool)));
|
||||
|
||||
disconnect(this, SIGNAL(StartExport(int)), pThread, SLOT(StartExport(int)));
|
||||
disconnect(this, SIGNAL(StopExport()), pThread, SLOT(StopExport()));
|
||||
|
||||
disconnect(&m_TimerSync, SIGNAL(timeout()), this, SLOT(SyncUpdate()));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogExportSamba::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
StopExport();
|
||||
|
||||
if(m_TimerSync.isActive()==true)
|
||||
{
|
||||
m_TimerSync.stop();
|
||||
}
|
||||
|
||||
Umount();
|
||||
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
void DialogExportSamba::on_pushButton_Export_clicked()
|
||||
{
|
||||
|
||||
m_nSyncCheckCount = 0;
|
||||
//done(QDialog::Accepted);
|
||||
|
||||
ui->label_InfoUSB->hide();
|
||||
|
||||
ui->label_InfoFile->show();
|
||||
ui->label_InfoProgress->show();
|
||||
ui->progressBar_File->show();
|
||||
ui->progressBar_Progress->show();
|
||||
|
||||
ui->progressBar_Progress->setRange(0, 100);
|
||||
|
||||
ui->progressBar_Progress->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setFormat("%v / %m File Exports");
|
||||
|
||||
update();
|
||||
|
||||
StartExport(m_nTypeExport);
|
||||
|
||||
return;
|
||||
|
||||
/*
|
||||
int i=0;
|
||||
for(i=1 ; i<101 ; i++)
|
||||
{
|
||||
ui->progressBar_Progress->setValue(i);
|
||||
QThread::usleep(100*1000);
|
||||
update();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void DialogExportSamba::SetProgressExportFile(int nProgress, int nTotal)
|
||||
{
|
||||
ui->progressBar_File->setRange(1, nTotal);
|
||||
ui->progressBar_File->setValue(nProgress);
|
||||
|
||||
QString strInfo;
|
||||
strInfo = QString("%1 / %2 File Exports").arg(nProgress).arg(nTotal);
|
||||
ui->progressBar_File->setFormat(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportSamba::SetProgressExportPercent(quint64 nProgress, quint64 nTotal)
|
||||
{
|
||||
int nPercentage = (float)(100.0f*(float)nProgress/(float)nTotal);
|
||||
|
||||
if(nPercentage>100)
|
||||
{
|
||||
nPercentage = 100;
|
||||
}
|
||||
|
||||
ui->progressBar_Progress->setRange(1, 100);
|
||||
ui->progressBar_Progress->setValue(nPercentage);
|
||||
|
||||
//ui->progressBar_Progress->setRange(1, nTotal);
|
||||
//ui->progressBar_Progress->setValue(nProgress);
|
||||
|
||||
ui->progressBar_Progress->resetFormat();
|
||||
}
|
||||
|
||||
void DialogExportSamba::SetProgressSync(bool bComplete)
|
||||
{
|
||||
if(bComplete==false)
|
||||
{
|
||||
m_TimerSync.setInterval(300);
|
||||
m_TimerSync.start();
|
||||
|
||||
//ui->label_InfoProgress->hide();
|
||||
//ui->progressBar_Progress->hide();
|
||||
|
||||
//ui->label_InfoFile->setText("Export Sync");
|
||||
ui->label_InfoProgress->setText("Export Sync");
|
||||
|
||||
ui->pushButton_Export->setDisabled(true);
|
||||
ui->pushButton_Export->hide();
|
||||
|
||||
//ui->pushButton_Cancel->setDisabled(true);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
|
||||
ui->pushButton_Cancel->setGeometry(240, 310, 130, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_TimerSync.isActive()==true)
|
||||
{
|
||||
m_TimerSync.stop();
|
||||
|
||||
//ui->progressBar_File->setFormat("Export Complete");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DialogExportSamba::SyncUpdate()
|
||||
{
|
||||
m_nSyncCheckCount++;
|
||||
|
||||
m_nSyncCheckCount = m_nSyncCheckCount%10;
|
||||
|
||||
QString strInfo;
|
||||
|
||||
strInfo = " Export File Sync ";
|
||||
int i=0;
|
||||
for(i=0 ; i<m_nSyncCheckCount ; i++)
|
||||
{
|
||||
strInfo += ". ";
|
||||
}
|
||||
|
||||
//ui->progressBar_File->setFormat(strInfo);
|
||||
ui->progressBar_Progress->setFormat(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportSamba::Mount()
|
||||
{
|
||||
SetExportEnable(true);
|
||||
QString strInfo = "Ready to Export 'Shared Network'";
|
||||
|
||||
ui->pushButton_Export->click();
|
||||
|
||||
|
||||
SetInfoString(strInfo);
|
||||
|
||||
return;
|
||||
SambaClient* pSambaClient = MainWindow::GetCommonData()->GetSambaClient();
|
||||
//QString strInfo;
|
||||
|
||||
bool bMount = pSambaClient->IsMount();
|
||||
|
||||
/*
|
||||
if(bMount==false)
|
||||
{
|
||||
pSambaClient->Umount();
|
||||
pSambaClient->Mount();
|
||||
}
|
||||
|
||||
|
||||
bMount = pSambaClient->IsMount();
|
||||
*/
|
||||
if(bMount==false)
|
||||
{
|
||||
SetExportEnable(false);
|
||||
//strInfo = m_strInfo;
|
||||
strInfo = "Check Your Network Server!!";
|
||||
}
|
||||
else
|
||||
{
|
||||
SetExportEnable(true);
|
||||
strInfo = "Ready to Export 'Shared Network'";
|
||||
|
||||
ui->pushButton_Export->click();
|
||||
}
|
||||
|
||||
SetInfoString(strInfo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void DialogExportSamba::Umount()
|
||||
{
|
||||
return;
|
||||
SambaClient* pSambaClient = MainWindow::GetCommonData()->GetSambaClient();
|
||||
|
||||
//pSambaClient->Umount();
|
||||
/*
|
||||
if(m_bError==true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_strInfo.clear();
|
||||
|
||||
QProcess process1;
|
||||
|
||||
process1.setStandardOutputProcess(&m_Process2);
|
||||
|
||||
process1.start("echo 1");
|
||||
m_Process2.start("sudo -S umount /home/birdhead/samba");
|
||||
m_Process2.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
|
||||
// Wait for it to start
|
||||
if(!process1.waitForStarted())
|
||||
return;
|
||||
|
||||
bool retval = false;
|
||||
QByteArray buffer;
|
||||
// To be fair: you only need to wait here for a bit with shutdown,
|
||||
// but I will still leave the rest here for a generic solution
|
||||
while ((retval = m_Process2.waitForFinished()))
|
||||
{
|
||||
buffer.append(m_Process2.readAll());
|
||||
}
|
||||
|
||||
|
||||
m_Process2.close();
|
||||
if(m_Process2.isOpen()==true)
|
||||
{
|
||||
m_Process2.terminate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
process1.close();
|
||||
if(process1.isOpen()==true)
|
||||
{
|
||||
process1.terminate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
buffer.clear();
|
||||
|
||||
if(m_bError==true)
|
||||
{
|
||||
SetInfoString(m_strInfo);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void DialogExportSamba::SetExportComplete()
|
||||
{
|
||||
ui->progressBar_File->setFormat("Export Complete");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
ui->label_InfoProgress->hide();
|
||||
ui->progressBar_Progress->hide();
|
||||
|
||||
Umount();
|
||||
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
ui->pushButton_Cancel->click();
|
||||
}
|
||||
|
||||
void DialogExportSamba::SetExportInit()
|
||||
{
|
||||
ui->progressBar_File->setFormat("");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
ui->label_InfoProgress->show();
|
||||
ui->progressBar_Progress->show();
|
||||
|
||||
ui->pushButton_Cancel->setDisabled(false);
|
||||
}
|
||||
|
||||
|
||||
void DialogExportSamba::OnDeferredInit()
|
||||
{
|
||||
Mount();
|
||||
}
|
||||
|
||||
|
||||
void DialogExportSamba::SetInfoString(QString strInfo)
|
||||
{
|
||||
ui->label_InfoUSB->setText(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportSamba::SetExportEnable(bool bEnable)
|
||||
{
|
||||
if(bEnable==true)
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(true);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
ui->pushButton_Retry->hide();
|
||||
ui->pushButton_Export->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Retry->show();
|
||||
ui->pushButton_Export->hide();
|
||||
//ui->pushButton_Export->setDisabled(true);
|
||||
//ui->pushButton_Export->hide();
|
||||
|
||||
//ui->pushButton_Cancel->setEnabled(true);
|
||||
|
||||
//ui->pushButton_Cancel->setGeometry(240, 310, 130, 40);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void DialogExportSamba::Process1Finish(int nRet)
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process1.readAll());
|
||||
|
||||
}
|
||||
|
||||
void DialogExportSamba::Process1ReadyReadStandardOutput()
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process1.readAllStandardOutput());
|
||||
|
||||
m_strInfo = buffer.toStdString().c_str();
|
||||
}
|
||||
|
||||
void DialogExportSamba::Process1ReadyReadStandardError()
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process1.readAllStandardError());
|
||||
|
||||
m_strInfo = buffer.toStdString().c_str();
|
||||
|
||||
m_bError = 1;
|
||||
}
|
||||
|
||||
void DialogExportSamba::Process2Finish(int nRet)
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process2.readAll());
|
||||
|
||||
}
|
||||
|
||||
void DialogExportSamba::Process2ReadyReadStandardOutput()
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process2.readAllStandardOutput());
|
||||
|
||||
m_strInfo = buffer.toStdString().c_str();
|
||||
}
|
||||
|
||||
void DialogExportSamba::Process2ReadyReadStandardError()
|
||||
{
|
||||
QByteArray buffer;
|
||||
buffer.append(m_Process2.readAllStandardError());
|
||||
|
||||
m_strInfo = buffer.toStdString().c_str();
|
||||
|
||||
if(m_strInfo.contains("not mounted")==false)
|
||||
{
|
||||
m_bError = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void DialogExportSamba::on_pushButton_Retry_clicked()
|
||||
{
|
||||
SambaClient* pSambaClient = MainWindow::GetCommonData()->GetSambaClient();
|
||||
|
||||
if(pSambaClient->IsMount()==false)
|
||||
{
|
||||
Umount();
|
||||
Mount();
|
||||
}
|
||||
|
||||
if(pSambaClient->IsMount()==true)
|
||||
{
|
||||
m_nSyncCheckCount = 0;
|
||||
//done(QDialog::Accepted);
|
||||
|
||||
ui->label_InfoUSB->hide();
|
||||
|
||||
ui->label_InfoFile->show();
|
||||
ui->label_InfoProgress->show();
|
||||
ui->progressBar_File->show();
|
||||
ui->progressBar_Progress->show();
|
||||
|
||||
ui->progressBar_Progress->setRange(0, 100);
|
||||
|
||||
ui->progressBar_Progress->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setFormat("%v / %m File Exports");
|
||||
|
||||
update();
|
||||
|
||||
StartExport(m_nTypeExport);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DialogExportSamba::reject()
|
||||
{
|
||||
return;
|
||||
}
|
||||
82
dialogexportsamba.h
Normal file
82
dialogexportsamba.h
Normal file
@ -0,0 +1,82 @@
|
||||
#ifndef DIALOGEXPORTSAMBA_H
|
||||
#define DIALOGEXPORTSAMBA_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
namespace Ui {
|
||||
class DialogExportSamba;
|
||||
}
|
||||
|
||||
class DialogExportSamba : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogExportSamba(QWidget *parent = 0);
|
||||
~DialogExportSamba();
|
||||
|
||||
int m_nTypeExport;
|
||||
|
||||
int m_nStorageSize;
|
||||
int m_nStorageFreeSize;
|
||||
|
||||
int m_nSyncCheckCount;
|
||||
|
||||
QTimer m_TimerSync;
|
||||
QTimer m_TimerDeferred;
|
||||
|
||||
//QProcess m_Process1;
|
||||
//QProcess m_Process2;
|
||||
|
||||
void SetInfoString(QString strInfo);
|
||||
void SetExportEnable(bool bEnable);
|
||||
|
||||
virtual void Mount();
|
||||
virtual void Umount();
|
||||
|
||||
virtual void reject();
|
||||
|
||||
protected:
|
||||
QString m_strInfo;
|
||||
int m_bError;
|
||||
|
||||
public slots:
|
||||
void SetProgressExportFile(int nProgress, int nTotal);
|
||||
void SetProgressExportPercent(quint64 nProgress, quint64 nTotal);
|
||||
void SetProgressSync(bool bSync);
|
||||
|
||||
void SyncUpdate();
|
||||
|
||||
void SetExportComplete();
|
||||
void SetExportInit();
|
||||
|
||||
void OnDeferredInit();
|
||||
|
||||
//virtual void Process1Finish(int nRet);
|
||||
//virtual void Process1ReadyReadStandardOutput();
|
||||
//virtual void Process1ReadyReadStandardError();
|
||||
|
||||
//virtual void Process2Finish(int nRet);
|
||||
//virtual void Process2ReadyReadStandardOutput();
|
||||
//virtual void Process2ReadyReadStandardError();
|
||||
|
||||
signals:
|
||||
void StartExport(int nType);
|
||||
void StopExport();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
void on_pushButton_Export_clicked();
|
||||
|
||||
void on_pushButton_Retry_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogExportSamba *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGEXPORTSAMBA_H
|
||||
242
dialogexportsamba.ui
Normal file
242
dialogexportsamba.ui
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogExportSamba</class>
|
||||
<widget class="QDialog" name="DialogExportSamba">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>603</width>
|
||||
<height>388</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: #f0f0f0;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>310</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}
|
||||
|
||||
QPushButton:disabled
|
||||
{
|
||||
background: #b4b4b4;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar_File">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>60</y>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar
|
||||
{
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoFile">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar_Progress">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>150</y>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar
|
||||
{
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Export">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>310</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #d0d0d0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
color: #202020;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Export</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoUSB">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>260</y>
|
||||
<width>430</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoProgress">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>120</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Progress</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Retry">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>310</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #d0d0d0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
color: #202020;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Retry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
572
dialogexportusb.cpp
Normal file
572
dialogexportusb.cpp
Normal file
@ -0,0 +1,572 @@
|
||||
#include "dialogexportusb.h"
|
||||
#include "ui_dialogexportusb.h"
|
||||
|
||||
#include <QStorageInfo>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <QThread>
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogExportUSB::DialogExportUSB(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogExportUSB)
|
||||
{
|
||||
//setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
//setWindowFlags(Qt::FramelessWindowHint);
|
||||
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->label_InfoUSB->setGeometry(90, 60, 430, 190);
|
||||
|
||||
ui->label_InfoFile->hide();
|
||||
ui->label_InfoProgress->hide();
|
||||
ui->progressBar_File->hide();
|
||||
ui->progressBar_Progress->hide();
|
||||
|
||||
|
||||
m_nSyncCheckCount = 0;
|
||||
//done(QDialog::Accepted);
|
||||
ui->progressBar_Progress->setRange(0, 100);
|
||||
ui->progressBar_File->setRange(0, 100);
|
||||
|
||||
ui->progressBar_File->setValue(0);
|
||||
ui->progressBar_Progress->setValue(0);
|
||||
|
||||
ui->progressBar_Progress->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setFormat("%v / %m File Exports");
|
||||
|
||||
m_nTypeExport = 0;
|
||||
|
||||
/*
|
||||
QString strInfo;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QString* pStrExternalDiskPath = pCommonData->GetExternalDiskPath();
|
||||
pStrExternalDiskPath->clear();
|
||||
|
||||
Mount();
|
||||
|
||||
foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) {
|
||||
|
||||
qDebug() << storage.rootPath();
|
||||
if (storage.isReadOnly())
|
||||
qDebug() << "isReadOnly:" << storage.isReadOnly();
|
||||
|
||||
QString strName = storage.name();
|
||||
QString strDevice = storage.device();
|
||||
|
||||
|
||||
|
||||
if(strDevice.contains("/dev/sd")==true)
|
||||
{
|
||||
QStringList strList;
|
||||
|
||||
|
||||
*pStrExternalDiskPath = storage.rootPath();
|
||||
|
||||
//strList << "name:" << storage.name();
|
||||
//strList << "fileSystemType:" << storage.fileSystemType();
|
||||
//strList << "size:" << storage.bytesTotal()/1000/1000 << "MB";
|
||||
//strList << "availableSize:" << storage.bytesAvailable()/1000/1000 << "MB";
|
||||
|
||||
strInfo = QString("name: %1\r\nFieSystemType: %2\r\nFull Size: %3 MBytes\r\nAvailable Size: %4 MBytes\r\nSystem Path: %5").arg(storage.name()).arg((QString)storage.fileSystemType()).arg(storage.bytesTotal()/1000/1000).arg(storage.bytesAvailable()/1000/1000).arg(storage.rootPath());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_nStorageFreeSize = storage.bytesAvailable()/1000/1000;
|
||||
m_nStorageSize = storage.bytesTotal()/1000/1000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
ui->label_InfoUSB->setText(strInfo);
|
||||
|
||||
if(m_nStorageFreeSize>100)
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(true);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(false);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
connect(pThread, SIGNAL(SetProgressExportFile(int, int)), this, SLOT(SetProgressExportFile(int, int)));
|
||||
connect(pThread, SIGNAL(SetProgressExportPercent(quint64, quint64)), this, SLOT(SetProgressExportPercent(quint64, quint64)));
|
||||
connect(pThread, SIGNAL(SetProgressSync(bool)), this, SLOT(SetProgressSync(bool)));
|
||||
connect(pThread, SIGNAL(SetExportInit()), this, SLOT(SetExportInit()));
|
||||
connect(pThread, SIGNAL(SetExportComplete()), this, SLOT(SetExportComplete()));
|
||||
|
||||
connect(this, SIGNAL(StartExport(int)), pThread, SLOT(StartExport(int)));
|
||||
connect(this, SIGNAL(StopExport()), pThread, SLOT(StopExport()));
|
||||
|
||||
connect(&m_TimerSync, SIGNAL(timeout()), this, SLOT(SyncUpdate()));
|
||||
|
||||
connect(&m_TimerDeferred, SIGNAL(timeout()), this, SLOT(OnDeferredInit()));
|
||||
|
||||
connect(&m_Process, SIGNAL(finished(int)), this, SLOT(ProcessFinish(int)));
|
||||
connect(&m_Process, SIGNAL(readyReadStandardOutput()), this, SLOT(ProcessReadyReadStandardOutput()));
|
||||
connect(&m_Process, SIGNAL(readyReadStandardError()), this, SLOT(ProcessReadyReadStandardError()));
|
||||
|
||||
m_TimerDeferred.setSingleShot(true);
|
||||
m_TimerDeferred.setInterval(100);
|
||||
m_TimerDeferred.start(100);
|
||||
|
||||
}
|
||||
|
||||
DialogExportUSB::~DialogExportUSB()
|
||||
{
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
disconnect(pThread, SIGNAL(SetProgressExportFile(int, int)), this, SLOT(SetProgressExportFile(int, int)));
|
||||
disconnect(pThread, SIGNAL(SetProgressExportPercent(quint64, quint64)), this, SLOT(SetProgressExportPercent(quint64, quint64)));
|
||||
disconnect(pThread, SIGNAL(SetProgressSync(bool)), this, SLOT(SetProgressSync(bool)));
|
||||
|
||||
disconnect(this, SIGNAL(StartExport(int)), pThread, SLOT(StartExport(int)));
|
||||
disconnect(this, SIGNAL(StopExport()), pThread, SLOT(StopExport()));
|
||||
|
||||
disconnect(&m_TimerSync, SIGNAL(timeout()), this, SLOT(SyncUpdate()));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogExportUSB::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
StopExport();
|
||||
|
||||
if(m_TimerSync.isActive()==true)
|
||||
{
|
||||
m_TimerSync.stop();
|
||||
}
|
||||
|
||||
Umount();
|
||||
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
void DialogExportUSB::on_pushButton_Export_clicked()
|
||||
{
|
||||
|
||||
m_nSyncCheckCount = 0;
|
||||
//done(QDialog::Accepted);
|
||||
|
||||
ui->label_InfoUSB->hide();
|
||||
|
||||
ui->label_InfoFile->show();
|
||||
ui->label_InfoProgress->show();
|
||||
ui->progressBar_File->show();
|
||||
ui->progressBar_Progress->show();
|
||||
|
||||
ui->progressBar_Progress->setRange(0, 100);
|
||||
|
||||
ui->progressBar_Progress->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setTextVisible(true);
|
||||
|
||||
ui->progressBar_File->setFormat("%v / %m File Exports");
|
||||
|
||||
update();
|
||||
|
||||
StartExport(m_nTypeExport);
|
||||
|
||||
return;
|
||||
|
||||
int i=0;
|
||||
for(i=1 ; i<101 ; i++)
|
||||
{
|
||||
ui->progressBar_Progress->setValue(i);
|
||||
QThread::usleep(100*1000);
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DialogExportUSB::SetProgressExportFile(int nProgress, int nTotal)
|
||||
{
|
||||
ui->progressBar_File->setRange(1, nTotal);
|
||||
ui->progressBar_File->setValue(nProgress);
|
||||
|
||||
QString strInfo;
|
||||
strInfo = QString("%1 / %2 File Exports").arg(nProgress).arg(nTotal);
|
||||
ui->progressBar_File->setFormat(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportUSB::SetProgressExportPercent(quint64 nProgress, quint64 nTotal)
|
||||
{
|
||||
int nPercentage = (float)(100.0f*(float)nProgress/(float)nTotal);
|
||||
|
||||
if(nPercentage>100)
|
||||
{
|
||||
nPercentage = 100;
|
||||
}
|
||||
|
||||
ui->progressBar_Progress->setRange(1, 100);
|
||||
ui->progressBar_Progress->setValue(nPercentage);
|
||||
|
||||
//ui->progressBar_Progress->setRange(1, nTotal);
|
||||
//ui->progressBar_Progress->setValue(nProgress);
|
||||
|
||||
ui->progressBar_Progress->resetFormat();
|
||||
}
|
||||
|
||||
void DialogExportUSB::SetProgressSync(bool bComplete)
|
||||
{
|
||||
if(bComplete==false)
|
||||
{
|
||||
m_TimerSync.setInterval(300);
|
||||
m_TimerSync.start();
|
||||
|
||||
//ui->label_InfoProgress->hide();
|
||||
//ui->progressBar_Progress->hide();
|
||||
|
||||
//ui->label_InfoFile->setText("Export Sync");
|
||||
ui->label_InfoProgress->setText("Export Sync");
|
||||
|
||||
ui->pushButton_Export->setDisabled(true);
|
||||
ui->pushButton_Export->hide();
|
||||
|
||||
ui->pushButton_Cancel->setDisabled(true);
|
||||
|
||||
ui->pushButton_Cancel->setGeometry(240, 310, 130, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_TimerSync.isActive()==true)
|
||||
{
|
||||
m_TimerSync.stop();
|
||||
|
||||
//ui->progressBar_File->setFormat("Export Complete");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DialogExportUSB::SyncUpdate()
|
||||
{
|
||||
m_nSyncCheckCount++;
|
||||
|
||||
m_nSyncCheckCount = m_nSyncCheckCount%10;
|
||||
|
||||
QString strInfo;
|
||||
|
||||
strInfo = " Export File Sync ";
|
||||
int i=0;
|
||||
for(i=0 ; i<m_nSyncCheckCount ; i++)
|
||||
{
|
||||
strInfo += ". ";
|
||||
}
|
||||
|
||||
//ui->progressBar_File->setFormat(strInfo);
|
||||
ui->progressBar_Progress->setFormat(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportUSB::Mount()
|
||||
{
|
||||
QProcess process1;
|
||||
QProcess process2;
|
||||
|
||||
process1.setStandardOutputProcess(&process2);
|
||||
|
||||
process1.start("echo 1");
|
||||
#ifdef _PC
|
||||
process2.start("sudo -S mount -o uid=1000,gid=1000 /dev/sdb1 /home/birdhead/test");
|
||||
#else
|
||||
process2.start("sudo -S mount -o uid=1000,gid=1000 /dev/sda1 /home/birdhead/test");
|
||||
#endif
|
||||
process2.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
|
||||
// Wait for it to start
|
||||
if(!process1.waitForStarted())
|
||||
return;
|
||||
|
||||
bool retval = false;
|
||||
QByteArray buffer;
|
||||
// To be fair: you only need to wait here for a bit with shutdown,
|
||||
// but I will still leave the rest here for a generic solution
|
||||
while ((retval = process2.waitForFinished()))
|
||||
{
|
||||
buffer.append(process2.readAll());
|
||||
}
|
||||
|
||||
|
||||
process1.terminate();
|
||||
process2.terminate();
|
||||
|
||||
process1.waitForFinished(100);
|
||||
process2.waitForFinished(100);
|
||||
|
||||
process1.deleteLater();
|
||||
process2.deleteLater();
|
||||
|
||||
buffer.clear();
|
||||
|
||||
|
||||
|
||||
QString strInfo;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QString* pStrExternalDiskPath = pCommonData->GetExternalDiskPath();
|
||||
pStrExternalDiskPath->clear();
|
||||
|
||||
foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) {
|
||||
|
||||
qDebug() << storage.rootPath();
|
||||
if (storage.isReadOnly())
|
||||
qDebug() << "isReadOnly:" << storage.isReadOnly();
|
||||
|
||||
QString strName = storage.name();
|
||||
QString strDevice = storage.device();
|
||||
|
||||
|
||||
|
||||
if(strDevice.contains("/dev/sd")==true)
|
||||
{
|
||||
QStringList strList;
|
||||
|
||||
|
||||
*pStrExternalDiskPath = storage.rootPath();
|
||||
|
||||
//strList << "name:" << storage.name();
|
||||
//strList << "fileSystemType:" << storage.fileSystemType();
|
||||
//strList << "size:" << storage.bytesTotal()/1000/1000 << "MB";
|
||||
//strList << "availableSize:" << storage.bytesAvailable()/1000/1000 << "MB";
|
||||
|
||||
strInfo = QString("name: %1\r\nFieSystemType: %2\r\nFull Size: %3 MBytes\r\nAvailable Size: %4 MBytes\r\nSystem Path: %5").arg(storage.name()).arg((QString)storage.fileSystemType()).arg(storage.bytesTotal()/1000/1000).arg(storage.bytesAvailable()/1000/1000).arg(storage.rootPath());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_nStorageFreeSize = storage.bytesAvailable()/1000/1000;
|
||||
m_nStorageSize = storage.bytesTotal()/1000/1000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SetInfoString(strInfo);
|
||||
|
||||
if(m_nStorageFreeSize>100)
|
||||
{
|
||||
SetExportEnable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetExportEnable(false);
|
||||
}
|
||||
|
||||
/*
|
||||
ui->label_InfoUSB->setText(strInfo);
|
||||
|
||||
if(m_nStorageFreeSize>100)
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(true);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(false);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void DialogExportUSB::Umount()
|
||||
{
|
||||
QProcess process1;
|
||||
QProcess process2;
|
||||
|
||||
process1.setStandardOutputProcess(&process2);
|
||||
|
||||
process1.start("echo 1");
|
||||
process2.start("sudo -S umount /home/birdhead/test");
|
||||
process2.setProcessChannelMode(QProcess::ForwardedChannels);
|
||||
|
||||
// Wait for it to start
|
||||
if(!process1.waitForStarted())
|
||||
return;
|
||||
|
||||
bool retval = false;
|
||||
QByteArray buffer;
|
||||
// To be fair: you only need to wait here for a bit with shutdown,
|
||||
// but I will still leave the rest here for a generic solution
|
||||
while ((retval = process2.waitForFinished()))
|
||||
{
|
||||
buffer.append(process2.readAll());
|
||||
}
|
||||
|
||||
|
||||
process1.terminate();
|
||||
process2.terminate();
|
||||
|
||||
process1.waitForFinished(100);
|
||||
process2.waitForFinished(100);
|
||||
|
||||
process1.deleteLater();
|
||||
process2.deleteLater();
|
||||
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
|
||||
void DialogExportUSB::SetExportComplete()
|
||||
{
|
||||
ui->progressBar_File->setFormat("Export Complete");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
ui->label_InfoProgress->hide();
|
||||
ui->progressBar_Progress->hide();
|
||||
|
||||
ui->pushButton_Cancel->setDisabled(false);
|
||||
|
||||
Umount();
|
||||
}
|
||||
|
||||
void DialogExportUSB::SetExportInit()
|
||||
{
|
||||
ui->progressBar_File->setFormat("");
|
||||
//ui->progressBar_Progress->setFormat("Export Complete");
|
||||
ui->label_InfoProgress->show();
|
||||
ui->progressBar_Progress->show();
|
||||
|
||||
ui->pushButton_Cancel->setDisabled(false);
|
||||
}
|
||||
|
||||
|
||||
void DialogExportUSB::OnDeferredInit()
|
||||
{
|
||||
QString strInfo;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QString* pStrExternalDiskPath = pCommonData->GetExternalDiskPath();
|
||||
pStrExternalDiskPath->clear();
|
||||
|
||||
Mount();
|
||||
|
||||
/*
|
||||
foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) {
|
||||
|
||||
qDebug() << storage.rootPath();
|
||||
if (storage.isReadOnly())
|
||||
qDebug() << "isReadOnly:" << storage.isReadOnly();
|
||||
|
||||
QString strName = storage.name();
|
||||
QString strDevice = storage.device();
|
||||
|
||||
|
||||
|
||||
if(strDevice.contains("/dev/sd")==true)
|
||||
{
|
||||
QStringList strList;
|
||||
|
||||
|
||||
*pStrExternalDiskPath = storage.rootPath();
|
||||
|
||||
//strList << "name:" << storage.name();
|
||||
//strList << "fileSystemType:" << storage.fileSystemType();
|
||||
//strList << "size:" << storage.bytesTotal()/1000/1000 << "MB";
|
||||
//strList << "availableSize:" << storage.bytesAvailable()/1000/1000 << "MB";
|
||||
|
||||
strInfo = QString("name: %1\r\nFieSystemType: %2\r\nFull Size: %3 MBytes\r\nAvailable Size: %4 MBytes\r\nSystem Path: %5").arg(storage.name()).arg((QString)storage.fileSystemType()).arg(storage.bytesTotal()/1000/1000).arg(storage.bytesAvailable()/1000/1000).arg(storage.rootPath());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_nStorageFreeSize = storage.bytesAvailable()/1000/1000;
|
||||
m_nStorageSize = storage.bytesTotal()/1000/1000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
SetInfoString(strInfo);
|
||||
|
||||
if(m_nStorageFreeSize>100)
|
||||
{
|
||||
SetExportEnable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetExportEnable(false);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void DialogExportUSB::ProcessFinish(int nRet)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DialogExportUSB::ProcessReadyReadStandardOutput()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DialogExportUSB::ProcessReadyReadStandardError()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DialogExportUSB::SetInfoString(QString strInfo)
|
||||
{
|
||||
ui->label_InfoUSB->setText(strInfo);
|
||||
}
|
||||
|
||||
void DialogExportUSB::SetExportEnable(bool bEnable)
|
||||
{
|
||||
if(bEnable==true)
|
||||
{
|
||||
ui->pushButton_Export->setEnabled(true);
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
//ui->pushButton_Export->setEnabled(false);
|
||||
//ui->pushButton_Cancel->setEnabled(true);
|
||||
|
||||
ui->pushButton_Export->setDisabled(true);
|
||||
ui->pushButton_Export->hide();
|
||||
|
||||
ui->pushButton_Cancel->setEnabled(true);
|
||||
|
||||
ui->pushButton_Cancel->setGeometry(240, 310, 130, 40);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DialogExportUSB::reject()
|
||||
{
|
||||
return;
|
||||
}
|
||||
70
dialogexportusb.h
Normal file
70
dialogexportusb.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef DIALOGEXPORTUSB_H
|
||||
#define DIALOGEXPORTUSB_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QTimer>
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
namespace Ui {
|
||||
class DialogExportUSB;
|
||||
}
|
||||
|
||||
class DialogExportUSB : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogExportUSB(QWidget *parent = 0);
|
||||
~DialogExportUSB();
|
||||
|
||||
int m_nTypeExport;
|
||||
|
||||
int m_nStorageSize;
|
||||
int m_nStorageFreeSize;
|
||||
|
||||
int m_nSyncCheckCount;
|
||||
|
||||
QTimer m_TimerSync;
|
||||
QTimer m_TimerDeferred;
|
||||
|
||||
QProcess m_Process;
|
||||
|
||||
void SetInfoString(QString strInfo);
|
||||
void SetExportEnable(bool bEnable);
|
||||
|
||||
virtual void Mount();
|
||||
virtual void Umount();
|
||||
|
||||
virtual void reject();
|
||||
|
||||
public slots:
|
||||
void SetProgressExportFile(int nProgress, int nTotal);
|
||||
void SetProgressExportPercent(quint64 nProgress, quint64 nTotal);
|
||||
void SetProgressSync(bool bSync);
|
||||
|
||||
void SyncUpdate();
|
||||
|
||||
void SetExportComplete();
|
||||
void SetExportInit();
|
||||
|
||||
void OnDeferredInit();
|
||||
|
||||
virtual void ProcessFinish(int nRet);
|
||||
virtual void ProcessReadyReadStandardOutput();
|
||||
virtual void ProcessReadyReadStandardError();
|
||||
|
||||
signals:
|
||||
void StartExport(int nType);
|
||||
void StopExport();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
void on_pushButton_Export_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogExportUSB *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGEXPORTUSB_H
|
||||
215
dialogexportusb.ui
Normal file
215
dialogexportusb.ui
Normal file
@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogExportUSB</class>
|
||||
<widget class="QDialog" name="DialogExportUSB">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>603</width>
|
||||
<height>388</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: #f0f0f0;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>340</x>
|
||||
<y>310</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}
|
||||
|
||||
QPushButton:disabled
|
||||
{
|
||||
background: #b4b4b4;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Export">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>310</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #d0d0d0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: #101010;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
color: #202020;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Export</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoUSB">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>300</y>
|
||||
<width>430</width>
|
||||
<height>190</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoFile">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_InfoProgress">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>120</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #101010;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Progress</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar_File">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>60</y>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar
|
||||
{
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar_Progress">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>150</y>
|
||||
<width>500</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar
|
||||
{
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
131
dialoglogin.cpp
Normal file
131
dialoglogin.cpp
Normal file
@ -0,0 +1,131 @@
|
||||
#include "dialoglogin.h"
|
||||
#include "ui_dialoglogin.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
DialogLogin::DialogLogin(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogLogin)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
ui->setupUi(this);
|
||||
|
||||
setGeometry(0, 0, 1280, 1024);
|
||||
|
||||
ui->lineEdit_Password->setEchoMode(QLineEdit::Password);
|
||||
ui->lineEdit_ID->setFocus();
|
||||
|
||||
connect(ui->lineEdit_ID, SIGNAL(returnPressed()), this, SLOT(OnReturnPressed()));
|
||||
connect(ui->lineEdit_Password, SIGNAL(returnPressed()), this, SLOT(OnReturnPressed()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
DialogLogin::~DialogLogin()
|
||||
{
|
||||
disconnect(ui->lineEdit_ID, SIGNAL(returnPressed()), this, SLOT(OnReturnPressed()));
|
||||
disconnect(ui->lineEdit_Password, SIGNAL(returnPressed()), this, SLOT(OnReturnPressed()));
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogLogin::OnReturnPressed()
|
||||
{
|
||||
ui->pushButton_OK->click();
|
||||
}
|
||||
|
||||
void DialogLogin::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->frame->setGeometry((1280-600)/2, (1080-340)/2, 600, 340);
|
||||
//ui->label->setGeometry(0, 30, 1080, 80);
|
||||
//ui->pushButton->setGeometry(1080/2-250/2, 124, 250, 60);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
//ui->frame_info->setGeometry(100, 400, 1720, 200);
|
||||
//ui->label->setGeometry(0, 30, 1720, 80);
|
||||
//ui->pushButton->setGeometry(728, 124, 271, 61);
|
||||
}
|
||||
}
|
||||
|
||||
void DialogLogin::on_pushButton_OK_clicked()
|
||||
{
|
||||
|
||||
QString strID = ui->lineEdit_ID->text();
|
||||
QString strPassword = ui->lineEdit_Password->text();
|
||||
|
||||
bool bLoginSuccess = false;
|
||||
|
||||
// 1. 이 로그인 확인 작업을 위한 지역 DB 인스턴스를 생성합니다.
|
||||
SUTIL::SDatabase db(QString("LoginCheck_%1").arg(reinterpret_cast<quintptr>(this)));
|
||||
if (db.OpenDatabase("/home/birdhead/test.db") == 0) // 0이 성공
|
||||
{
|
||||
// 2. 보안과 효율을 위해 COUNT(*) 쿼리와 '?' 플레이스홀더를 사용합니다.
|
||||
QString query = "SELECT COUNT(*) FROM LoginUser WHERE LoginID = ? AND LoginPassword = ?;";
|
||||
|
||||
// 3. 사용자 입력을 안전하게 파라미터로 전달합니다.
|
||||
QVariantList params;
|
||||
params << strID << strPassword;
|
||||
|
||||
// 4. executeScalar 헬퍼를 사용해 일치하는 사용자의 '수'를 가져옵니다.
|
||||
// 이 수가 0보다 크면, 로그인 정보가 일치하는 것입니다.
|
||||
if (db.executeScalar(query, params).toInt() > 0)
|
||||
{
|
||||
bLoginSuccess = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << "DB open failed for login check.";
|
||||
// 필요에 따라 사용자에게 DB 오류 메시지 표시
|
||||
}
|
||||
|
||||
// 5. 최종 결과에 따라 다이얼로그를 닫습니다.
|
||||
if (bLoginSuccess)
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 로그인 실패 시 사용자에게 알림 (예: QMessageBox)
|
||||
QMessageBox::warning(this, "Login Failed", "Invalid ID or password.");
|
||||
// 기존 코드처럼 실패 시 아무것도 안 하려면 이 else 블록을 비워두거나 제거합니다.
|
||||
}
|
||||
|
||||
/*
|
||||
QString strID;
|
||||
QString strPassword;
|
||||
|
||||
strID = ui->lineEdit_ID->text();
|
||||
strPassword = ui->lineEdit_Password->text();
|
||||
|
||||
QString strQuery;
|
||||
strQuery = QString("select * from LoginUser where LoginID='%1' and LoginPassword='%2';").arg(strID).arg(strPassword);
|
||||
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
SDatabase* pDatabase = pCommonData->GetDatabase();
|
||||
pDatabase->ExecuteQuery(strQuery);
|
||||
QList<QStringList*>* pResult = pDatabase->GetResult();
|
||||
|
||||
if(pResult->size()>0)
|
||||
{
|
||||
pCommonData->ReleaseDatabase();
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCommonData->ReleaseDatabase();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void DialogLogin::reject()
|
||||
{
|
||||
|
||||
}
|
||||
33
dialoglogin.h
Normal file
33
dialoglogin.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef DIALOGLOGIN_H
|
||||
#define DIALOGLOGIN_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogLogin;
|
||||
}
|
||||
|
||||
class DialogLogin : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogLogin(QWidget *parent = 0);
|
||||
~DialogLogin();
|
||||
|
||||
public:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
virtual void reject();
|
||||
|
||||
public slots:
|
||||
void OnReturnPressed();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_OK_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogLogin *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGLOGIN_H
|
||||
248
dialoglogin.ui
Normal file
248
dialoglogin.ui
Normal file
@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogLogin</class>
|
||||
<widget class="QDialog" name="DialogLogin">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #40202020;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>550</x>
|
||||
<y>390</y>
|
||||
<width>600</width>
|
||||
<height>340</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: white;</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>200</y>
|
||||
<width>311</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>270</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: gray;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Login">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>20</y>
|
||||
<width>131</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignHCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_OK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>120</x>
|
||||
<y>270</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>140</y>
|
||||
<width>311</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>140</y>
|
||||
<width>151</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>200</y>
|
||||
<width>151</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
78
dialogloginuseradd.cpp
Normal file
78
dialogloginuseradd.cpp
Normal file
@ -0,0 +1,78 @@
|
||||
#include "dialogloginuseradd.h"
|
||||
#include "ui_dialogloginuseradd.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogLoginUserAdd::DialogLoginUserAdd(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogLoginUserAdd)
|
||||
{
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->lineEdit_Password->setEchoMode(QLineEdit::Password);
|
||||
ui->lineEdit_Password_Confirm->setEchoMode(QLineEdit::Password);
|
||||
|
||||
ui->label_Password_Check->setVisible(false);
|
||||
|
||||
ui->lineEdit_ID->setFocus();
|
||||
}
|
||||
|
||||
DialogLoginUserAdd::~DialogLoginUserAdd()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogLoginUserAdd::on_pushButton_OK_clicked()
|
||||
{
|
||||
QString strID = ui->lineEdit_ID->text();
|
||||
QString strPassword = ui->lineEdit_Password->text();
|
||||
QString strPasswordConfirm = ui->lineEdit_Password_Confirm->text();
|
||||
|
||||
if(strPassword!=strPasswordConfirm)
|
||||
{
|
||||
ui->label_Password_Check->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->label_Password_Check->setVisible(false);
|
||||
|
||||
bool bSuccess = false;
|
||||
// 1. 이 작업을 위한 지역 DB 인스턴스를 생성합니다.
|
||||
SUTIL::SDatabase db(QString("AddUser_%1").arg(reinterpret_cast<quintptr>(this)));
|
||||
if (db.OpenDatabase("/home/birdhead/test.db") == 0) // 0이 성공
|
||||
{
|
||||
// 2. 파라미터 바인딩을 사용하여 SQL Injection을 완벽하게 방어합니다.
|
||||
QString query = "INSERT INTO LoginUser (LoginID, LoginPassword) VALUES (?, ?);";
|
||||
|
||||
QVariantList params;
|
||||
params << strID << strPassword;
|
||||
|
||||
// 3. ExecuteNonQuery의 반환 값(bool)을 확인하여 작업 성공 여부를 판단합니다.
|
||||
if (db.ExecuteNonQuery(query, params)) {
|
||||
bSuccess = true;
|
||||
} else {
|
||||
// INSERT 실패 시 (예: 동일한 ID가 이미 존재할 경우) 사용자에게 오류를 알립니다.
|
||||
QMessageBox::warning(this, "Creation Failed", "Failed to add new user.\nThe ID might already exist.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::critical(this, "Database Error", "Could not connect to the database.");
|
||||
}
|
||||
|
||||
// 4. 데이터베이스 작업이 성공했을 때만 다이얼로그를 닫습니다.
|
||||
if (bSuccess)
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DialogLoginUserAdd::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
27
dialogloginuseradd.h
Normal file
27
dialogloginuseradd.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef DIALOGLOGINUSERADD_H
|
||||
#define DIALOGLOGINUSERADD_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogLoginUserAdd;
|
||||
}
|
||||
|
||||
class DialogLoginUserAdd : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogLoginUserAdd(QWidget *parent = 0);
|
||||
~DialogLoginUserAdd();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_OK_clicked();
|
||||
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogLoginUserAdd *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGLOGINUSERADD_H
|
||||
305
dialogloginuseradd.ui
Normal file
305
dialogloginuseradd.ui
Normal file
@ -0,0 +1,305 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogLoginUserAdd</class>
|
||||
<widget class="QDialog" name="DialogLoginUserAdd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>598</width>
|
||||
<height>468</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>471</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: white;</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLineEdit" name="lineEdit_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>180</y>
|
||||
<width>311</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>370</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: gray;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Login">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>20</y>
|
||||
<width>441</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignHCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add User</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_OK">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>370</y>
|
||||
<width>171</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>120</y>
|
||||
<width>311</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>120</y>
|
||||
<width>151</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ID:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>180</y>
|
||||
<width>151</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Password_Confirm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>240</y>
|
||||
<width>151</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignRight';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Confirm:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_Password_Confirm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>240</y>
|
||||
<width>311</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLineEdit
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Password_Check">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>300</y>
|
||||
<width>301</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignLeft';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check Password Again</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>lineEdit_ID</tabstop>
|
||||
<tabstop>lineEdit_Password</tabstop>
|
||||
<tabstop>lineEdit_Password_Confirm</tabstop>
|
||||
<tabstop>pushButton_OK</tabstop>
|
||||
<tabstop>pushButton_Cancel</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
89
dialogmisscapture.cpp
Normal file
89
dialogmisscapture.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
#include "dialogmisscapture.h"
|
||||
#include "ui_dialogmisscapture.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogMissCapture::DialogMissCapture(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogMissCapture)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup | Qt::WindowStaysOnTopHint);
|
||||
|
||||
//setWindowFlags(Qt::FramelessWindowHint);
|
||||
|
||||
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
DialogMissCapture::~DialogMissCapture()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogMissCapture::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->frame_info->setGeometry(100, 400, 1080, 200);
|
||||
ui->label->setGeometry(0, 30, 1080, 80);
|
||||
ui->pushButton->setGeometry(1080/2-250/2, 124, 250, 60);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_info->setGeometry(100, 400, 1720, 200);
|
||||
ui->label->setGeometry(0, 30, 1720, 80);
|
||||
ui->pushButton->setGeometry(728, 124, 271, 61);
|
||||
}
|
||||
}
|
||||
|
||||
void DialogMissCapture::Show()
|
||||
{
|
||||
show();
|
||||
}
|
||||
|
||||
void DialogMissCapture::on_pushButton_clicked()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
//pCommonData->ClearCaptureImage();
|
||||
pCommonData->GetThreadCaptureImage()->ClearMissCapture();
|
||||
|
||||
hide();
|
||||
}
|
||||
|
||||
|
||||
void DialogMissCapture::SetErrorType(int nType)
|
||||
{
|
||||
QString strErrorMessage;
|
||||
|
||||
if(nType==0)
|
||||
{
|
||||
strErrorMessage = "Check Patient Selection!!";
|
||||
}
|
||||
else if(nType==0x01)
|
||||
{
|
||||
strErrorMessage = "Error: Database Check!";
|
||||
}
|
||||
else if(nType==0x02)
|
||||
{
|
||||
strErrorMessage = "Error: Lock Check!";
|
||||
}
|
||||
else if(nType==0x04)
|
||||
{
|
||||
strErrorMessage = "Error: Image File Write!";
|
||||
}
|
||||
else if(nType==0x08)
|
||||
{
|
||||
strErrorMessage = "Error: Create Study!";
|
||||
}
|
||||
|
||||
SetErrorString(strErrorMessage);
|
||||
}
|
||||
|
||||
void DialogMissCapture::SetErrorString(const QString strErrorMessage)
|
||||
{
|
||||
ui->label->setText(strErrorMessage);
|
||||
ui->pushButton->setEnabled(true);
|
||||
}
|
||||
33
dialogmisscapture.h
Normal file
33
dialogmisscapture.h
Normal file
@ -0,0 +1,33 @@
|
||||
#ifndef DIALOGMISSCAPTURE_H
|
||||
#define DIALOGMISSCAPTURE_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogMissCapture;
|
||||
}
|
||||
|
||||
class DialogMissCapture : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogMissCapture(QWidget *parent = 0);
|
||||
~DialogMissCapture();
|
||||
|
||||
void SetErrorType(int nType);
|
||||
void SetErrorString(const QString strErrorMessage);
|
||||
|
||||
void Show();
|
||||
|
||||
public:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogMissCapture *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGMISSCAPTURE_H
|
||||
114
dialogmisscapture.ui
Normal file
114
dialogmisscapture.ui
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogMissCapture</class>
|
||||
<widget class="QDialog" name="DialogMissCapture">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: transparent;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1920</width>
|
||||
<height>1080</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #40202020;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>400</y>
|
||||
<width>1720</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background: white;</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>30</y>
|
||||
<width>1720</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
qproperty-alignment: 'AlignVCenter | AlignHCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check Patient Selection!!</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>728</x>
|
||||
<y>124</y>
|
||||
<width>271</width>
|
||||
<height>61</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
96
dialogpowerbutton.cpp
Normal file
96
dialogpowerbutton.cpp
Normal file
@ -0,0 +1,96 @@
|
||||
#include "dialogpowerbutton.h"
|
||||
#include "ui_dialogpowerbutton.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QProcess>
|
||||
#include <QKeyEvent>
|
||||
|
||||
DialogPowerButton::DialogPowerButton(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogPowerButton)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
|
||||
connect(this, SIGNAL(SendCaptureFootSwitch()), pMainWindow, SLOT(CaptureFootSwitch()));
|
||||
|
||||
|
||||
ui->pushButton_shutdown->setVisible(false);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
DialogPowerButton::~DialogPowerButton()
|
||||
{
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
|
||||
disconnect(this, SIGNAL(SendCaptureFootSwitch()), pMainWindow, SLOT(CaptureFootSwitch()));
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogPowerButton::on_pushButton_cancel_clicked()
|
||||
{
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
void DialogPowerButton::on_pushButton_shutdown_clicked()
|
||||
{
|
||||
//QProcess::execute("shutdown -P now");
|
||||
QProcess process;
|
||||
|
||||
process.start("shutdown -P now");
|
||||
process.waitForFinished();
|
||||
}
|
||||
|
||||
void DialogPowerButton::on_pushButton_restart_clicked()
|
||||
{
|
||||
QProcess::execute("shutdown -r now");
|
||||
}
|
||||
|
||||
void DialogPowerButton::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
/*
|
||||
QPainter painter(this);
|
||||
QSize nSize = size();
|
||||
int nPaddingLeft = 0;
|
||||
|
||||
QRect rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft, nSize.height());
|
||||
|
||||
QColor colorBackground;
|
||||
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
|
||||
colorBackground = Qt::white;
|
||||
if(m_pImageBackground!=NULL)
|
||||
{
|
||||
//painter.fillRect(QRect(0, 0, nSize.width(), nSize.height()), Qt::black);
|
||||
|
||||
painter.drawImage(rectDisplay, *m_pImageBackground);
|
||||
painter.fillRect(QRect(0, 0, nSize.width(), nSize.height()), QColor(0, 0, 0, 128));
|
||||
return;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void DialogPowerButton::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
int nKey = event->key();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
SendCaptureFootSwitch();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
SendCaptureFootSwitch();
|
||||
}
|
||||
}
|
||||
38
dialogpowerbutton.h
Normal file
38
dialogpowerbutton.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef DIALOGPOWERBUTTON_H
|
||||
#define DIALOGPOWERBUTTON_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogPowerButton;
|
||||
}
|
||||
|
||||
class DialogPowerButton : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogPowerButton(QWidget *parent = 0);
|
||||
~DialogPowerButton();
|
||||
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_cancel_clicked();
|
||||
|
||||
void on_pushButton_shutdown_clicked();
|
||||
|
||||
void on_pushButton_restart_clicked();
|
||||
|
||||
signals:
|
||||
void SendCaptureFootSwitch();
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
|
||||
private:
|
||||
Ui::DialogPowerButton *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGPOWERBUTTON_H
|
||||
118
dialogpowerbutton.ui
Normal file
118
dialogpowerbutton.ui
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogPowerButton</class>
|
||||
<widget class="QDialog" name="DialogPowerButton">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: transparent;
|
||||
border: 2px white;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: none;
|
||||
background-color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_shutdown">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>220</y>
|
||||
<width>89</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Shutdown</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>160</y>
|
||||
<width>89</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_restart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>160</y>
|
||||
<width>89</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restart</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>40</y>
|
||||
<width>501</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
|
||||
qproperty-alignment: 'AlignHCenter | AlignVCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Restart ?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
437
dialogprogress.cpp
Normal file
437
dialogprogress.cpp
Normal file
@ -0,0 +1,437 @@
|
||||
#include "dialogprogress.h"
|
||||
#include "ui_dialogprogress.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogProgress::DialogProgress(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogProgress)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_bAutoRetryDICOMSend = false;
|
||||
|
||||
//setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
|
||||
//setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
|
||||
ui->pushButton_Cancel->hide();
|
||||
ui->pushButton_Send->hide();
|
||||
|
||||
m_bError = false;
|
||||
|
||||
connect(&m_TimerDisplay, SIGNAL(timeout()), this, SLOT(OnTimerCalled()));
|
||||
}
|
||||
|
||||
DialogProgress::~DialogProgress()
|
||||
{
|
||||
disconnect(&m_TimerDisplay, SIGNAL(timeout()), this, SLOT(OnTimerCalled()));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
int DialogProgress::exec()
|
||||
{
|
||||
int nRet = 0;
|
||||
|
||||
//MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
|
||||
//int nCheck = pMainWindow->CheckAliveWorklist();
|
||||
|
||||
QString strText;
|
||||
|
||||
//if(nCheck<1)
|
||||
{
|
||||
strText = ui->progressBar->text();
|
||||
//ui->label_Info->hide();
|
||||
|
||||
//ChangeProgress(0);
|
||||
}
|
||||
|
||||
//ui->pushButton_Cancel->hide();
|
||||
|
||||
nRet = QDialog::exec();
|
||||
|
||||
|
||||
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DialogProgress::ChangeProgress(int nProgress)
|
||||
{
|
||||
ui->progressBar->hide();
|
||||
ui->label_Info->show();
|
||||
ui->label_Info->setText("4 Images Send Complete!");
|
||||
//ui->label_Info->setText("4 Images Delete!");
|
||||
ui->pushButton_Cancel->setText("OK");
|
||||
}
|
||||
|
||||
void DialogProgress::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
if(m_nType&0x10)
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
SThreadSendDICOM* pThreadSendDICOM = pCommonData->GetThreadSendDICOM();
|
||||
|
||||
if(pThreadSendDICOM->GetCurrentState()&0x40)
|
||||
{
|
||||
pThreadSendDICOM->SetExitSendImageList();
|
||||
|
||||
while(pThreadSendDICOM->IsExitSendImageList()==true)
|
||||
{
|
||||
usleep(10*1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if(m_TimerDisplay.isActive()==true)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
}
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
|
||||
void DialogProgress::OnWorklistComplete()
|
||||
{
|
||||
if(m_TimerDisplay.isActive()==true)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
}
|
||||
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogProgress::OnWorklistError()
|
||||
{
|
||||
DisplayInfo(-1);
|
||||
//if(m_TimerDisplay.isActive()==true)
|
||||
{
|
||||
//m_TimerDisplay.stop();
|
||||
}
|
||||
|
||||
//done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogProgress::SendComplete()
|
||||
{
|
||||
m_strSendInfo = QString("Send Complete!!");
|
||||
ui->pushButton_Cancel->show();
|
||||
ui->pushButton_Cancel->setText("OK");
|
||||
update();
|
||||
|
||||
//QThread::msleep(1000);
|
||||
m_bSendComplete = true;
|
||||
}
|
||||
|
||||
void DialogProgress::DisplayInfo(int nValue)
|
||||
{
|
||||
if(nValue<0)
|
||||
{
|
||||
|
||||
//m_TimerDisplay.stop();
|
||||
|
||||
QString strError = "";
|
||||
|
||||
if(nValue==-11)
|
||||
{
|
||||
strError = QString("Error: Patient Info");
|
||||
if(m_TimerDisplay.isActive()==true)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
}
|
||||
}
|
||||
else if(nValue==-12)
|
||||
{
|
||||
strError = QString("Error: Network Connection");
|
||||
if(m_TimerDisplay.isActive()==true)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strError = QString("Check Server Info!! (%1)").arg(nValue);
|
||||
}
|
||||
|
||||
ui->label_Info->setText(strError);
|
||||
ui->label_Info->show();
|
||||
ui->progressBar->setTextVisible(false);
|
||||
ui->pushButton_Cancel->setText("OK");
|
||||
ui->progressBar->setValue(0);
|
||||
|
||||
ui->pushButton_Cancel->show();
|
||||
ui->pushButton_Cancel->update();
|
||||
|
||||
QString strStyle = QString("QLabel \n"
|
||||
"{ \n"
|
||||
" color: black; \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: 18px; \n"
|
||||
" font-weight: light; \n"
|
||||
" padding-left: 0px; \n"
|
||||
" padding-top: 0px; \n"
|
||||
//" qproperty-backgroundVisible: false; \n"
|
||||
" border: none; \n"
|
||||
//" qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff'; \n"
|
||||
" background: transparent; \n"
|
||||
" qproperty-alignment: 'AlignCenter'; \n"
|
||||
"} \n");
|
||||
|
||||
ui->label_Info->setStyleSheet(strStyle);
|
||||
|
||||
|
||||
m_bError = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
QString strInfo = QString("Search...");
|
||||
ui->label_Info->setText(strInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DialogProgress::DisplayInfo(QString strInfo)
|
||||
{
|
||||
m_strSendInfo = strInfo;
|
||||
}
|
||||
|
||||
void DialogProgress::DisplayInfo(int nValue, int nTotal)
|
||||
{
|
||||
m_nSendCount = nValue;
|
||||
m_nSendTotal = nTotal;
|
||||
}
|
||||
|
||||
|
||||
void DialogProgress::Init(int nType)
|
||||
{
|
||||
m_nSendCount = 0;
|
||||
m_nSendTotal = 0;
|
||||
m_bSendComplete = false;
|
||||
m_nType = nType;
|
||||
m_nCount = 0;
|
||||
//ui->label_Info->hide();
|
||||
ui->label_Info->setText("Connect to Server");
|
||||
|
||||
ui->progressBar->show();
|
||||
ui->pushButton_Cancel->setText("Cancel");
|
||||
|
||||
ui->progressBar->setTextVisible(false);
|
||||
|
||||
QString strStyle = QString("QLabel \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto'; \n"
|
||||
" font-size: 18px; \n"
|
||||
" font-weight: light; \n"
|
||||
" padding-left: 0px; \n"
|
||||
" padding-top: 0px; \n"
|
||||
//" qproperty-backgroundVisible: false; \n"
|
||||
" border: none; \n"
|
||||
//" qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff'; \n"
|
||||
" background: transparent; \n"
|
||||
" qproperty-alignment: 'AlignCenter'; \n"
|
||||
"} \n");
|
||||
|
||||
ui->label_Info->setStyleSheet(strStyle);
|
||||
|
||||
//if(nType==0)
|
||||
{
|
||||
m_TimerDisplay.setInterval(30);
|
||||
if(m_TimerDisplay.isActive()==false)
|
||||
{
|
||||
m_TimerDisplay.start(30);
|
||||
}
|
||||
|
||||
if(nType&0x01)
|
||||
{
|
||||
ui->progressBar->setRange(0, 1);
|
||||
ui->progressBar->setValue(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->progressBar->setRange(0, 100);
|
||||
ui->progressBar->setValue(100);
|
||||
}
|
||||
|
||||
if(nType&0x02)
|
||||
{
|
||||
ui->label_Info->setText("Storage Clean");
|
||||
}
|
||||
|
||||
if(nType&0x10)
|
||||
{
|
||||
//m_nType = 1;
|
||||
ui->pushButton_Cancel->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Cancel->hide();
|
||||
}
|
||||
|
||||
if(nType&0x40)
|
||||
{
|
||||
ui->pushButton_Cancel->show();
|
||||
ui->pushButton_Cancel->setText("OK");
|
||||
|
||||
if(nType&0x01)
|
||||
{
|
||||
ui->label_Info->setText("Error: Database");
|
||||
}
|
||||
else if(nType&0x02)
|
||||
{
|
||||
ui->label_Info->setText("Error: Database Lock");
|
||||
}
|
||||
else if(nType&0x04)
|
||||
{
|
||||
ui->label_Info->setText("Error: Image File");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DialogProgress::SetAutoRetryDICOMSend(bool bSet)
|
||||
{
|
||||
m_bAutoRetryDICOMSend = bSet;
|
||||
}
|
||||
|
||||
|
||||
void DialogProgress::OnTimerCalled()
|
||||
{
|
||||
if(m_nType==0)
|
||||
{
|
||||
m_nCount++;
|
||||
ui->progressBar->setValue(m_nCount%100);
|
||||
}
|
||||
else if(m_nType&0x01)
|
||||
{
|
||||
//DICOM Worklist, Storage
|
||||
if(m_nSendTotal>0)
|
||||
{
|
||||
ui->progressBar->setRange(0, m_nSendTotal);
|
||||
}
|
||||
|
||||
if(m_nSendCount>0)
|
||||
{
|
||||
ui->progressBar->setValue(m_nSendCount);
|
||||
ui->label_Info->setText(m_strSendInfo);
|
||||
}
|
||||
else if(m_nSendCount<0)
|
||||
{
|
||||
int nValue = ui->progressBar->value();
|
||||
ui->progressBar->setValue(0);
|
||||
ui->label_Info->setText("Send Complete");
|
||||
m_bSendComplete = true;
|
||||
}
|
||||
|
||||
if(m_bError==true)
|
||||
{
|
||||
ui->label_Info->setText("Failed: Send DICOM");
|
||||
m_TimerDisplay.stop();
|
||||
|
||||
ui->pushButton_Cancel->setText("Close");
|
||||
|
||||
if(m_bAutoRetryDICOMSend==true)
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Send->show();
|
||||
|
||||
ui->pushButton_Cancel->setGeometry(360, 70, 130, 40);
|
||||
ui->pushButton_Send->setGeometry(180, 70, 130, 40);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_bSendComplete==true)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
if(pCommonData->IsAutoCloseSendFinish()==true)
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Cancel->setText("Close");
|
||||
ui->pushButton_Cancel->setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(m_nType&0x02)
|
||||
{
|
||||
ui->label_Info->setText("Storage Clean");
|
||||
m_nCount++;
|
||||
ui->progressBar->setValue(m_nCount%100);
|
||||
}
|
||||
|
||||
/*
|
||||
else if(m_nType==3)
|
||||
{
|
||||
m_TimerDisplay.stop();
|
||||
|
||||
ui->label_Info->setText("Error: Check Network Share Folder Setting!!!!");
|
||||
m_nCount++;
|
||||
ui->progressBar->setValue(0);
|
||||
ui->pushButton_Cancel->setText("Done");
|
||||
ui->pushButton_Cancel->show();
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DialogProgress::SetTypeMakeDICOM()
|
||||
{
|
||||
m_nDICOMProgressType = 1;
|
||||
}
|
||||
|
||||
void DialogProgress::SetTypeSendDICOM()
|
||||
{
|
||||
m_nDICOMProgressType = 2;
|
||||
}
|
||||
|
||||
void DialogProgress::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
int nKey = event->key();
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void DialogProgress::reject()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DialogProgress::on_pushButton_Send_clicked()
|
||||
{
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
|
||||
bool DialogProgress::IsError()
|
||||
{
|
||||
return m_bError;
|
||||
}
|
||||
81
dialogprogress.h
Normal file
81
dialogprogress.h
Normal file
@ -0,0 +1,81 @@
|
||||
#ifndef DIALOGPROGRESS_H
|
||||
#define DIALOGPROGRESS_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
namespace Ui {
|
||||
class DialogProgress;
|
||||
}
|
||||
|
||||
class DialogProgress : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogProgress(QWidget *parent = 0);
|
||||
~DialogProgress();
|
||||
|
||||
virtual void reject();
|
||||
|
||||
|
||||
void ChangeProgress(int nProgress);
|
||||
|
||||
void Init(int nType=0);
|
||||
|
||||
virtual int exec();
|
||||
|
||||
void DisplayInfo(int nValue);
|
||||
|
||||
void DisplayInfo(QString strInfo);
|
||||
|
||||
void DisplayInfo(int nValue, int nTotal);
|
||||
|
||||
void SendComplete();
|
||||
|
||||
void SetTypeMakeDICOM();
|
||||
void SetTypeSendDICOM();
|
||||
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
|
||||
bool IsError();
|
||||
|
||||
void SetAutoRetryDICOMSend(bool bSet);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
bool m_bAutoRetryDICOMSend;
|
||||
bool m_bError;
|
||||
int m_nDICOMProgressType;
|
||||
QTimer m_TimerDisplay;
|
||||
int m_nCount;
|
||||
int m_nType;
|
||||
|
||||
int m_nSendCount;
|
||||
int m_nSendTotal;
|
||||
QString m_strSendInfo;
|
||||
bool m_bSendComplete;
|
||||
|
||||
QString m_strErrorInfo;
|
||||
|
||||
public slots:
|
||||
void OnWorklistComplete();
|
||||
|
||||
void OnWorklistError();
|
||||
|
||||
void OnTimerCalled();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
void on_pushButton_Send_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogProgress *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGPROGRESS_H
|
||||
139
dialogprogress.ui
Normal file
139
dialogprogress.ui
Normal file
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogProgress</class>
|
||||
<widget class="QDialog" name="DialogProgress">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>671</width>
|
||||
<height>122</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::DefaultContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Progress Status</string>
|
||||
</property>
|
||||
<property name="windowOpacity">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>270</x>
|
||||
<y>70</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: gray;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #c0c0c0;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>22</y>
|
||||
<width>621</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QProgressBar
|
||||
{
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>24</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>22</y>
|
||||
<width>621</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>4 Image Send Complete</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Send">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>70</y>
|
||||
<width>130</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
152
dialogsettingnetworkshare.cpp
Normal file
152
dialogsettingnetworkshare.cpp
Normal file
@ -0,0 +1,152 @@
|
||||
#include "dialogsettingnetworkshare.h"
|
||||
#include "ui_dialogsettingnetworkshare.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogSettingNetworkShare::DialogSettingNetworkShare(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogSettingNetworkShare)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
NetworkShareInfo* pNetworkShareInfo = pCommonData->GetNetworkShareInfo();
|
||||
|
||||
QString strIP = pNetworkShareInfo->m_strIP;
|
||||
QString strID = pNetworkShareInfo->m_strID;
|
||||
QString strPassword = pNetworkShareInfo->m_strPassword;
|
||||
QString strShareFolder = pNetworkShareInfo->m_strShareFolder;
|
||||
QString strVersion = pNetworkShareInfo->m_strVersion;
|
||||
|
||||
if(strIP=="127.0.0.1")
|
||||
{
|
||||
strIP.clear();
|
||||
}
|
||||
|
||||
if(strID=="Share ID")
|
||||
{
|
||||
strID.clear();
|
||||
}
|
||||
|
||||
if(strPassword=="Share Password")
|
||||
{
|
||||
strPassword.clear();
|
||||
}
|
||||
|
||||
if(strShareFolder=="Share Folder")
|
||||
{
|
||||
strShareFolder.clear();
|
||||
}
|
||||
|
||||
if(strVersion=="SMB Version")
|
||||
{
|
||||
strVersion.clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
ui->plainTextEdit_IP->insertPlainText(strIP);
|
||||
ui->plainTextEdit_ID->insertPlainText(strID);
|
||||
ui->plainTextEdit_Password->insertPlainText(strPassword);
|
||||
ui->plainTextEdit_Share_Folder->insertPlainText(strShareFolder);
|
||||
ui->plainTextEdit_SMB_Version->insertPlainText(strVersion);
|
||||
ui->checkBox_Enable->setChecked(pNetworkShareInfo->m_bEnable);
|
||||
ui->checkBox_AutoSend->setChecked(pNetworkShareInfo->m_bAutoSend);
|
||||
|
||||
SetEnable(pNetworkShareInfo->m_bEnable);
|
||||
|
||||
ui->checkBox_Enable->setFocus();
|
||||
}
|
||||
|
||||
DialogSettingNetworkShare::~DialogSettingNetworkShare()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogSettingNetworkShare::on_pushButton_Save_clicked()
|
||||
{
|
||||
QString strIP = ui->plainTextEdit_IP->toPlainText();
|
||||
QString strID = ui->plainTextEdit_ID->toPlainText();
|
||||
QString strPassword = ui->plainTextEdit_Password->toPlainText();
|
||||
QString strShareFolder = ui->plainTextEdit_Share_Folder->toPlainText();
|
||||
|
||||
bool bEnable = ui->checkBox_Enable->isChecked();
|
||||
|
||||
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
void DialogSettingNetworkShare::on_pushButton_Cancel_clicked()
|
||||
{
|
||||
done(QDialog::Rejected);
|
||||
}
|
||||
|
||||
void DialogSettingNetworkShare::on_checkBox_Enable_stateChanged(int arg1)
|
||||
{
|
||||
bool bEnable = ui->checkBox_Enable->isChecked();
|
||||
|
||||
SetEnable(bEnable);
|
||||
}
|
||||
|
||||
void DialogSettingNetworkShare::SetEnable(bool bEnable)
|
||||
{
|
||||
if(bEnable==true)
|
||||
{
|
||||
ui->plainTextEdit_IP->setEnabled(true);
|
||||
ui->plainTextEdit_Share_Folder->setEnabled(true);
|
||||
ui->plainTextEdit_ID->setEnabled(true);
|
||||
ui->plainTextEdit_Password->setEnabled(true);
|
||||
ui->plainTextEdit_SMB_Version->setEnabled(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->plainTextEdit_IP->setDisabled(true);
|
||||
ui->plainTextEdit_Share_Folder->setDisabled(true);
|
||||
ui->plainTextEdit_ID->setDisabled(true);
|
||||
ui->plainTextEdit_Password->setDisabled(true);
|
||||
ui->plainTextEdit_SMB_Version->setDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
QString DialogSettingNetworkShare::GetIP()
|
||||
{
|
||||
return ui->plainTextEdit_IP->toPlainText();
|
||||
}
|
||||
QString DialogSettingNetworkShare::GetID()
|
||||
{
|
||||
return ui->plainTextEdit_ID->toPlainText();
|
||||
}
|
||||
QString DialogSettingNetworkShare::GetPassword()
|
||||
{
|
||||
return ui->plainTextEdit_Password->toPlainText();
|
||||
}
|
||||
QString DialogSettingNetworkShare::GetShareFolder()
|
||||
{
|
||||
return ui->plainTextEdit_Share_Folder->toPlainText();
|
||||
}
|
||||
|
||||
QString DialogSettingNetworkShare::GetSMBVersion()
|
||||
{
|
||||
return ui->plainTextEdit_SMB_Version->toPlainText();
|
||||
}
|
||||
|
||||
bool DialogSettingNetworkShare::IsEnabledNetworkShare()
|
||||
{
|
||||
bool bEnable = ui->checkBox_Enable->isChecked();
|
||||
|
||||
return bEnable;
|
||||
}
|
||||
|
||||
void DialogSettingNetworkShare::on_checkBox_AutoSend_clicked()
|
||||
{
|
||||
bool bEnable = ui->checkBox_Enable->isChecked();
|
||||
|
||||
SetEnable(bEnable);
|
||||
}
|
||||
|
||||
bool DialogSettingNetworkShare::IsNetworkAutoSend()
|
||||
{
|
||||
bool bAutoSend = ui->checkBox_AutoSend->isChecked();
|
||||
|
||||
return bAutoSend;
|
||||
}
|
||||
41
dialogsettingnetworkshare.h
Normal file
41
dialogsettingnetworkshare.h
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef DIALOGSETTINGNETWORKSHARE_H
|
||||
#define DIALOGSETTINGNETWORKSHARE_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class DialogSettingNetworkShare;
|
||||
}
|
||||
|
||||
class DialogSettingNetworkShare : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogSettingNetworkShare(QWidget *parent = 0);
|
||||
~DialogSettingNetworkShare();
|
||||
|
||||
void SetEnable(bool bEnable);
|
||||
|
||||
QString GetIP();
|
||||
QString GetID();
|
||||
QString GetPassword();
|
||||
QString GetShareFolder();
|
||||
QString GetSMBVersion();
|
||||
bool IsEnabledNetworkShare();
|
||||
bool IsNetworkAutoSend();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Save_clicked();
|
||||
|
||||
void on_pushButton_Cancel_clicked();
|
||||
|
||||
void on_checkBox_Enable_stateChanged(int arg1);
|
||||
|
||||
void on_checkBox_AutoSend_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogSettingNetworkShare *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGSETTINGNETWORKSHARE_H
|
||||
582
dialogsettingnetworkshare.ui
Normal file
582
dialogsettingnetworkshare.ui
Normal file
@ -0,0 +1,582 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogSettingNetworkShare</class>
|
||||
<widget class="QDialog" name="DialogSettingNetworkShare">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>720</width>
|
||||
<height>440</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>720</width>
|
||||
<height>441</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #A6B1C2;
|
||||
border: 3px solid #80000000;
|
||||
}
|
||||
|
||||
QWidget
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
QPlainTextEdit
|
||||
{
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
qproperty-tabChangesFocus: true;
|
||||
color: black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_IP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>150</y>
|
||||
<width>161</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: light;
|
||||
qproperty-alignment: 'AlignRight | AlignVCenter';
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="background_IP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>150</y>
|
||||
<width>471</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="STextEdit" name="plainTextEdit_IP">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">STextEdit
|
||||
{
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>127.0.0.1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="background_Folder">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>90</y>
|
||||
<width>471</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="STextEdit" name="plainTextEdit_Share_Folder">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">STextEdit
|
||||
{
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>Share Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ShareFolder">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>161</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: light;
|
||||
qproperty-alignment: 'AlignRight | AlignVCenter';
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>200</y>
|
||||
<width>161</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: light;
|
||||
qproperty-alignment: 'AlignRight | AlignVCenter';
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="background_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>200</y>
|
||||
<width>471</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="STextEdit" name="plainTextEdit_ID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">STextEdit
|
||||
{
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User ID</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>250</y>
|
||||
<width>161</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: light;
|
||||
qproperty-alignment: 'AlignRight | AlignVCenter';
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>User Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="background_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>250</y>
|
||||
<width>471</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="STextEdit" name="plainTextEdit_Password">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">STextEdit
|
||||
{
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>User Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_Enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_Enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>5</y>
|
||||
<width>120</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_Enable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>5</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Save">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>360</y>
|
||||
<width>153</width>
|
||||
<height>63</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #FFFFFF;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #D8D8D8;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>400</x>
|
||||
<y>360</y>
|
||||
<width>153</width>
|
||||
<height>63</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #d0d0d0;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #808080;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_SMB_Version">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>300</y>
|
||||
<width>161</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: light;
|
||||
qproperty-alignment: 'AlignRight | AlignVCenter';
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable SSL</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="background_SMB_Version">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>300</y>
|
||||
<width>471</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="STextEdit" name="plainTextEdit_SMB_Version">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>5</x>
|
||||
<y>0</y>
|
||||
<width>461</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">STextEdit
|
||||
{
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>SMB Version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_AutoSend">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>30</y>
|
||||
<width>221</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_AutoSend">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>5</y>
|
||||
<width>171</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Send</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkBox_AutoSend">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>5</y>
|
||||
<width>30</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QCheckBox::indicator
|
||||
{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>STextEdit</class>
|
||||
<extends>QPlainTextEdit</extends>
|
||||
<header location="global">stextedit.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
439
dialogsettingtable.cpp
Normal file
439
dialogsettingtable.cpp
Normal file
@ -0,0 +1,439 @@
|
||||
#include "dialogsettingtable.h"
|
||||
#include "ui_dialogsettingtable.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
DialogSettingTable::DialogSettingTable(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DialogSettingTable)
|
||||
{
|
||||
//setAttribute(Qt::WA_TranslucentBackground);
|
||||
//setWindowFlags(Qt::CustomizeWindowHint);
|
||||
//setWindowFlags(Qt::FramelessWindowHint);
|
||||
|
||||
//setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog | Qt::Popup);
|
||||
setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
|
||||
|
||||
{
|
||||
ui->listWidget_choose->SetActivate(false);
|
||||
ui->verticalScrollBar_Choose->setRange(0, 299);
|
||||
ui->verticalScrollBar_Choose->SetSlideType(SSlideBar::SLIDE_VERTICAL);
|
||||
|
||||
connect(ui->verticalScrollBar_Choose, SIGNAL(valueChanged(int)), ui->listWidget_choose, SLOT(valueChangedScrollBarHorizontal(int)));
|
||||
|
||||
QScrollBar* pScrollBarChoose = ui->listWidget_choose->verticalScrollBar();
|
||||
connect(pScrollBarChoose, SIGNAL(valueChanged(int)), this, SLOT(ScrollChangeChoose(int)));
|
||||
}
|
||||
|
||||
{
|
||||
ui->listWidget_Selection->SetActivate(true);
|
||||
ui->verticalScrollBar_Selection->setRange(0, 299);
|
||||
ui->verticalScrollBar_Selection->SetSlideType(SSlideBar::SLIDE_VERTICAL);
|
||||
|
||||
connect(ui->verticalScrollBar_Selection, SIGNAL(valueChanged(int)), ui->listWidget_Selection, SLOT(valueChangedScrollBarHorizontal(int)));
|
||||
|
||||
QScrollBar* pScrollBarChoose = ui->listWidget_Selection->verticalScrollBar();
|
||||
connect(pScrollBarChoose, SIGNAL(valueChanged(int)), this, SLOT(ScrollChangeSelection(int)));
|
||||
}
|
||||
|
||||
int nDisplayType = pCommonData->GetDisplayType();
|
||||
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
int nGabX = (1280-1000)/2;
|
||||
int nGabY = (1024-600)/2;
|
||||
setGeometry(nGabX, nGabY, 1000, 600);
|
||||
ui->frame_choose->setGeometry(30, 52, 380, 520);
|
||||
ui->label_choose->setGeometry(0, 0, 380, 50);
|
||||
ui->listWidget_choose->setGeometry(20, 60, 380-60, 520-80);
|
||||
ui->frame_verticalScrollBar_Choose->setGeometry(380-30, 50, 25, 520-60);
|
||||
ui->verticalScrollBar_Choose->setGeometry(0, 0, 25, 520-60);
|
||||
|
||||
ui->pushButton_Active->setGeometry(430, 220, 60, 31);
|
||||
ui->pushButton_Inactive->setGeometry(430, 320, 60, 31);
|
||||
|
||||
ui->frame_selection->setGeometry(520, 52, 380, 520);
|
||||
ui->label_selection->setGeometry(0, 0, 380, 50);
|
||||
ui->listWidget_Selection->setGeometry(20, 60, 380-60, 520-80);
|
||||
ui->frame_verticalScrollBar_Selection->setGeometry(380-30, 50, 25, 520-60);
|
||||
ui->verticalScrollBar_Selection->setGeometry(0, 0, 25, 520-60);
|
||||
|
||||
ui->pushButton_Up->setGeometry(920, 60, 60, 36);
|
||||
ui->pushButton_Down->setGeometry(920, 100, 60, 36);
|
||||
ui->pushButton_Save->setGeometry(920, 540, 60, 36);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
setGeometry(0, 0, 1583, 818);
|
||||
ui->frame_choose->setGeometry(52, 52, 616, 724);
|
||||
ui->label_choose->setGeometry(0, 0, 616, 50);
|
||||
ui->listWidget_choose->setGeometry(50, 60, 501, 651);
|
||||
ui->frame_verticalScrollBar_Choose->setGeometry(570, 20, 25, 671);
|
||||
ui->verticalScrollBar_Choose->setGeometry(0, 0, 25, 671);
|
||||
|
||||
ui->pushButton_Active->setGeometry(700, 290, 89, 51);
|
||||
ui->pushButton_Inactive->setGeometry(700, 390, 89, 51);
|
||||
|
||||
ui->frame_selection->setGeometry(814, 52, 616, 724);
|
||||
ui->label_selection->setGeometry(0, 0, 616, 50);
|
||||
ui->listWidget_Selection->setGeometry(50, 60, 501, 651);
|
||||
ui->frame_verticalScrollBar_Selection->setGeometry(570, 20, 25, 671);
|
||||
ui->verticalScrollBar_Selection->setGeometry(0, 0, 25, 671);
|
||||
|
||||
ui->pushButton_Up->setGeometry(1470, 60, 89, 51);
|
||||
ui->pushButton_Down->setGeometry(1470, 120, 89, 51);
|
||||
ui->pushButton_Save->setGeometry(1470, 720, 89, 51);
|
||||
}
|
||||
}
|
||||
|
||||
DialogSettingTable::~DialogSettingTable()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DialogSettingTable::SetListType(int nType)
|
||||
{
|
||||
m_nListType = nType;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
STableHeader* pTableHeader = NULL;
|
||||
|
||||
if(m_nListType==SWIDGET_WORKLIST)
|
||||
{
|
||||
pTableHeader = pCommonData->GetWorklistTableHeader();
|
||||
m_TableHeader.CopyWorklistFrom(pTableHeader);
|
||||
}
|
||||
else if(m_nListType==SWIDGET_HISTORY)
|
||||
{
|
||||
pTableHeader = pCommonData->GetHistoryTableHeader();
|
||||
m_TableHeader.CopyHistoryFrom(pTableHeader);
|
||||
}
|
||||
|
||||
ui->listWidget_choose->SetListType(nType);
|
||||
ui->listWidget_Selection->SetListType(nType);
|
||||
|
||||
ui->listWidget_choose->SetData(&m_TableHeader);
|
||||
ui->listWidget_Selection->SetData(&m_TableHeader);
|
||||
|
||||
CheckVerticalScrollBar();
|
||||
|
||||
}
|
||||
|
||||
void DialogSettingTable::CheckVerticalScrollBar()
|
||||
{
|
||||
int nMaxShowItem = 8;
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
nMaxShowItem = 11;
|
||||
}
|
||||
if(ui->listWidget_choose->count() > nMaxShowItem)
|
||||
{
|
||||
ui->verticalScrollBar_Choose->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->verticalScrollBar_Choose->hide();
|
||||
}
|
||||
|
||||
if(ui->listWidget_Selection->count() > nMaxShowItem)
|
||||
{
|
||||
ui->verticalScrollBar_Selection->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->verticalScrollBar_Selection->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void DialogSettingTable::on_pushButton_Save_clicked()
|
||||
{
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
|
||||
STableHeader* pTableHeader = NULL;
|
||||
if(m_nListType==SWIDGET_WORKLIST)
|
||||
{
|
||||
pTableHeader = pCommonData->GetWorklistTableHeader();
|
||||
pTableHeader->CopyWorklistFrom(&m_TableHeader);
|
||||
pCommonData->UpdateWorklistIndex();
|
||||
}
|
||||
else if(m_nListType==SWIDGET_HISTORY)
|
||||
{
|
||||
pMainWindow->ClearHistoryView();
|
||||
pTableHeader = pCommonData->GetHistoryTableHeader();
|
||||
pTableHeader->CopyHistoryFrom(&m_TableHeader);
|
||||
pCommonData->UpdateHistoryIndex();
|
||||
}
|
||||
|
||||
|
||||
done(QDialog::Accepted);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void DialogSettingTable::ScrollChangeChoose(int nValue)
|
||||
{
|
||||
QScrollBar* pScrollBar = ui->listWidget_choose->verticalScrollBar();
|
||||
int nMax = pScrollBar->maximum();
|
||||
float fRatio = (float)nValue / (float)nMax;
|
||||
|
||||
int nPos = fRatio * 299.0f + 0.5f;
|
||||
if(nPos>299)
|
||||
{
|
||||
nPos = 299;
|
||||
}
|
||||
|
||||
ui->verticalScrollBar_Choose->setValue(nPos);
|
||||
}
|
||||
|
||||
void DialogSettingTable::ScrollChangeSelection(int nValue)
|
||||
{
|
||||
QScrollBar* pScrollBar = ui->listWidget_Selection->verticalScrollBar();
|
||||
int nMax = pScrollBar->maximum();
|
||||
float fRatio = (float)nValue / (float)nMax;
|
||||
|
||||
int nPos = fRatio * 299.0f + 0.5f;
|
||||
if(nPos>299)
|
||||
{
|
||||
nPos = 299;
|
||||
}
|
||||
|
||||
ui->verticalScrollBar_Selection->setValue(nPos);
|
||||
}
|
||||
|
||||
void DialogSettingTable::on_pushButton_Active_clicked()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
STableHeader* pTableHeader = &m_TableHeader;
|
||||
vector<TableHeader*> listMove;
|
||||
|
||||
vector<TableHeader*>* pListHeader = NULL;
|
||||
{
|
||||
pListHeader = pTableHeader->GetListInactive();
|
||||
vector<TableHeader*>::iterator it;
|
||||
for(it=pListHeader->begin() ; it!=pListHeader->end() ; )
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
listMove.push_back(pHeader);
|
||||
pListHeader->erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
ui->listWidget_choose->SetData(&m_TableHeader);
|
||||
}
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
pListHeader = pTableHeader->GetListActive();
|
||||
vector<TableHeader*>::iterator it;
|
||||
for(it=listMove.begin() ; it!=listMove.end() ; ++it)
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
pHeader->m_bSelect = false;
|
||||
|
||||
pListHeader->push_back(pHeader);
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
listMove.clear();
|
||||
}
|
||||
|
||||
ui->listWidget_Selection->SetData(&m_TableHeader);
|
||||
}
|
||||
|
||||
CheckVerticalScrollBar();
|
||||
|
||||
}
|
||||
|
||||
void DialogSettingTable::on_pushButton_Inactive_clicked()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
STableHeader* pTableHeader = &m_TableHeader;
|
||||
vector<TableHeader*> listMove;
|
||||
|
||||
vector<TableHeader*>* pListHeader = NULL;
|
||||
{
|
||||
pListHeader = pTableHeader->GetListActive();
|
||||
vector<TableHeader*>::iterator it;
|
||||
for(it=pListHeader->begin() ; it!=pListHeader->end() ; )
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
listMove.push_back(pHeader);
|
||||
pListHeader->erase(it);
|
||||
}
|
||||
else
|
||||
{
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
ui->listWidget_Selection->SetData(&m_TableHeader);
|
||||
}
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
pListHeader = pTableHeader->GetListInactive();
|
||||
vector<TableHeader*>::iterator it;
|
||||
for(it=listMove.begin() ; it!=listMove.end() ; ++it)
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
pHeader->m_bSelect = false;
|
||||
|
||||
pListHeader->push_back(pHeader);
|
||||
}
|
||||
|
||||
if(listMove.size()>0)
|
||||
{
|
||||
listMove.clear();
|
||||
}
|
||||
|
||||
ui->listWidget_choose->SetData(&m_TableHeader);
|
||||
}
|
||||
|
||||
CheckVerticalScrollBar();
|
||||
}
|
||||
|
||||
void DialogSettingTable::on_pushButton_Up_clicked()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
STableHeader* pTableHeader = &m_TableHeader;
|
||||
vector<TableHeader*> listMove;
|
||||
|
||||
vector<TableHeader*>* pListHeader = NULL;
|
||||
{
|
||||
pListHeader = pTableHeader->GetListActive();
|
||||
int nCheckCount = 0;
|
||||
int nSwapCount = 0;
|
||||
int i=0;
|
||||
for(i=0 ; i<pListHeader->size() ; i++)
|
||||
{
|
||||
TableHeader* pHeader = (*pListHeader)[i];
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
nCheckCount++;
|
||||
}
|
||||
}
|
||||
|
||||
//for(i=0 ; i<nCheckCount ; i++)
|
||||
{
|
||||
vector<TableHeader*>::iterator it;
|
||||
vector<TableHeader*>::iterator itNext;
|
||||
int nIndex = 0;
|
||||
for(it=pListHeader->begin() ; it!=pListHeader->end() ; ++it, nIndex++)
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
if(nIndex==0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
itNext = it;
|
||||
--itNext;
|
||||
TableHeader* pHeaderNext = *itNext;
|
||||
|
||||
if(pHeaderNext!=NULL && itNext!=pListHeader->end())
|
||||
{
|
||||
|
||||
TableHeader* pHeaderTmp = pHeaderNext;
|
||||
|
||||
*itNext = pHeader;
|
||||
*it = pHeaderTmp;
|
||||
nSwapCount++;
|
||||
//break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(nSwapCount>0)
|
||||
{
|
||||
ui->listWidget_Selection->SetData(&m_TableHeader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DialogSettingTable::on_pushButton_Down_clicked()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
STableHeader* pTableHeader = &m_TableHeader;
|
||||
vector<TableHeader*> listMove;
|
||||
|
||||
vector<TableHeader*>* pListHeader = NULL;
|
||||
{
|
||||
pListHeader = pTableHeader->GetListActive();
|
||||
int nCheckCount = 0;
|
||||
int nSwapCount = 0;
|
||||
int i=0;
|
||||
for(i=0 ; i<pListHeader->size() ; i++)
|
||||
{
|
||||
TableHeader* pHeader = (*pListHeader)[i];
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
nCheckCount++;
|
||||
}
|
||||
}
|
||||
|
||||
//for(i=0 ; i<nCheckCount ; i++)
|
||||
{
|
||||
vector<TableHeader*>::reverse_iterator it;
|
||||
vector<TableHeader*>::reverse_iterator itNext;
|
||||
int nIndex = 0;
|
||||
for(it=pListHeader->rbegin() ; it!=pListHeader->rend() ; ++it, nIndex++)
|
||||
{
|
||||
TableHeader* pHeader = *it;
|
||||
if(pHeader->m_bSelect==true)
|
||||
{
|
||||
if(nIndex==0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
itNext = it;
|
||||
--itNext;
|
||||
TableHeader* pHeaderNext = *itNext;
|
||||
|
||||
if(pHeaderNext!=NULL)
|
||||
{
|
||||
|
||||
TableHeader* pHeaderTmp = pHeaderNext;
|
||||
|
||||
*itNext = pHeader;
|
||||
*it = pHeaderTmp;
|
||||
nSwapCount++;
|
||||
//break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(nSwapCount>0)
|
||||
{
|
||||
ui->listWidget_Selection->SetData(&m_TableHeader);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
49
dialogsettingtable.h
Normal file
49
dialogsettingtable.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef DIALOGSETTINGTABLE_H
|
||||
#define DIALOGSETTINGTABLE_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "common.h"
|
||||
#include "commondata.h"
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class DialogSettingTable;
|
||||
}
|
||||
|
||||
class DialogSettingTable : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DialogSettingTable(QWidget *parent = nullptr);
|
||||
~DialogSettingTable();
|
||||
|
||||
void CheckVerticalScrollBar();
|
||||
|
||||
void SetListType(int nType);
|
||||
|
||||
protected:
|
||||
int m_nListType;
|
||||
STableHeader m_TableHeader;
|
||||
|
||||
private slots:
|
||||
void on_pushButton_Save_clicked();
|
||||
|
||||
|
||||
void ScrollChangeChoose(int nValue);
|
||||
void ScrollChangeSelection(int nValue);
|
||||
|
||||
void on_pushButton_Active_clicked();
|
||||
|
||||
void on_pushButton_Inactive_clicked();
|
||||
|
||||
void on_pushButton_Up_clicked();
|
||||
|
||||
void on_pushButton_Down_clicked();
|
||||
|
||||
private:
|
||||
Ui::DialogSettingTable *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOGSETTINGTABLE_H
|
||||
448
dialogsettingtable.ui
Normal file
448
dialogsettingtable.ui
Normal file
@ -0,0 +1,448 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogSettingTable</class>
|
||||
<widget class="QDialog" name="DialogSettingTable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1583</width>
|
||||
<height>818</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QDialog
|
||||
{
|
||||
background: #A6B1C2;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>52</x>
|
||||
<y>52</y>
|
||||
<width>616</width>
|
||||
<height>724</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_line_choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>50</y>
|
||||
<width>616</width>
|
||||
<height>2</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: gray;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>616</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
background: none;
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CHOOSE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_verticalScrollBar_Choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>570</x>
|
||||
<y>50</y>
|
||||
<width>25</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="SSlideBar" name="verticalScrollBar_Choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>25</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollBar
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: white;
|
||||
width: 26px;
|
||||
margin: 26px 0px 26px 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
width: 18px;
|
||||
min-height: 36px;
|
||||
max-height: 36px;
|
||||
height: 36px;
|
||||
border-image: url(://image/ScrollBar_Vertical_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
height: 0px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="SListWidgetSetting" name="listWidget_choose">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>60</y>
|
||||
<width>501</width>
|
||||
<height>651</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget::item
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
||||
QListWidget::item:selected
|
||||
{
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>814</x>
|
||||
<y>52</y>
|
||||
<width>616</width>
|
||||
<height>724</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_line_selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>50</y>
|
||||
<width>616</width>
|
||||
<height>2</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: gray;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>616</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
background: none;
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
qproperty-alignment: 'AlignCenter';
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SELECT</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="SListWidgetSetting" name="listWidget_Selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>60</y>
|
||||
<width>501</width>
|
||||
<height>651</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QListWidget::item
|
||||
{
|
||||
background: none;
|
||||
}
|
||||
|
||||
QListWidget::item:selected
|
||||
{
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_verticalScrollBar_Selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>570</x>
|
||||
<y>50</y>
|
||||
<width>25</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="SSlideBar" name="verticalScrollBar_Selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>25</width>
|
||||
<height>671</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollBar
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: white;
|
||||
width: 26px;
|
||||
margin: 26px 0px 26px 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
width: 18px;
|
||||
min-height: 36px;
|
||||
max-height: 36px;
|
||||
height: 36px;
|
||||
border-image: url(://image/ScrollBar_Vertical_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
height: 0px;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
height: 0px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Save">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1470</x>
|
||||
<y>720</y>
|
||||
<width>89</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SAVE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Active">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>700</x>
|
||||
<y>290</y>
|
||||
<width>89</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>--></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Inactive">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>700</x>
|
||||
<y>390</y>
|
||||
<width>89</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><--</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Up">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1470</x>
|
||||
<y>60</y>
|
||||
<width>89</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>UP</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Down">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1470</x>
|
||||
<y>120</y>
|
||||
<width>89</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Down</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SSlideBar</class>
|
||||
<extends>QScrollBar</extends>
|
||||
<header location="global">sslidebar.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SListWidgetSetting</class>
|
||||
<extends>QListWidget</extends>
|
||||
<header location="global">slistwidgetsetting.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
408
formcalendarview.cpp
Normal file
408
formcalendarview.cpp
Normal file
@ -0,0 +1,408 @@
|
||||
#include "formcalendarview.h"
|
||||
#include "ui_formcalendarview.h"
|
||||
|
||||
|
||||
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
#include "dialogcalendar.h"
|
||||
|
||||
#include "commondata.h"
|
||||
|
||||
QDate FormCalendarView::m_DateStart;
|
||||
QDate FormCalendarView::m_DateEnd;
|
||||
|
||||
FormCalendarView::FormCalendarView(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormCalendarView)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_nMode = CHANGE_DATE_START;
|
||||
|
||||
m_DateStart = QDate::currentDate();
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
ui->gridLayout->setSpacing(0);
|
||||
ui->horizontalLayout->setSpacing(0);
|
||||
|
||||
int i=0;
|
||||
int j=0;
|
||||
|
||||
m_pViewDays = new SDayView**[7];
|
||||
for(i=0 ; i<6 ; i++)
|
||||
{
|
||||
m_pViewDays[i] = new SDayView*[6];
|
||||
|
||||
for(j=0 ; j<7 ; j++)
|
||||
{
|
||||
m_pViewDays[i][j] = new SDayView(this);
|
||||
m_pViewDays[i][j]->SetRowColumn(i, j);
|
||||
//m_pViewDays[i][j]->setGeometry(0, 0, 100, 30);
|
||||
|
||||
m_pViewDays[i][j]->setStyleSheet("QWidget{ background: none; border: none;} ");
|
||||
|
||||
connect(m_pViewDays[i][j], SIGNAL(Clicked(int, int)), this, SLOT(Clicked(int, int)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for(i=0 ; i<6 ; i++)
|
||||
{
|
||||
for(j=0 ; j<7 ; j++)
|
||||
{
|
||||
ui->gridLayout->addWidget(m_pViewDays[i][j], i, j);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QStringList strListDayName;
|
||||
strListDayName << "SUN";
|
||||
strListDayName << "MON";
|
||||
strListDayName << "TUE";
|
||||
strListDayName << "WED";
|
||||
strListDayName << "THU";
|
||||
strListDayName << "FRI";
|
||||
strListDayName << "SAT";
|
||||
|
||||
ui->horizontalLayout->addSpacing(50);
|
||||
|
||||
for(i=0 ; i<7 ; i++)
|
||||
{
|
||||
QLabel* pLabel = new QLabel(this);
|
||||
QString strDayName = strListDayName[i];
|
||||
pLabel->setText(strDayName);
|
||||
|
||||
if(i==0)
|
||||
{
|
||||
pLabel->setStyleSheet("QLabel{ background: #D6E0E5; qproperty-alignment: AlignCenter; color: #FF0000;}");
|
||||
}
|
||||
else if(i==6)
|
||||
{
|
||||
pLabel->setStyleSheet("QLabel{ background: #D6E0E5; qproperty-alignment: AlignCenter; color: #0019FF;}");
|
||||
}
|
||||
else
|
||||
{
|
||||
pLabel->setStyleSheet("QLabel{ background: #D6E0E5; qproperty-alignment: AlignCenter;}");
|
||||
}
|
||||
|
||||
|
||||
ui->horizontalLayout->addWidget(pLabel);
|
||||
}
|
||||
|
||||
ui->horizontalLayout->addSpacing(50);
|
||||
|
||||
|
||||
}
|
||||
|
||||
FormCalendarView::~FormCalendarView()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void FormCalendarView::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize nSize = event->size();
|
||||
int nHeightTitle = 66;
|
||||
|
||||
ui->verticalLayoutWidget->setGeometry(0, 0, nSize.width(), nSize.height());
|
||||
|
||||
QSize nSizeDayOfWeek(nSize.width(), nHeightTitle);
|
||||
ui->frame_DayOfWeek->setMaximumSize(nSizeDayOfWeek);
|
||||
|
||||
|
||||
ui->gridLayoutWidget->setGeometry(50, 0, nSize.width()-100, nSize.height()-nHeightTitle);
|
||||
|
||||
|
||||
ui->horizontalLayoutWidget->setGeometry(0, 0, nSize.width(), nHeightTitle);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormCalendarView::SetCalendar(int nYear, int nMonth)
|
||||
{
|
||||
int nStartDay = 0;
|
||||
int nMonthDay = 0;
|
||||
int nPrevMonthDay = 0;
|
||||
int nPrevMonth = nMonth-1;
|
||||
int nPrevYear = nYear;
|
||||
int nNextMonth = nMonth+1;
|
||||
int nNextYear = nYear;
|
||||
|
||||
|
||||
QDate date(nYear, nMonth, 1);
|
||||
|
||||
nMonthDay = date.daysInMonth();
|
||||
nStartDay = date.dayOfWeek();
|
||||
|
||||
|
||||
if(nPrevMonth<=0)
|
||||
{
|
||||
nPrevYear = nYear - 1;
|
||||
nPrevMonth = 12;
|
||||
}
|
||||
|
||||
if(nNextMonth>12)
|
||||
{
|
||||
nNextYear = nYear+1;
|
||||
nNextMonth = 1;
|
||||
}
|
||||
|
||||
|
||||
QDate datePrevMonth(nPrevYear, nPrevMonth, 1);
|
||||
nPrevMonthDay = datePrevMonth.daysInMonth();
|
||||
|
||||
|
||||
int i=0;
|
||||
int j=0;
|
||||
|
||||
int nIndexDisplay = 0;
|
||||
int nDay = 1;
|
||||
int nIndexNextMonthDay = 1;
|
||||
for(i=0 ; i<6 ; i++)
|
||||
{
|
||||
for(j=0 ; j<7 ; j++)
|
||||
{
|
||||
if(nIndexDisplay>=nStartDay && nDay<=nMonthDay)
|
||||
{
|
||||
m_pViewDays[i][j]->SetDate(QDate(nYear, nMonth, nDay), true);
|
||||
nDay++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i==0)
|
||||
{
|
||||
int nPrevDay = nPrevMonthDay - nStartDay + (j+1);
|
||||
m_pViewDays[i][j]->SetDate(QDate(nPrevYear, nPrevMonth, nPrevDay), false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pViewDays[i][j]->SetDate(QDate(nNextYear, nNextMonth, nIndexNextMonthDay), false);
|
||||
nIndexNextMonthDay++;
|
||||
}
|
||||
//m_pViewDays[i][j]->ClearDate();
|
||||
}
|
||||
nIndexDisplay++;
|
||||
}
|
||||
}
|
||||
|
||||
ui->gridLayout->update();
|
||||
update();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormCalendarView::SetToday()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd;
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
|
||||
void FormCalendarView::SetLast3Days()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addDays(-2);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLastWeek()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addDays(-6);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLast2Weeks()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addDays(-13);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLast3Weeks()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addDays(-20);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLastMonth()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addMonths(-1);
|
||||
m_DateStart = m_DateStart.addDays(1);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLast2Month()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addMonths(-2);
|
||||
m_DateStart = m_DateStart.addDays(1);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLast6Months()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addMonths(-6);
|
||||
m_DateStart = m_DateStart.addDays(1);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetLastYear()
|
||||
{
|
||||
ClearDayState();
|
||||
|
||||
m_DateEnd = QDate::currentDate();
|
||||
|
||||
m_DateStart = m_DateEnd.addYears(-1);
|
||||
m_DateStart = m_DateStart.addDays(1);
|
||||
|
||||
UpdateDayState();
|
||||
}
|
||||
|
||||
|
||||
void FormCalendarView::UpdateDayState()
|
||||
{
|
||||
int i=0;
|
||||
int j=0;
|
||||
|
||||
for(i=0 ; i<6 ; i++)
|
||||
{
|
||||
for(j=0 ; j<7 ; j++)
|
||||
{
|
||||
if(m_pViewDays[i][j]->GetDate()==m_DateStart)
|
||||
{
|
||||
m_pViewDays[i][j]->Select();
|
||||
//m_pViewDays[i][j]->update();
|
||||
}
|
||||
if(m_pViewDays[i][j]->GetDate()==m_DateEnd)
|
||||
{
|
||||
m_pViewDays[i][j]->Select();
|
||||
//m_pViewDays[i][j]->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void FormCalendarView::ClearDayState()
|
||||
{
|
||||
int i=0;
|
||||
int j=0;
|
||||
|
||||
for(i=0 ; i<6 ; i++)
|
||||
{
|
||||
for(j=0 ; j<7 ; j++)
|
||||
{
|
||||
if(m_pViewDays[i][j]->IsSelected()==true)
|
||||
{
|
||||
m_pViewDays[i][j]->Unselect();
|
||||
m_pViewDays[i][j]->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
QDate FormCalendarView::GetDateStart()
|
||||
{
|
||||
return m_DateStart;
|
||||
}
|
||||
|
||||
QDate FormCalendarView::GetDateEnd()
|
||||
{
|
||||
return m_DateEnd;
|
||||
}
|
||||
|
||||
void FormCalendarView::SetDateStart(QDate date)
|
||||
{
|
||||
m_DateStart = date;
|
||||
}
|
||||
|
||||
void FormCalendarView::SetDateEnd(QDate date)
|
||||
{
|
||||
m_DateEnd = date;
|
||||
}
|
||||
|
||||
void FormCalendarView::Clicked(int nIndexRow, int nIndexColumn)
|
||||
{
|
||||
if(m_nMode==CHANGE_DATE_START)
|
||||
{
|
||||
QDate date = m_pViewDays[nIndexRow][nIndexColumn]->GetDate();
|
||||
m_DateStart = date;
|
||||
m_DateEnd = date;
|
||||
m_nMode = CHANGE_DATE_END;
|
||||
}
|
||||
else if(m_nMode==CHANGE_DATE_END)
|
||||
{
|
||||
QDate date = m_pViewDays[nIndexRow][nIndexColumn]->GetDate();
|
||||
m_DateEnd = date;
|
||||
m_nMode = CHANGE_DATE_START;
|
||||
}
|
||||
|
||||
if(m_DateStart>m_DateEnd)
|
||||
{
|
||||
QDate dateTmp;
|
||||
dateTmp = m_DateStart;
|
||||
m_DateStart = m_DateEnd;
|
||||
m_DateEnd = dateTmp;
|
||||
}
|
||||
|
||||
UpdateDayState();
|
||||
|
||||
SetSearchDateUpdate(SEARCH_USER_DEFINED);
|
||||
ExecuteClickDate();
|
||||
}
|
||||
|
||||
void FormCalendarView::SetModeChangeStart()
|
||||
{
|
||||
m_nMode = CHANGE_DATE_START;
|
||||
}
|
||||
|
||||
void FormCalendarView::SetModeChangeEnd()
|
||||
{
|
||||
m_nMode = CHANGE_DATE_END;
|
||||
}
|
||||
|
||||
|
||||
71
formcalendarview.h
Normal file
71
formcalendarview.h
Normal file
@ -0,0 +1,71 @@
|
||||
#ifndef FORMCALENDARVIEW_H
|
||||
#define FORMCALENDARVIEW_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "sdayview.h"
|
||||
|
||||
namespace Ui {
|
||||
class FormCalendarView;
|
||||
}
|
||||
|
||||
class FormCalendarView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormCalendarView(QWidget *parent = nullptr);
|
||||
~FormCalendarView();
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
void SetCalendar(int nYear, int nMonth);
|
||||
|
||||
void SetToday();
|
||||
void SetLast3Days();
|
||||
void SetLastWeek();
|
||||
void SetLast2Weeks();
|
||||
void SetLast3Weeks();
|
||||
void SetLastMonth();
|
||||
void SetLast2Month();
|
||||
void SetLast6Months();
|
||||
void SetLastYear();
|
||||
|
||||
void UpdateDayState();
|
||||
|
||||
void ClearDayState();
|
||||
|
||||
void SetModeChangeStart();
|
||||
void SetModeChangeEnd();
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void Clicked(int nIndexRow, int nIndexColumn);
|
||||
|
||||
signals:
|
||||
void SetSearchDateUpdate(int nTypeSearchDuration);
|
||||
void ExecuteClickDate();
|
||||
|
||||
protected:
|
||||
int m_nMode;
|
||||
SDayView*** m_pViewDays;
|
||||
|
||||
public:
|
||||
static QDate m_DateStart;
|
||||
static QDate m_DateEnd;
|
||||
|
||||
static QDate GetDateStart();
|
||||
static QDate GetDateEnd();
|
||||
|
||||
static void SetDateStart(QDate date);
|
||||
static void SetDateEnd(QDate date);
|
||||
|
||||
static int GetTypeSearchDuration();
|
||||
|
||||
|
||||
private:
|
||||
Ui::FormCalendarView *ui;
|
||||
};
|
||||
|
||||
#endif // FORMCALENDARVIEW_H
|
||||
114
formcalendarview.ui
Normal file
114
formcalendarview.ui
Normal file
@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormCalendarView</class>
|
||||
<widget class="QWidget" name="FormCalendarView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>660</width>
|
||||
<height>440</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>60</y>
|
||||
<width>461</width>
|
||||
<height>291</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_Calendar">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_DayOfWeek">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget
|
||||
{
|
||||
border: none;
|
||||
background: #D6E0E5;
|
||||
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>10</y>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout"/>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_Days">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
border: none;
|
||||
background: #FFFFFF;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="gridLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>100</y>
|
||||
<width>160</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout"/>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
2916
formcapture.cpp
Normal file
2916
formcapture.cpp
Normal file
File diff suppressed because it is too large
Load Diff
157
formcapture.h
Normal file
157
formcapture.h
Normal file
@ -0,0 +1,157 @@
|
||||
#ifndef FORMCAPTURE_H
|
||||
#define FORMCAPTURE_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "common.h"
|
||||
#include "formcaptureimageselect.h"
|
||||
|
||||
#include "qvideowidget.h"
|
||||
|
||||
#include "sthreadwatchvideolink.h"
|
||||
|
||||
|
||||
|
||||
#include "dialogprogress.h"
|
||||
|
||||
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class FormCapture;
|
||||
}
|
||||
|
||||
class FormCapture : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormCapture(QWidget *parent = nullptr);
|
||||
virtual ~FormCapture();
|
||||
|
||||
QVideoWidget* GetVideoWidget();
|
||||
|
||||
void Init();
|
||||
void ExitCapture();
|
||||
|
||||
void WriteDatabaseListCapture();
|
||||
|
||||
virtual void UpdateViewer();
|
||||
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
void UpdateObjectDisplay(vector<QRect>& listRectDisplay);
|
||||
|
||||
void UpdateMakeDICOMInfo(int nCount, int nTotalCount);
|
||||
void UpdateSendInfo(int nCount, int nTotalCount);
|
||||
void UpdateSendComplete();
|
||||
void UpdateSendFailed();
|
||||
|
||||
void VideoSaveEnd();
|
||||
|
||||
public:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
protected:
|
||||
bool m_bPrevConnectHDMI;
|
||||
SThreadWatchVideoLink* m_pThreadWatchVideoLink;
|
||||
QElapsedTimer m_TimerStartPipeLine;
|
||||
bool m_bSendBackground;
|
||||
vector<FormCaptureImageSelect*> m_ListFormVerticalImageSelect;
|
||||
vector<FormCaptureImageSelect*> m_ListFormHorizontalImageSelect;
|
||||
int m_bAutoVideoCapture;
|
||||
int m_nCurrentPos;
|
||||
int m_nIndexCurrent;
|
||||
int m_nCaptureImageCount;
|
||||
QTimer m_Timer;
|
||||
QTimer m_TimerCaptureInfo;
|
||||
QTimer m_TimerCaptureBeepSound;
|
||||
QTimer m_TimerCaptureImage;
|
||||
QTimer m_TimerCaptureVideo;
|
||||
QTimer m_TimerCaptureSingleShot;
|
||||
QElapsedTimer m_TimeCapture;
|
||||
QElapsedTimer m_TimeCaptureVideo;
|
||||
|
||||
//QTime m_TimeHandSwitchOn;
|
||||
|
||||
int m_nHandSwitchValue;
|
||||
int m_nPrevHandSwitchValue;
|
||||
|
||||
|
||||
int m_nItemPerPage;
|
||||
|
||||
|
||||
|
||||
DialogProgress* m_pDialogSendProgress;
|
||||
|
||||
bool m_bDisconnectCheck;
|
||||
bool m_bEncodingVideo;
|
||||
|
||||
bool m_bExecStopRTSP;
|
||||
|
||||
|
||||
void CheckVideoDevice_old();
|
||||
|
||||
public slots:
|
||||
void FinishBeep();
|
||||
void CheckCaptureTimeInfo();
|
||||
void CheckVideoDevice();
|
||||
void SingleDown();
|
||||
void SingleUp();
|
||||
|
||||
void captureImage(CAPTURE_IMAGE* pCaptureImage);
|
||||
void captureVideo(CAPTURE_IMAGE* pCaptureImage);
|
||||
|
||||
void VideoStopEnable();
|
||||
void ImageCaptureEnable();
|
||||
|
||||
void CaptureSingleShot();
|
||||
|
||||
|
||||
void CaptureHandSwitch();
|
||||
|
||||
void CaptureFootSwitch();
|
||||
|
||||
void SetHDMICalbeConnect(bool bCableConnect);
|
||||
|
||||
private slots:
|
||||
void HDMICalbeConnect(bool bCableConnect);
|
||||
void VideoButtonChange(bool bEncodingVideo);
|
||||
void CloseSelectForm();
|
||||
void ThumbnailClicked(void* pData);
|
||||
|
||||
void valueChangedScrollBarVertical(int value);
|
||||
void valueChangedScrollBarHorizontal(int value);
|
||||
|
||||
void on_pushButton_EXIT_clicked();
|
||||
|
||||
|
||||
void on_pushButton_ACQ_clicked();
|
||||
|
||||
void on_pushButton_VID_clicked();
|
||||
|
||||
void on_horizontalSlider_Hue_valueChanged(int value);
|
||||
|
||||
void on_horizontalSlider_Saturation_valueChanged(int value);
|
||||
|
||||
void on_pushButton_SEND_clicked();
|
||||
|
||||
void on_pushButton_DELETE_clicked();
|
||||
|
||||
void on_checkBox_Detection_toggled(bool checked);
|
||||
|
||||
void OnDoubleClicked();
|
||||
|
||||
signals:
|
||||
void BackupNetworkShareFolder(QString strFilename);
|
||||
//void ExitCapture();
|
||||
|
||||
private:
|
||||
Ui::FormCapture *ui;
|
||||
};
|
||||
|
||||
#endif // FORMCAPTURE_H
|
||||
1004
formcapture.ui
Normal file
1004
formcapture.ui
Normal file
File diff suppressed because it is too large
Load Diff
235
formcaptureimageselect.cpp
Normal file
235
formcaptureimageselect.cpp
Normal file
@ -0,0 +1,235 @@
|
||||
#include "formcaptureimageselect.h"
|
||||
#include "ui_formcaptureimageselect.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPaintEvent>
|
||||
#include <QResizeEvent>
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
FormCaptureImageSelect::FormCaptureImageSelect(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormCaptureImageSelect)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_pCaptureImage = NULL;
|
||||
|
||||
m_pImage = NULL;
|
||||
|
||||
m_pParentWidget = parent;
|
||||
|
||||
connect(ui->pushButton_Select, SIGNAL(released()), this, SLOT(ClickSelect()));
|
||||
|
||||
connect(this, SIGNAL(ThumbnailClicked(void*)), m_pParentWidget, SLOT(ThumbnailClicked(void*)));
|
||||
}
|
||||
|
||||
FormCaptureImageSelect::~FormCaptureImageSelect()
|
||||
{
|
||||
disconnect(this, SIGNAL(ThumbnailClicked(void*)), m_pParentWidget, SLOT(ThumbnailClicked(void*)));
|
||||
|
||||
disconnect(ui->pushButton_Select, SIGNAL(released()), this, SLOT(ClickSelect()));
|
||||
|
||||
SAFE_DELETE(m_pImage);
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::Init()
|
||||
{
|
||||
m_pCaptureImage = NULL;
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
QSize nSize = size();
|
||||
//int nPaddingLeft = 60;
|
||||
int nPaddingLeft = 0;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
int nVideoWidth = pCommonData->GetVideoWidth();
|
||||
int nVideoHeight = pCommonData->GetVideoHeight();
|
||||
|
||||
int nWidth = nSize.width() - nPaddingLeft;
|
||||
int nHeight = (int)(nWidth * (float)((float)nVideoHeight/(float)nVideoWidth) + 0.5f);
|
||||
|
||||
QRect rectDisplay = QRect(nPaddingLeft, 0, nWidth, nHeight);
|
||||
|
||||
QColor colorBackground;
|
||||
|
||||
colorBackground = Qt::black;
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
painter.fillRect(rectDisplay, colorBackground);
|
||||
|
||||
if(m_pCaptureImage!=NULL)
|
||||
{
|
||||
if(m_pCaptureImage->m_pImageSmall!=NULL)
|
||||
{
|
||||
QImage::Format format = m_pCaptureImage->m_pImageSmall->format();
|
||||
if(format!=QImage::Format_RGB888)
|
||||
{
|
||||
*m_pCaptureImage->m_pImageSmall = m_pCaptureImage->m_pImageSmall->convertToFormat(QImage::Format_RGB888);
|
||||
}
|
||||
painter.drawImage(rectDisplay, *m_pCaptureImage->m_pImageSmall);
|
||||
}
|
||||
else if(m_pCaptureImage->m_pImage!=NULL)
|
||||
{
|
||||
painter.drawImage(rectDisplay, *m_pCaptureImage->m_pImage);
|
||||
}
|
||||
else if(m_pCaptureImage->m_pImageData!=NULL)
|
||||
{
|
||||
int nWidth = m_pCaptureImage->GetWidth();
|
||||
int nHeight = m_pCaptureImage->GetHeight();
|
||||
QImage::Format fmt = QImage::Format_RGB888;
|
||||
uint8_t* pImageDataSrc = m_pCaptureImage->m_pImageData;
|
||||
|
||||
if(m_pImage==NULL)
|
||||
{
|
||||
m_pImage = new QImage(nWidth, nHeight, fmt);
|
||||
uchar* pDataImage = m_pImage->bits();
|
||||
memcpy(pDataImage, pImageDataSrc, nWidth*nHeight*3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nWidth>0 && nHeight>0)
|
||||
{
|
||||
if(m_pImage->width()!=nWidth || m_pImage->height()!=nHeight)
|
||||
{
|
||||
delete m_pImage;
|
||||
m_pImage = NULL;
|
||||
//m_pImage = new QImage(pImageDataSrc, nWidth, nHeight, fmt);
|
||||
m_pImage = new QImage(nWidth, nHeight, fmt);
|
||||
}
|
||||
|
||||
if(pImageDataSrc!=NULL)
|
||||
{
|
||||
uchar* pDataImage = m_pImage->bits();
|
||||
memcpy(pDataImage, pImageDataSrc, nWidth*nHeight*3);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pImage!=NULL)
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
painter.drawImage(rectDisplay, *m_pImage);
|
||||
}
|
||||
|
||||
if(m_pCaptureImage->m_nType==DISPLAY_VIDEO)
|
||||
{
|
||||
QRect rectDisplayVideo;
|
||||
int nWidthDisplayVideo = rectDisplay.width() / 20;
|
||||
int nHeightDisplayVideo = rectDisplay.height() / 20;
|
||||
rectDisplayVideo = QRect(rectDisplay.left()+nWidthDisplayVideo*17, nHeightDisplayVideo, nWidthDisplayVideo*2, nHeightDisplayVideo);
|
||||
|
||||
painter.fillRect(rectDisplayVideo, QColor(255, 0, 0));
|
||||
|
||||
int nFontSize = nHeightDisplayVideo/2;
|
||||
if(nFontSize<10)
|
||||
{
|
||||
nFontSize = 10;
|
||||
}
|
||||
|
||||
QFont font("Roboto");
|
||||
font.setPixelSize(nFontSize);
|
||||
font.setBold(true);
|
||||
painter.setFont(font);
|
||||
painter.drawText(rectDisplayVideo, Qt::AlignCenter, "VIDEO");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
int nDelta = event->delta();
|
||||
if(nDelta<0)
|
||||
{
|
||||
SingleDown();
|
||||
}
|
||||
else if(nDelta>0)
|
||||
{
|
||||
SingleUp();
|
||||
}
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if(m_pCaptureImage==NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pCaptureImage->m_bCheck==true)
|
||||
{
|
||||
//m_pCaptureImage->m_bCheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//m_pCaptureImage->m_bCheck = true;
|
||||
}
|
||||
|
||||
//ui->pushButton_Select->setChecked(m_pCaptureImage->m_bCheck);
|
||||
|
||||
ThumbnailClicked(m_pCaptureImage);
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::ClickSelect()
|
||||
{
|
||||
if(m_pCaptureImage==NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pCaptureImage->m_bCheck==true)
|
||||
{
|
||||
//m_pCaptureImage->m_bCheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
//m_pCaptureImage->m_bCheck = true;
|
||||
}
|
||||
|
||||
//ui->pushButton_Select->setChecked(m_pCaptureImage->m_bCheck);
|
||||
|
||||
}
|
||||
|
||||
void FormCaptureImageSelect::SetCaptureImage(CAPTURE_IMAGE* pCaptureImage)
|
||||
{
|
||||
m_pCaptureImage = pCaptureImage;
|
||||
|
||||
QString strIndex;
|
||||
bool bCheck = false;
|
||||
|
||||
if(m_pCaptureImage!=NULL)
|
||||
{
|
||||
strIndex = QString::number(m_pCaptureImage->m_nIndex);
|
||||
bCheck = m_pCaptureImage->m_bCheck;
|
||||
}
|
||||
|
||||
ui->pushButton_Select->setText(strIndex);
|
||||
ui->pushButton_Select->setChecked(bCheck);
|
||||
|
||||
}
|
||||
57
formcaptureimageselect.h
Normal file
57
formcaptureimageselect.h
Normal file
@ -0,0 +1,57 @@
|
||||
#ifndef FORMCAPTUREIMAGESELECT_H
|
||||
#define FORMCAPTUREIMAGESELECT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <QImage>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class FormCaptureImageSelect;
|
||||
}
|
||||
|
||||
class FormCaptureImageSelect : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormCaptureImageSelect(QWidget *parent = nullptr);
|
||||
virtual ~FormCaptureImageSelect();
|
||||
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
void SetCaptureImage(CAPTURE_IMAGE* pCaptureImage);
|
||||
|
||||
void Init();
|
||||
|
||||
public slots:
|
||||
void ClickSelect();
|
||||
|
||||
signals:
|
||||
void SingleDown();
|
||||
void SingleUp();
|
||||
void ThumbnailClicked(void* pData);
|
||||
|
||||
protected:
|
||||
CAPTURE_IMAGE* m_pCaptureImage;
|
||||
int m_nIndexViewer;
|
||||
|
||||
QWidget* m_pParentWidget;
|
||||
|
||||
QImage* m_pImage;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Ui::FormCaptureImageSelect *ui;
|
||||
};
|
||||
|
||||
#endif // FORMCAPTUREIMAGESELECT_H
|
||||
55
formcaptureimageselect.ui
Normal file
55
formcaptureimageselect.ui
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormCaptureImageSelect</class>
|
||||
<widget class="QWidget" name="FormCaptureImageSelect">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>352</width>
|
||||
<height>240</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Select">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>41</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton#pushButton_Select
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
background: white;
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
qproperty-text: '19';
|
||||
|
||||
border-radius: 6px;
|
||||
|
||||
qproperty-checkable: true;
|
||||
qproperty-checked: false;
|
||||
}
|
||||
|
||||
QPushButton#pushButton_Select:checked
|
||||
{
|
||||
background: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>19</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
733
formcheckcaptureselect.cpp
Normal file
733
formcheckcaptureselect.cpp
Normal file
@ -0,0 +1,733 @@
|
||||
#include "formcheckcaptureselect.h"
|
||||
#include "ui_formcheckcaptureselect.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPaintEvent>
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QDirIterator>
|
||||
|
||||
FormCheckCaptureSelect::FormCheckCaptureSelect(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormCheckCaptureSelect)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_pDialogSendProgress = new DialogProgress(this);
|
||||
|
||||
m_pDisplayImage = NULL;
|
||||
m_pCurrentImage = NULL;
|
||||
QWidget* pFormWidget = parent->parentWidget();
|
||||
connect(this, SIGNAL(CloseSelectForm()), pFormWidget, SLOT(CloseSelectForm()));
|
||||
|
||||
connect(ui->pushButton_Selection, SIGNAL(released()), this, SLOT(ClickSelect()));
|
||||
}
|
||||
|
||||
FormCheckCaptureSelect::~FormCheckCaptureSelect()
|
||||
{
|
||||
QWidget* pFormWidget = parentWidget()->parentWidget();
|
||||
disconnect(this, SIGNAL(CloseSelectForm()), pFormWidget, SLOT(CloseSelectForm()));
|
||||
|
||||
disconnect(ui->pushButton_Selection, SIGNAL(released()), this, SLOT(ClickSelect()));
|
||||
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
delete m_pDialogSendProgress;
|
||||
}
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::SetCurrentImage(CAPTURE_IMAGE* pData)
|
||||
{
|
||||
if(m_pCurrentImage!=NULL)
|
||||
{
|
||||
SAFE_DELETE(m_pCurrentImage->m_pImage);
|
||||
}
|
||||
m_pCurrentImage = pData;
|
||||
if(m_pCurrentImage==NULL)
|
||||
{
|
||||
ui->pushButton_Selection->hide();
|
||||
ui->label_Info->hide();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pCurrentImage->m_pImage==NULL && m_pCurrentImage->m_strImageFilename.length()>0)
|
||||
{
|
||||
m_pCurrentImage->m_pImage = new QImage(m_pCurrentImage->m_strImageFilename);
|
||||
}
|
||||
}
|
||||
|
||||
ui->pushButton_Selection->show();
|
||||
ui->pushButton_Selection->setChecked(pData->m_bCheck);
|
||||
|
||||
int i=0;
|
||||
int nIndex = 0;
|
||||
int nTotal = 0;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<CAPTURE_IMAGE*>* pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
nIndex++;
|
||||
}
|
||||
if(m_pCurrentImage==pImageCapture)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
//if(pImageCapture->m_bDelete==false && pImageCapture->m_nType==DISPLAY_IMAGE)
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
nTotal++;
|
||||
}
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
QString strInfo;
|
||||
strInfo = QString("Image: %1/%2").arg(nIndex).arg(nTotal);
|
||||
ui->label_Info->show();
|
||||
ui->label_Info->setText(strInfo);
|
||||
|
||||
if(nTotal==1)
|
||||
{
|
||||
ui->pushButton_Prev->hide();
|
||||
ui->pushButton_Next->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nIndex==1)
|
||||
{
|
||||
ui->pushButton_Prev->hide();
|
||||
ui->pushButton_Next->show();
|
||||
}
|
||||
else if(nIndex==nTotal)
|
||||
{
|
||||
ui->pushButton_Prev->show();
|
||||
ui->pushButton_Next->hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pushButton_Prev->show();
|
||||
ui->pushButton_Next->show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(pData->m_nType==DISPLAY_VIDEO)
|
||||
{
|
||||
ui->label_Info_Video->show();
|
||||
}
|
||||
else if(pData->m_nType==DISPLAY_IMAGE)
|
||||
{
|
||||
ui->label_Info_Video->hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FormCheckCaptureSelect::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
QSize nSize = size();
|
||||
int nPaddingLeft = 0;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
int nVideoWidth = pCommonData->GetVideoWidth();
|
||||
int nVideoHeight = pCommonData->GetVideoHeight();
|
||||
|
||||
float fRatio = (float)nVideoHeight / (float)nVideoWidth;
|
||||
|
||||
QRect rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft, nSize.height());
|
||||
QRect rectDisplayImage = QRect(0, 0, nSize.width(), fRatio*nSize.width());
|
||||
|
||||
QColor colorBackground;
|
||||
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
|
||||
colorBackground = QColor(0xA6B1C2);
|
||||
//painter.fillRect(rectDisplay, colorBackground);
|
||||
|
||||
if(m_pCurrentImage!=NULL)
|
||||
{
|
||||
if(m_pCurrentImage->m_pImage==NULL && m_pCurrentImage->m_strImageFilename.length()>0)
|
||||
{
|
||||
m_pCurrentImage->m_pImage = new QImage(m_pCurrentImage->m_strImageFilename);
|
||||
}
|
||||
painter.drawImage(rectDisplayImage, *m_pCurrentImage->m_pImage);
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.fillRect(rectDisplayImage, QColor(0, 0, 0));
|
||||
}
|
||||
painter.end();
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Close_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
CloseSelectForm();
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Prev_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
int i=0;
|
||||
CAPTURE_IMAGE* pPrevImage = NULL;
|
||||
CAPTURE_IMAGE* pNewCurrentImage = NULL;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<CAPTURE_IMAGE*>* pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
if(m_pCurrentImage==pImageCapture)
|
||||
{
|
||||
if(pPrevImage!=NULL)
|
||||
{
|
||||
pNewCurrentImage = pPrevImage;
|
||||
}
|
||||
break;
|
||||
}
|
||||
pPrevImage = pImageCapture;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
if(pNewCurrentImage!=NULL)
|
||||
{
|
||||
SetCurrentImage(pNewCurrentImage);
|
||||
}
|
||||
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Next_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
int i=0;
|
||||
CAPTURE_IMAGE* pNextImage = NULL;
|
||||
CAPTURE_IMAGE* pNewCurrentImage = NULL;
|
||||
|
||||
int nCurrentIndex = 0;
|
||||
int nFindIndex = 0;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<CAPTURE_IMAGE*>* pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
if(m_pCurrentImage==pImageCapture)
|
||||
{
|
||||
nFindIndex = nCurrentIndex+1;
|
||||
break;
|
||||
}
|
||||
nCurrentIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
nCurrentIndex = 0;
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
if(nCurrentIndex==nFindIndex)
|
||||
{
|
||||
pNewCurrentImage = pImageCapture;
|
||||
break;
|
||||
}
|
||||
nCurrentIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
if(pNewCurrentImage!=NULL)
|
||||
{
|
||||
SetCurrentImage(pNewCurrentImage);
|
||||
}
|
||||
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void FormCheckCaptureSelect::ClickSelect()
|
||||
{
|
||||
if(m_pCurrentImage!=NULL)
|
||||
{
|
||||
if(m_pCurrentImage->m_bCheck==true)
|
||||
{
|
||||
m_pCurrentImage->m_bCheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pCurrentImage->m_bCheck = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Delete_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
int i=0;
|
||||
int nIndex = 0;
|
||||
|
||||
vector<CAPTURE_IMAGE*>::iterator it;
|
||||
|
||||
CAPTURE_IMAGE* pPrevImage = NULL;
|
||||
CAPTURE_IMAGE* pNewCurrentImage = NULL;
|
||||
//SDatabase* pDatabase = NULL;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<CAPTURE_IMAGE*>* pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(it=pListCaptureImage->begin() ; it!=pListCaptureImage->end() ; ++it)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = *it;
|
||||
if(m_pCurrentImage==pImageCapture)
|
||||
{
|
||||
qDebug() << "Delete: Index(" << pImageCapture->m_nIndex << ")";
|
||||
if(pImageCapture->m_nType==DISPLAY_IMAGE)
|
||||
{
|
||||
//pDatabase = pCommonData->GetDatabase();
|
||||
//pDatabase->ImageDeleteFromAcqusitionTemp(pImageCapture->m_strImageFilename, true);
|
||||
//pCommonData->ReleaseDatabase();
|
||||
}
|
||||
else if(pImageCapture->m_nType==DISPLAY_VIDEO)
|
||||
{
|
||||
QString strFilename = pImageCapture->m_strImageFilename;
|
||||
|
||||
QFileInfo fileCheck(strFilename);
|
||||
if(fileCheck.exists()==true)
|
||||
{
|
||||
QString strPath = fileCheck.path();
|
||||
QString strFilename = fileCheck.fileName();
|
||||
|
||||
QStringList filter;
|
||||
if(strFilename.size()>0)
|
||||
{
|
||||
strFilename = strFilename.left(strFilename.size()-4);
|
||||
filter << strFilename + QString("*") + MOVIE_FILE_EXTENSION;
|
||||
}
|
||||
|
||||
QDirIterator it(strPath, filter, QDir::AllEntries | QDir::NoSymLinks | QDir::NoDotAndDotDot, QDirIterator::NoIteratorFlags);
|
||||
while(it.hasNext()==true)
|
||||
{
|
||||
QString strVideoFilename = it.next();
|
||||
QFile fileDelete(strVideoFilename);
|
||||
if(fileDelete.exists()==true)
|
||||
{
|
||||
fileDelete.remove();
|
||||
fileDelete.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QFile fileDelete(strFilename);
|
||||
if(fileDelete.exists()==true)
|
||||
{
|
||||
fileDelete.remove();
|
||||
fileDelete.close();
|
||||
}
|
||||
|
||||
strFilename.replace(".jpg", MOVIE_FILE_EXTENSION);
|
||||
strFilename.replace(".png", MOVIE_FILE_EXTENSION);
|
||||
strFilename.replace(".bmp", MOVIE_FILE_EXTENSION);
|
||||
|
||||
//pDatabase = pCommonData->GetDatabase();
|
||||
//pDatabase->ImageDeleteFromAcqusitionTemp(strFilename, true);
|
||||
//pCommonData->ReleaseDatabase();
|
||||
}
|
||||
|
||||
pImageCapture->m_bDelete = true;
|
||||
//pListCaptureImage->erase(it);
|
||||
break;
|
||||
}
|
||||
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
pPrevImage = pImageCapture;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(pPrevImage!=NULL)
|
||||
{
|
||||
pNewCurrentImage = pPrevImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
int nTotalImage = 0;
|
||||
int i=0;
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
nTotalImage++;
|
||||
}
|
||||
}
|
||||
|
||||
if(nTotalImage>0)
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = (*pListCaptureImage)[i];
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
pPrevImage = pImageCapture;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//pPrevImage = (*pListCaptureImage)[0];
|
||||
}
|
||||
|
||||
pNewCurrentImage = pPrevImage;
|
||||
}
|
||||
|
||||
for(it=pListCaptureImage->begin() ; it!=pListCaptureImage->end() ; ++it)
|
||||
{
|
||||
CAPTURE_IMAGE* pImageCapture = *it;
|
||||
nIndex++;
|
||||
|
||||
if(pImageCapture->m_bDelete==false)
|
||||
{
|
||||
pImageCapture->m_nIndex = nIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
//pImageCapture->m_nIndex = -1;
|
||||
pImageCapture->m_nIndex = nIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
//if(pNewCurrentImage!=NULL)
|
||||
{
|
||||
SetCurrentImage(pNewCurrentImage);
|
||||
}
|
||||
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Send_Select_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
|
||||
bool bExecuteSend = true;
|
||||
|
||||
while(bExecuteSend==true)
|
||||
{
|
||||
QList<QStringList> listFile;
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
|
||||
if(m_pCurrentImage->m_nType==DISPLAY_IMAGE)
|
||||
{
|
||||
//`FileLocation`, `AcquisitionNumber`, `AcquisitionDate`, `AcquisitionTime`, `ImageDelete`, `ImageSend`
|
||||
|
||||
QString strFile = m_pCurrentImage->m_strImageFilename;
|
||||
QString strAcquisitionNumber;
|
||||
QString strAcquisitionDate;
|
||||
QString strAcquisitionTime;
|
||||
QString strImageDelete;
|
||||
QString strImageSend;
|
||||
|
||||
strAcquisitionNumber = QString("%1").arg(m_pCurrentImage->m_nAcquisitionNumber);
|
||||
strAcquisitionDate = m_pCurrentImage->m_DateTime.toString("yyyyMMdd"); //pImageSelect->m_strDate;
|
||||
strAcquisitionTime = m_pCurrentImage->m_DateTime.toString("HHmmss");//pImageSelect->m_strTime;
|
||||
if(m_pCurrentImage->m_bDelete==true)
|
||||
{
|
||||
strImageDelete = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
strImageDelete = "0";
|
||||
}
|
||||
|
||||
if(m_pCurrentImage->m_bSend==true)
|
||||
{
|
||||
strImageSend = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
strImageSend = "0";
|
||||
}
|
||||
|
||||
QStringList listData;
|
||||
listData.push_back(strFile);
|
||||
listData.push_back(strAcquisitionNumber);
|
||||
listData.push_back(strAcquisitionDate);
|
||||
listData.push_back(strAcquisitionTime);
|
||||
listData.push_back(strImageDelete);
|
||||
listData.push_back(strImageSend);
|
||||
|
||||
listFile.push_back(listData);
|
||||
}
|
||||
|
||||
if(listFile.size()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//pCommonData->GetThreadCaptureImage()->SendImage(listFile);
|
||||
SThreadSendDICOM* pThreadSendDICOM = pCommonData->GetThreadSendDICOM();
|
||||
pThreadSendDICOM->SetCheckSendImageList(listFile);
|
||||
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
delete m_pDialogSendProgress;
|
||||
}
|
||||
|
||||
m_pDialogSendProgress = new DialogProgress(this);
|
||||
|
||||
//m_pDialogSendProgress->Init(1);
|
||||
m_pDialogSendProgress->Init(0x11);
|
||||
m_pDialogSendProgress->exec();
|
||||
|
||||
vector<QString> listImageSendCompleteFile = pThreadSendDICOM->GetListImageSendCompleteFile();
|
||||
if(listImageSendCompleteFile.size()>0)
|
||||
{
|
||||
QString strSendCompleteFile = listImageSendCompleteFile[0];
|
||||
if(strSendCompleteFile==m_pCurrentImage->m_strImageFilename)
|
||||
{
|
||||
m_pCurrentImage->m_bSend = true;
|
||||
}
|
||||
}
|
||||
|
||||
int nRet = m_pDialogSendProgress->result();
|
||||
|
||||
if(m_pDialogSendProgress->IsError()==false)
|
||||
{
|
||||
bExecuteSend = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nRet==QDialog::Rejected)
|
||||
{
|
||||
bExecuteSend = false;
|
||||
}
|
||||
}
|
||||
|
||||
//SDatabase::DeleteListReponse(listFile);
|
||||
listFile.clear();
|
||||
|
||||
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
delete m_pDialogSendProgress;
|
||||
m_pDialogSendProgress = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::on_pushButton_Send_SelectAll_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
|
||||
int i=0;
|
||||
|
||||
bool bExecuteSend = true;
|
||||
|
||||
while(bExecuteSend==true)
|
||||
{
|
||||
QList<QStringList> listFile;
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<CAPTURE_IMAGE*>* pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pCaptureImage = (*pListCaptureImage)[i];
|
||||
if(pCaptureImage->m_bDelete==false && pCaptureImage->m_nType==DISPLAY_IMAGE)
|
||||
{
|
||||
if(pCaptureImage->m_bCheck==true)
|
||||
{
|
||||
//`FileLocation`, `AcquisitionNumber`, `AcquisitionDate`, `AcquisitionTime`, `ImageDelete`, `ImageSend`
|
||||
|
||||
QString strFile = pCaptureImage->m_strImageFilename;
|
||||
QString strAcquisitionNumber;
|
||||
QString strAcquisitionDate;
|
||||
QString strAcquisitionTime;
|
||||
QString strImageDelete;
|
||||
QString strImageSend;
|
||||
|
||||
strAcquisitionNumber = QString("%1").arg(pCaptureImage->m_nAcquisitionNumber);
|
||||
strAcquisitionDate = pCaptureImage->m_DateTime.toString("yyyyMMdd"); //pImageSelect->m_strDate;
|
||||
strAcquisitionTime = pCaptureImage->m_DateTime.toString("HHmmss");//pImageSelect->m_strTime;
|
||||
if(pCaptureImage->m_bDelete==true)
|
||||
{
|
||||
strImageDelete = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
strImageDelete = "0";
|
||||
}
|
||||
|
||||
if(pCaptureImage->m_bSend==true)
|
||||
{
|
||||
strImageSend = "1";
|
||||
}
|
||||
else
|
||||
{
|
||||
strImageSend = "0";
|
||||
}
|
||||
|
||||
QStringList listData;
|
||||
listData.push_back(strFile);
|
||||
listData.push_back(strAcquisitionNumber);
|
||||
listData.push_back(strAcquisitionDate);
|
||||
listData.push_back(strAcquisitionTime);
|
||||
listData.push_back(strImageDelete);
|
||||
listData.push_back(strImageSend);
|
||||
|
||||
listFile.push_back(listData);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
if(listFile.size()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//pCommonData->GetThreadCaptureImage()->SendImage(listFile);
|
||||
SThreadSendDICOM* pThreadSendDICOM = pCommonData->GetThreadSendDICOM();
|
||||
pThreadSendDICOM->SetCheckSendImageList(listFile);
|
||||
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
delete m_pDialogSendProgress;
|
||||
}
|
||||
|
||||
m_pDialogSendProgress = new DialogProgress(this);
|
||||
|
||||
//m_pDialogSendProgress->Init(1);
|
||||
m_pDialogSendProgress->Init(0x11);
|
||||
m_pDialogSendProgress->exec();
|
||||
|
||||
vector<QString> listImageSendCompleteFile = pThreadSendDICOM->GetListImageSendCompleteFile();
|
||||
|
||||
pListCaptureImage = pCommonData->GetListCaptureImage();
|
||||
{
|
||||
for(i=0 ; i<pListCaptureImage->size() ; i++)
|
||||
{
|
||||
CAPTURE_IMAGE* pCaptureImage = (*pListCaptureImage)[i];
|
||||
int j=0;
|
||||
for(j=0 ; j<listImageSendCompleteFile.size() ; j++)
|
||||
{
|
||||
QString strImageSendCompleteFile = listImageSendCompleteFile[j];
|
||||
if(pCaptureImage->m_strImageFilename==strImageSendCompleteFile)
|
||||
{
|
||||
pCaptureImage->m_bSend = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
pCommonData->ReleaseListCaptureImage();
|
||||
|
||||
|
||||
|
||||
int nRet = m_pDialogSendProgress->result();
|
||||
|
||||
if(m_pDialogSendProgress->IsError()==false)
|
||||
{
|
||||
bExecuteSend = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nRet==QDialog::Rejected)
|
||||
{
|
||||
bExecuteSend = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
delete m_pDialogSendProgress;
|
||||
m_pDialogSendProgress = NULL;
|
||||
}
|
||||
|
||||
//SDatabase::DeleteListReponse(listFile);
|
||||
listFile.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::UpdateMakeDICOMInfo(int nCount, int nTotalCount)
|
||||
{
|
||||
m_pDialogSendProgress->DisplayInfo(nCount, nTotalCount);
|
||||
|
||||
QString strInfo = QString("DICOM Make: %1 / %2").arg(nCount).arg(nTotalCount);
|
||||
m_pDialogSendProgress->DisplayInfo(strInfo);
|
||||
}
|
||||
|
||||
|
||||
void FormCheckCaptureSelect::UpdateSendInfo(int nCount, int nTotalCount)
|
||||
{
|
||||
m_pDialogSendProgress->DisplayInfo(nCount, nTotalCount);
|
||||
|
||||
QString strInfo = QString("%1 / %2").arg(nCount).arg(nTotalCount);
|
||||
m_pDialogSendProgress->DisplayInfo(strInfo);
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::UpdateSendComplete()
|
||||
{
|
||||
m_pDialogSendProgress->DisplayInfo(-1, 100);
|
||||
|
||||
QString strInfo = QString("Send Complete");
|
||||
m_pDialogSendProgress->DisplayInfo(strInfo);
|
||||
|
||||
//QThread::msleep(1000);
|
||||
|
||||
//m_pDialogSendProgress->SendComplete();
|
||||
//m_pDialogSendProgress->accept();
|
||||
}
|
||||
|
||||
void FormCheckCaptureSelect::UpdateSendFailed()
|
||||
{
|
||||
if(m_pDialogSendProgress!=NULL)
|
||||
{
|
||||
m_pDialogSendProgress->DisplayInfo(-1, 100);
|
||||
|
||||
m_pDialogSendProgress->DisplayInfo(-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormCheckCaptureSelect::Init()
|
||||
{
|
||||
m_pCurrentImage = NULL;
|
||||
}
|
||||
61
formcheckcaptureselect.h
Normal file
61
formcheckcaptureselect.h
Normal file
@ -0,0 +1,61 @@
|
||||
#ifndef FORMCHECKCAPTURESELECT_H
|
||||
#define FORMCHECKCAPTURESELECT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#include "dialogprogress.h"
|
||||
|
||||
namespace Ui {
|
||||
class FormCheckCaptureSelect;
|
||||
}
|
||||
|
||||
class FormCheckCaptureSelect : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormCheckCaptureSelect(QWidget *parent = nullptr);
|
||||
~FormCheckCaptureSelect();
|
||||
|
||||
void SetCurrentImage(CAPTURE_IMAGE* pData);
|
||||
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
|
||||
void UpdateMakeDICOMInfo(int nCount, int nTotalCount);
|
||||
|
||||
void UpdateSendInfo(int nCount, int nTotalCount);
|
||||
void UpdateSendComplete();
|
||||
void UpdateSendFailed();
|
||||
|
||||
void Init();
|
||||
|
||||
protected:
|
||||
CAPTURE_IMAGE* m_pCurrentImage;
|
||||
CAPTURE_IMAGE* m_pDisplayImage;
|
||||
|
||||
DialogProgress* m_pDialogSendProgress;
|
||||
|
||||
signals:
|
||||
void CloseSelectForm();
|
||||
|
||||
private slots:
|
||||
void ClickSelect();
|
||||
void on_pushButton_Close_clicked();
|
||||
|
||||
void on_pushButton_Prev_clicked();
|
||||
|
||||
void on_pushButton_Next_clicked();
|
||||
|
||||
void on_pushButton_Delete_clicked();
|
||||
|
||||
void on_pushButton_Send_Select_clicked();
|
||||
|
||||
void on_pushButton_Send_SelectAll_clicked();
|
||||
|
||||
private:
|
||||
Ui::FormCheckCaptureSelect *ui;
|
||||
};
|
||||
|
||||
#endif // FORMCHECKCAPTURESELECT_H
|
||||
293
formcheckcaptureselect.ui
Normal file
293
formcheckcaptureselect.ui
Normal file
@ -0,0 +1,293 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormCheckCaptureSelect</class>
|
||||
<widget class="QWidget" name="FormCheckCaptureSelect">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1103</width>
|
||||
<height>780</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget
|
||||
{
|
||||
background: #A6B1C2;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_Background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>621</y>
|
||||
<width>1103</width>
|
||||
<height>159</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: #A6B1C2;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Send_Select">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>121</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/capture_send_icon_button.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/capture_send_icon_clicked_button.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Delete">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
<y>50</y>
|
||||
<width>121</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/capture_delete_button_icon.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/capture_delete_clicked_button_icon.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Send_SelectAll">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>970</x>
|
||||
<y>50</y>
|
||||
<width>121</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/capture_send_icon_check box_button.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/capture_send all_button_clicked.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Close">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1007</x>
|
||||
<y>12</y>
|
||||
<width>81</width>
|
||||
<height>71</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/capture_close_button_icon.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/capture_close_clicked_button_icon.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Next">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>7</x>
|
||||
<y>262</y>
|
||||
<width>80</width>
|
||||
<height>110</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/preview-icon.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/preview-icon_clicked.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Selection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>27</x>
|
||||
<y>32</y>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
background: white;
|
||||
qproperty-checkable: true;
|
||||
qproperty-checked: false;
|
||||
}
|
||||
|
||||
QPushButton:!checked
|
||||
{
|
||||
background: white;
|
||||
}
|
||||
|
||||
|
||||
QPushButton:checked
|
||||
{
|
||||
background: white;
|
||||
border-image: url(://image/2/capture_check box.png);
|
||||
padding: 6px;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>75</x>
|
||||
<y>27</y>
|
||||
<width>141</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
color: white;
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
background: black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Image: 5/5</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Prev">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1007</x>
|
||||
<y>262</y>
|
||||
<width>80</width>
|
||||
<height>110</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
border-image: url(://image/2/next-icon.png);
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
border-image: url(://image/2/next-icon_clicked.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_Info_Video">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>27</y>
|
||||
<width>141</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
color: white;
|
||||
font-family: 'Roboto';
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
background: red;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Video File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
156
formheadertype1.cpp
Normal file
156
formheadertype1.cpp
Normal file
@ -0,0 +1,156 @@
|
||||
#include "formheadertype1.h"
|
||||
#include "ui_formheadertype1.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QEvent>
|
||||
#include "mainwindow.h"
|
||||
|
||||
FormHeaderType1::FormHeaderType1(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormHeaderType1)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_nID = 0;
|
||||
}
|
||||
|
||||
FormHeaderType1::~FormHeaderType1()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void FormHeaderType1::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
event->type();
|
||||
|
||||
QSize sz = size();
|
||||
ui->horizontalLayoutWidget->setGeometry(0, 0, sz.width(), sz.height());
|
||||
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
int nFontSize = 22;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->frame_image->move(15, 20);
|
||||
nFontSize = 16;
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_image->move(15, 25);
|
||||
}
|
||||
|
||||
QString strLabel = QString(
|
||||
"QLabel \
|
||||
{ \
|
||||
qproperty-alignment: 'AlignHCenter | AlignVCenter'; \
|
||||
font-family: 'Roboto'; \
|
||||
font-size: %1px; \
|
||||
font-weight: bold; \
|
||||
color: white; \
|
||||
}").arg(nFontSize);
|
||||
|
||||
ui->label->setStyleSheet(strLabel);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormHeaderType1::enterEvent(QEvent *event)
|
||||
{
|
||||
//ui->label->setText("hover");
|
||||
|
||||
ui->horizontalLayoutWidget->setStyleSheet("QWidget { background: #ff0000; }");
|
||||
//setStyleSheet("");
|
||||
}
|
||||
|
||||
void FormHeaderType1::leaveEvent(QEvent *event)
|
||||
{
|
||||
//ui->label->setText("leave");
|
||||
ui->horizontalLayoutWidget->setStyleSheet("QWidget { background: transparent; }");
|
||||
}
|
||||
|
||||
|
||||
void FormHeaderType1::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
//ui->label->setText("click");
|
||||
//ui->horizontalLayoutWidget->setStyleSheet("QWidget { background: #000000; }");
|
||||
|
||||
//ui->label->setStyleSheet("QLabel { color: white; }");
|
||||
//ui->frame->setStyleSheet("QFrame {border-image: url(://image/Arrow_top_2.png);}");
|
||||
|
||||
/*
|
||||
setStyleSheet(
|
||||
"QTableWidget {background-color: transparent; border: none; outline: none;}"
|
||||
//"QHeaderView { border:none; border-bottom: 3px solid rgb(0, 160, 230); background: rgb(57, 58, 60); min-height: 60px;}"
|
||||
"QHeaderView { border:none; border-bottom: 3px solid rgb(0, 160, 230); background: transparent; min-height: 60px;}"
|
||||
|
||||
"QHeaderView::section:horizontal { border:none; border-right: 1px solid white; color: white; background: transparent ; padding-left: 10px; }"
|
||||
"QHeaderView::section:horizontal:hover { background: rgb(0, 160, 230);}"
|
||||
"QHeaderView::section:horizontal:pressed { background: rgb(0, 180, 255);}"
|
||||
"QHeaderView::up-arrow { width: 23px; height: 12px; padding-right: 25px; image: url(://image/Arrow_top_2.png); subcontrol-position: center right; }"
|
||||
"QHeaderView::down-arrow { width: 23px; height: 12px; padding-right: 25px; image: url(://image/Arrow_under_2.png); subcontrol-position: center right; }");
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void FormHeaderType1::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
Clicked(m_nID);
|
||||
}
|
||||
|
||||
|
||||
void FormHeaderType1::Unselect()
|
||||
{
|
||||
//ui->horizontalSpacer->changeSize(0, 0);
|
||||
ui->frame->hide();
|
||||
|
||||
//m_nOrder = Qt::AscendingOrder;
|
||||
m_nOrder = -1;
|
||||
}
|
||||
|
||||
void FormHeaderType1::Select(int nOrder)
|
||||
{
|
||||
m_nOrder = nOrder;
|
||||
if(ui->frame->isVisible()==false)
|
||||
{
|
||||
//ui->horizontalSpacer->changeSize(10, 20);
|
||||
ui->frame->show();
|
||||
}
|
||||
|
||||
|
||||
if(nOrder==Qt::AscendingOrder)
|
||||
{
|
||||
ui->frame_image->setStyleSheet("QFrame {border-image: url(://image/Arrow_under_2.png);}");
|
||||
}
|
||||
else if(nOrder==Qt::DescendingOrder)
|
||||
{
|
||||
ui->frame_image->setStyleSheet("QFrame {border-image: url(://image/Arrow_top_2.png);}");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->frame_image->setStyleSheet("QFrame {border: none;}");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
int FormHeaderType1::GetOrder()
|
||||
{
|
||||
return m_nOrder;
|
||||
}
|
||||
|
||||
void FormHeaderType1::SetID(int nID)
|
||||
{
|
||||
m_nID = nID;
|
||||
}
|
||||
|
||||
int FormHeaderType1::GetID()
|
||||
{
|
||||
return m_nID;
|
||||
}
|
||||
|
||||
void FormHeaderType1::SetHeaderText(QString& strText)
|
||||
{
|
||||
ui->label->setText(strText);
|
||||
}
|
||||
|
||||
48
formheadertype1.h
Normal file
48
formheadertype1.h
Normal file
@ -0,0 +1,48 @@
|
||||
#ifndef FORMHEADERTYPE1_H
|
||||
#define FORMHEADERTYPE1_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class FormHeaderType1;
|
||||
}
|
||||
|
||||
class FormHeaderType1 : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormHeaderType1(QWidget *parent = nullptr);
|
||||
~FormHeaderType1();
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
virtual void enterEvent(QEvent *event);
|
||||
virtual void leaveEvent(QEvent *event);
|
||||
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
|
||||
void Unselect();
|
||||
void Select(int nOrder);
|
||||
|
||||
void SetID(int nID);
|
||||
int GetID();
|
||||
int GetOrder();
|
||||
|
||||
void SetHeaderText(QString& strText);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
int m_nID;
|
||||
int m_nOrder;
|
||||
|
||||
signals:
|
||||
void Clicked(int nID);
|
||||
|
||||
private:
|
||||
Ui::FormHeaderType1 *ui;
|
||||
};
|
||||
|
||||
#endif // FORMHEADERTYPE1_H
|
||||
165
formheadertype1.ui
Normal file
165
formheadertype1.ui
Normal file
@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormHeaderType1</class>
|
||||
<widget class="QWidget" name="FormHeaderType1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>198</width>
|
||||
<height>60</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget#FormHeaderType1
|
||||
{
|
||||
background: red;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>208</width>
|
||||
<height>62</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_Left">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
qproperty-alignment: 'AlignHCenter | AlignVCenter';
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>STUDY DATE</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_image">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>15</x>
|
||||
<y>25</y>
|
||||
<width>10</width>
|
||||
<height>7</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>7</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>7</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_image
|
||||
{
|
||||
background: none;
|
||||
border-image: url(://image/Arrow_top_2.png);
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_Right">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
372
formhistory.cpp
Normal file
372
formhistory.cpp
Normal file
@ -0,0 +1,372 @@
|
||||
#include "formhistory.h"
|
||||
#include "ui_formhistory.h"
|
||||
|
||||
#include "commondata.h"
|
||||
#include "mainwindow.h"
|
||||
#include "dialogcalendar.h"
|
||||
#include "formcalendarview.h"
|
||||
|
||||
FormHistory::FormHistory(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormHistory)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->widgetList->ChangeHeader();
|
||||
|
||||
ui->pushButton_DateEnd->hide();
|
||||
|
||||
m_nSearchDurationType = 0;
|
||||
}
|
||||
|
||||
FormHistory::~FormHistory()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormHistory::ClickSearchDateStartEnd()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QDate dateStart = pCommonData->GetDateSearchHistoryStart();
|
||||
QDate dateEnd = pCommonData->GetDateSearchHistoryEnd();
|
||||
|
||||
QDate date = QDate::currentDate();
|
||||
|
||||
if(m_nSearchDurationType==0)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DialogCalendar dlg(this);
|
||||
dlg.SetCalendarDate(date.year(), date.month(), 1);
|
||||
dlg.SetDateStart(dateStart);
|
||||
dlg.SetDateEnd(dateEnd);
|
||||
//dlg.SetModeChangeStart();
|
||||
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
pMainWindow->StopScreenSaverTimer();
|
||||
|
||||
connect(&dlg, SIGNAL(SetSearchDateUpdate(int)), this, SLOT(SetSearchDateUpdate(int)));
|
||||
|
||||
dlg.exec();
|
||||
m_nSearchDurationType = dlg.GetTypeSearchDuration();
|
||||
|
||||
disconnect(&dlg, SIGNAL(SetSearchDateUpdate(int)), this, SLOT(SetSearchDateUpdate(int)));
|
||||
|
||||
pMainWindow->ResetScreenSaverTimer();
|
||||
pMainWindow->StartScreenSaverTimer();
|
||||
}
|
||||
|
||||
void FormHistory::on_pushButton_DateStart_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
ClickSearchDateStartEnd();
|
||||
|
||||
}
|
||||
|
||||
void FormHistory::on_pushButton_DateEnd_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
ClickSearchDateStartEnd();
|
||||
}
|
||||
|
||||
void FormHistory::SetSearchDateUpdate(int nTypeSearchDuration)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
//QDate dateStart = pMainWindow->GetDateSearchWorklistStart();// FormCalendarView::GetDateStart();
|
||||
//QDate dateEnd = pMainWindow->GetDateSearchWorklistEnd();// FormCalendarView::GetDateEnd();
|
||||
QDate dateStart = FormCalendarView::GetDateStart();
|
||||
QDate dateEnd = FormCalendarView::GetDateEnd();
|
||||
QDate dateToday = QDate::currentDate();
|
||||
|
||||
m_nSearchDurationType = nTypeSearchDuration;
|
||||
|
||||
pCommonData->GetSearchDateStartEnd(m_nSearchDurationType, dateStart, dateEnd);
|
||||
pCommonData->SetDateSearchHistoryStart(dateStart);
|
||||
pCommonData->SetDateSearchHistoryEnd(dateEnd);
|
||||
|
||||
QString strDateStart;
|
||||
QString strDateEnd;
|
||||
|
||||
int nStartYear = dateStart.year();
|
||||
int nStartMonth = dateStart.month();
|
||||
int nStartDay = dateStart.day();
|
||||
|
||||
int nEndYear = dateEnd.year();
|
||||
int nEndMonth = dateEnd.month();
|
||||
int nEndDay = dateEnd.day();
|
||||
|
||||
strDateStart = QString("%1/%2/%3").arg(QString::number(nStartYear).rightJustified(4, '0')).arg(QString::number(nStartMonth).rightJustified(2, '0')).arg(QString::number(nStartDay).rightJustified(2, '0'));
|
||||
|
||||
strDateEnd = QString("%1/%2/%3").arg(QString::number(nEndYear).rightJustified(4, '0')).arg(QString::number(nEndMonth).rightJustified(2, '0')).arg(QString::number(nEndDay).rightJustified(2, '0'));
|
||||
|
||||
if(dateToday==dateStart)
|
||||
{
|
||||
ui->label_DateStart->setText("Today");
|
||||
}
|
||||
else
|
||||
{
|
||||
QString strSearchDate = QString("%1 ~ %2").arg(strDateStart).arg(strDateEnd);
|
||||
ui->label_DateStart->setText(strSearchDate);
|
||||
}
|
||||
|
||||
if(dateToday==dateEnd)
|
||||
{
|
||||
ui->label_DateEnd->setText("Today");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->label_DateEnd->setText(strDateEnd);
|
||||
}
|
||||
|
||||
|
||||
SEARCH_ITEM* pSearchItem = pCommonData->GetSearchItemHistory();
|
||||
pSearchItem->m_strStudyDate = QString("%1-%2").arg(strDateStart).arg(strDateEnd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void FormHistory::on_pushButton_Search_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QDate dateStart = pCommonData->GetDateSearchHistoryStart();
|
||||
QDate dateEnd = pCommonData->GetDateSearchHistoryEnd();
|
||||
SDatabase* pDatabase = NULL;
|
||||
SEARCH_ITEM si;
|
||||
|
||||
pCommonData->GetSearchDateStartEnd(m_nSearchDurationType, dateStart, dateEnd);
|
||||
pCommonData->SetDateSearchHistoryStart(dateStart);
|
||||
pCommonData->SetDateSearchHistoryEnd(dateEnd);
|
||||
|
||||
pCommonData->ClearHistorySearchResult();
|
||||
|
||||
QDate dt = QDate::currentDate();
|
||||
int nYear = dt.year();
|
||||
int nMonth = dt.month();
|
||||
int nDay = dt.day();
|
||||
|
||||
|
||||
QString strSearchDate;
|
||||
if(dateStart.isValid()==true)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
strSearchDate = QString("%1/%2/%3").arg(nYear, 4, 10, QChar('0')).arg(nMonth, 2, 10, QChar('0')).arg(nDay, 2, 10, QChar('0'));
|
||||
}
|
||||
|
||||
if(dateEnd.isValid()==true)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
strSearchDate += QString("-%1/%2/%3").arg(nYear, 4, 10, QChar('0')).arg(nMonth, 2, 10, QChar('0')).arg(nDay, 2, 10, QChar('0'));
|
||||
}
|
||||
|
||||
if(strSearchDate.length()<21)
|
||||
{
|
||||
QDate dt = dateStart;
|
||||
int nYear = dt.year();
|
||||
int nMonth = dt.month();
|
||||
int nDay = dt.day();
|
||||
|
||||
strSearchDate += QString("%1/%2/%3").arg(nYear, 4, 10, QChar('0')).arg(nMonth, 2, 10, QChar('0')).arg(nDay, 2, 10, QChar('0'));
|
||||
|
||||
dt = dateEnd;
|
||||
nYear = dt.year();
|
||||
nMonth = dt.month();
|
||||
nDay = dt.day();
|
||||
strSearchDate += QString("-%1/%2/%3").arg(nYear, 4, 10, QChar('0')).arg(nMonth, 2, 10, QChar('0')).arg(nDay, 2, 10, QChar('0'));
|
||||
}
|
||||
|
||||
|
||||
si.m_strStudyDate = strSearchDate;
|
||||
|
||||
si.m_strPatientName = ui->plainTextEdit_PatientName->toPlainText();
|
||||
si.m_strPatientID = ui->plainTextEdit_PatientID->toPlainText();
|
||||
|
||||
|
||||
// 1. 결과를 담을 벡터를 먼저 가져옵니다. (기존 데이터를 비우는 처리는 ClearHistorySearchResult에서 담당)
|
||||
vector<HISTORY_STUDY*>* pListHistorySearch = pCommonData->GetHistorySearchResult();
|
||||
// pCommonData->ClearHistorySearchResult(); // 필요하다면 여기서 기존 결과를 비웁니다.
|
||||
|
||||
// 2. 이 작업을 위한 지역 DB 인스턴스를 생성하고 연결합니다.
|
||||
SUTIL::SDatabase db(QString("GetHistoryStudyTask_%1").arg(reinterpret_cast<quintptr>(this)));
|
||||
if (db.OpenDatabase("/home/birdhead/test.db") == 0) // 0이 성공
|
||||
{
|
||||
// 3. 새로운 API를 호출하여 결과 리스트 "값"을 직접 받습니다.
|
||||
// (bWithDelete는 false라고 가정)
|
||||
QList<QStringList> result = db.GetHistoryStudy(&si, false);
|
||||
|
||||
// 4. 새로운 range-based for 문으로 코드를 더 간결하게 만듭니다.
|
||||
for (const QStringList& rowData : result)
|
||||
{
|
||||
HISTORY_STUDY* pHistoryStudy = new HISTORY_STUDY;
|
||||
|
||||
// 컬럼 순서가 일치한다고 가정하고 데이터를 복사합니다.
|
||||
// SDI_TOTAL은 m_List의 크기를 넘어가지 않도록 하는 안전장치입니다.
|
||||
for (int j = 0; j < rowData.size() && j < SDI_TOTAL; ++j)
|
||||
{
|
||||
QString* pData = pHistoryStudy->m_List[j];
|
||||
if (pData) { // 포인터 유효성 검사
|
||||
*pData = rowData.at(j);
|
||||
}
|
||||
}
|
||||
pListHistorySearch->push_back(pHistoryStudy);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning() << "DB open failed for GetHistoryStudy.";
|
||||
}
|
||||
|
||||
/*
|
||||
pDatabase = pCommonData->GetDatabase();
|
||||
pDatabase->GetHistoryStudy(&si);
|
||||
|
||||
vector<HISTORY_STUDY*>* pListHistorySearch = pCommonData->GetHistorySearchResult();
|
||||
QList<QStringList*>* pResult = pDatabase->GetResult();
|
||||
|
||||
|
||||
int i=0;
|
||||
|
||||
for(i=0 ; i<pResult->size() ; i++)
|
||||
{
|
||||
HISTORY_STUDY* pHistoryStudy = new HISTORY_STUDY;
|
||||
pListHistorySearch->push_back(pHistoryStudy);
|
||||
|
||||
QStringList* pListData = (*pResult)[i];
|
||||
int j=0;
|
||||
for(j=0 ; j<pListData->size() ; j++)
|
||||
{
|
||||
QString* pData = pHistoryStudy->m_List[j];
|
||||
*pData = (*pListData)[j];
|
||||
}
|
||||
}
|
||||
|
||||
pCommonData->ReleaseDatabase();
|
||||
*/
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
void FormHistory::Init()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
ui->widgetList->Clear();
|
||||
ui->widgetList->ChangeHeader();
|
||||
|
||||
ui->widgetList->UpdateHistoryList();
|
||||
ui->widgetList->Init();
|
||||
}
|
||||
|
||||
|
||||
void FormHistory::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
|
||||
int nFontSize = 22;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
nFontSize = 16;
|
||||
|
||||
ui->frame_PatientID->setGeometry(20, 28, 156, 32);
|
||||
ui->frame_PatientName->setGeometry(195, 28, 156, 32);
|
||||
ui->pushButton_DateStart->setGeometry(376, 28, 278, 32);
|
||||
//ui->
|
||||
ui->pushButton_DateEnd->setGeometry(580, 28, 178, 32);
|
||||
|
||||
ui->plainTextEdit_PatientID->setGeometry(30, 31, 140, 40);
|
||||
ui->plainTextEdit_PatientName->setGeometry(205, 31, 140, 40);
|
||||
|
||||
ui->label_DateStart->setGeometry(18, 0, 260, 36);
|
||||
ui->label_DateEnd->setGeometry(18, 0, 160, 36);
|
||||
|
||||
ui->widgetList->setGeometry(20, 91, 1150, 665);
|
||||
|
||||
ui->pushButton_USBExport->setGeometry(20, 91+665+30, 145, 45);
|
||||
|
||||
|
||||
ui->pushButton_Search->setGeometry(1025, 21, 145, 45);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_PatientID->setGeometry(30, 34, 195, 40);
|
||||
ui->frame_PatientName->setGeometry(250, 34, 195, 40);
|
||||
ui->pushButton_DateStart->setGeometry(477, 34, 268, 40);
|
||||
ui->pushButton_DateEnd->setGeometry(770, 34, 268, 40);
|
||||
|
||||
ui->plainTextEdit_PatientID->setGeometry(40, 40, 175, 50);
|
||||
ui->plainTextEdit_PatientName->setGeometry(260, 40, 175, 50);
|
||||
|
||||
ui->label_DateStart->setGeometry(20, 0, 201, 40);
|
||||
ui->label_DateEnd->setGeometry(20, 0, 201, 40);
|
||||
|
||||
ui->widgetList->setGeometry(30, 108, 1750, 640);
|
||||
|
||||
ui->pushButton_Search->setGeometry(1600, 24, 180, 56);
|
||||
}
|
||||
|
||||
QString strPushButton = QString(
|
||||
"QPushButton \
|
||||
{ \
|
||||
background: #153B44; \
|
||||
font-family: 'Roboto'; \
|
||||
font-size: %1px; \
|
||||
font-weight: bold; \
|
||||
border-radius: 8px; \
|
||||
color: white; \
|
||||
} \
|
||||
\
|
||||
QPushButton:pressed \
|
||||
{ \
|
||||
background: #1B4C54; \
|
||||
}").arg(nFontSize);
|
||||
|
||||
ui->pushButton_Search->setStyleSheet(strPushButton);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#include "dialogexportusb.h"
|
||||
|
||||
void FormHistory::on_pushButton_USBExport_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
ui->widgetList->GetExportList();
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<QString>* pListExport = pCommonData->GetExportList();
|
||||
|
||||
if(pListExport->size()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DialogExportUSB dlg(this);
|
||||
|
||||
int nRet = dlg.exec();
|
||||
}
|
||||
|
||||
void FormHistory::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
int nKey = event->key();
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
|
||||
}
|
||||
47
formhistory.h
Normal file
47
formhistory.h
Normal file
@ -0,0 +1,47 @@
|
||||
#ifndef FORMHISTORY_H
|
||||
#define FORMHISTORY_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui {
|
||||
class FormHistory;
|
||||
}
|
||||
|
||||
class FormHistory : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormHistory(QWidget *parent = nullptr);
|
||||
~FormHistory();
|
||||
|
||||
virtual void Init();
|
||||
|
||||
void ClickSearchDateStartEnd();
|
||||
|
||||
protected:
|
||||
int m_nSearchDurationType;
|
||||
|
||||
public:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
public slots:
|
||||
void SetSearchDateUpdate(int nTypeSearchDuration);
|
||||
|
||||
private slots:
|
||||
void on_pushButton_DateStart_clicked();
|
||||
|
||||
void on_pushButton_DateEnd_clicked();
|
||||
|
||||
|
||||
|
||||
void on_pushButton_Search_clicked();
|
||||
|
||||
void on_pushButton_USBExport_clicked();
|
||||
|
||||
private:
|
||||
Ui::FormHistory *ui;
|
||||
};
|
||||
|
||||
#endif // FORMHISTORY_H
|
||||
396
formhistory.ui
Normal file
396
formhistory.ui
Normal file
@ -0,0 +1,396 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormHistory</class>
|
||||
<widget class="QWidget" name="FormHistory">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1808</width>
|
||||
<height>857</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1808</width>
|
||||
<height>857</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_background
|
||||
{
|
||||
background: #a6b1c2;
|
||||
border: none;
|
||||
}
|
||||
|
||||
</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_DateStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>477</x>
|
||||
<y>34</y>
|
||||
<width>368</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_DateStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>668</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_DateStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>0</y>
|
||||
<width>301</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #938182;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Search Date: Today</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_image_DateStart">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>0</y>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_DateEnd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>870</x>
|
||||
<y>34</y>
|
||||
<width>268</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_DateEnd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>268</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_DateEnd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>0</y>
|
||||
<width>201</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
color: #938182;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>END DATE</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_image_DateEnd">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>0</y>
|
||||
<width>40</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_PatientName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>34</y>
|
||||
<width>195</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_PatientName
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="STextEdit" name="plainTextEdit_PatientName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>40</y>
|
||||
<width>175</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPlainTextEdit
|
||||
{
|
||||
qproperty-placeholderText: 'NAME';
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhNone</set>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="backgroundVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_Search">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1600</x>
|
||||
<y>24</y>
|
||||
<width>180</width>
|
||||
<height>56</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #153B44;
|
||||
font-family: 'Roboto';
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #1B4C54;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SEARCH</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_PatientID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>34</y>
|
||||
<width>195</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame_PatientID
|
||||
{
|
||||
background: white;
|
||||
border: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="STextEdit" name="plainTextEdit_PatientID">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>40</y>
|
||||
<width>175</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPlainTextEdit
|
||||
{
|
||||
qproperty-placeholderText: 'ID';
|
||||
qproperty-lineWrapMode: 'NoWrap';
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: light;
|
||||
padding-left: 0px;
|
||||
padding-top: 0px;
|
||||
qproperty-backgroundVisible: false;
|
||||
border: none;
|
||||
qproperty-verticalScrollBarPolicy: 'ScrollBarAlwaysOff';
|
||||
background: transparent;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="backgroundVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="FormListWidgetHistory" name="widgetList" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>108</y>
|
||||
<width>1750</width>
|
||||
<height>721</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_USBExport">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>1630</x>
|
||||
<y>360</y>
|
||||
<width>180</width>
|
||||
<height>56</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
background: #FFFFFF;
|
||||
font-family: 'Roboto';
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
QPushButton:pressed
|
||||
{
|
||||
background: #D8D8D8;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USB Export</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>STextEdit</class>
|
||||
<extends>QPlainTextEdit</extends>
|
||||
<header location="global">stextedit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>FormListWidgetHistory</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">formlistwidgethistory.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>plainTextEdit_PatientID</tabstop>
|
||||
<tabstop>plainTextEdit_PatientName</tabstop>
|
||||
<tabstop>pushButton_Search</tabstop>
|
||||
<tabstop>pushButton_DateStart</tabstop>
|
||||
<tabstop>pushButton_DateEnd</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
484
formimageselect.cpp
Normal file
484
formimageselect.cpp
Normal file
@ -0,0 +1,484 @@
|
||||
#include "formimageselect.h"
|
||||
#include "ui_formimageselect.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPaintEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QPixelFormat>
|
||||
#include <QtMath>
|
||||
|
||||
#include "mainwindow.h"
|
||||
//#include <QImageData>
|
||||
|
||||
FormImageSelect::FormImageSelect(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormImageSelect)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButton_Select, SIGNAL(released()), this, SLOT(ClickSelect()));
|
||||
|
||||
//m_pImage = new QImage("/home/birdhead/test1.png");
|
||||
|
||||
m_pImageSelect = NULL;
|
||||
m_pImage = NULL;
|
||||
|
||||
//m_pImage = new QImage(1920, 1080, QImage::Format_RGB888);
|
||||
|
||||
|
||||
m_nIndexViewer = -1;
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
FormImageSelect::~FormImageSelect()
|
||||
{
|
||||
//SAFE_DELETE(m_pImage);
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormImageSelect::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
|
||||
UpdateImageSelect();
|
||||
Init();
|
||||
}
|
||||
|
||||
|
||||
void FormImageSelect::ClickSelect()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
|
||||
}
|
||||
|
||||
void FormImageSelect::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
|
||||
|
||||
QPainter painter(this);
|
||||
QSize nSize = size();
|
||||
int nPaddingLeft = 0;
|
||||
|
||||
QRect rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft, nSize.height());
|
||||
|
||||
QColor colorBackground;
|
||||
|
||||
painter.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
|
||||
colorBackground = Qt::white;
|
||||
if(m_pImage==NULL)
|
||||
{
|
||||
painter.fillRect(rectDisplay, Qt::black);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
painter.fillRect(rectDisplay, colorBackground);
|
||||
|
||||
if(m_pImage!=NULL)
|
||||
{
|
||||
painter.fillRect(QRect(0, 0, nSize.width(), nSize.height()), Qt::black);
|
||||
/*
|
||||
if(m_pImage->width() < m_pImage->height())
|
||||
{
|
||||
|
||||
nPaddingLeft += (nSize.width()-nSize.height())/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPaddingLeft = 0;
|
||||
}
|
||||
m_rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft*2, nSize.height());
|
||||
m_rectDisplayImage = m_rectDisplay;
|
||||
*/
|
||||
}
|
||||
|
||||
if(m_bUseZoom==true)
|
||||
{
|
||||
int nOffset = m_PointClicked.y() - m_PointCurrent.y();
|
||||
|
||||
int nRectX = m_rectDisplay.x();
|
||||
int nRectY = m_rectDisplay.y();
|
||||
int nRectWidth = m_rectDisplay.width();
|
||||
int nRectHeight = m_rectDisplay.height();
|
||||
|
||||
float fRatioTmp = (float)nSize.width() / (float)nSize.height();
|
||||
|
||||
m_rectDisplayImage = QRect(nRectX+nOffset*fRatioTmp, nRectY+nOffset, nRectWidth-nOffset*2*fRatioTmp, nRectHeight-nOffset*2);
|
||||
}
|
||||
else if(m_bUseMove==true)
|
||||
{
|
||||
int nOffsetX = m_PointCurrent.x() - m_PointClicked.x();
|
||||
int nOffsetY = m_PointCurrent.y() - m_PointClicked.y();
|
||||
|
||||
qDebug() << nOffsetX << ", " << nOffsetY << endl;
|
||||
|
||||
int nRectX = m_rectDisplay.x();
|
||||
int nRectY = m_rectDisplay.y();
|
||||
int nRectWidth = m_rectDisplay.width();
|
||||
int nRectHeight = m_rectDisplay.height();
|
||||
|
||||
float fRatioTmp = (float)nSize.width() / (float)nSize.height();
|
||||
|
||||
m_rectDisplayImage = QRect(nRectX+nOffsetX, nRectY+nOffsetY, nRectWidth, nRectHeight);
|
||||
}
|
||||
|
||||
painter.drawImage(m_rectDisplayImage, *m_pImage);
|
||||
|
||||
|
||||
QFont font("Roboto");
|
||||
font.setPixelSize(18);
|
||||
|
||||
painter.setFont(font);
|
||||
|
||||
painter.setPen(Qt::black);
|
||||
//QString strInfo;
|
||||
//strInfo = QString("Index: %1").arg(QString::number(m_nIndexViewer));
|
||||
//painter.drawText(rectDisplay, Qt::AlignLeft | Qt::AlignVCenter, strInfo);
|
||||
|
||||
if(m_pImageSelect!=NULL)
|
||||
{
|
||||
if(m_pImageSelect->m_nType==DISPLAY_VIDEO)
|
||||
{
|
||||
QRect rectDisplayVideo;
|
||||
int nWidth = rectDisplay.width() / 20;
|
||||
int nHeight = rectDisplay.height() / 20;
|
||||
rectDisplayVideo = QRect(nWidth*17, nHeight, nWidth*2, nHeight);
|
||||
|
||||
painter.fillRect(rectDisplayVideo, QColor(255, 0, 0));
|
||||
|
||||
int nFontSize = nHeight/2;
|
||||
if(nFontSize<10)
|
||||
{
|
||||
nFontSize = 10;
|
||||
}
|
||||
|
||||
font.setPixelSize(nFontSize);
|
||||
font.setBold(true);
|
||||
painter.setFont(font);
|
||||
painter.drawText(rectDisplayVideo, Qt::AlignCenter, "VIDEO");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormImageSelect::SetIndexViewer(int nIndex)
|
||||
{
|
||||
m_nIndexViewer = nIndex;
|
||||
}
|
||||
|
||||
|
||||
void FormImageSelect::SetImageSelect(ImageSelect* pImageSelect)
|
||||
{
|
||||
//WRITE_FUNCTION_LOG();
|
||||
m_pImageSelect = pImageSelect;
|
||||
|
||||
DisplayCheck();
|
||||
|
||||
if(m_pImageSelect==NULL)
|
||||
{
|
||||
if(m_pImage!=NULL)
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
|
||||
//m_pImage = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
UpdateImageSelect(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormImageSelect::UpdateImageSelect(bool bForce)
|
||||
{
|
||||
//WRITE_FUNCTION_LOG();
|
||||
QSize nSize = size();
|
||||
|
||||
bool bResize = false;
|
||||
/*
|
||||
if(m_pImage==NULL)
|
||||
{
|
||||
bResize = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pImage->size()!=nSize)
|
||||
{
|
||||
bResize = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if(m_pImageSelect!=NULL)
|
||||
{
|
||||
int nWidth = m_pImageSelect->GetWidth();
|
||||
int nHeight = m_pImageSelect->GetHeight();
|
||||
//QImage::Format fmt = (QImage::Format)m_pImageSelect->GetFormat();
|
||||
QImage::Format fmt = QImage::Format_RGB888;
|
||||
uint8_t* pImageDataSrc = m_pImageSelect->m_pImageData;
|
||||
|
||||
if(m_pImage==NULL)
|
||||
{
|
||||
//m_pImage = new QImage(pImageDataSrc, nWidth, nHeight, fmt);
|
||||
m_pImage = new QImage(nWidth, nHeight, fmt);
|
||||
uchar* pDataImage = m_pImage->bits();
|
||||
memcpy(pDataImage, pImageDataSrc, nWidth*nHeight*3);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(nWidth>0 && nHeight>0)
|
||||
{
|
||||
if(m_pImage->width()!=nWidth || m_pImage->height()!=nHeight)
|
||||
{
|
||||
delete m_pImage;
|
||||
m_pImage = NULL;
|
||||
//m_pImage = new QImage(pImageDataSrc, nWidth, nHeight, fmt);
|
||||
m_pImage = new QImage(nWidth, nHeight, fmt);
|
||||
}
|
||||
|
||||
if(pImageDataSrc!=NULL)
|
||||
{
|
||||
uchar* pDataImage = m_pImage->bits();
|
||||
memcpy(pDataImage, pImageDataSrc, nWidth*nHeight*3);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pImage!=NULL)
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
//m_pImage = m_pImageSelect->m_pImage;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(m_pImage!=NULL)
|
||||
{
|
||||
m_pImage->fill(QColor(0, 0, 0));
|
||||
}
|
||||
//m_pImage = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void FormImageSelect::on_pushButton_Select_clicked()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
if(m_pImageSelect==NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(m_pImageSelect->m_bSelect==true)
|
||||
{
|
||||
m_pImageSelect->m_bSelect = false;
|
||||
}
|
||||
else if(m_pImageSelect->m_bSelect==false)
|
||||
{
|
||||
m_pImageSelect->m_bSelect = true;
|
||||
}
|
||||
|
||||
DisplayCheck();
|
||||
}
|
||||
|
||||
void FormImageSelect::DisplayCheck()
|
||||
{
|
||||
//WRITE_FUNCTION_LOG();
|
||||
if(m_pImageSelect==NULL)
|
||||
{
|
||||
ui->pushButton_Select->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
||||
ui->pushButton_Select->setChecked(m_pImageSelect->m_bSelect);
|
||||
}
|
||||
|
||||
void FormImageSelect::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
qDebug() << "Pressed";
|
||||
|
||||
//if(event->buttons()==Qt::RightButton)
|
||||
{
|
||||
m_PointClicked = event->pos();
|
||||
//grabMouse();
|
||||
}
|
||||
}
|
||||
|
||||
void FormImageSelect::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
//if(event->buttons()==Qt::RightButton || event->button()==Qt::RightButton)
|
||||
if(m_bUseMove==true || m_bUseZoom==true)
|
||||
{
|
||||
m_rectDisplay = m_rectDisplayImage;
|
||||
return;
|
||||
}
|
||||
//return;
|
||||
qDebug() << "Released";
|
||||
if(m_pImageSelect==NULL)
|
||||
{
|
||||
m_PointCurrent = event->pos();
|
||||
update();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(m_pImageSelect->m_bSelect==true)
|
||||
{
|
||||
m_pImageSelect->m_bSelect = false;
|
||||
}
|
||||
else if(m_pImageSelect->m_bSelect==false)
|
||||
{
|
||||
m_pImageSelect->m_bSelect = true;
|
||||
}
|
||||
|
||||
DisplayCheck();
|
||||
}
|
||||
|
||||
void FormImageSelect::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
//if(event->buttons()==Qt::RightButton)
|
||||
{
|
||||
if(m_bUseZoom==true || m_bUseMove==true)
|
||||
{
|
||||
m_PointCurrent = event->pos();
|
||||
update();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void FormImageSelect::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
qDebug() << "Double Clicked";
|
||||
|
||||
}
|
||||
|
||||
bool FormImageSelect::IsSelect()
|
||||
{
|
||||
if(m_pImage==NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return ui->pushButton_Select->isChecked();
|
||||
}
|
||||
|
||||
void FormImageSelect::DisplayRotate()
|
||||
{
|
||||
QImage image;
|
||||
|
||||
QPoint center = m_pImage->rect().center();
|
||||
QMatrix matrix;
|
||||
matrix.translate(center.x(), center.y());
|
||||
matrix.rotate(90);
|
||||
|
||||
image = m_pImage->transformed(matrix);
|
||||
|
||||
delete m_pImage;
|
||||
m_pImage = new QImage(image);
|
||||
|
||||
|
||||
int nPaddingLeft = 0;
|
||||
QSize nSize = size();
|
||||
if(m_pImage->width() < m_pImage->height())
|
||||
{
|
||||
nPaddingLeft += (nSize.width()-nSize.height())/2;
|
||||
}
|
||||
else
|
||||
{
|
||||
nPaddingLeft = 0;
|
||||
}
|
||||
m_rectDisplay = QRect(nPaddingLeft, 0, nSize.width()-nPaddingLeft*2, nSize.height());
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void FormImageSelect::DisplayFlipHorizontal()
|
||||
{
|
||||
QImage image;
|
||||
image = m_pImage->mirrored(true, false);
|
||||
|
||||
delete m_pImage;
|
||||
m_pImage = new QImage(image);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void FormImageSelect::DisplayFlipVertical()
|
||||
{
|
||||
QImage image;
|
||||
image = m_pImage->mirrored(false, true);
|
||||
|
||||
delete m_pImage;
|
||||
m_pImage = new QImage(image);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void FormImageSelect::Init()
|
||||
{
|
||||
WRITE_FUNCTION_LOG();
|
||||
|
||||
m_bUseZoom = false;
|
||||
m_bUseMove = false;
|
||||
m_PointClicked = QPoint(-1, -1);
|
||||
|
||||
QSize nSize = size();
|
||||
m_rectDisplay = QRect(0, 0, nSize.width(), nSize.height());
|
||||
m_rectDisplayImage = m_rectDisplay;
|
||||
}
|
||||
|
||||
void FormImageSelect::EnableZoom(bool bEnable)
|
||||
{
|
||||
|
||||
//Init();
|
||||
m_bUseZoom = bEnable;
|
||||
m_bUseMove = false;
|
||||
}
|
||||
|
||||
bool FormImageSelect::IsEnableZoom()
|
||||
{
|
||||
|
||||
return m_bUseZoom;
|
||||
}
|
||||
|
||||
void FormImageSelect::EnableMove(bool bEnable)
|
||||
{
|
||||
//Init();
|
||||
m_bUseMove = bEnable;
|
||||
m_bUseZoom = false;
|
||||
}
|
||||
|
||||
bool FormImageSelect::IsEnableMove()
|
||||
{
|
||||
return m_bUseMove;
|
||||
}
|
||||
|
||||
|
||||
|
||||
81
formimageselect.h
Normal file
81
formimageselect.h
Normal file
@ -0,0 +1,81 @@
|
||||
#ifndef FORMIMAGESELECT_H
|
||||
#define FORMIMAGESELECT_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <QImage>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace Ui {
|
||||
class FormImageSelect;
|
||||
}
|
||||
|
||||
|
||||
class FormImageSelect : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormImageSelect(QWidget *parent = nullptr);
|
||||
virtual ~FormImageSelect();
|
||||
|
||||
virtual void paintEvent(QPaintEvent *event);
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
void SetImageSelect(ImageSelect* pImageSelect);
|
||||
|
||||
void UpdateImageSelect(bool bForce=false);
|
||||
|
||||
void SetIndexViewer(int nIndex);
|
||||
|
||||
void DisplayCheck();
|
||||
|
||||
bool IsSelect();
|
||||
|
||||
void Init();
|
||||
|
||||
void DisplayRotate();
|
||||
|
||||
void DisplayFlipHorizontal();
|
||||
void DisplayFlipVertical();
|
||||
|
||||
void EnableZoom(bool bEnable);
|
||||
bool IsEnableZoom();
|
||||
|
||||
void EnableMove(bool bEnable);
|
||||
bool IsEnableMove();
|
||||
|
||||
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
|
||||
|
||||
protected:
|
||||
ImageSelect* m_pImageSelect;
|
||||
QImage* m_pImage;
|
||||
int m_nIndexViewer;
|
||||
|
||||
bool m_bUseZoom;
|
||||
bool m_bUseMove;
|
||||
QPoint m_PointClicked;
|
||||
QPoint m_PointCurrent;
|
||||
|
||||
QRect m_rectDisplay;
|
||||
QRect m_rectDisplayImage;
|
||||
|
||||
public slots:
|
||||
void ClickSelect();
|
||||
|
||||
private slots:
|
||||
|
||||
|
||||
void on_pushButton_Select_clicked();
|
||||
|
||||
private:
|
||||
Ui::FormImageSelect *ui;
|
||||
};
|
||||
|
||||
#endif // FORMIMAGESELECT_H
|
||||
56
formimageselect.ui
Normal file
56
formimageselect.ui
Normal file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormImageSelect</class>
|
||||
<widget class="QWidget" name="FormImageSelect">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton_Select">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>21</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: true;
|
||||
border: none;
|
||||
background: white;
|
||||
qproperty-checkable: true;
|
||||
qproperty-checked: false;
|
||||
}
|
||||
|
||||
QPushButton:!checked
|
||||
{
|
||||
background: white;
|
||||
}
|
||||
|
||||
|
||||
QPushButton:checked
|
||||
{
|
||||
background: white;
|
||||
border-image: url(://image/select_indicator.png);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
100
formitemselection.cpp
Normal file
100
formitemselection.cpp
Normal file
@ -0,0 +1,100 @@
|
||||
#include "formitemselection.h"
|
||||
#include "ui_formitemselection.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QDebug>
|
||||
|
||||
FormItemSelection::FormItemSelection(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormItemSelection)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
m_pTableHeader = NULL;
|
||||
|
||||
connect(ui->pushButton, SIGNAL(clicked(bool)), this, SLOT(Clicked()));
|
||||
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
int nFontSize = 24;
|
||||
int nCellHeight = 80;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->label_Info->setStyleSheet("QLabel \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto';\n"
|
||||
" font-size: 18px;\n"
|
||||
" font-weight: normal;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #202020;\n"
|
||||
"}");
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->label_Info->setStyleSheet("QLabel \n"
|
||||
"{ \n"
|
||||
" font-family: 'Roboto';\n"
|
||||
" font-size: 24px;\n"
|
||||
" font-weight: normal;\n"
|
||||
" background: transparent;\n"
|
||||
" color: #202020;\n"
|
||||
"}");
|
||||
}
|
||||
}
|
||||
|
||||
FormItemSelection::~FormItemSelection()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormItemSelection::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize nSize = size();
|
||||
//ui->verticalLayoutWidget->setGeometry(0, 0, nSize.width(), nSize.height());
|
||||
//ui->frame_background->setGeometry(0, 0, nSize.width(), nSize.height());
|
||||
|
||||
qDebug() << "x: " << nSize.width() << ", y: "<< nSize.height();
|
||||
}
|
||||
|
||||
|
||||
void FormItemSelection::SetText(QString strText)
|
||||
{
|
||||
ui->label_Info->setText(strText);
|
||||
}
|
||||
|
||||
void FormItemSelection::SetTableHeader(TableHeader* pTableHeader)
|
||||
{
|
||||
m_pTableHeader = pTableHeader;
|
||||
ui->label_Info->setText(m_pTableHeader->m_strText);
|
||||
ui->pushButton->setChecked(pTableHeader->m_bSelect);
|
||||
}
|
||||
|
||||
void FormItemSelection::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormItemSelection::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
Clicked();
|
||||
}
|
||||
|
||||
void FormItemSelection::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormItemSelection::Clicked()
|
||||
{
|
||||
if(m_pTableHeader->m_bSelect==true)
|
||||
{
|
||||
m_pTableHeader->m_bSelect = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pTableHeader->m_bSelect = true;
|
||||
}
|
||||
|
||||
ui->pushButton->setChecked(m_pTableHeader->m_bSelect);
|
||||
}
|
||||
38
formitemselection.h
Normal file
38
formitemselection.h
Normal file
@ -0,0 +1,38 @@
|
||||
#ifndef FORMITEMSELECTION_H
|
||||
#define FORMITEMSELECTION_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "common.h"
|
||||
|
||||
namespace Ui {
|
||||
class FormItemSelection;
|
||||
}
|
||||
|
||||
class FormItemSelection : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormItemSelection(QWidget *parent = nullptr);
|
||||
~FormItemSelection();
|
||||
|
||||
virtual void SetText(QString strText);
|
||||
virtual void SetTableHeader(TableHeader* pTableHeader);
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
virtual void mousePressEvent(QMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
|
||||
public slots:
|
||||
void Clicked();
|
||||
|
||||
protected:
|
||||
TableHeader* m_pTableHeader;
|
||||
|
||||
private:
|
||||
Ui::FormItemSelection *ui;
|
||||
};
|
||||
|
||||
#endif // FORMITEMSELECTION_H
|
||||
241
formitemselection.ui
Normal file
241
formitemselection.ui
Normal file
@ -0,0 +1,241 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormItemSelection</class>
|
||||
<widget class="QWidget" name="FormItemSelection">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>76</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget
|
||||
{
|
||||
background: white;
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>76</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>402</width>
|
||||
<height>74</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_up">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_background">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame
|
||||
{
|
||||
background: none;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QLabel" name="label_Info">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>0</y>
|
||||
<width>351</width>
|
||||
<height>40</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QLabel
|
||||
{
|
||||
font-family: 'Roboto';
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
background: transparent;
|
||||
color: #202020;
|
||||
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>10</y>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton
|
||||
{
|
||||
qproperty-autoDefault: false;
|
||||
qproperty-flat: false;
|
||||
qproperty-checkable: true;
|
||||
qproperty-checked: false;
|
||||
background: white;
|
||||
}
|
||||
|
||||
QPushButton:!checked
|
||||
{
|
||||
background: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QPushButton:checked
|
||||
{
|
||||
background: white;
|
||||
border-image: url(://image/select_indicator.png);
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_down">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
234
formlistwidget.cpp
Normal file
234
formlistwidget.cpp
Normal file
@ -0,0 +1,234 @@
|
||||
#include "formlistwidget.h"
|
||||
#include "ui_formlistwidget.h"
|
||||
#include <QWheelEvent>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
FormListWidget::FormListWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormListWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_nCurrentRowIndex = -1;
|
||||
|
||||
m_pListWidget = ui->tableWidget;
|
||||
m_pHorizontalScrollBarWidget = ui->frame_horizontalScrollBar;
|
||||
m_pVerticalScrollBarWidget = ui->frame_verticalScrollBar;
|
||||
m_pHorizontalScrollBar = ui->horizontalScrollBar;
|
||||
m_pVerticalScrollBar = ui->verticalScrollBar;
|
||||
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
connect(this, SIGNAL(ChangeMenu(int)), pMainWindow, SLOT(ChangeMenu(int)));
|
||||
|
||||
|
||||
ui->tableWidget->setGeometry(0, 0, 1750, 640-25);
|
||||
ui->tableWidget->Init();
|
||||
ui->tableWidget->SetData();
|
||||
|
||||
m_pVerticalScrollBar->SetSlideType(SSlideBar::SLIDE_VERTICAL);
|
||||
m_pVerticalScrollBar->setMinimum(0);
|
||||
m_pVerticalScrollBar->setMaximum(99);
|
||||
|
||||
m_pHorizontalScrollBar->SetSlideType(SSlideBar::SLIDE_HORIZONTAL);
|
||||
m_pHorizontalScrollBar->setMinimum(0);
|
||||
m_pHorizontalScrollBar->setMaximum(599);
|
||||
|
||||
ui->tableWidget->SetSlideBarVertical(m_pVerticalScrollBar, ui->frame_verticalScrollBar);
|
||||
|
||||
ui->tableWidget->SetSlideBarHorizontal(m_pHorizontalScrollBar, ui->frame_horizontalScrollBar);
|
||||
|
||||
|
||||
connect(m_pVerticalScrollBar, SIGNAL(valueChanged(int)), ui->tableWidget, SLOT(valueChangedScrollBarVertical(int)));
|
||||
connect(m_pHorizontalScrollBar, SIGNAL(valueChanged(int)), ui->tableWidget, SLOT(valueChangedScrollBarHorizontal(int)));
|
||||
|
||||
connect(ui->tableWidget, SIGNAL(SetSlideValue(int)), m_pVerticalScrollBar, SLOT(setValue(int)));
|
||||
|
||||
connect(ui->tableWidget->GetHeaderType1(), SIGNAL(Resort(int, int)), ui->tableWidget, SLOT(Resort(int, int)));
|
||||
|
||||
connect(m_pVerticalScrollBar, SIGNAL(actionTriggered(int)), this, SLOT(actionTriggered(int)));
|
||||
connect(m_pVerticalScrollBar, SIGNAL(SingleDown()), ui->tableWidget, SLOT(SingleDown()));
|
||||
connect(m_pVerticalScrollBar, SIGNAL(SingleUp()), ui->tableWidget, SLOT(SingleUp()));
|
||||
|
||||
|
||||
connect(m_pHorizontalScrollBar, SIGNAL(actionTriggered(int)), this, SLOT(actionTriggered(int)));
|
||||
|
||||
|
||||
|
||||
//m_pVerticalScrollBar->setGeometry(1750-25, 60, 25, 555);
|
||||
|
||||
|
||||
ui->frame_verticalScrollBar->setGeometry(1750-26, 60, 25, 555);
|
||||
m_pVerticalScrollBar->setGeometry(0, 0, 25, 555);
|
||||
|
||||
ui->frame_horizontalScrollBar->setGeometry(0, 640-26, 1750, 25);
|
||||
m_pHorizontalScrollBar->setGeometry(0, 0, 1750-1, 25);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
FormListWidget::~FormListWidget()
|
||||
{
|
||||
ui->tableWidget->Clear();
|
||||
//MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
//disconnect(this, SIGNAL(ChangeMenu(int)), pMainWindow, SLOT(ChangeMenu(int)));
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormListWidget::actionTriggered(int action)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void FormListWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QSize nSize = size();
|
||||
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
|
||||
int nFontSize = 24;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
ui->tableWidget->setGeometry(0, 0, nSize.width(), nSize.height()-20);
|
||||
|
||||
ui->frame_verticalScrollBar->setGeometry(nSize.width()-20, 50, 20, nSize.height()-20-50);
|
||||
m_pVerticalScrollBar->setGeometry(0, 0, 20, nSize.height()-20-50);
|
||||
|
||||
ui->frame_horizontalScrollBar->setGeometry(0, nSize.height()-20, 1750, 20);
|
||||
m_pHorizontalScrollBar->setGeometry(0, 0, nSize.width()-1, 20);
|
||||
|
||||
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->tableWidget->setGeometry(0, 0, nSize.width(), nSize.height()-25);
|
||||
|
||||
ui->frame_verticalScrollBar->setGeometry(nSize.width()-26, 60, 25, nSize.height()-25-60);
|
||||
m_pVerticalScrollBar->setGeometry(0, 0, 25, nSize.height()-25-60);
|
||||
|
||||
ui->frame_horizontalScrollBar->setGeometry(0, nSize.height()-26, 1750, 25);
|
||||
m_pHorizontalScrollBar->setGeometry(0, 0, nSize.width()-1, 25);
|
||||
}
|
||||
|
||||
//m_pListWidget->resize(nSize);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormListWidget::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormListWidget::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormListWidget::wheelEvent(QWheelEvent *event)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void FormListWidget::on_tableWidget_itemDoubleClicked(QTableWidgetItem *item)
|
||||
{
|
||||
//CellDoubleClicked(item->row(), 0);
|
||||
//return;
|
||||
|
||||
int nRow = item->row();
|
||||
if(m_nCurrentRowIndex!=nRow)
|
||||
{
|
||||
CellDoubleClicked(nRow, 0);
|
||||
m_nCurrentRowIndex = nRow;
|
||||
}
|
||||
|
||||
/*
|
||||
m_nCurrentRowIndex = item->row();
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
pCommonData->SetCurrentHistoryStudy(m_nCurrentRowIndex);
|
||||
|
||||
ExecuteMenu();
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
void FormListWidget::on_tableWidget_itemSelectionChanged()
|
||||
{
|
||||
//m_nCurrentRowIndex = ui->tableWidget->currentRow();
|
||||
}
|
||||
|
||||
void FormListWidget::ExecuteMenu()
|
||||
{
|
||||
ChangeMenu(SMENU_CAPTURE);
|
||||
}
|
||||
|
||||
void FormListWidget::ChangeHeader()
|
||||
{
|
||||
ui->tableWidget->SetResizeEnableHeader(false);
|
||||
ui->tableWidget->ChangeHeader();
|
||||
ui->tableWidget->SetResizeEnableHeader(true);
|
||||
}
|
||||
|
||||
int FormListWidget::GetCurrentRowIndex()
|
||||
{
|
||||
return m_nCurrentRowIndex;
|
||||
}
|
||||
|
||||
void FormListWidget::on_tableWidget_cellDoubleClicked(int row, int column)
|
||||
{
|
||||
//if(m_nCurrentRowIndex!=row)
|
||||
{
|
||||
CellDoubleClicked(row, column);
|
||||
m_nCurrentRowIndex = row;
|
||||
}
|
||||
}
|
||||
|
||||
void FormListWidget::CellDoubleClicked(int nRow, int nColumn)
|
||||
{
|
||||
if(m_bDoubleClicked==false)
|
||||
{
|
||||
|
||||
}
|
||||
m_bDoubleClicked = true;
|
||||
}
|
||||
|
||||
void FormListWidget::Init()
|
||||
{
|
||||
m_bDoubleClicked = false;
|
||||
m_nCurrentPos = 0;
|
||||
m_nCurrentRowIndex = -1;
|
||||
|
||||
m_pHorizontalScrollBarWidget->hide();
|
||||
}
|
||||
|
||||
int FormListWidget::GetSelectIndexWorklist(int nRow)
|
||||
{
|
||||
return ui->tableWidget->GetSelectIndexWorklist(nRow);
|
||||
}
|
||||
|
||||
void FormListWidget::on_tableWidget_cellClicked(int row, int column)
|
||||
{
|
||||
int a=0;
|
||||
}
|
||||
|
||||
void FormListWidget::on_tableWidget_itemClicked(QTableWidgetItem *item)
|
||||
{
|
||||
int a=0;
|
||||
|
||||
int nRow = item->row();
|
||||
if(m_nCurrentRowIndex!=nRow)
|
||||
{
|
||||
//CellDoubleClicked(nRow, 0);
|
||||
m_nCurrentRowIndex = nRow;
|
||||
}
|
||||
else
|
||||
{
|
||||
CellDoubleClicked(nRow, 0);
|
||||
}
|
||||
}
|
||||
79
formlistwidget.h
Normal file
79
formlistwidget.h
Normal file
@ -0,0 +1,79 @@
|
||||
#ifndef FORMLISTWIDGET_H
|
||||
#define FORMLISTWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTableWidgetItem>
|
||||
|
||||
#include "common.h"
|
||||
#include "slistwidget.h"
|
||||
|
||||
namespace Ui {
|
||||
class FormListWidget;
|
||||
}
|
||||
|
||||
class FormListWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormListWidget(QWidget *parent = nullptr);
|
||||
virtual ~FormListWidget();
|
||||
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent *event);
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
virtual void ExecuteMenu();
|
||||
|
||||
virtual void ChangeHeader();
|
||||
|
||||
int GetCurrentRowIndex();
|
||||
|
||||
virtual void CellDoubleClicked(int nRow, int nColumn);
|
||||
|
||||
virtual void Init();
|
||||
|
||||
virtual int GetSelectIndexWorklist(int nRow);
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
int m_nMaxItemShow;
|
||||
int m_nCurrentRowIndex;
|
||||
SListWidget* m_pListWidget;
|
||||
QFrame* m_pHorizontalScrollBarWidget;
|
||||
QFrame* m_pVerticalScrollBarWidget;
|
||||
SSlideBar* m_pVerticalScrollBar;
|
||||
SSlideBar* m_pHorizontalScrollBar;
|
||||
bool m_bDoubleClicked;
|
||||
|
||||
public slots:
|
||||
void actionTriggered(int action);
|
||||
|
||||
private slots:
|
||||
void on_tableWidget_itemDoubleClicked(QTableWidgetItem *item);
|
||||
|
||||
void on_tableWidget_itemSelectionChanged();
|
||||
|
||||
|
||||
void on_tableWidget_cellDoubleClicked(int row, int column);
|
||||
|
||||
void on_tableWidget_cellClicked(int row, int column);
|
||||
|
||||
void on_tableWidget_itemClicked(QTableWidgetItem *item);
|
||||
|
||||
signals:
|
||||
void ChangeMenu(int nID);
|
||||
|
||||
private:
|
||||
Ui::FormListWidget *ui;
|
||||
|
||||
int m_nCurrentPos;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // FORMLISTWIDGET_H
|
||||
320
formlistwidget.ui
Normal file
320
formlistwidget.ui
Normal file
@ -0,0 +1,320 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormListWidget</class>
|
||||
<widget class="QWidget" name="FormListWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1253</width>
|
||||
<height>530</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="SListWidget" name="tableWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollBar
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
border-image: url(://image/scrollbar_horizontal_bg.png);
|
||||
}
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background: white;
|
||||
height: 26px;
|
||||
margin: 0px 26px 0px 26px;
|
||||
}
|
||||
QScrollBar::handle:horizontal {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
height: 18px;
|
||||
min-width: 36px;
|
||||
max-width: 36px;
|
||||
width: 36px;
|
||||
border-image: url(://image/ScrollBar_Horizontal_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:horizontal {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_right.png);
|
||||
width: 26px;
|
||||
margin: 0px 0px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:horizontal {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_left.png);
|
||||
width: 26px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: white;
|
||||
width: 26px;
|
||||
margin: 26px 0px 26px 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
width: 18px;
|
||||
min-height: 36px;
|
||||
max-height: 36px;
|
||||
height: 36px;
|
||||
border-image: url(://image/ScrollBar_Vertical_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_down.png);
|
||||
height: 26px;
|
||||
margin: 0px 0px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_up.png);
|
||||
height: 26px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::MultiSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="verticalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollMode">
|
||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_verticalScrollBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>430</x>
|
||||
<y>30</y>
|
||||
<width>25</width>
|
||||
<height>331</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame
|
||||
{
|
||||
border: 1px solid black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="SSlideBar" name="verticalScrollBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>25</width>
|
||||
<height>331</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollBar
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
border-image: url(://image/scrollbar_vertical_bg.png);
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
background: white;
|
||||
width: 26px;
|
||||
margin: 26px 0px 26px 0px;
|
||||
}
|
||||
QScrollBar::handle:vertical {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
width: 18px;
|
||||
min-height: 36px;
|
||||
max-height: 36px;
|
||||
height: 36px;
|
||||
border-image: url(://image/ScrollBar_Vertical_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_down.png);
|
||||
height: 26px;
|
||||
margin: 0px 0px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_up.png);
|
||||
height: 26px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_horizontalScrollBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>500</y>
|
||||
<width>911</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QFrame#frame
|
||||
{
|
||||
border: 1px solid black;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="SSlideBarHorizontal" name="horizontalScrollBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>911</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::WheelFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QScrollBar
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
border-image: url(://image/scrollbar_horizontal_bg.png);
|
||||
}
|
||||
|
||||
QScrollBar:horizontal {
|
||||
background: white;
|
||||
height: 26px;
|
||||
margin: 0px 26px 0px 26px;
|
||||
}
|
||||
QScrollBar::handle:horizontal {
|
||||
background: none;
|
||||
margin: 4px;
|
||||
height: 18px;
|
||||
min-width: 36px;
|
||||
max-width: 36px;
|
||||
width: 36px;
|
||||
border-image: url(://image/ScrollBar_Horizontal_Icon.png);
|
||||
}
|
||||
QScrollBar::add-line:horizontal {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_right.png);
|
||||
width: 26px;
|
||||
margin: 0px 0px;
|
||||
subcontrol-position: right;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:horizontal {
|
||||
border: none;
|
||||
background: none;
|
||||
border-image: url(://image/scrollbar_left.png);
|
||||
width: 26px;
|
||||
subcontrol-position: left;
|
||||
subcontrol-origin: margin;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1808</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="invertedControls">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>SSlideBar</class>
|
||||
<extends>QScrollBar</extends>
|
||||
<header location="global">sslidebar.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SListWidget</class>
|
||||
<extends>QTableWidget</extends>
|
||||
<header location="global">slistwidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>SSlideBarHorizontal</class>
|
||||
<extends>QScrollBar</extends>
|
||||
<header location="global">sslidebarhorizontal.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
252
formlistwidgethistory.cpp
Normal file
252
formlistwidgethistory.cpp
Normal file
@ -0,0 +1,252 @@
|
||||
#include "formlistwidgethistory.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include <QFileInfo>
|
||||
#include <QDirIterator>
|
||||
|
||||
FormListWidgetHistory::FormListWidgetHistory(QWidget *parent) : FormListWidget(parent)
|
||||
{
|
||||
connect(m_pListWidget, SIGNAL(ListSingleDown()), this, SLOT(ListSingleDown()));
|
||||
connect(m_pListWidget, SIGNAL(ListSingleUp()), this, SLOT(ListSingleUp()));
|
||||
|
||||
m_nMaxItemShow = 10;
|
||||
|
||||
m_pListWidget->SetListType(SWIDGET_HISTORY);
|
||||
}
|
||||
|
||||
FormListWidgetHistory::~FormListWidgetHistory()
|
||||
{
|
||||
disconnect(m_pListWidget, SIGNAL(ListSingleDown()), this, SLOT(ListSingleDown()));
|
||||
disconnect(m_pListWidget, SIGNAL(ListSingleUp()), this, SLOT(ListSingleUp()));
|
||||
|
||||
Clear();
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::ExecuteMenu()
|
||||
{
|
||||
ChangeMenu(SMENU_VIEWER);
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::ChangeHeader()
|
||||
{
|
||||
FormListWidget::ChangeHeader();
|
||||
|
||||
m_pListWidget->SetResizeEnableHeader(false);
|
||||
m_pListWidget->ChangeHeader();
|
||||
m_pListWidget->SetResizeEnableHeader(true);
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::Clear()
|
||||
{
|
||||
m_pListWidget->Clear();
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::UpdateHistoryList()
|
||||
{
|
||||
m_pListWidget->UpdateHistoryList();
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
|
||||
if(pListHistoryStudy->size()>m_nMaxItemShow)
|
||||
{
|
||||
m_pVerticalScrollBar->setValue(0);
|
||||
m_pVerticalScrollBarWidget->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pVerticalScrollBarWidget->hide();
|
||||
}
|
||||
|
||||
m_pListWidget->CheckHorizontalScroll();
|
||||
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::CellDoubleClicked(int nRow, int nColumn)
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
|
||||
if(nRow < pListHistoryStudy->size())
|
||||
{
|
||||
if(m_bExecute==false)
|
||||
{
|
||||
vector<TableHeader*>* pListActivate = pCommonData->GetHistoryTableHeader()->GetListActive();
|
||||
vector<TableHeader*>::iterator it;
|
||||
int nSelectIndex = -1;
|
||||
|
||||
int nIndex = 0;
|
||||
QTableWidgetItem * pItem = NULL;
|
||||
QString strSelectIndex;
|
||||
|
||||
for(it=pListActivate->begin() ; it!=pListActivate->end() ; ++it)
|
||||
{
|
||||
TableHeader* pTableHeader = (*it);
|
||||
int nOriIndex = pTableHeader->m_nIndex;
|
||||
int nDefaultIndex = pTableHeader->m_nIndexDefault;
|
||||
if(nDefaultIndex==SDI_INDEX)
|
||||
{
|
||||
nIndex = nDefaultIndex;
|
||||
pItem = m_pListWidget->item(nRow, nOriIndex);
|
||||
strSelectIndex = pItem->text();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int i=0;
|
||||
|
||||
if(strSelectIndex.size()>0)
|
||||
{
|
||||
for(i=0 ; i<pListHistoryStudy->size() ; i++)
|
||||
{
|
||||
HISTORY_STUDY* pHistoryStudy = (*pListHistoryStudy)[i];
|
||||
QString strIndex = pHistoryStudy->GetData(nIndex);
|
||||
if(strSelectIndex==strIndex)
|
||||
{
|
||||
nSelectIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(nSelectIndex<0)
|
||||
{
|
||||
nSelectIndex = nRow;
|
||||
}
|
||||
|
||||
|
||||
m_nCurrentRowIndex = nSelectIndex;
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
pCommonData->ClearHistoryImage();
|
||||
|
||||
pCommonData->SetCurrentHistoryStudy(m_nCurrentRowIndex);
|
||||
|
||||
|
||||
|
||||
ExecuteMenu();
|
||||
m_bExecute = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::ListSingleDown()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QScrollBar* pScrollBar = m_pListWidget->verticalScrollBar();
|
||||
float fMaxValue = 199.0f;
|
||||
float fMaxScrollBar = 0.0f;
|
||||
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
int nHistoryCount = pListHistoryStudy->size();
|
||||
int nRemain = nHistoryCount - m_nMaxItemShow;
|
||||
|
||||
float fRatio = (float)fMaxValue / (float)nRemain + 1.5f;
|
||||
|
||||
int nValue = m_pVerticalScrollBar->value();
|
||||
nValue = nValue + fRatio;
|
||||
if(nValue > fMaxValue)
|
||||
{
|
||||
nValue = (int)fMaxValue;
|
||||
}
|
||||
|
||||
m_pVerticalScrollBar->setValue(nValue);
|
||||
}
|
||||
|
||||
void FormListWidgetHistory::ListSingleUp()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QScrollBar* pScrollBar = m_pListWidget->verticalScrollBar();
|
||||
float fMaxValue = 199.0f;
|
||||
float fMaxScrollBar = 0.0f;
|
||||
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
int nHistoryCount = pListHistoryStudy->size();
|
||||
int nRemain = nHistoryCount - m_nMaxItemShow;
|
||||
|
||||
float fRatio = (float)fMaxValue / (float)nRemain + 1.5f;
|
||||
|
||||
int nValue = m_pVerticalScrollBar->value();
|
||||
nValue = nValue - fRatio;
|
||||
if(nValue < 0)
|
||||
{
|
||||
nValue = 0;
|
||||
}
|
||||
|
||||
m_pVerticalScrollBar->setValue(nValue);
|
||||
}
|
||||
|
||||
|
||||
void FormListWidgetHistory::Init()
|
||||
{
|
||||
m_bExecute = false;
|
||||
FormListWidget::Init();
|
||||
|
||||
m_pListWidget->InitHeader();
|
||||
m_pListWidget->setCurrentCell(-1, -1);
|
||||
m_pListWidget->CheckHorizontalScroll();
|
||||
|
||||
setFocus(Qt::OtherFocusReason);
|
||||
m_pListWidget->setFocus(Qt::OtherFocusReason);
|
||||
}
|
||||
|
||||
|
||||
void FormListWidgetHistory::GetExportList()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<HISTORY_STUDY*>* pListHistorySearch = pCommonData->GetHistorySearchResult();
|
||||
vector<QString>* pListExport = pCommonData->GetExportList();
|
||||
|
||||
QModelIndexList selection = m_pListWidget->selectionModel()->selectedRows();
|
||||
|
||||
pListExport->clear();
|
||||
|
||||
if (selection.isEmpty()) {
|
||||
return; // 선택된 항목이 없으면 바로 종료
|
||||
}
|
||||
|
||||
// 1. 루프 시작 전에 단 하나의 지역 DB 인스턴스를 생성합니다.
|
||||
SUTIL::SDatabase db(QString("GetExportList_%1").arg(reinterpret_cast<quintptr>(this)));
|
||||
if (db.OpenDatabase("/home/birdhead/test.db") != 0) {
|
||||
qWarning() << "DB open failed for GetExportList.";
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 선택된 항목들을 순회합니다.
|
||||
for (const QModelIndex& index : selection)
|
||||
{
|
||||
int nIndex = index.row();
|
||||
if (nIndex < pListHistorySearch->size())
|
||||
{
|
||||
HISTORY_STUDY* pHistory = (*pListHistorySearch)[nIndex];
|
||||
if (!pHistory || !pHistory->pStrStudyIndex) continue;
|
||||
|
||||
int studyIndex = pHistory->pStrStudyIndex->toInt();
|
||||
|
||||
// 3. 새로 만든 효율적인 함수를 "한 번만" 호출하여 모든 파일 목록을 가져옵니다.
|
||||
vector<QString> allFiles = db.GetAllFilesForStudyIndex(studyIndex);
|
||||
|
||||
// 4. 조회된 결과를 최종 목록에 추가합니다.
|
||||
pListExport->insert(pListExport->end(), allFiles.begin(), allFiles.end());
|
||||
}
|
||||
}
|
||||
// 함수가 끝나면 'db' 객체는 자동으로 소멸되어 모든 자원이 정리됩니다.
|
||||
}
|
||||
|
||||
|
||||
void FormListWidgetHistory::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
int nKey = event->key();
|
||||
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
}
|
||||
42
formlistwidgethistory.h
Normal file
42
formlistwidgethistory.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef FORMLISTWIDGETHISTORY_H
|
||||
#define FORMLISTWIDGETHISTORY_H
|
||||
|
||||
#include "formlistwidget.h"
|
||||
|
||||
class FormListWidgetHistory : public FormListWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FormListWidgetHistory(QWidget *parent = nullptr);
|
||||
virtual ~FormListWidgetHistory();
|
||||
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
virtual void ExecuteMenu();
|
||||
|
||||
virtual void ChangeHeader();
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual void UpdateHistoryList();
|
||||
|
||||
virtual void CellDoubleClicked(int nRow, int nColumn);
|
||||
|
||||
virtual void Init();
|
||||
|
||||
void GetExportList();
|
||||
|
||||
|
||||
protected:
|
||||
bool m_bExecute;
|
||||
|
||||
|
||||
public slots:
|
||||
void ListSingleDown();
|
||||
void ListSingleUp();
|
||||
|
||||
signals:
|
||||
|
||||
};
|
||||
|
||||
#endif // FORMLISTWIDGETHISTORY_H
|
||||
185
formlistwidgetworklist.cpp
Normal file
185
formlistwidgetworklist.cpp
Normal file
@ -0,0 +1,185 @@
|
||||
#include "formlistwidgetworklist.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
FormListWidgetWorklist::FormListWidgetWorklist(QWidget *parent) : FormListWidget(parent)
|
||||
{
|
||||
connect(m_pListWidget, SIGNAL(ListSingleDown()), this, SLOT(ListSingleDown()));
|
||||
connect(m_pListWidget, SIGNAL(ListSingleUp()), this, SLOT(ListSingleUp()));
|
||||
|
||||
m_nMaxItemShow = 10;
|
||||
m_pListWidget->SetListType(SWIDGET_WORKLIST);
|
||||
}
|
||||
|
||||
FormListWidgetWorklist::~FormListWidgetWorklist()
|
||||
{
|
||||
disconnect(m_pListWidget, SIGNAL(ListSingleDown()), this, SLOT(ListSingleDown()));
|
||||
disconnect(m_pListWidget, SIGNAL(ListSingleUp()), this, SLOT(ListSingleUp()));
|
||||
|
||||
m_pListWidget->Clear();
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::ExecuteMenu()
|
||||
{
|
||||
ChangeMenu(SMENU_CAPTURE);
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::CellDoubleClicked(int nRow, int nColumn)
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<WorklistResponseData>* pListWorklist = pCommonData->GetWorklistData();
|
||||
|
||||
if(m_bExecMenu==false)
|
||||
{
|
||||
#ifdef _TEST_CODE
|
||||
|
||||
#else
|
||||
if(nRow<pListWorklist->size())
|
||||
{
|
||||
|
||||
|
||||
int nSelectRow = GetSelectIndexWorklist(nRow);
|
||||
|
||||
if(nSelectRow<0)
|
||||
{
|
||||
nSelectRow = nRow;
|
||||
}
|
||||
|
||||
WorklistResponseData rd = (*pListWorklist)[nSelectRow];
|
||||
|
||||
pCommonData->ReleaseWorklistData();
|
||||
|
||||
ACQUISITION_INFO* pAcquisitionInfo = pCommonData->GetAcquisitionInfo();
|
||||
pAcquisitionInfo->SetDataPatient(rd.m_Patient);
|
||||
pAcquisitionInfo->SetDataStudy(rd.m_Study);
|
||||
pAcquisitionInfo->SetDataSeries(rd.m_Series);
|
||||
pAcquisitionInfo->SetDataImage(rd.m_Image);
|
||||
pAcquisitionInfo->SetDataScheduledData(rd.m_ScheduledData);
|
||||
pCommonData->ReleaseAcquisitionInfo();
|
||||
|
||||
m_bExecMenu = true;
|
||||
ExecuteMenu();
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
pCommonData->ReleaseWorklistData();
|
||||
}
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::Init()
|
||||
{
|
||||
FormListWidget::Init();
|
||||
m_bExecMenu = false;
|
||||
m_pVerticalScrollBarWidget->hide();
|
||||
m_pHorizontalScrollBarWidget->hide();
|
||||
|
||||
m_pListWidget->InitHeader();
|
||||
m_pListWidget->setCurrentCell(-1, -1);
|
||||
m_pListWidget->CheckHorizontalScroll();
|
||||
|
||||
setFocus(Qt::OtherFocusReason);
|
||||
m_pListWidget->setFocus(Qt::OtherFocusReason);
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::Clear()
|
||||
{
|
||||
m_pListWidget->Clear();
|
||||
|
||||
m_pListWidget->update();
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::UpdateList()
|
||||
{
|
||||
m_pListWidget->UpdateWorklist();
|
||||
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
vector<WorklistResponseData>* pListWorklist = pCommonData->GetWorklistData();
|
||||
|
||||
int nSizeWorklist = pListWorklist->size();
|
||||
pCommonData->ReleaseWorklistData();
|
||||
|
||||
if(nSizeWorklist>m_nMaxItemShow)
|
||||
{
|
||||
m_pVerticalScrollBar->setValue(0);
|
||||
m_pVerticalScrollBarWidget->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pVerticalScrollBarWidget->hide();
|
||||
}
|
||||
|
||||
m_pListWidget->CheckHorizontalScroll();
|
||||
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::ListSingleDown()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QScrollBar* pScrollBar = m_pListWidget->verticalScrollBar();
|
||||
float fMaxValue = 199.0f;
|
||||
float fMaxScrollBar = 0.0f;
|
||||
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
int nHistoryCount = pListHistoryStudy->size();
|
||||
int nRemain = nHistoryCount - m_nMaxItemShow;
|
||||
|
||||
float fRatio = (float)fMaxValue / (float)nRemain + 1.5f;
|
||||
|
||||
int nValue = m_pVerticalScrollBar->value();
|
||||
nValue = nValue + fRatio;
|
||||
if(nValue > fMaxValue)
|
||||
{
|
||||
nValue = (int)fMaxValue;
|
||||
}
|
||||
|
||||
m_pVerticalScrollBar->setValue(nValue);
|
||||
}
|
||||
|
||||
void FormListWidgetWorklist::ListSingleUp()
|
||||
{
|
||||
CommonData* pCommonData = MainWindow::GetCommonData();
|
||||
QScrollBar* pScrollBar = m_pListWidget->verticalScrollBar();
|
||||
float fMaxValue = 199.0f;
|
||||
float fMaxScrollBar = 0.0f;
|
||||
|
||||
vector<HISTORY_STUDY*>* pListHistoryStudy = pCommonData->GetHistorySearchResult();
|
||||
int nHistoryCount = pListHistoryStudy->size();
|
||||
int nRemain = nHistoryCount - m_nMaxItemShow;
|
||||
|
||||
float fRatio = (float)fMaxValue / (float)nRemain + 1.5f;
|
||||
|
||||
int nValue = m_pVerticalScrollBar->value();
|
||||
nValue = nValue - fRatio;
|
||||
if(nValue < 0)
|
||||
{
|
||||
nValue = 0;
|
||||
}
|
||||
|
||||
m_pVerticalScrollBar->setValue(nValue);
|
||||
}
|
||||
|
||||
|
||||
void FormListWidgetWorklist::keyReleaseEvent(QKeyEvent *event)
|
||||
{
|
||||
SThreadImageSave* pThread = MainWindow::GetCommonData()->GetThreadCaptureImage();
|
||||
|
||||
int nKey = event->key();
|
||||
|
||||
if(nKey==Qt::Key_F10)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
else if(nKey==Qt::Key_F11)
|
||||
{
|
||||
pThread->MissCapture();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FormListWidgetWorklist::SetExecMenu(bool bExecMenu)
|
||||
{
|
||||
m_bExecMenu = bExecMenu;
|
||||
}
|
||||
42
formlistwidgetworklist.h
Normal file
42
formlistwidgetworklist.h
Normal file
@ -0,0 +1,42 @@
|
||||
#ifndef FORMLISTWIDGETWORKLIST_H
|
||||
#define FORMLISTWIDGETWORKLIST_H
|
||||
|
||||
#include "formlistwidget.h"
|
||||
#include "common.h"
|
||||
|
||||
class FormListWidgetWorklist : public FormListWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FormListWidgetWorklist(QWidget *parent = nullptr);
|
||||
virtual ~FormListWidgetWorklist();
|
||||
|
||||
virtual void ExecuteMenu();
|
||||
|
||||
virtual void CellDoubleClicked(int nRow, int nColumn);
|
||||
|
||||
virtual void keyReleaseEvent(QKeyEvent *event);
|
||||
|
||||
|
||||
virtual void Init();
|
||||
|
||||
virtual void UpdateList();
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
virtual void SetExecMenu(bool bExecMenu);
|
||||
|
||||
protected:
|
||||
bool m_bExecMenu;
|
||||
|
||||
public slots:
|
||||
void ListSingleDown();
|
||||
void ListSingleUp();
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
};
|
||||
|
||||
#endif // FORMLISTWIDGETWORKLIST_H
|
||||
170
formmainmenu.cpp
Normal file
170
formmainmenu.cpp
Normal file
@ -0,0 +1,170 @@
|
||||
#include "formmainmenu.h"
|
||||
#include "ui_formmainmenu.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
FormMainMenu::FormMainMenu(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormMainMenu)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->pushButton_Worklist, SIGNAL(released()), this, SLOT(SelectWorklist()));
|
||||
connect(ui->pushButton_History, SIGNAL(released()), this, SLOT(SelectHistory()));
|
||||
connect(ui->pushButton_Setting, SIGNAL(released()), this, SLOT(SelectSetting()));
|
||||
|
||||
m_ListButton.push_back(ui->pushButton_Worklist);
|
||||
m_ListButton.push_back(ui->pushButton_History);
|
||||
m_ListButton.push_back(ui->pushButton_Setting);
|
||||
|
||||
MainWindow* pMainWindow = MainWindow::GetMainWindow();
|
||||
connect(this, SIGNAL(ChangeMenu(int)), pMainWindow, SLOT(ChangeMenu(int)));
|
||||
|
||||
m_nCurrentMenuID = SMENU_WORKLIST;
|
||||
m_nCurrentWidgetID = SWIDGET_WORKLIST;
|
||||
|
||||
SetEnableDiskUSB(false);
|
||||
}
|
||||
|
||||
FormMainMenu::~FormMainMenu()
|
||||
{
|
||||
disconnect(ui->pushButton_Worklist, SIGNAL(released()), this, SLOT(SelectWorklist()));
|
||||
disconnect(ui->pushButton_History, SIGNAL(released()), this, SLOT(SelectHistory()));
|
||||
disconnect(ui->pushButton_Setting, SIGNAL(released()), this, SLOT(SelectSetting()));
|
||||
|
||||
m_ListButton.clear();
|
||||
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormMainMenu::SelectWorklist()
|
||||
{
|
||||
if(m_nCurrentMenuID!=SMENU_WORKLIST)
|
||||
{
|
||||
int nPrevWidget = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[nPrevWidget]->setChecked(false);
|
||||
m_nCurrentMenuID = SMENU_WORKLIST;
|
||||
ChangeMenu(m_nCurrentMenuID);
|
||||
}
|
||||
|
||||
m_nCurrentWidgetID = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[m_nCurrentWidgetID]->setChecked(true);
|
||||
}
|
||||
|
||||
void FormMainMenu::SelectHistory()
|
||||
{
|
||||
if(m_nCurrentMenuID!=SMENU_HISTORY)
|
||||
{
|
||||
int nPrevWidget = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[nPrevWidget]->setChecked(false);
|
||||
m_nCurrentMenuID = SMENU_HISTORY;
|
||||
ChangeMenu(m_nCurrentMenuID);
|
||||
}
|
||||
|
||||
m_nCurrentWidgetID = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[m_nCurrentWidgetID]->setChecked(true);
|
||||
}
|
||||
|
||||
void FormMainMenu::SelectSetting()
|
||||
{
|
||||
if(m_nCurrentMenuID!=SMENU_SETTING)
|
||||
{
|
||||
int nPrevWidget = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[nPrevWidget]->setChecked(false);
|
||||
m_nCurrentMenuID = SMENU_SETTING;
|
||||
ChangeMenu(m_nCurrentMenuID);
|
||||
}
|
||||
|
||||
m_nCurrentWidgetID = GetWidgetID(m_nCurrentMenuID);
|
||||
m_ListButton[m_nCurrentWidgetID]->setChecked(true);
|
||||
}
|
||||
|
||||
|
||||
int FormMainMenu::GetWidgetID(int nID)
|
||||
{
|
||||
switch(nID)
|
||||
{
|
||||
case SMENU_WORKLIST:
|
||||
return SWIDGET_WORKLIST;
|
||||
break;
|
||||
case SMENU_HISTORY:
|
||||
return SWIDGET_HISTORY;
|
||||
break;
|
||||
case SMENU_SETTING:
|
||||
return SWIDGET_SETTING;
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void FormMainMenu::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
int nDisplayType = MainWindow::GetCommonData()->GetDisplayType();
|
||||
|
||||
int nFontSize = 24;
|
||||
if(nDisplayType==SDISPLAY_1280X1024)
|
||||
{
|
||||
nFontSize = 18;
|
||||
ui->frame_background->resize(462, 58);
|
||||
//ui->frame_background->resize(1190, 58);
|
||||
ui->pushButton_Worklist->setGeometry(0, 0, 154, 58);
|
||||
ui->pushButton_History->setGeometry(154, 0, 154, 58);
|
||||
ui->pushButton_Setting->setGeometry(308, 0, 154, 58);
|
||||
|
||||
ui->frame_usb->setGeometry(1104, 0, 58, 58);
|
||||
ui->check_usb->setGeometry(0, 0, 58, 58);
|
||||
}
|
||||
else if(nDisplayType==SDISPLAY_1920X1080)
|
||||
{
|
||||
ui->frame_background->resize(573, 70);
|
||||
ui->pushButton_Worklist->setGeometry(0, 0, 191, 70);
|
||||
ui->pushButton_History->setGeometry(191, 0, 191, 70);
|
||||
ui->pushButton_Setting->setGeometry(382, 0, 191, 70);
|
||||
}
|
||||
|
||||
QString strBackground = QString(
|
||||
"QFrame#frame_background \
|
||||
{ \
|
||||
background: #153b44;\
|
||||
border-radius: 9px; \
|
||||
border: none; \
|
||||
} \
|
||||
\
|
||||
QPushButton \
|
||||
{ \
|
||||
background: none; \
|
||||
border-radius: 8px; \
|
||||
border: none; \
|
||||
qproperty-autoDefault: false; \
|
||||
qproperty-default: false; \
|
||||
qproperty-flat: true; \
|
||||
qproperty-checkable: true; \
|
||||
qproperty-checked: false; \
|
||||
color: white; \
|
||||
font-family: 'Roboto'; \
|
||||
font-size: %1px; \
|
||||
font-weight: bold; \
|
||||
} \
|
||||
\
|
||||
QPushButton:checked \
|
||||
{ \
|
||||
background: #A6B1C2; \
|
||||
color: black; \
|
||||
}").arg(nFontSize);
|
||||
|
||||
ui->frame_background->setStyleSheet(strBackground);
|
||||
}
|
||||
|
||||
|
||||
void FormMainMenu::SetEnableDiskUSB(bool bEnable)
|
||||
{
|
||||
if(bEnable==true)
|
||||
{
|
||||
ui->frame_usb->setVisible(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->frame_usb->setVisible(false);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user