Initial commit
imported all content from archive: http://users.telenet.be/on4qz/qsstv/downloads/qsstv_9.2.6.tar.gzpull/1/head
|
@ -0,0 +1,684 @@
|
|||
|
||||
QSSTV uses Qt see http://qt.digia.com/ if any restrictions apply.
|
||||
|
||||
|
||||
As far as I know, QSSTV does not use any none-public software.
|
||||
If there are doubts, please let me know by email: on4qz@telenet.be
|
||||
|
||||
If part of whole of this code is used, you have to include a statement to indicate that the program is based in whole or in part on QSSTV.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
@ -0,0 +1,7 @@
|
|||
For the full manual please go to
|
||||
http://users.telenet.be/on4qz/qsstv_9/manual/index.html
|
||||
|
||||
There you'll find the complete installation instructions wich is part of the user manual.
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
#ifndef APPDEFS_H
|
||||
#define APPDEFS_H
|
||||
#include <stdint.h>
|
||||
#include <complex>
|
||||
using namespace std; /* Because of the library: "complex" */
|
||||
|
||||
#define SOUNDFRAME quint32
|
||||
|
||||
#define BASESAMPLERATE 48000
|
||||
#define SUBSAMPLINGFACTOR 4
|
||||
#define MONOCHANNEL 1
|
||||
#define STEREOCHANNEL 2
|
||||
#define RXSTRIPE 1024
|
||||
#define TXSTRIPE 1024
|
||||
#define FILTERPARAMTYPE double
|
||||
#define DOWNSAMPLESIZE (SUBSAMPLINGFACTOR*RXSTRIPE)
|
||||
#define SAMPLERATE (BASESAMPLERATE/SUBSAMPLINGFACTOR)
|
||||
|
||||
typedef double DSPFLOAT;
|
||||
typedef unsigned char byte;
|
||||
|
||||
|
||||
/* Define the application specific data-types ------------------------------- */
|
||||
typedef double _REAL;
|
||||
typedef complex<_REAL> _COMPLEX;
|
||||
typedef short _SAMPLE;
|
||||
typedef unsigned char _BYTE;
|
||||
typedef bool _BOOLEAN;
|
||||
typedef unsigned char _BINARY;
|
||||
|
||||
#endif // APPDEFS_H
|
|
@ -0,0 +1,83 @@
|
|||
#include "appglobal.h"
|
||||
#include "logging.h"
|
||||
#include "soundbase.h"
|
||||
#include <QPixmap>
|
||||
#include <QCursor>
|
||||
|
||||
|
||||
const QString MAJORVERSION = "9.2";
|
||||
const QString CONFIGVERSION = "9.0";
|
||||
const QString MINORVERSION = ".6";
|
||||
const QString LOGVERSION = ("qsstv."+MAJORVERSION+MINORVERSION+".log");
|
||||
const QString ORGANIZATION = "ON4QZ";
|
||||
const QString APPLICATION = ("qsstv_" +CONFIGVERSION);
|
||||
const QString qsstvVersion=QString("QSSTV " + MAJORVERSION+MINORVERSION);
|
||||
const QString shortName=QString("QSSTV");
|
||||
|
||||
|
||||
QSplashScreen *splashPtr;
|
||||
QString splashStr;
|
||||
|
||||
mainWindow *mainWindowPtr;
|
||||
soundBase *soundIOPtr;
|
||||
logFile *logFilePtr;
|
||||
configDialog *configDialogPtr;
|
||||
|
||||
|
||||
ftpInterface *notifyRXIntf;
|
||||
ftpInterface *hybridTxIntf;
|
||||
ftpInterface *notifyTXIntf;
|
||||
ftpInterface *onlineStatusIntf;
|
||||
|
||||
|
||||
|
||||
dispatcher *dispatcherPtr;
|
||||
QStatusBar *statusBarPtr;
|
||||
rxWidget *rxWidgetPtr;
|
||||
txWidget *txWidgetPtr;
|
||||
galleryWidget *galleryWidgetPtr;
|
||||
waterfallText *waterfallPtr;
|
||||
rigControl *rigControllerPtr;
|
||||
xmlInterface *xmlIntfPtr;
|
||||
logBook *logBookPtr;
|
||||
fileWatcher *fileWatcherPtr;
|
||||
|
||||
bool useHybrid;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
etransmissionMode transmissionModeIndex; // SSTV , DRM
|
||||
|
||||
|
||||
|
||||
QPixmap *greenPXMPtr;
|
||||
QPixmap *redPXMPtr;
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
scopeView *scopeViewerData;
|
||||
scopeView *scopeViewerSyncNarrow;
|
||||
scopeView *scopeViewerSyncWide;
|
||||
#endif
|
||||
|
||||
|
||||
void globalInit()
|
||||
{
|
||||
logFilePtr=new logFile();
|
||||
logFilePtr->open(LOGVERSION);
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("MAIN");
|
||||
logFilePtr->readSettings();
|
||||
greenPXMPtr=new QPixmap(16,16);
|
||||
greenPXMPtr->fill(Qt::green);
|
||||
redPXMPtr=new QPixmap(16,16);
|
||||
redPXMPtr->fill(Qt::red);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void globalEnd(void)
|
||||
{
|
||||
logFilePtr->close();
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
#ifndef APPGLOBAL_H
|
||||
#define APPGLOBAL_H
|
||||
#include "logging.h"
|
||||
//#include "mainwindow.h"
|
||||
#include "appdefs.h"
|
||||
|
||||
class QSplashScreen;
|
||||
class scopeView;
|
||||
class rxWidget;
|
||||
class txWidget;
|
||||
class galleryWidget;
|
||||
class waterfallText;
|
||||
class rigControl;
|
||||
class xmlInterface;
|
||||
class logBook;
|
||||
class dispatcher;
|
||||
class fileWatcher;
|
||||
class ftpInterface;
|
||||
|
||||
enum etransmissionMode {TRXSSTV,TRXDRM,TRXNOMODE};
|
||||
|
||||
extern const QString MAJORVERSION;
|
||||
extern const QString CONFIGVERSION;
|
||||
extern const QString MINORVERSION;
|
||||
extern const QString ORGANIZATION;
|
||||
extern const QString APPLICATION;
|
||||
extern const QString qsstvVersion;
|
||||
extern const QString shortName;
|
||||
#define MAGICNUMBER (('4'<<24)+('Q'<<16)+('Z'<<8)+'S')
|
||||
|
||||
class soundBase;
|
||||
class mainWindow;
|
||||
class QStatusBar;
|
||||
class configDialog;
|
||||
|
||||
extern mainWindow *mainWindowPtr;
|
||||
extern soundBase *soundIOPtr;
|
||||
extern QSplashScreen *splashPtr;
|
||||
extern QString splashStr;
|
||||
extern dispatcher *dispatcherPtr;
|
||||
extern QStatusBar *statusBarPtr;
|
||||
extern fileWatcher *fileWatcherPtr;
|
||||
|
||||
extern rxWidget *rxWidgetPtr;
|
||||
extern txWidget *txWidgetPtr;
|
||||
extern galleryWidget *galleryWidgetPtr;
|
||||
extern waterfallText *waterfallPtr;
|
||||
extern rigControl *rigControllerPtr;
|
||||
extern xmlInterface *xmlIntfPtr;
|
||||
extern configDialog *configDialogPtr;
|
||||
extern logBook *logBookPtr;
|
||||
|
||||
|
||||
extern QPixmap *greenPXMPtr;
|
||||
extern QPixmap *redPXMPtr;
|
||||
|
||||
extern logFile *logFilePtr;
|
||||
extern bool useHybrid;
|
||||
|
||||
|
||||
extern ftpInterface *notifyRXIntf;
|
||||
extern ftpInterface *hybridTxIntf;
|
||||
extern ftpInterface *notifyTXIntf;
|
||||
extern ftpInterface *onlineStatusIntf;
|
||||
|
||||
extern etransmissionMode transmissionModeIndex; // SSTV , DRM
|
||||
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
extern scopeView *scopeViewerData;
|
||||
extern scopeView *scopeViewerSyncNarrow;
|
||||
extern scopeView *scopeViewerSyncWide;
|
||||
#endif
|
||||
|
||||
void globalInit(void);
|
||||
void globalEnd(void);
|
||||
|
||||
#endif // APPGLOBAL_H
|
|
@ -0,0 +1,6 @@
|
|||
#include "baseconfig.h"
|
||||
|
||||
baseConfig::baseConfig(QWidget *parent):QWidget(parent)
|
||||
{
|
||||
changed=false;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef BASECONFIG_H
|
||||
#define BASECONFIG_H
|
||||
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include <QSettings>
|
||||
#include "utils/supportfunctions.h"
|
||||
|
||||
class baseConfig: public QWidget
|
||||
{
|
||||
public:
|
||||
baseConfig(QWidget *parent = 0);
|
||||
virtual void readSettings()=0;
|
||||
virtual void writeSettings()=0;
|
||||
virtual void getParams()=0;
|
||||
virtual void setParams()=0;
|
||||
bool hasChanged() {return changed;}
|
||||
protected:
|
||||
bool changed;
|
||||
};
|
||||
|
||||
#endif // BASECONFIG_H
|
|
@ -0,0 +1,96 @@
|
|||
#include "configdialog.h"
|
||||
#include "ui_configdialog.h"
|
||||
#include "gallerywidget.h"
|
||||
#include "mainwindow.h"
|
||||
#include "txwidget.h"
|
||||
#include "filewatcher.h"
|
||||
|
||||
|
||||
configDialog::configDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::configDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->catWidget->attachRigController(rigControllerPtr);
|
||||
ui->configTabWidget->setCurrentIndex(0);
|
||||
}
|
||||
|
||||
configDialog::~configDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void configDialog::readSettings()
|
||||
{
|
||||
ui->cwWidget->readSettings();
|
||||
ui->directoryWidget->readSettings();
|
||||
ui->drmProfilesWidget->readSettings();
|
||||
ui->ftpWidget->readSettings();
|
||||
ui->guiWidget->readSettings();
|
||||
ui->hybridWidget->readSettings();
|
||||
ui->hybridNotifyWidget->readSettings();
|
||||
ui->operatorWidget->readSettings();
|
||||
ui->repeaterWidget->readSettings();
|
||||
ui->catWidget->readSettings();
|
||||
ui->soundWidget->readSettings();
|
||||
ui->waterfallWidget->readSettings();
|
||||
ui->freqSelectWidget->readSettings();
|
||||
}
|
||||
|
||||
void configDialog::writeSettings()
|
||||
{
|
||||
ui->operatorWidget->writeSettings();
|
||||
ui->directoryWidget->writeSettings();
|
||||
ui->soundWidget->writeSettings();
|
||||
ui->guiWidget->writeSettings();
|
||||
ui->catWidget->writeSettings();
|
||||
ui->ftpWidget->writeSettings();
|
||||
ui->repeaterWidget->writeSettings();
|
||||
ui->hybridWidget->writeSettings();
|
||||
ui->hybridNotifyWidget->writeSettings();
|
||||
ui->drmProfilesWidget->writeSettings();
|
||||
ui->cwWidget->writeSettings();
|
||||
ui->waterfallWidget->writeSettings();
|
||||
soundNeedsRestart=ui->soundWidget->hasChanged();
|
||||
guiNeedsRestart=ui->guiWidget->hasChanged();
|
||||
ui->freqSelectWidget->writeSettings();
|
||||
if(ui->guiWidget->backGroundColorChanged)
|
||||
{
|
||||
emit bgColorChanged();
|
||||
ui->guiWidget->backGroundColorChanged=false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Opens the configuration dialog
|
||||
*/
|
||||
|
||||
int configDialog::exec()
|
||||
{
|
||||
if(QDialog::exec())
|
||||
{
|
||||
writeSettings();
|
||||
if(ui->directoryWidget->hasChanged() || ui->guiWidget->hasChanged())
|
||||
{
|
||||
galleryWidgetPtr->changedMatrix();
|
||||
}
|
||||
if(ui->drmProfilesWidget->hasChanged())
|
||||
{
|
||||
txWidgetPtr->reloadProfiles();
|
||||
}
|
||||
if(ui->directoryWidget->hasChanged())
|
||||
{
|
||||
fileWatcherPtr->init();
|
||||
}
|
||||
mainWindowPtr->setSSTVDRMPushButton(transmissionModeIndex==TRXDRM);
|
||||
|
||||
return QDialog::Accepted;
|
||||
}
|
||||
else
|
||||
{
|
||||
return QDialog::Rejected;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef CONFIGDIALOG_H
|
||||
#define CONFIGDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class configDialog;
|
||||
}
|
||||
|
||||
class configDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit configDialog(QWidget *parent = 0);
|
||||
~configDialog();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
int exec();
|
||||
bool soundNeedsRestart;
|
||||
bool guiNeedsRestart;
|
||||
|
||||
|
||||
signals:
|
||||
void bgColorChanged();
|
||||
|
||||
|
||||
private:
|
||||
Ui::configDialog *ui;
|
||||
|
||||
};
|
||||
|
||||
#endif // CONFIGDIALOG_H
|
|
@ -0,0 +1,491 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>configDialog</class>
|
||||
<widget class="QDialog" name="configDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>818</width>
|
||||
<height>438</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Configuration</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="configTabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="operatorTab">
|
||||
<attribute name="title">
|
||||
<string>Operator</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="operatorConfig" name="operatorWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="directoryTab">
|
||||
<attribute name="title">
|
||||
<string>Directories</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="directoriesConfig" name="directoryWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="guiTab">
|
||||
<attribute name="title">
|
||||
<string>Gui</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="guiConfig" name="guiWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="soundTab">
|
||||
<attribute name="title">
|
||||
<string>Sound</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="soundConfig" name="soundWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="catTab">
|
||||
<attribute name="title">
|
||||
<string>CAT</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="rigConfig" name="catWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="cwTab">
|
||||
<attribute name="title">
|
||||
<string>CW</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="cwConfig" name="cwWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="repeaterTab">
|
||||
<attribute name="title">
|
||||
<string>Repeater</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="repeaterConfig" name="repeaterWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="ftpTab">
|
||||
<attribute name="title">
|
||||
<string>FTP</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="ftpConfig" name="ftpWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="waterfallTab">
|
||||
<attribute name="title">
|
||||
<string>Waterfall</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="waterfallConfig" name="waterfallWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="hybridTab">
|
||||
<attribute name="title">
|
||||
<string>Hybrid</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="hybridConfig" name="hybridWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="notifyTab">
|
||||
<attribute name="title">
|
||||
<string>Notifications</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11a">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="hybridNotifyConfig" name="hybridNotifyWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="profilesTab">
|
||||
<attribute name="title">
|
||||
<string>DRM Profiles</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_12">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="drmProfileConfig" name="drmProfilesWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="frequenciesTab">
|
||||
<attribute name="title">
|
||||
<string>Frequencies</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="frequencySelectWidget" name="freqSelectWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>soundConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>soundconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>directoriesConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>directoriesconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>operatorConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>operatorconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>guiConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>guiconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>rigConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>rigconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>cwConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>cwconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>repeaterConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>repeaterconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ftpConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>ftpconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>waterfallConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>waterfallconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>hybridConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>hybridconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>drmProfileConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>drmprofileconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>frequencySelectWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>frequencyselectwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>hybridNotifyConfig</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>hybridnotifyconfig.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>configDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>configDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef CONFIGPARAMS_H
|
||||
#define CONFIGPARAMS_H
|
||||
|
||||
#include "cwconfig.h"
|
||||
#include "directoriesconfig.h"
|
||||
#include "drmprofileconfig.h"
|
||||
#include "ftpconfig.h"
|
||||
#include "guiconfig.h"
|
||||
#include "hybridconfig.h"
|
||||
#include "hybridnotifyconfig.h"
|
||||
#include "operatorconfig.h"
|
||||
#include "repeaterconfig.h"
|
||||
#include "rigconfig.h"
|
||||
#include "soundconfig.h"
|
||||
#include "waterfallconfig.h"
|
||||
#include "frequencyselectwidget.h"
|
||||
|
||||
#endif // CONFIGPARAMS_H
|
|
@ -0,0 +1,67 @@
|
|||
#include "cwconfig.h"
|
||||
#include "ui_cwconfig.h"
|
||||
|
||||
QString cwText;
|
||||
int cwTone;
|
||||
int cwWPM;
|
||||
//bool enableCW;
|
||||
|
||||
cwConfig::cwConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::cwConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
cwConfig::~cwConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void cwConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("CW");
|
||||
cwText=qSettings.value("cwtext","").toString();
|
||||
cwTone=qSettings.value("cwtone",800).toInt();
|
||||
cwWPM=qSettings.value("cwWPM",12).toInt();
|
||||
// enableCW=qSettings.value("enableCW",false).toBool();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void cwConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
|
||||
qSettings.beginGroup("CW");
|
||||
qSettings.setValue("cwtext",cwText);
|
||||
qSettings.setValue("cwtone",cwTone);
|
||||
qSettings.setValue("cwWPM",cwWPM);
|
||||
// qSettings.setValue("enableCW",enableCW);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void cwConfig::getParams()
|
||||
{
|
||||
QString cwTextCopy=cwText;
|
||||
int cwToneCopy=cwTone;
|
||||
int cwWPMCopy=cwWPM;
|
||||
getValue(cwText,ui->cwTextLineEdit);
|
||||
getValue(cwTone,ui->cwToneSpinBox);
|
||||
getValue(cwWPM,ui->cwWPMSpinBox);
|
||||
// getValue(enableCW,ui->enableCWCheckBox);
|
||||
changed=false;
|
||||
if(cwTextCopy!=cwText
|
||||
|| cwToneCopy!=cwTone
|
||||
|| cwWPMCopy!=cwWPM)
|
||||
changed=true;
|
||||
}
|
||||
|
||||
void cwConfig::setParams()
|
||||
{
|
||||
setValue(cwText,ui->cwTextLineEdit);
|
||||
setValue(cwTone,ui->cwToneSpinBox);
|
||||
setValue(cwWPM,ui->cwWPMSpinBox);
|
||||
// setValue(enableCW,ui->enableCWCheckBox);
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef CWCONFIG_H
|
||||
#define CWCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern QString cwText;
|
||||
extern int cwTone;
|
||||
extern int cwWPM;
|
||||
//extern bool enableCW;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class cwConfig;
|
||||
}
|
||||
|
||||
class cwConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit cwConfig(QWidget *parent = 0);
|
||||
~cwConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private:
|
||||
Ui::cwConfig *ui;
|
||||
};
|
||||
|
||||
#endif // CWCONFIG_H
|
|
@ -0,0 +1,255 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>cwConfig</class>
|
||||
<widget class="QWidget" name="cwConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>482</width>
|
||||
<height>182</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="wpmLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Words PerMinute</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="cwWPMSpinBox">
|
||||
<property name="minimum">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>12</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2" stretch="0,1,0">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="textToSendLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Text to send</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="cwTextLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="toneLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tone</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="cwToneSpinBox">
|
||||
<property name="minimum">
|
||||
<number>300</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2300</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>800</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<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>54</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,184 @@
|
|||
#include "directoriesconfig.h"
|
||||
#include "ui_directoriesconfig.h"
|
||||
|
||||
|
||||
QString rxSSTVImagesPath;
|
||||
QString rxDRMImagesPath;
|
||||
QString txSSTVImagesPath;
|
||||
QString txDRMImagesPath;
|
||||
QString txStockImagesPath;
|
||||
QString templatesPath;
|
||||
QString audioPath;
|
||||
bool saveTXimages;
|
||||
QString docURL;
|
||||
|
||||
|
||||
|
||||
directoriesConfig::directoriesConfig(QWidget *parent) :baseConfig(parent),
|
||||
ui(new Ui::directoriesConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->rxSSTVImagesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseRxSSTVImagesPath()));
|
||||
connect(ui->rxDRMImagesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseRxDRMImagesPath()));
|
||||
connect(ui->txSSTVImagesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseTxSSTVImagesPath()));
|
||||
connect(ui->txDRMImagesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseTxDRMImagesPath()));
|
||||
connect(ui->txStockImagesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseTxStockImagesPath()));
|
||||
connect(ui->templatesPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseTemplatesPath()));
|
||||
connect(ui->audioPathBrowseButton,SIGNAL(clicked()),SLOT(slotBrowseAudioPath()));
|
||||
}
|
||||
|
||||
directoriesConfig::~directoriesConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void directoriesConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("DIRECTORIES");
|
||||
rxSSTVImagesPath=qSettings.value("rxSSTVImagesPath",QString(getenv("HOME"))+"/qsstv/rx_sstv/").toString();
|
||||
rxDRMImagesPath=qSettings.value("rxDRMImagesPath",QString(getenv("HOME"))+"/qsstv/rx_drm/").toString();
|
||||
txSSTVImagesPath=qSettings.value("txSSTVImagesPath",QString(getenv("HOME"))+"/qsstv/tx_sstv/").toString();
|
||||
txDRMImagesPath=qSettings.value("txDRMImagesPath",QString(getenv("HOME"))+"/tx_drm/").toString();
|
||||
txStockImagesPath=qSettings.value("txStockImagesPath",QString(getenv("HOME"))+"/tx_stock/").toString();
|
||||
templatesPath=qSettings.value("templatesPath",QString(getenv("HOME"))+"/templates/").toString();
|
||||
audioPath=qSettings.value("audioPath",QString(getenv("HOME"))+"/audio/").toString();
|
||||
docURL=qSettings.value("docURL","http://users.telenet.be/on4qz/qsstv/manual").toString();
|
||||
saveTXimages=qSettings.value("saveTXimages",false).toBool();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void directoriesConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("DIRECTORIES");
|
||||
qSettings.setValue("rxSSTVImagesPath",rxSSTVImagesPath);
|
||||
qSettings.setValue("rxDRMImagesPath",rxDRMImagesPath);
|
||||
qSettings.setValue("txSSTVImagesPath",txSSTVImagesPath);
|
||||
qSettings.setValue("txDRMImagesPath",txDRMImagesPath);
|
||||
qSettings.setValue("txStockImagesPath",txStockImagesPath);
|
||||
qSettings.setValue("templatesPath",templatesPath);
|
||||
qSettings.setValue("audioPath",audioPath);
|
||||
qSettings.setValue("docURL",docURL);
|
||||
qSettings.setValue("saveTXimages",saveTXimages);
|
||||
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void directoriesConfig::getParams()
|
||||
{
|
||||
QString rxSSTVImagePathSaved=rxSSTVImagesPath;
|
||||
QString rxDRMImagePathSaved=rxDRMImagesPath;
|
||||
QString txSSTVImagePathSaved=txSSTVImagesPath;
|
||||
QString txDRMImagePathSaved=txDRMImagesPath;
|
||||
QString txStockImagePathSaved=txStockImagesPath;
|
||||
QString templatesPathSaved=templatesPath;
|
||||
getValue(rxSSTVImagesPath,ui->rxSSTVImagesPathLineEdit);
|
||||
getValue(rxDRMImagesPath,ui->rxDRMImagesPathLineEdit);
|
||||
getValue(txSSTVImagesPath,ui->txSSTVImagesPathLineEdit);
|
||||
getValue(txDRMImagesPath,ui->txDRMImagesPathLineEdit);
|
||||
getValue(txStockImagesPath,ui->txStockImagesPathLineEdit);
|
||||
getValue(templatesPath,ui->templatesPathLineEdit);
|
||||
getValue(audioPath,ui->audioPathLineEdit);
|
||||
getValue(docURL,ui->docPathLineEdit);
|
||||
getValue(saveTXimages,ui->saveTXcheckBox);
|
||||
changed=false;
|
||||
if(rxSSTVImagePathSaved!=rxSSTVImagesPath || rxDRMImagePathSaved!=rxDRMImagesPath ||
|
||||
txSSTVImagePathSaved!=txSSTVImagesPath ||
|
||||
txDRMImagePathSaved!=txDRMImagesPath ||
|
||||
txStockImagePathSaved!=txStockImagesPath ||
|
||||
templatesPathSaved!=templatesPath
|
||||
)
|
||||
changed=true; // always save it
|
||||
}
|
||||
|
||||
void directoriesConfig::setParams()
|
||||
{
|
||||
setValue(rxSSTVImagesPath,ui->rxSSTVImagesPathLineEdit);
|
||||
setValue(rxDRMImagesPath,ui->rxDRMImagesPathLineEdit);
|
||||
setValue(txSSTVImagesPath,ui->txSSTVImagesPathLineEdit);
|
||||
setValue(txDRMImagesPath,ui->txDRMImagesPathLineEdit);
|
||||
setValue(txStockImagesPath,ui->txStockImagesPathLineEdit);
|
||||
setValue(templatesPath,ui->templatesPathLineEdit);
|
||||
setValue(audioPath,ui->audioPathLineEdit);
|
||||
setValue(docURL,ui->docPathLineEdit);
|
||||
setValue(saveTXimages,ui->saveTXcheckBox);
|
||||
// create directories if not exist
|
||||
createDir(rxSSTVImagesPath);
|
||||
createDir(rxDRMImagesPath);
|
||||
createDir(txSSTVImagesPath);
|
||||
createDir(txDRMImagesPath);
|
||||
createDir(txStockImagesPath);
|
||||
createDir(templatesPath);
|
||||
|
||||
createDir(rxSSTVImagesPath+"/cache");
|
||||
createDir(rxDRMImagesPath+"/cache");
|
||||
createDir(txSSTVImagesPath+"/cache");
|
||||
createDir(txDRMImagesPath+"/cache");
|
||||
createDir(txStockImagesPath+"/cache");
|
||||
createDir(audioPath);
|
||||
}
|
||||
|
||||
void directoriesConfig::createDir(QString path)
|
||||
{
|
||||
QDir dd(path);
|
||||
if(!dd.exists())
|
||||
{
|
||||
dd.mkpath(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Browse function for path where the rximages are stored
|
||||
*/
|
||||
|
||||
|
||||
void directoriesConfig::slotBrowseRxSSTVImagesPath()
|
||||
{
|
||||
browseDir(ui->rxSSTVImagesPathLineEdit,rxSSTVImagesPath);
|
||||
}
|
||||
|
||||
void directoriesConfig::slotBrowseRxDRMImagesPath()
|
||||
{
|
||||
browseDir(ui->rxDRMImagesPathLineEdit,rxDRMImagesPath);
|
||||
}
|
||||
|
||||
/**
|
||||
Browse function for path where the tximages are stored
|
||||
*/
|
||||
|
||||
void directoriesConfig::slotBrowseTxSSTVImagesPath()
|
||||
{
|
||||
browseDir(ui->txSSTVImagesPathLineEdit,txSSTVImagesPath);
|
||||
}
|
||||
|
||||
void directoriesConfig::slotBrowseTxDRMImagesPath()
|
||||
{
|
||||
browseDir(ui->txDRMImagesPathLineEdit,txDRMImagesPath);
|
||||
}
|
||||
|
||||
void directoriesConfig::slotBrowseTxStockImagesPath()
|
||||
{
|
||||
browseDir(ui->txStockImagesPathLineEdit,txStockImagesPath);
|
||||
}
|
||||
|
||||
/**
|
||||
Browse function for path where the templates are stored
|
||||
*/
|
||||
|
||||
void directoriesConfig::slotBrowseTemplatesPath()
|
||||
{
|
||||
browseDir(ui->templatesPathLineEdit,templatesPath);
|
||||
}
|
||||
|
||||
/**
|
||||
Browse function for audio path
|
||||
*/
|
||||
|
||||
void directoriesConfig::slotBrowseAudioPath()
|
||||
{
|
||||
browseDir(ui->audioPathLineEdit,audioPath);
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
#ifndef DIRECTORIES_H
|
||||
#define DIRECTORIES_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern QString rxSSTVImagesPath;
|
||||
extern QString rxDRMImagesPath;
|
||||
extern QString txSSTVImagesPath;
|
||||
extern QString txDRMImagesPath;
|
||||
extern QString txStockImagesPath;
|
||||
extern QString templatesPath;
|
||||
extern QString audioPath;
|
||||
extern bool saveTXimages;
|
||||
extern QString docURL;
|
||||
|
||||
namespace Ui {
|
||||
class directoriesConfig;
|
||||
}
|
||||
|
||||
class directoriesConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit directoriesConfig(QWidget *parent = 0);
|
||||
~directoriesConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private slots:
|
||||
void slotBrowseRxSSTVImagesPath();
|
||||
void slotBrowseRxDRMImagesPath();
|
||||
void slotBrowseTxSSTVImagesPath();
|
||||
void slotBrowseTxDRMImagesPath();
|
||||
void slotBrowseTxStockImagesPath();
|
||||
void slotBrowseTemplatesPath();
|
||||
void slotBrowseAudioPath();
|
||||
|
||||
private:
|
||||
Ui::directoriesConfig *ui;
|
||||
void createDir(QString path);
|
||||
};
|
||||
|
||||
#endif // DIRECTORIES_H
|
|
@ -0,0 +1,502 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>directoriesConfig</class>
|
||||
<widget class="QWidget" name="directoriesConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>700</width>
|
||||
<height>345</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rxSSTVImLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RX SSTV Images</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="rxSSTVImagesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rxSSTVImagesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rxDRMImLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>RX DRM Images</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="rxDRMImagesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rxDRMImagesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="txImLabel_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TX SSTV Images</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="txSSTVImagesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="txSSTVImagesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="txImLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TX DRM Images</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="txDRMImagesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="txDRMImagesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_8">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="txImLabel_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TX Stock Images</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="txStockImagesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="txStockImagesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="templLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Templates</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="templatesPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="templatesPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="audioRecordsLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Audio Records</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="audioPathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="audioPathBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="saveTXcheckBox">
|
||||
<property name="text">
|
||||
<string>Save TX images in TX SSTV or TX DRM directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<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>184</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="docLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Documentation </string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="docPathLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,189 @@
|
|||
#include "drmprofileconfig.h"
|
||||
#include "ui_drmprofileconfig.h"
|
||||
#include "utils/supportfunctions.h"
|
||||
#include "configparams.h"
|
||||
|
||||
sprofile drmPFArray[NUMBEROFPROFILES];
|
||||
|
||||
drmProfileConfig *drmProfileConfigPtr;
|
||||
|
||||
|
||||
drmProfileConfig::drmProfileConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::drmProfileConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
readSettings();
|
||||
}
|
||||
|
||||
drmProfileConfig::~drmProfileConfig()
|
||||
{
|
||||
writeSettings();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void drmProfileConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup ("DRMPROFILE" );
|
||||
drmPFArray[0].name=qSettings.value ("drmPF1Name","Profile 1").toString();
|
||||
drmPFArray[0].params.robMode=qSettings.value ("drmPF1Mode",0).toInt();
|
||||
drmPFArray[0].params.qam=qSettings.value("drmPF1QAM",0).toInt();
|
||||
drmPFArray[0].params.bandwith=qSettings.value("drmPF1Bandwidth",0).toInt();
|
||||
drmPFArray[0].params.protection=qSettings.value("drmPF1Protection",0).toInt();
|
||||
drmPFArray[0].params.interleaver=qSettings.value("drmPF1Interleave",0).toInt();
|
||||
drmPFArray[0].params.reedSolomon=qSettings.value("drmPF1ReedSolomon",0).toInt();
|
||||
|
||||
drmPFArray[1].name=qSettings.value ("drmPF2Name","Profile 2").toString();
|
||||
drmPFArray[1].params.robMode=qSettings.value ("drmPF2Mode",0).toInt();
|
||||
drmPFArray[1].params.qam=qSettings.value("drmPF2QAM",0).toInt();
|
||||
drmPFArray[1].params.bandwith=qSettings.value("drmPF2Bandwidth",0).toInt();
|
||||
drmPFArray[1].params.protection=qSettings.value("drmPF2Protection",0).toInt();
|
||||
drmPFArray[1].params.interleaver=qSettings.value("drmPF2Interleave",0).toInt();
|
||||
drmPFArray[1].params.reedSolomon=qSettings.value("drmPF2ReedSolomon",0).toInt();
|
||||
|
||||
drmPFArray[2].name=qSettings.value ("drmPF3Name","Profile 3").toString();
|
||||
drmPFArray[2].params.robMode=qSettings.value ("drmPF3Mode",0).toInt();
|
||||
drmPFArray[2].params.qam=qSettings.value("drmPF3QAM",0).toInt();
|
||||
drmPFArray[2].params.bandwith=qSettings.value("drmPF3Bandwidth",0).toInt();
|
||||
drmPFArray[2].params.protection=qSettings.value("drmPF3Protection",0).toInt();
|
||||
drmPFArray[2].params.interleaver=qSettings.value("drmPF3Interleave",0).toInt();
|
||||
drmPFArray[2].params.reedSolomon=qSettings.value("drmPF3ReedSolomon",0).toInt();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
|
||||
}
|
||||
|
||||
void drmProfileConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup ("DRMPROFILE" );
|
||||
qSettings.setValue ("drmPF1Name",drmPFArray[0].name);
|
||||
qSettings.setValue ("drmPF1Mode",drmPFArray[0].params.robMode);
|
||||
qSettings.setValue("drmPF1QAM",drmPFArray[0].params.qam);
|
||||
qSettings.setValue("drmPF1Bandwidth",drmPFArray[0].params.bandwith);
|
||||
qSettings.setValue("drmPF1Protection",drmPFArray[0].params.protection);
|
||||
qSettings.setValue("drmPF1Interleave",drmPFArray[0].params.interleaver);
|
||||
qSettings.setValue("drmPF1ReedSolomon",drmPFArray[0].params.reedSolomon);
|
||||
qSettings.setValue ("drmPF2Name",drmPFArray[1].name);
|
||||
qSettings.setValue ("drmPF2Mode",drmPFArray[1].params.robMode);
|
||||
qSettings.setValue("drmPF2QAM",drmPFArray[1].params.qam);
|
||||
qSettings.setValue("drmPF2Bandwidth",drmPFArray[1].params.bandwith);
|
||||
qSettings.setValue("drmPF2Protection",drmPFArray[1].params.protection);
|
||||
qSettings.setValue("drmPF2Interleave",drmPFArray[1].params.interleaver);
|
||||
qSettings.setValue("drmPF2ReedSolomon",drmPFArray[1].params.reedSolomon);
|
||||
|
||||
qSettings.setValue ("drmPF3Name",drmPFArray[2].name);
|
||||
qSettings.setValue ("drmPF3Mode",drmPFArray[2].params.robMode);
|
||||
qSettings.setValue("drmPF3QAM",drmPFArray[2].params.qam);
|
||||
qSettings.setValue("drmPF3Bandwidth",drmPFArray[2].params.bandwith);
|
||||
qSettings.setValue("drmPF3Protection",drmPFArray[2].params.protection);
|
||||
qSettings.setValue("drmPF3Interleave",drmPFArray[2].params.interleaver);
|
||||
qSettings.setValue("drmPF3ReedSolomon",drmPFArray[2].params.reedSolomon);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
|
||||
void drmProfileConfig::getParams()
|
||||
{
|
||||
sprofile drmPFArrayCopy[NUMBEROFPROFILES];
|
||||
drmPFArrayCopy[0]=drmPFArray[0];
|
||||
drmPFArrayCopy[1]=drmPFArray[1];
|
||||
drmPFArrayCopy[2]=drmPFArray[2];
|
||||
|
||||
getValue(drmPFArray[0].name,ui->namePF1LineEdit);
|
||||
drmPFArray[0].params.callsign=myCallsign;
|
||||
getIndex(drmPFArray[0].params.robMode,ui->drmPF1ModeComboBox);
|
||||
getIndex(drmPFArray[0].params.qam,ui->drmPF1QAMComboBox);
|
||||
getIndex(drmPFArray[0].params.bandwith,ui->drmPF1BandwidthComboBox);
|
||||
getIndex(drmPFArray[0].params.protection,ui->drmPF1ProtectionComboBox);
|
||||
getIndex(drmPFArray[0].params.interleaver,ui->drmPF1InterleaveComboBox);
|
||||
getIndex(drmPFArray[0].params.reedSolomon,ui->drmPF1ReedSolomonComboBox);
|
||||
|
||||
getValue(drmPFArray[1].name,ui->namePF2LineEdit);
|
||||
drmPFArray[1].params.callsign=myCallsign;
|
||||
getIndex(drmPFArray[1].params.robMode,ui->drmPF2ModeComboBox);
|
||||
getIndex(drmPFArray[1].params.qam,ui->drmPF2QAMComboBox);
|
||||
getIndex(drmPFArray[1].params.bandwith,ui->drmPF2BandwidthComboBox);
|
||||
getIndex(drmPFArray[1].params.protection,ui->drmPF2ProtectionComboBox);
|
||||
getIndex(drmPFArray[1].params.interleaver,ui->drmPF2InterleaveComboBox);
|
||||
getIndex(drmPFArray[1].params.reedSolomon,ui->drmPF2ReedSolomonComboBox);
|
||||
|
||||
getValue(drmPFArray[2].name,ui->namePF3LineEdit);
|
||||
drmPFArray[2].params.callsign=myCallsign;
|
||||
getIndex(drmPFArray[2].params.robMode,ui->drmPF3ModeComboBox);
|
||||
getIndex(drmPFArray[2].params.qam,ui->drmPF3QAMComboBox);
|
||||
getIndex(drmPFArray[2].params.bandwith,ui->drmPF3BandwidthComboBox);
|
||||
getIndex(drmPFArray[2].params.protection,ui->drmPF3ProtectionComboBox);
|
||||
getIndex(drmPFArray[2].params.interleaver,ui->drmPF3InterleaveComboBox);
|
||||
getIndex(drmPFArray[2].params.reedSolomon,ui->drmPF3ReedSolomonComboBox);
|
||||
changed=false;
|
||||
if( diff(drmPFArrayCopy[0],drmPFArray[0])
|
||||
|| diff(drmPFArrayCopy[1],drmPFArray[1])
|
||||
|| diff(drmPFArrayCopy[2],drmPFArray[2]))
|
||||
changed=true;
|
||||
|
||||
}
|
||||
|
||||
bool drmProfileConfig::diff(sprofile a,sprofile b)
|
||||
{
|
||||
return
|
||||
(a.name!=b.name
|
||||
|| a.params.robMode!=b.params.robMode
|
||||
|| a.params.qam!= b.params.qam
|
||||
|| a.params.bandwith!=b.params.bandwith
|
||||
|| a.params.protection!=b.params.protection
|
||||
|| a.params.interleaver!=b.params.interleaver
|
||||
|| a.params.reedSolomon!=b.params.reedSolomon);
|
||||
|
||||
}
|
||||
|
||||
void drmProfileConfig::setParams()
|
||||
{
|
||||
setValue(drmPFArray[0].name,ui->namePF1LineEdit);
|
||||
setIndex(drmPFArray[0].params.robMode,ui->drmPF1ModeComboBox);
|
||||
setIndex(drmPFArray[0].params.qam,ui->drmPF1QAMComboBox);
|
||||
setIndex(drmPFArray[0].params.bandwith,ui->drmPF1BandwidthComboBox);
|
||||
setIndex(drmPFArray[0].params.protection,ui->drmPF1ProtectionComboBox);
|
||||
setIndex(drmPFArray[0].params.interleaver,ui->drmPF1InterleaveComboBox);
|
||||
setIndex(drmPFArray[0].params.reedSolomon,ui->drmPF1ReedSolomonComboBox);
|
||||
|
||||
setValue(drmPFArray[1].name,ui->namePF2LineEdit);
|
||||
setIndex(drmPFArray[1].params.robMode,ui->drmPF2ModeComboBox);
|
||||
setIndex(drmPFArray[1].params.qam,ui->drmPF2QAMComboBox);
|
||||
setIndex(drmPFArray[1].params.bandwith,ui->drmPF2BandwidthComboBox);
|
||||
setIndex(drmPFArray[1].params.protection,ui->drmPF2ProtectionComboBox);
|
||||
setIndex(drmPFArray[1].params.interleaver,ui->drmPF2InterleaveComboBox);
|
||||
setIndex(drmPFArray[1].params.reedSolomon,ui->drmPF2ReedSolomonComboBox);
|
||||
|
||||
setValue(drmPFArray[2].name,ui->namePF3LineEdit);
|
||||
setIndex(drmPFArray[2].params.robMode,ui->drmPF3ModeComboBox);
|
||||
setIndex(drmPFArray[2].params.qam,ui->drmPF3QAMComboBox);
|
||||
setIndex(drmPFArray[2].params.bandwith,ui->drmPF3BandwidthComboBox);
|
||||
setIndex(drmPFArray[2].params.protection,ui->drmPF3ProtectionComboBox);
|
||||
setIndex(drmPFArray[2].params.interleaver,ui->drmPF3InterleaveComboBox);
|
||||
setIndex(drmPFArray[2].params.reedSolomon,ui->drmPF3ReedSolomonComboBox);
|
||||
}
|
||||
|
||||
|
||||
bool drmProfileConfig::getDRMParams(int idx,drmTxParams &d)
|
||||
{
|
||||
if((idx<0)||(idx>=NUMBEROFPROFILES))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
d=drmPFArray[idx].params;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool drmProfileConfig::getName(int idx, QString &n)
|
||||
{
|
||||
|
||||
if((idx<0)||(idx>=NUMBEROFPROFILES))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
n=drmPFArray[idx].name;
|
||||
return true;
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
#ifndef DRMPROFILECONFIG_H
|
||||
#define DRMPROFILECONFIG_H
|
||||
#include "drmtx/drmparams.h"
|
||||
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
#define NUMBEROFPROFILES 3
|
||||
|
||||
|
||||
|
||||
struct sprofile
|
||||
{
|
||||
QString name;
|
||||
drmTxParams params;
|
||||
|
||||
};
|
||||
|
||||
extern sprofile drmPFArray[NUMBEROFPROFILES];
|
||||
|
||||
bool getDRMParams(int idx, drmTxParams &d);
|
||||
bool getName(int idx,QString &n);
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class drmProfileConfig;
|
||||
}
|
||||
|
||||
class drmProfileConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit drmProfileConfig(QWidget *parent = 0);
|
||||
~drmProfileConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
bool getDRMParams(int idx,drmTxParams &d);
|
||||
bool getName(int idx, QString &n);
|
||||
|
||||
private:
|
||||
Ui::drmProfileConfig *ui;
|
||||
bool diff(sprofile a,sprofile b);
|
||||
|
||||
};
|
||||
|
||||
extern drmProfileConfig *drmProfileConfigPtr;
|
||||
|
||||
|
||||
|
||||
#endif // DRMPROFILECONFIG
|
|
@ -0,0 +1,866 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>drmProfileConfig</class>
|
||||
<widget class="QWidget" name="drmProfileConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>434</width>
|
||||
<height>330</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="Profile1">
|
||||
<attribute name="title">
|
||||
<string>Profile 1</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Profile Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="namePF1LineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="drmModeLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="drmPF1ModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>E</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="drmBandwidthLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BW</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="drmPF1BandwidthComboBox">
|
||||
<property name="currentText">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.5 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="drmQAMLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QAM</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="drmPF1QAMComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>64</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="drmInterleavelabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interleave</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="drmPF1InterleaveComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Short</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Long</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="drmProtectionLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prot.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="drmPF1ProtectionComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="drmReadSolomonLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rs</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="drmPF1ReedSolomonComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS4</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="Profile2">
|
||||
<attribute name="title">
|
||||
<string>Profile 2</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Profile Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="namePF2LineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="drmModeLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="drmPF2ModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>E</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="drmBandwidthLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BW</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="drmPF2BandwidthComboBox">
|
||||
<property name="currentText">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.5 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="drmQAMLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QAM</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="drmPF2QAMComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>64</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="drmInterleavelabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interleave</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="drmPF2InterleaveComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Short</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Long</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="drmProtectionLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prot.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="drmPF2ProtectionComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="drmReadSolomonLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rs</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="drmPF2ReedSolomonComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS4</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="Profile3">
|
||||
<attribute name="title">
|
||||
<string>Profile 3</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Profile Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="namePF3LineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="drmModeLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="drmPF3ModeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>A</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>E</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="drmBandwidthLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BW</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="drmPF3BandwidthComboBox">
|
||||
<property name="currentText">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.2 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2.5 kHz</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="drmQAMLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QAM</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="drmPF3QAMComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>64</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="drmInterleavelabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Interleave</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="drmPF3InterleaveComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Short</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Long</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="drmProtectionLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Prot.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="drmPF3ProtectionComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>High</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Low</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="drmReadSolomonLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>30</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Rs</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="drmPF3ReedSolomonComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS2</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS3</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>RS4</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>121</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,251 @@
|
|||
#include "frequencyselectwidget.h"
|
||||
#include "ui_frequencyselectwidget.h"
|
||||
|
||||
QStringList freqList;
|
||||
QStringList modeList;
|
||||
QStringList sbModeList;
|
||||
QString additionalCommand;
|
||||
bool additionalCommandHex;
|
||||
|
||||
frequencySelectWidget::frequencySelectWidget(QWidget *parent) :baseConfig(parent),
|
||||
ui(new Ui::frequencySelectWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QStringList sl;
|
||||
sl<<"Frequencyy"<<"Mode"<<"Modulation";
|
||||
ui->tableWidget->setAlternatingRowColors (false);
|
||||
ui->tableWidget->setColumnCount(3);
|
||||
ui->tableWidget->setHorizontalHeaderLabels(sl);
|
||||
connect(ui->tableWidget,SIGNAL(itemChanged(QTableWidgetItem *)),this,SLOT(slotItemChanged()));
|
||||
connect(ui->tableWidget,SIGNAL(cellClicked(int,int)),this,SLOT(slotCellClicked(int,int)));
|
||||
connect(ui->addFreqPushButton,SIGNAL(clicked()),this,SLOT(slotFreqAdd()));
|
||||
connect(ui->deleteFreqPushButton,SIGNAL(clicked()),this,SLOT(slotFreqDelete()));
|
||||
connect(ui->moveUpFreqPushButton,SIGNAL(clicked()),this,SLOT(slotFreqUp()));
|
||||
connect(ui->moveDownFreqPushButton,SIGNAL(clicked()),this,SLOT(slotFreqDown()));
|
||||
lastRowSelected=-1;
|
||||
}
|
||||
|
||||
frequencySelectWidget::~frequencySelectWidget()
|
||||
{
|
||||
writeSettings();
|
||||
delete ui;
|
||||
|
||||
}
|
||||
|
||||
void frequencySelectWidget::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("FREQSELECT");
|
||||
freqList=qSettings.value("frequencyList",QStringList()).toStringList();
|
||||
modeList=qSettings.value("modeList",QStringList()).toStringList();
|
||||
sbModeList=qSettings.value("sbModeList",QStringList()).toStringList();
|
||||
additionalCommand=qSettings.value("additionalCommand",QString()).toString();
|
||||
additionalCommandHex=qSettings.value("additionalCommandHex",false).toBool();
|
||||
if(modeList.count()!=freqList.count() || sbModeList.count()!=freqList.count())
|
||||
{
|
||||
// invalid config
|
||||
freqList.clear();
|
||||
modeList.clear();
|
||||
sbModeList.clear();
|
||||
}
|
||||
setParams();
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void frequencySelectWidget::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("FREQSELECT");
|
||||
qSettings.setValue("frequencyList",freqList);
|
||||
qSettings.setValue("modeList",modeList);
|
||||
qSettings.setValue("sbModeList",sbModeList);
|
||||
qSettings.setValue("additionalCommand",additionalCommand);
|
||||
qSettings.setValue("additionalCommandHex",additionalCommandHex);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void frequencySelectWidget::constructTable()
|
||||
{
|
||||
int i;
|
||||
while(ui->tableWidget->rowCount()>0)
|
||||
{
|
||||
ui->tableWidget->removeRow(0);
|
||||
}
|
||||
ui->tableWidget->setRowCount(freqList.count());
|
||||
|
||||
for(i=0;i<freqList.count();)
|
||||
{
|
||||
if(!freqList.at(i).isEmpty())
|
||||
{
|
||||
createEntry(i++);
|
||||
}
|
||||
else
|
||||
{
|
||||
freqList.takeAt(i);
|
||||
modeList.takeAt(i);
|
||||
sbModeList.takeAt(i);
|
||||
ui->tableWidget->setRowCount(freqList.count());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void frequencySelectWidget:: getParams()
|
||||
{
|
||||
int i;
|
||||
bool ok;
|
||||
freqList.clear();
|
||||
modeList.clear();
|
||||
sbModeList.clear();
|
||||
for(i=0;i<ui->tableWidget->rowCount();i++)
|
||||
{
|
||||
ui->tableWidget->item(i,0)->text().toDouble(&ok);
|
||||
{
|
||||
if (!ok)
|
||||
{
|
||||
blockSignals(true);
|
||||
ui->tableWidget->item(i,0)->setText("");
|
||||
blockSignals(false);
|
||||
}
|
||||
}
|
||||
freqList.append(ui->tableWidget->item(i,0)->text());
|
||||
modeList.append(((QComboBox *)ui->tableWidget->cellWidget(i,1))->currentText());
|
||||
sbModeList.append(((QComboBox *)ui->tableWidget->cellWidget(i,2))->currentText());
|
||||
}
|
||||
getValue(additionalCommand,ui->additionalCommandLineEdit);
|
||||
getValue(additionalCommandHex,ui->additionalCommandHexCheckBox);
|
||||
}
|
||||
|
||||
void frequencySelectWidget::setParams()
|
||||
{
|
||||
constructTable();
|
||||
setValue(additionalCommand,ui->additionalCommandLineEdit);
|
||||
setValue(additionalCommandHex,ui->additionalCommandHexCheckBox);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void frequencySelectWidget::slotFreqAdd()
|
||||
{
|
||||
freqList.append("");
|
||||
modeList.append("SSTV");
|
||||
sbModeList.append("LSB");
|
||||
createEntry(freqList.count()-1);
|
||||
}
|
||||
|
||||
void frequencySelectWidget::slotFreqDelete()
|
||||
{
|
||||
int curRow=lastRowSelected;
|
||||
freqList.takeAt(curRow);
|
||||
modeList.takeAt(curRow);
|
||||
sbModeList.takeAt(curRow);
|
||||
constructTable();
|
||||
if((curRow<freqList.count()) && (curRow!=0))
|
||||
{
|
||||
ui->tableWidget->setCurrentCell(curRow-1,0);
|
||||
ui->tableWidget->item(curRow-1, 0)->setSelected(true);
|
||||
setLastRowSelected();
|
||||
}
|
||||
}
|
||||
void frequencySelectWidget::slotFreqUp()
|
||||
{
|
||||
int curRow=lastRowSelected;
|
||||
QString f,m,sb;
|
||||
if(curRow>0)
|
||||
{
|
||||
f=freqList.at(curRow-1);
|
||||
m=modeList.at(curRow-1);
|
||||
sb=sbModeList.at(curRow-1);
|
||||
freqList[curRow-1]=freqList.at(curRow);
|
||||
modeList[curRow-1]=modeList.at(curRow);
|
||||
sbModeList[curRow-1]=sbModeList.at(curRow);
|
||||
freqList[curRow]=f;
|
||||
modeList[curRow]=m;
|
||||
sbModeList[curRow]=sb;
|
||||
constructTable();
|
||||
ui->tableWidget->setCurrentCell(curRow-1,0);
|
||||
ui->tableWidget->item(curRow-1, 0)->setSelected(true);
|
||||
setLastRowSelected();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void frequencySelectWidget::slotFreqDown()
|
||||
{
|
||||
int curRow=lastRowSelected;
|
||||
QString f,m,sb;
|
||||
if(curRow<(ui->tableWidget->rowCount()-1) && curRow>=0)
|
||||
{
|
||||
f=freqList.at(curRow+1);
|
||||
m=modeList.at(curRow+1);
|
||||
sb=sbModeList.at(curRow+1);
|
||||
freqList[curRow+1]=freqList.at(curRow);
|
||||
modeList[curRow+1]=modeList.at(curRow);
|
||||
sbModeList[curRow+1]=sbModeList.at(curRow);
|
||||
freqList[curRow]=f;
|
||||
modeList[curRow]=m;
|
||||
sbModeList[curRow]=sb;
|
||||
constructTable();
|
||||
ui->tableWidget->setCurrentCell(curRow+1,0);
|
||||
ui->tableWidget->item(curRow+1, 0)->setSelected(true);
|
||||
setLastRowSelected();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void frequencySelectWidget::createEntry(int row)
|
||||
{
|
||||
QComboBox *cb, *sb;
|
||||
QTableWidgetItem *ct;
|
||||
if(row>(ui->tableWidget->rowCount()-1))
|
||||
{
|
||||
ui->tableWidget->setRowCount(row+1);
|
||||
}
|
||||
ui->tableWidget-> blockSignals(true);
|
||||
ct=new QTableWidgetItem();
|
||||
ct->setText(freqList.at(row));
|
||||
ui->tableWidget->setItem(row,0,ct);
|
||||
|
||||
cb=new QComboBox(this);
|
||||
cb->addItem("SSTV");
|
||||
cb->addItem("DRM");
|
||||
// cb->setCurrentText(modeList.at(row));
|
||||
setValue(modeList.at(row),cb);
|
||||
|
||||
ui->tableWidget->setCellWidget(row,1,cb);
|
||||
|
||||
sb=new QComboBox(this);
|
||||
sb->addItem("LSB");
|
||||
sb->addItem("USB");
|
||||
sb->addItem("FM");
|
||||
sb->addItem("AM");
|
||||
|
||||
// sb->setCurrentText(sbModeList.at(row));
|
||||
setValue(sbModeList.at(row),sb);
|
||||
ui->tableWidget->setCellWidget(row,2,sb);
|
||||
connect(cb,SIGNAL(currentIndexChanged(int)),SLOT(slotItemChanged()));
|
||||
connect(sb,SIGNAL(currentIndexChanged(int)),SLOT(slotItemChanged()));
|
||||
ui->tableWidget->blockSignals(false);
|
||||
}
|
||||
|
||||
void frequencySelectWidget::slotItemChanged()
|
||||
{
|
||||
getParams();
|
||||
}
|
||||
|
||||
void frequencySelectWidget::setLastRowSelected()
|
||||
{
|
||||
lastRowSelected=ui->tableWidget->currentRow();
|
||||
if(lastRowSelected>=ui->tableWidget->rowCount())
|
||||
{
|
||||
lastRowSelected=-1;
|
||||
}
|
||||
}
|
||||
void frequencySelectWidget::slotCellClicked(int r,int)
|
||||
{
|
||||
lastRowSelected=r;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
#ifndef FREQUENCYSELECTWIDGET_H
|
||||
#define FREQUENCYSELECTWIDGET_H
|
||||
#include "baseconfig.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
extern QStringList freqList;
|
||||
extern QStringList modeList;
|
||||
extern QStringList sbModeList;
|
||||
extern QString additionalCommand;
|
||||
extern bool additionalCommandHex;
|
||||
|
||||
namespace Ui {
|
||||
class frequencySelectWidget;
|
||||
}
|
||||
|
||||
class frequencySelectWidget : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit frequencySelectWidget(QWidget *parent = 0);
|
||||
~frequencySelectWidget();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private slots:
|
||||
void slotFreqAdd();
|
||||
void slotFreqDelete();
|
||||
void slotFreqUp();
|
||||
void slotFreqDown();
|
||||
void slotItemChanged();
|
||||
void slotCellClicked(int r, int);
|
||||
|
||||
private:
|
||||
Ui::frequencySelectWidget *ui;
|
||||
void constructTable();
|
||||
void createEntry(int row);
|
||||
void setLastRowSelected();
|
||||
int lastRowSelected;
|
||||
|
||||
};
|
||||
|
||||
#endif // FREQUENCYSELECTWIDGET_H
|
|
@ -0,0 +1,164 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>frequencySelectWidget</class>
|
||||
<widget class="QWidget" name="frequencySelectWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>788</width>
|
||||
<height>473</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="2,0">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,0,0">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
<item>
|
||||
<widget class="QPushButton" name="addFreqPushButton">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="deleteFreqPushButton">
|
||||
<property name="text">
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="moveUpFreqPushButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qsstv.qrc">
|
||||
<normaloff>:/icons/up.png</normaloff>:/icons/up.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="moveDownFreqPushButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../qsstv.qrc">
|
||||
<normaloff>:/icons/down.png</normaloff>:/icons/down.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>Enter the frequency in MHz and select the mode.
|
||||
Example:
|
||||
14.230 SSTV USB
|
||||
7.058 DRM LSB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Hamlib Data Command</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="additionalCommandLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="additionalCommandHexCheckBox">
|
||||
<property name="text">
|
||||
<string>Hex</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../qsstv.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,153 @@
|
|||
#include "ftpconfig.h"
|
||||
#include "ui_ftpconfig.h"
|
||||
#include "ftp.h"
|
||||
|
||||
#include <QImageWriter>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
bool enableFTP;
|
||||
int ftpPort;
|
||||
QString ftpRemoteHost;
|
||||
QString ftpRemoteSSTVDirectory;
|
||||
QString ftpRemoteDRMDirectory;
|
||||
QString ftpLogin;
|
||||
QString ftpPassword;
|
||||
QString ftpDefaultImageFormat;
|
||||
eftpSaveFormat ftpSaveFormat;
|
||||
int ftpNumImages;
|
||||
|
||||
ftpConfig::ftpConfig(QWidget *parent) : baseConfig (parent), ui(new Ui::ftpConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
foreach (QByteArray format, QImageWriter::supportedImageFormats())
|
||||
{
|
||||
QString text = tr("%1").arg(QString(format));
|
||||
ui->ftpDefaultImageFormatComboBox->addItem(text);
|
||||
}
|
||||
connect(ui->testFTPPushButton,SIGNAL(clicked()),SLOT(slotTestFTPPushButton()));
|
||||
}
|
||||
|
||||
ftpConfig::~ftpConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ftpConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("FTPCONFIG");
|
||||
enableFTP=qSettings.value("enableFTP",false).toBool();
|
||||
ftpPort=qSettings.value("ftpPort",21).toInt();
|
||||
ftpRemoteHost=qSettings.value("ftpRemoteHost","").toString();
|
||||
ftpRemoteSSTVDirectory=qSettings.value("ftpRemoteSSTVDirectory","").toString();
|
||||
ftpRemoteDRMDirectory=qSettings.value("ftpRemoteDRMDirectory","").toString();
|
||||
ftpLogin=qSettings.value("ftpLogin","").toString();
|
||||
ftpPassword=qSettings.value("ftpPassword","").toString();
|
||||
ftpDefaultImageFormat=qSettings.value("ftpDefaultImageFormat","png").toString();
|
||||
ftpSaveFormat=(eftpSaveFormat)qSettings.value("ftpSaveFormat",0).toInt();
|
||||
ftpNumImages=qSettings.value("ftpNumImages",30).toInt();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void ftpConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("FTPCONFIG");
|
||||
qSettings.setValue("enableFTP",enableFTP);
|
||||
qSettings.setValue("ftpPort",ftpPort);
|
||||
qSettings.setValue("ftpRemoteHost",ftpRemoteHost);
|
||||
qSettings.setValue("ftpRemoteSSTVDirectory",ftpRemoteSSTVDirectory);
|
||||
qSettings.setValue("ftpRemoteDRMDirectory",ftpRemoteDRMDirectory);
|
||||
qSettings.setValue("ftpLogin",ftpLogin);
|
||||
qSettings.setValue("ftpPassword",ftpPassword);
|
||||
qSettings.setValue("ftpDefaultImageFormat",ftpDefaultImageFormat);
|
||||
qSettings.setValue("ftpSaveFormat",(int)ftpSaveFormat);
|
||||
qSettings.setValue("ftpNumImages",ftpNumImages);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void ftpConfig::getParams()
|
||||
{
|
||||
bool enableFTPCopy=enableFTP;
|
||||
int ftpPortCopy=ftpPort;
|
||||
QString ftpRemoteHostCopy=ftpRemoteHost;
|
||||
QString ftpRemoteSSTVDirectoryCopy=ftpRemoteSSTVDirectory;
|
||||
QString ftpRemoteDRMDirectoryCopy=ftpRemoteDRMDirectory;
|
||||
QString ftpLoginCopy=ftpLogin;
|
||||
QString ftpPasswordCopy=ftpPassword;
|
||||
QString ftpDefaultImageFormatCopy=ftpDefaultImageFormat;
|
||||
eftpSaveFormat ftpSaveFormatCopy=ftpSaveFormat;
|
||||
|
||||
|
||||
getValue(enableFTP,ui->enableFTPCheckBox);
|
||||
getValue(ftpPort,ui->ftpPortSpinBox);
|
||||
getValue(ftpRemoteHost,ui->remoteHostLineEdit);
|
||||
getValue(ftpNumImages,ui->ftpNumImagesSpinBox);
|
||||
getValue(ftpRemoteSSTVDirectory,ui->remoteSSTVDirectoryLineEdit);
|
||||
getValue(ftpRemoteDRMDirectory,ui->remoteDRMDirectoryLineEdit);
|
||||
getValue(ftpLogin,ui->ftpLoginLineEdit);
|
||||
getValue(ftpPassword,ui->ftpPasswordLineEdit);
|
||||
getValue(ftpDefaultImageFormat,ui->ftpDefaultImageFormatComboBox);
|
||||
if(ui->imageRadioButton->isChecked())
|
||||
{
|
||||
ftpSaveFormat=FTPIM;
|
||||
}
|
||||
else
|
||||
{
|
||||
ftpSaveFormat=FTPFILE;
|
||||
}
|
||||
changed=false;
|
||||
if(enableFTPCopy!=enableFTP
|
||||
|| ftpPortCopy!=ftpPort
|
||||
|| ftpRemoteHostCopy!=ftpRemoteHost
|
||||
|| ftpRemoteSSTVDirectoryCopy!=ftpRemoteSSTVDirectory
|
||||
|| ftpRemoteDRMDirectoryCopy!=ftpRemoteDRMDirectory
|
||||
|| ftpLoginCopy!=ftpLogin
|
||||
|| ftpPasswordCopy!=ftpPassword
|
||||
|| ftpDefaultImageFormatCopy!=ftpDefaultImageFormat
|
||||
|| ftpSaveFormatCopy!=ftpSaveFormat)
|
||||
changed=true;
|
||||
}
|
||||
|
||||
void ftpConfig::setParams()
|
||||
{
|
||||
setValue(enableFTP,ui->enableFTPCheckBox);
|
||||
setValue(ftpPort,ui->ftpPortSpinBox);
|
||||
setValue(ftpRemoteHost,ui->remoteHostLineEdit);
|
||||
setValue(ftpNumImages,ui->ftpNumImagesSpinBox);
|
||||
setValue(ftpRemoteSSTVDirectory,ui->remoteSSTVDirectoryLineEdit);
|
||||
setValue(ftpRemoteDRMDirectory,ui->remoteDRMDirectoryLineEdit);
|
||||
setValue(ftpLogin,ui->ftpLoginLineEdit);
|
||||
setValue(ftpPassword,ui->ftpPasswordLineEdit);
|
||||
if(ftpSaveFormat==FTPIM)
|
||||
{
|
||||
ui->imageRadioButton->setChecked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->filenameRadioButton->setChecked(true);
|
||||
}
|
||||
setValue(ftpDefaultImageFormat,ui->ftpDefaultImageFormatComboBox);
|
||||
}
|
||||
|
||||
|
||||
void ftpConfig::slotTestFTPPushButton()
|
||||
{
|
||||
QString r1,r2;
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
ftpInterface fInt("TestUploadConnection");
|
||||
ui->testFTPPushButton->setDisabled(true);
|
||||
getParams();
|
||||
fInt.setupConnection(ftpRemoteHost,ftpPort,ftpLogin,ftpPassword,ftpRemoteSSTVDirectory);
|
||||
r1=fInt.execFTPTest();
|
||||
fInt.init();
|
||||
fInt.setupConnection(ftpRemoteHost,ftpPort,ftpLogin,ftpPassword,ftpRemoteDRMDirectory);
|
||||
r2=fInt.execFTPTest();
|
||||
QApplication::restoreOverrideCursor();
|
||||
ui->testFTPPushButton->setDisabled(false);
|
||||
QMessageBox::information(this,"Testing Connection","",QString("SSTV: %1\nDRM: %2").arg(r1).arg(r2));
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef FTPCONFIG_H
|
||||
#define FTPCONFIG_H
|
||||
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
|
||||
#define NUMFTPRXIMAGES 30
|
||||
|
||||
enum eftpSaveFormat {FTPIM,FTPFILE};
|
||||
|
||||
extern bool enableFTP;
|
||||
extern int ftpPort;
|
||||
extern QString ftpRemoteHost;
|
||||
extern QString ftpRemoteSSTVDirectory;
|
||||
extern QString ftpRemoteDRMDirectory;
|
||||
extern QString ftpLogin;
|
||||
extern QString ftpPassword;
|
||||
extern QString ftpFilename;
|
||||
extern QString ftpDefaultImageFormat;
|
||||
extern eftpSaveFormat ftpSaveFormat;
|
||||
extern int ftpNumImages;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class ftpConfig;
|
||||
}
|
||||
|
||||
class ftpConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ftpConfig(QWidget *parent = 0);
|
||||
~ftpConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private slots:
|
||||
void slotTestFTPPushButton();
|
||||
|
||||
private:
|
||||
Ui::ftpConfig *ui;
|
||||
};
|
||||
|
||||
#endif // FTPCONFIG_H
|
|
@ -0,0 +1,585 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ftpConfig</class>
|
||||
<widget class="QWidget" name="ftpConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>751</width>
|
||||
<height>517</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableFTPCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable File Upload to FTP Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ftpPortLabel">
|
||||
<property name="text">
|
||||
<string>FTP Port</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="ftpPortSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>21</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="defaultImageModeLabel">
|
||||
<property name="text">
|
||||
<string>Default Image Format</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="ftpDefaultImageFormatComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="remoteHostLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Host</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="remoteHostLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="ftploginLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ftpLoginLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="passwordLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="ftpPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="remoteSSTVDirectoryLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directory SSTV</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="remoteSSTVDirectoryLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="remoteDRMDirectoryLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directory DRM</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="remoteDRMDirectoryLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Image store</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="imageRadioButton">
|
||||
<property name="text">
|
||||
<string>image1 to image</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="ftpNumImagesSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="filenameRadioButton">
|
||||
<property name="text">
|
||||
<string>filename</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>This ftp server is used to upload your received pictures. You can save them as a rotating sequence of images (image1 being the latest and image30 being the oldest) or simply under their own filename.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="testFTPPushButton">
|
||||
<property name="text">
|
||||
<string>Test connection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<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>6</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,119 @@
|
|||
#include "guiconfig.h"
|
||||
#include "ui_guiconfig.h"
|
||||
#include <QImageWriter>
|
||||
#include <QColorDialog>
|
||||
|
||||
|
||||
int galleryRows;
|
||||
int galleryColumns;
|
||||
bool imageStretch;
|
||||
QColor backGroundColor;
|
||||
QColor imageBackGroundColor;
|
||||
bool slowCPU;
|
||||
bool lowRes;
|
||||
|
||||
guiConfig::guiConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::guiConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
backGroundColorChanged=false;
|
||||
connect(ui->backgroundColorPushButton,SIGNAL(clicked()),SLOT(slotBGColorSelect()));
|
||||
connect(ui->imageBackgroundColorPushButton,SIGNAL(clicked()),SLOT(slotIBGColorSelect()));
|
||||
}
|
||||
|
||||
guiConfig::~guiConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void guiConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("GUI");
|
||||
galleryRows=qSettings.value("galleryRows",4).toInt();
|
||||
galleryColumns=qSettings.value("galleryColumns",4).toInt();
|
||||
imageStretch=qSettings.value("imageStretch",true).toBool();
|
||||
backGroundColor=qSettings.value("backGroundColor",QColor(128,128,128)).value<QColor>();
|
||||
imageBackGroundColor=qSettings.value("imageBackGroundColor",QColor(0,0,128)).value<QColor>();
|
||||
slowCPU=qSettings.value("slowCPU",false).toBool();
|
||||
lowRes=qSettings.value("lowRes",false).toBool();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void guiConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("GUI");
|
||||
qSettings.setValue("galleryRows",galleryRows);
|
||||
qSettings.setValue("galleryColumns",galleryColumns);
|
||||
qSettings.setValue("imageStretch",imageStretch);
|
||||
qSettings.setValue("backGroundColor",backGroundColor);
|
||||
qSettings.setValue("imageBackGroundColor",imageBackGroundColor);
|
||||
qSettings.setValue("slowCPU",slowCPU);
|
||||
qSettings.setValue("lowRes",lowRes);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void guiConfig::getParams()
|
||||
{
|
||||
int galleryRowsCopy=galleryRows;
|
||||
int galleryColumnsCopy=galleryColumns;
|
||||
getValue(galleryRows,ui->rowsSpinBox);
|
||||
getValue(galleryColumns, ui->columnsSpinBox);
|
||||
changed=false;
|
||||
if( galleryRowsCopy!=galleryRows || galleryColumnsCopy!=galleryColumns)
|
||||
changed=true;
|
||||
getValue(imageStretch,ui->stretchCheckBox);
|
||||
getValue(slowCPU,ui->slowCPUCheckBox);
|
||||
getValue(lowRes,ui->lowResCheckBox);
|
||||
}
|
||||
|
||||
void guiConfig::setParams()
|
||||
{
|
||||
setValue(galleryRows,ui->rowsSpinBox);
|
||||
setValue(galleryColumns, ui->columnsSpinBox);
|
||||
setValue(imageStretch,ui->stretchCheckBox);
|
||||
setColorLabel(backGroundColor,false);
|
||||
setColorLabel(imageBackGroundColor,true);
|
||||
setValue(slowCPU,ui->slowCPUCheckBox);
|
||||
setValue(lowRes,ui->lowResCheckBox);
|
||||
}
|
||||
|
||||
|
||||
void guiConfig::slotBGColorSelect()
|
||||
{
|
||||
QColor c;
|
||||
c=QColorDialog::getColor(backGroundColor,this,"",QColorDialog::ShowAlphaChannel);
|
||||
setColorLabel(c,false);
|
||||
}
|
||||
|
||||
void guiConfig::slotIBGColorSelect()
|
||||
{
|
||||
QColor c;
|
||||
c=QColorDialog::getColor(imageBackGroundColor,this,"",QColorDialog::ShowAlphaChannel);
|
||||
setColorLabel(c,true);
|
||||
}
|
||||
|
||||
|
||||
void guiConfig::setColorLabel(QColor c,bool image)
|
||||
{
|
||||
if (c.isValid())
|
||||
{
|
||||
if(!image)
|
||||
{
|
||||
backGroundColorChanged=true;
|
||||
QPalette palette = ui->backGroundColorLabel->palette();
|
||||
palette.setColor(ui->backGroundColorLabel->backgroundRole(), c);
|
||||
ui->backGroundColorLabel->setPalette(palette);
|
||||
backGroundColor=c;
|
||||
}
|
||||
else
|
||||
{
|
||||
QPalette palette = ui->imageBackGroundColorLabel->palette();
|
||||
palette.setColor(ui->imageBackGroundColorLabel->backgroundRole(), c);
|
||||
ui->imageBackGroundColorLabel->setPalette(palette);
|
||||
imageBackGroundColor=c;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
#ifndef GUICONFIG_H
|
||||
#define GUICONFIG_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern int galleryRows;
|
||||
extern int galleryColumns;
|
||||
extern bool imageStretch;
|
||||
extern QString defaultImageFormat;
|
||||
extern QColor backGroundColor;
|
||||
extern QColor imageBackGroundColor;
|
||||
extern bool slowCPU;
|
||||
extern bool lowRes;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class guiConfig;
|
||||
}
|
||||
|
||||
class guiConfig :public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit guiConfig(QWidget *parent = 0);
|
||||
~guiConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
bool backGroundColorChanged;
|
||||
private slots:
|
||||
void slotBGColorSelect();
|
||||
void slotIBGColorSelect();
|
||||
|
||||
private:
|
||||
Ui::guiConfig *ui;
|
||||
void setColorLabel(QColor c, bool image);
|
||||
|
||||
};
|
||||
|
||||
#endif // GUICONFIG_H
|
|
@ -0,0 +1,267 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>guiConfig</class>
|
||||
<widget class="QWidget" name="guiConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>548</width>
|
||||
<height>446</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Images</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="backgroundColorPushButton">
|
||||
<property name="text">
|
||||
<string>Background Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="stretchCheckBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stretch</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="imageBackgroundColorPushButton">
|
||||
<property name="text">
|
||||
<string>Image Background color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="backGroundColorLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="imageBackGroundColorLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Gallery</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Rows</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="columnsSpinBox"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="rowsSpinBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Columns</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Exit and restart QSSTV If slow CPU or Low Resolution has changed.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Performance</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="slowCPUCheckBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check if slow CPU</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Resolution</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="lowResCheckBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check if Low Screen Resolution</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>238</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,121 @@
|
|||
#include "hybridconfig.h"
|
||||
#include "ui_hybridconfig.h"
|
||||
#include "ftp.h"
|
||||
#include "hybridcrypt.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
bool enableHybridRx;
|
||||
//bool enableSpecialServer;
|
||||
int hybridFtpPort;
|
||||
QString hybridFtpRemoteHost;
|
||||
QString hybridFtpRemoteDirectory;
|
||||
QString hybridFtpLogin;
|
||||
QString hybridFtpPassword;
|
||||
QString hybridFtpHybridFilesDirectory;
|
||||
|
||||
|
||||
hybridConfig::hybridConfig(QWidget *parent) :baseConfig(parent), ui(new Ui::hybridConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// connect(testFTPPushButton,SIGNAL(clicked()),SLOT(slotTestFTPPushButton()));
|
||||
connect(ui->testHybridPushButton,SIGNAL(clicked()),SLOT(slotTestHybridPushButton()));
|
||||
}
|
||||
|
||||
hybridConfig::~hybridConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void hybridConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("HYBRID");
|
||||
enableHybridRx=qSettings.value("enableHybridRx",true).toBool();
|
||||
// enableSpecialServer=qSettings.value("enableSpecialServer",false).toBool();
|
||||
hybridFtpPort=qSettings.value("hybridFtpPort",21).toInt();
|
||||
hybridFtpRemoteHost=qSettings.value("hybridFtpRemoteHost","").toString();
|
||||
hybridFtpRemoteDirectory=qSettings.value("hybridFtpRemoteDirectory","").toString();
|
||||
hybridFtpLogin=qSettings.value("hybridFtpLogin","").toString();
|
||||
hybridFtpPassword=qSettings.value("hybridFtpPassword","").toString();
|
||||
hybridFtpHybridFilesDirectory=qSettings.value("hybridFtpHybridFilesDirectory","HybridFiles1").toString();
|
||||
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void hybridConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("HYBRID");
|
||||
qSettings.setValue("enableHybridRx",enableHybridRx);
|
||||
// qSettings.setValue("enableSpecialServer",enableSpecialServer);
|
||||
qSettings.setValue("hybridFtpPort",hybridFtpPort);
|
||||
qSettings.setValue("hybridFtpRemoteHost",hybridFtpRemoteHost);
|
||||
qSettings.setValue("hybridFtpRemoteDirectory",hybridFtpRemoteDirectory);
|
||||
qSettings.setValue("hybridFtpLogin",hybridFtpLogin);
|
||||
qSettings.setValue("hybridFtpPassword",hybridFtpPassword);
|
||||
qSettings.setValue("hybridFtpHybridFilesDirectory",hybridFtpHybridFilesDirectory);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void hybridConfig::getParams()
|
||||
{
|
||||
bool enableHybridRxCopy=enableHybridRx;
|
||||
// bool enableSpecialServerCopy=enableSpecialServer;
|
||||
int hybridFtpPortCopy=hybridFtpPort;
|
||||
QString hybridFtpRemoteHostCopy=hybridFtpRemoteHost;
|
||||
QString hybridFtpRemoteDirectoryCopy=hybridFtpRemoteDirectory;
|
||||
QString hybridFtpLoginCopy=hybridFtpLogin;
|
||||
QString hybridFtpPasswordCopy=hybridFtpPassword;
|
||||
|
||||
|
||||
getValue(enableHybridRx,ui->enableHybridRxCheckBox);
|
||||
// getValue(enableSpecialServer,ui->enableSpecialServerCheckBox);
|
||||
getValue(hybridFtpPort,ui->hybridFtpPortSpinBox);
|
||||
getValue(hybridFtpRemoteHost,ui->hybridRemoteHostLineEdit);
|
||||
getValue(hybridFtpRemoteDirectory,ui->hybridRemoteDirectoryLineEdit);
|
||||
getValue(hybridFtpLogin,ui->hybridFtpLoginLineEdit);
|
||||
getValue(hybridFtpPassword,ui->hybridFtpPasswordLineEdit);
|
||||
getValue(hybridFtpHybridFilesDirectory,ui->hybridFilesDirectoryLineEdit);
|
||||
changed=false;
|
||||
if( enableHybridRxCopy!=enableHybridRx
|
||||
// || enableSpecialServerCopy!=enableSpecialServer
|
||||
|| hybridFtpPortCopy!=hybridFtpPort
|
||||
|| hybridFtpRemoteHostCopy!=hybridFtpRemoteHost
|
||||
|| hybridFtpRemoteDirectoryCopy!=hybridFtpRemoteDirectory
|
||||
|| hybridFtpLoginCopy!=hybridFtpLogin
|
||||
|| hybridFtpPasswordCopy!=hybridFtpPassword)
|
||||
changed=true;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void hybridConfig::setParams()
|
||||
{
|
||||
setValue(enableHybridRx,ui->enableHybridRxCheckBox);
|
||||
// setValue(enableSpecialServer,ui->enableSpecialServerCheckBox);
|
||||
setValue(hybridFtpPort,ui->hybridFtpPortSpinBox);
|
||||
setValue(hybridFtpRemoteHost,ui->hybridRemoteHostLineEdit);
|
||||
setValue(hybridFtpRemoteDirectory,ui->hybridRemoteDirectoryLineEdit);
|
||||
setValue(hybridFtpLogin,ui->hybridFtpLoginLineEdit);
|
||||
setValue(hybridFtpPassword,ui->hybridFtpPasswordLineEdit);
|
||||
setValue(hybridFtpHybridFilesDirectory,ui->hybridFilesDirectoryLineEdit);
|
||||
}
|
||||
|
||||
|
||||
void hybridConfig::slotTestHybridPushButton()
|
||||
{
|
||||
QString msg;
|
||||
ftpInterface fInt("TestHybridConnection");
|
||||
ui->testHybridPushButton->setDisabled(true);
|
||||
getParams();
|
||||
fInt.setupConnection(hybridFtpRemoteHost,hybridFtpPort,hybridFtpLogin,hybridFtpPassword,hybridFtpRemoteDirectory+"/"+hybridFtpHybridFilesDirectory);
|
||||
// fInt.setupConnection(hc.host(),hc.port(),hc.user(),hc.passwd(),hc.dir()+"/"+hybridFtpHybridFilesDirectory);
|
||||
msg=fInt.execFTPTest();
|
||||
ui->testHybridPushButton->setDisabled(false);
|
||||
QMessageBox::information(this,"Test Connection",msg);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef HYBRIDCONFIG_H
|
||||
#define HYBRIDCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern bool enableHybridRx;
|
||||
//extern bool enableSpecialServer;
|
||||
extern int hybridFtpPort;
|
||||
extern QString hybridFtpRemoteHost;
|
||||
extern QString hybridFtpRemoteDirectory;
|
||||
extern QString hybridFtpLogin;
|
||||
extern QString hybridFtpPassword;
|
||||
extern QString hybridFtpHybridFilesDirectory;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class hybridConfig;
|
||||
}
|
||||
|
||||
class hybridConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit hybridConfig(QWidget *parent = 0);
|
||||
~hybridConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
private slots:
|
||||
void slotTestHybridPushButton();
|
||||
|
||||
private:
|
||||
Ui::hybridConfig *ui;
|
||||
};
|
||||
|
||||
#endif // HYBRIDCONFIG_H
|
|
@ -0,0 +1,450 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>hybridConfig</class>
|
||||
<widget class="QWidget" name="hybridConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>730</width>
|
||||
<height>372</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableHybridRxCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable Reception in Hybrid Mode </string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ftpPortLabel_2">
|
||||
<property name="text">
|
||||
<string>FTP Port</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="hybridFtpPortSpinBox">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>21</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridRemoteHostLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Host</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridRemoteHostLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridFtpLoginLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridFtpLoginLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridPasswordLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridFtpPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_8">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridRemoteDirectoryLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directory</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridRemoteDirectoryLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_9">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridRemoteDirectoryLabel_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hybrid Files Directory</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridFilesDirectoryLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="testHybridPushButton">
|
||||
<property name="text">
|
||||
<string>Test connection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<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>38</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,123 @@
|
|||
#include "hybridnotifyconfig.h"
|
||||
#include "ui_hybridnotifyconfig.h"
|
||||
#include "ftp.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
|
||||
bool enableHybridNotify;
|
||||
bool enableHybridNotifySnoop;
|
||||
int hybridNotifyPort;
|
||||
QString hybridNotifyRemoteHost;
|
||||
QString hybridNotifyRemoteDir;
|
||||
QString hybridNotifyLogin;
|
||||
QString hybridNotifyPassword;
|
||||
QString hybridNotifyDir;
|
||||
|
||||
|
||||
hybridNotifyConfig::hybridNotifyConfig(QWidget *parent) :baseConfig(parent), ui(new Ui::hybridNotifyConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// connect(testFTPPushButton,SIGNAL(clicked()),SLOT(slotTestFTPPushButton()));
|
||||
connect(ui->testNotifyPushButton,SIGNAL(clicked()),SLOT(slotTestNotifyPushButton()));
|
||||
}
|
||||
|
||||
hybridNotifyConfig::~hybridNotifyConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void hybridNotifyConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("HYBRID_NOTIFY");
|
||||
enableHybridNotify=qSettings.value("enableHybridNotify",true).toBool();
|
||||
enableHybridNotifySnoop=qSettings.value("enableHybridNotifySnoop",true).toBool();
|
||||
hybridNotifyPort=qSettings.value("hybridNotifyPort",21).toInt();
|
||||
hybridNotifyRemoteHost=qSettings.value("hybridNotifyRemoteHost","").toString();
|
||||
hybridNotifyRemoteDir=qSettings.value("hybridNotifyRemoteDir","").toString();
|
||||
hybridNotifyLogin=qSettings.value("hybridNotifyLogin","").toString();
|
||||
hybridNotifyPassword=qSettings.value("hybridNotifyPassword","").toString();
|
||||
hybridNotifyDir=qSettings.value("hybridNotifyDirectory","RxOkNotifications1").toString();
|
||||
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void hybridNotifyConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("HYBRID_NOTIFY");
|
||||
qSettings.setValue("enableHybridNotify",enableHybridNotify);
|
||||
qSettings.setValue("enableHybridNotifySnoop",enableHybridNotifySnoop);
|
||||
qSettings.setValue("hybridNotifyPort",hybridNotifyPort);
|
||||
qSettings.setValue("hybridNotifyRemoteHost",hybridNotifyRemoteHost);
|
||||
qSettings.setValue("hybridNotifyRemoteDir",hybridNotifyRemoteDir);
|
||||
qSettings.setValue("hybridNotifyLogin",hybridNotifyLogin);
|
||||
qSettings.setValue("hybridNotifyPassword",hybridNotifyPassword);
|
||||
qSettings.setValue("hybridNotifyDir",hybridNotifyDir);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void hybridNotifyConfig::getParams()
|
||||
{
|
||||
bool enableHybridNotifyCopy=enableHybridNotify;
|
||||
bool enableHybridNotifySnoopCopy=enableHybridNotifySnoop;
|
||||
int hybridNotifyPortCopy=hybridNotifyPort;
|
||||
QString hybridNotifyRemoteHostCopy=hybridNotifyRemoteHost;
|
||||
QString hybridNotifyRemoteDirCopy=hybridNotifyRemoteDir;
|
||||
QString hybridNotifyDirCopy=hybridNotifyDir;
|
||||
QString hybridNotifyLoginCopy=hybridNotifyLogin;
|
||||
QString hybridNotifyPasswordCopy=hybridNotifyPassword;
|
||||
|
||||
|
||||
getValue(enableHybridNotify,ui->enableHybridNotifyCheckBox);
|
||||
getValue(enableHybridNotifySnoop,ui->enableHybridNotifySnoopCheckBox);
|
||||
getValue(hybridNotifyPort,ui->hybridNotifyPortSpinBox);
|
||||
getValue(hybridNotifyRemoteHost,ui->hybridNotifyRemoteHostLineEdit);
|
||||
getValue(hybridNotifyRemoteDir,ui->hybridNotifyRemoteDirLineEdit);
|
||||
getValue(hybridNotifyLogin,ui->hybridNotifyLoginLineEdit);
|
||||
getValue(hybridNotifyPassword,ui->hybridNotifyPasswordLineEdit);
|
||||
getValue(hybridNotifyDir,ui->hybridNotifyDirLineEdit);
|
||||
changed=false;
|
||||
if( enableHybridNotifyCopy!=enableHybridNotify
|
||||
|| enableHybridNotifySnoopCopy!=enableHybridNotifySnoop
|
||||
|| hybridNotifyPortCopy!=hybridNotifyPort
|
||||
|| hybridNotifyRemoteHostCopy!=hybridNotifyRemoteHost
|
||||
|| hybridNotifyRemoteDirCopy!=hybridNotifyRemoteDir
|
||||
|| hybridNotifyDirCopy!=hybridNotifyDir
|
||||
|| hybridNotifyLoginCopy!=hybridNotifyLogin
|
||||
|| hybridNotifyPasswordCopy!=hybridNotifyPassword)
|
||||
changed=true;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void hybridNotifyConfig::setParams()
|
||||
{
|
||||
setValue(enableHybridNotify,ui->enableHybridNotifyCheckBox);
|
||||
setValue(enableHybridNotifySnoop,ui->enableHybridNotifySnoopCheckBox);
|
||||
setValue(hybridNotifyPort,ui->hybridNotifyPortSpinBox);
|
||||
setValue(hybridNotifyRemoteHost,ui->hybridNotifyRemoteHostLineEdit);
|
||||
setValue(hybridNotifyRemoteDir,ui->hybridNotifyRemoteDirLineEdit);
|
||||
setValue(hybridNotifyLogin,ui->hybridNotifyLoginLineEdit);
|
||||
setValue(hybridNotifyPassword,ui->hybridNotifyPasswordLineEdit);
|
||||
setValue(hybridNotifyDir,ui->hybridNotifyDirLineEdit);
|
||||
}
|
||||
|
||||
|
||||
void hybridNotifyConfig::slotTestNotifyPushButton()
|
||||
{
|
||||
QString msg;
|
||||
ftpInterface fInt("TestNotifyConnection");
|
||||
ui->testNotifyPushButton->setDisabled(true);
|
||||
getParams();
|
||||
fInt.setupConnection(hybridNotifyRemoteHost,hybridNotifyPort,
|
||||
hybridNotifyLogin,hybridNotifyPassword,hybridNotifyRemoteDir+"/"+hybridNotifyDir);
|
||||
msg=fInt.execFTPTest();
|
||||
ui->testNotifyPushButton->setDisabled(false);
|
||||
|
||||
QMessageBox::information(this,"Test Connection",msg);
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef HYBRIDNOTIFYCONFIG_H
|
||||
#define HYBRIDNOTIFYCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern bool enableHybridNotify;
|
||||
extern bool enableHybridNotifySnoop;
|
||||
extern int hybridNotifyPort;
|
||||
extern QString hybridNotifyRemoteHost;
|
||||
extern QString hybridNotifyRemoteDir;
|
||||
extern QString hybridNotifyLogin;
|
||||
extern QString hybridNotifyPassword;
|
||||
extern QString hybridNotifyDir;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class hybridNotifyConfig;
|
||||
}
|
||||
|
||||
class hybridNotifyConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit hybridNotifyConfig(QWidget *parent = 0);
|
||||
~hybridNotifyConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
private slots:
|
||||
void slotTestNotifyPushButton();
|
||||
|
||||
private:
|
||||
Ui::hybridNotifyConfig *ui;
|
||||
};
|
||||
|
||||
#endif // HYBRIDNOTIFYCONFIG_H
|
|
@ -0,0 +1,469 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>hybridNotifyConfig</class>
|
||||
<widget class="QWidget" name="hybridNotifyConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>806</width>
|
||||
<height>388</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableHybridNotifyCheckBox">
|
||||
<property name="text">
|
||||
<string>Send RX Notifications in Hybrid Mode</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableHybridNotifySnoopCheckBox">
|
||||
<property name="text">
|
||||
<string>Check who else got it</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ftpPortLabel_2">
|
||||
<property name="text">
|
||||
<string>FTP Port</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="hybridNotifyPortSpinBox">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>10000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>21</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridNotifyRemoteHostLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Host</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridNotifyRemoteHostLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridNotifyLoginLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Login</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridNotifyLoginLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridNotifyPasswordLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridNotifyPasswordLineEdit">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_8">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridNotifyRemoteDirLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Directory</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridNotifyRemoteDirLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_9">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="hybridNotifyDirLabel_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>145</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Notifications Directory</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="hybridNotifyDirLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,0">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="testNotifyPushButton">
|
||||
<property name="text">
|
||||
<string>Test connection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<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>38</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,91 @@
|
|||
#include "operatorconfig.h"
|
||||
#include "ui_operatorconfig.h"
|
||||
|
||||
QString myCallsign;
|
||||
QString myQth;
|
||||
QString myLocator;
|
||||
QString myLastname;
|
||||
QString myFirstname;
|
||||
QString lastReceivedCall;
|
||||
bool onlineStatusEnabled;
|
||||
QString onlineStatusText;
|
||||
|
||||
operatorConfig::operatorConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::operatorConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
operatorConfig::~operatorConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void operatorConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("PERSONAL");
|
||||
myCallsign=qSettings.value("callsign",QString("NOCALL")).toString();
|
||||
myQth=qSettings.value("qth",QString("NOWHERE")).toString();
|
||||
myLastname=qSettings.value("lastname",QString("NONAME")).toString();
|
||||
myFirstname=qSettings.value("firstname",QString("NOFIRSTNAME")).toString();
|
||||
myLocator=qSettings.value("locator",QString("NOLOCATOR")).toString();
|
||||
onlineStatusEnabled=qSettings.value("onlinestatusenabled",true).toBool();
|
||||
onlineStatusText=qSettings.value("onlinestatustext",QString("")).toString();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void operatorConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("PERSONAL");
|
||||
qSettings.setValue("callsign",myCallsign);
|
||||
qSettings.setValue("qth",myQth);
|
||||
qSettings.setValue("locator",myLocator);
|
||||
qSettings.setValue("lastname",myLastname);
|
||||
qSettings.setValue("firstname",myFirstname);
|
||||
qSettings.setValue("onlinestatusenabled",onlineStatusEnabled);
|
||||
qSettings.setValue("onlinestatustext",onlineStatusText);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void operatorConfig::getParams()
|
||||
{
|
||||
QString myCallsignCopy=myCallsign;
|
||||
QString myQthCopy=myQth;
|
||||
QString myLocatorCopy= myLocator;
|
||||
QString myLastnameCopy=myLastname;
|
||||
QString myFirstnameCopy=myFirstname;
|
||||
QString onlineStatusTextCopy=onlineStatusText;
|
||||
bool onlineStatusEnabledCopy=onlineStatusEnabled;
|
||||
|
||||
getValue(myCallsign,ui->callsignLineEdit);
|
||||
getValue(myLastname,ui->lastnameLineEdit);
|
||||
getValue(myFirstname,ui->firstnameLineEdit);
|
||||
getValue(myQth,ui->qthLineEdit);
|
||||
getValue(myLocator,ui->locatorLineEdit);
|
||||
getValue(onlineStatusText,ui->onlineStatusText);
|
||||
getValue(onlineStatusEnabled,ui->onlineStatusCheckbox);
|
||||
|
||||
changed=false;
|
||||
if( myCallsignCopy!=myCallsign
|
||||
|| myQthCopy!=myQth
|
||||
|| myLocatorCopy!= myLocator
|
||||
|| myLastnameCopy!=myLastname
|
||||
|| myFirstnameCopy!=myFirstname
|
||||
|| onlineStatusEnabledCopy!=onlineStatusEnabled
|
||||
|| onlineStatusTextCopy!=onlineStatusText)
|
||||
changed=true;
|
||||
}
|
||||
|
||||
void operatorConfig::setParams()
|
||||
{
|
||||
setValue(myCallsign,ui->callsignLineEdit);
|
||||
setValue(myLastname,ui->lastnameLineEdit);
|
||||
setValue(myFirstname,ui->firstnameLineEdit);
|
||||
setValue(myQth,ui->qthLineEdit);
|
||||
setValue(myLocator,ui->locatorLineEdit);
|
||||
setValue(onlineStatusEnabled,ui->onlineStatusCheckbox);
|
||||
setValue(onlineStatusText,ui->onlineStatusText);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef OPERATORCONFIG_H
|
||||
#define OPERATORCONFIG_H
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern QString myCallsign;
|
||||
extern QString myQth;
|
||||
extern QString myLocator;
|
||||
extern QString myLastname;
|
||||
extern QString myFirstname;
|
||||
extern QString lastReceivedCall;
|
||||
|
||||
extern bool onlineStatusEnabled;
|
||||
extern QString onlineStatusText;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class operatorConfig;
|
||||
}
|
||||
|
||||
class operatorConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit operatorConfig(QWidget *parent = 0);
|
||||
~operatorConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private:
|
||||
Ui::operatorConfig *ui;
|
||||
};
|
||||
|
||||
#endif // OPERATORCONFIG_H
|
|
@ -0,0 +1,325 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>operatorConfig</class>
|
||||
<widget class="QWidget" name="operatorConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>680</width>
|
||||
<height>272</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="firstnameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Firstname</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="firstnameLineEdit">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="lastnameLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lastname</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lastnameLineEdit">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="callsignLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Callsign</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="callsignLineEdit">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="qthLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTH</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="qthLineEdit">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="locatorLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Locator</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="locatorLineEdit">
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="onlineStatusCheckbox">
|
||||
<property name="text">
|
||||
<string>Allow other users to see your online status via the notification server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="onlineStatusLabel">
|
||||
<property name="text">
|
||||
<string>Online Status Text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="onlineStatusText">
|
||||
<property name="maxLength">
|
||||
<number>120</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>antenna, radio, operating freq or other info</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="spacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,110 @@
|
|||
#include "repeaterconfig.h"
|
||||
#include "ui_repeaterconfig.h"
|
||||
|
||||
|
||||
bool repeaterEnable;
|
||||
int repeaterImageInterval;
|
||||
esstvMode repeaterTxMode;
|
||||
QString repeaterImage1;
|
||||
QString repeaterImage2;
|
||||
QString repeaterImage3;
|
||||
QString repeaterImage4;
|
||||
QString repeaterAcknowledge;
|
||||
QString repeaterTemplate;
|
||||
QString idleTemplate;
|
||||
|
||||
repeaterConfig::repeaterConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::repeaterConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
repeaterConfig::~repeaterConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void repeaterConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("REPEATER");
|
||||
repeaterImageInterval=qSettings.value("repeaterImageInterval",10).toInt();
|
||||
repeaterEnable=qSettings.value("repeaterEnable",false).toBool();
|
||||
repeaterTxMode=(esstvMode)qSettings.value("repeaterTxMode",0).toInt();
|
||||
repeaterImage1=qSettings.value("repeaterImage1","").toString();
|
||||
repeaterImage2=qSettings.value("repeaterImage2","").toString();
|
||||
repeaterImage3=qSettings.value("repeaterImage3","").toString();
|
||||
repeaterImage4=qSettings.value("repeaterImage4","").toString();
|
||||
repeaterAcknowledge=qSettings.value("repeaterAcknowledge","").toString();
|
||||
repeaterTemplate=qSettings.value("repeaterTemplate","").toString();
|
||||
idleTemplate=qSettings.value("idleTemplate","").toString();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void repeaterConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("REPEATER");
|
||||
qSettings.setValue("repeaterImageInterval",repeaterImageInterval);
|
||||
qSettings.setValue("repeaterEnable",repeaterEnable);
|
||||
qSettings.setValue("repeaterTxMode",repeaterTxMode);
|
||||
qSettings.setValue("repeaterImage1",repeaterImage1);
|
||||
qSettings.setValue("repeaterImage2",repeaterImage2);
|
||||
qSettings.setValue("repeaterImage3",repeaterImage3);
|
||||
qSettings.setValue("repeaterImage4",repeaterImage4);
|
||||
qSettings.setValue("repeaterAcknowledge",repeaterAcknowledge);
|
||||
qSettings.setValue("repeaterTemplate",repeaterTemplate);
|
||||
qSettings.setValue("idleTemplate",idleTemplate);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void repeaterConfig::getParams()
|
||||
{
|
||||
int temp;
|
||||
bool repeaterEnableCopy=repeaterEnable;
|
||||
int repeaterImageIntervalCopy=repeaterImageInterval;
|
||||
esstvMode repeaterTxModeCopy=repeaterTxMode;
|
||||
QString repeaterImage1Copy=repeaterImage1;
|
||||
QString repeaterImage2Copy=repeaterImage2;
|
||||
QString repeaterImage3Copy=repeaterImage3;
|
||||
QString repeaterImage4Copy=repeaterImage4;
|
||||
QString repeaterAcknowledgeCopy=repeaterAcknowledge;
|
||||
QString repeaterTemplateCopy=repeaterTemplate;
|
||||
QString idleTemplateCopy=idleTemplate;
|
||||
getValue(repeaterImageInterval,ui->imageIntervalSpinBox);
|
||||
getValue(repeaterEnable,ui->repeaterEnableCheckBox);
|
||||
getIndex(temp,ui->repeaterTxModeComboBox);
|
||||
repeaterTxMode=(esstvMode)temp;
|
||||
getValue(repeaterImage1,ui->repeaterImage1LineEdit);
|
||||
getValue(repeaterImage2,ui->repeaterImage2LineEdit);
|
||||
getValue(repeaterImage3,ui->repeaterImage3LineEdit);
|
||||
getValue(repeaterImage4,ui->repeaterImage4LineEdit);
|
||||
getValue(idleTemplate,ui->idleTemplateLineEdit);
|
||||
getValue(repeaterTemplate,ui->repeaterTemplateLineEdit);
|
||||
changed=false;
|
||||
if( repeaterEnableCopy!=repeaterEnable
|
||||
|| repeaterImageIntervalCopy!=repeaterImageInterval
|
||||
|| repeaterTxModeCopy!=repeaterTxMode
|
||||
|| repeaterImage1Copy!=repeaterImage1
|
||||
|| repeaterImage2Copy!=repeaterImage2
|
||||
|| repeaterImage3Copy!=repeaterImage3
|
||||
|| repeaterImage4Copy!=repeaterImage4
|
||||
|| repeaterAcknowledgeCopy!=repeaterAcknowledge
|
||||
|| repeaterTemplateCopy!=repeaterTemplate
|
||||
|| idleTemplateCopy!=idleTemplate)
|
||||
changed=true;
|
||||
}
|
||||
|
||||
void repeaterConfig::setParams()
|
||||
{;
|
||||
setValue(repeaterImageInterval,ui->imageIntervalSpinBox);
|
||||
setValue(repeaterEnable,ui->repeaterEnableCheckBox);
|
||||
setIndex(repeaterTxMode,ui->repeaterTxModeComboBox);
|
||||
setValue(repeaterImage1,ui->repeaterImage1LineEdit);
|
||||
setValue(repeaterImage2,ui->repeaterImage2LineEdit);
|
||||
setValue(repeaterImage3,ui->repeaterImage3LineEdit);
|
||||
setValue(repeaterImage4,ui->repeaterImage4LineEdit);
|
||||
setValue(idleTemplate,ui->idleTemplateLineEdit);
|
||||
setValue(repeaterTemplate,ui->repeaterTemplateLineEdit);
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef REPEATERCONFIG_H
|
||||
#define REPEATERCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
#include "sstv/sstvparam.h"
|
||||
|
||||
|
||||
extern bool repeaterEnable;
|
||||
extern int repeaterImageInterval;
|
||||
extern esstvMode repeaterTxMode;
|
||||
extern QString repeaterImage1;
|
||||
extern QString repeaterImage2;
|
||||
extern QString repeaterImage3;
|
||||
extern QString repeaterImage4;
|
||||
extern QString repeaterAcknowledge;
|
||||
extern QString repeaterTemplate;
|
||||
extern QString idleTemplate;
|
||||
|
||||
namespace Ui {
|
||||
class repeaterConfig;
|
||||
}
|
||||
|
||||
class repeaterConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit repeaterConfig(QWidget *parent = 0);
|
||||
~repeaterConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
private:
|
||||
Ui::repeaterConfig *ui;
|
||||
};
|
||||
|
||||
#endif // REPEATERCONFIG_H
|
|
@ -0,0 +1,401 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>repeaterConfig</class>
|
||||
<widget class="QWidget" name="repeaterConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>624</width>
|
||||
<height>474</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="repeaterEnableCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable Repeater</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="imageIntervalLabel">
|
||||
<property name="text">
|
||||
<string>Image Interval (min)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="imageIntervalSpinBox">
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_4">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="repeaterTxModeLabel">
|
||||
<property name="text">
|
||||
<string>Repeater TX mode</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="repeaterTxModeComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_6">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rep1Label">
|
||||
<property name="text">
|
||||
<string>Idle Image 1</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="repeaterImage1LineEdit">
|
||||
<property name="modified">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rp1BrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_5">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rp2Label">
|
||||
<property name="text">
|
||||
<string>Idle Image 2</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="repeaterImage2LineEdit">
|
||||
<property name="modified">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rp2BrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_7">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rp3Label">
|
||||
<property name="text">
|
||||
<string>Idle Image 3</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="repeaterImage3LineEdit">
|
||||
<property name="modified">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rp3BrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="rp4Label">
|
||||
<property name="text">
|
||||
<string>Idle Image 4</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="repeaterImage4LineEdit">
|
||||
<property name="modified">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rp4BrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="Label">
|
||||
<property name="text">
|
||||
<string>Idle Template</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="idleTemplateLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="idleTemplateBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="ackLabel">
|
||||
<property name="text">
|
||||
<string>Repeater Template</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="repeaterTemplateLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="repeaterTemplateBrowseButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse ...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>202</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,299 @@
|
|||
#include "rigconfig.h"
|
||||
#include "ui_rigconfig.h"
|
||||
#include "appglobal.h"
|
||||
#include "configparams.h"
|
||||
#include "utils/supportfunctions.h"
|
||||
#include "rigcontrol.h"
|
||||
#include <QSettings>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
rigConfig::rigConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::rigConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->enableCATCheckBox,SIGNAL(clicked()),SLOT(slotEnableCAT()));
|
||||
connect(ui->enablePTTCheckBox,SIGNAL(clicked()),SLOT(slotEnablePTT()));
|
||||
connect(ui->enableXMLRPCCheckBox,SIGNAL(clicked()),SLOT(slotEnableXMLRPC()));
|
||||
connect(ui->restartPushButton,SIGNAL(clicked()),SLOT(slotRestart()));
|
||||
connect(ui->RTSCheckBox,SIGNAL(clicked()),SLOT(slotCheckPTT0()));
|
||||
connect(ui->DTRCheckBox,SIGNAL(clicked()),SLOT(slotCheckPTT1()));
|
||||
connect(ui->nRTSCheckBox,SIGNAL(clicked()),SLOT(slotCheckPTT2()));
|
||||
connect(ui->nDTRCheckBox,SIGNAL(clicked()),SLOT(slotCheckPTT3()));
|
||||
rigController=NULL;
|
||||
cp=NULL;
|
||||
}
|
||||
|
||||
|
||||
rigConfig::~rigConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void rigConfig::attachRigController(rigControl *rigCtrl)
|
||||
{
|
||||
rigController=rigCtrl;
|
||||
}
|
||||
|
||||
void rigConfig::readSettings()
|
||||
{
|
||||
cp=rigController->params();
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup(cp->configLabel);
|
||||
cp->serialPort=qSettings.value("serialPort","/dev/ttyS0").toString();
|
||||
cp->radioModel=qSettings.value("radioModel","dummy").toString();
|
||||
cp->civAddress=qSettings.value("civAddress","").toString();
|
||||
cp->baudrate=qSettings.value("baudrate",9600).toInt();
|
||||
cp->parity=qSettings.value("parity","None").toString();
|
||||
cp->stopbits=qSettings.value("stopbits",1).toInt();
|
||||
cp->databits=qSettings.value("databits",8).toInt();
|
||||
cp->handshake=qSettings.value("handshake","None").toString();
|
||||
cp->enableCAT=qSettings.value("enableCAT",0).toBool();
|
||||
cp->enableSerialPTT=qSettings.value("enableSerialPTT",0).toBool();
|
||||
cp->pttSerialPort=qSettings.value("pttSerialPort","/dev/ttyS0").toString();
|
||||
cp->activeRTS=qSettings.value("activeRTS",1).toBool();
|
||||
cp->activeDTR=qSettings.value("activeDTR",0).toBool();
|
||||
cp->nactiveRTS=qSettings.value("nactiveRTS",1).toBool();
|
||||
cp->nactiveDTR=qSettings.value("nactiveDTR",0).toBool();
|
||||
cp->enableXMLRPC=qSettings.value("enableXMLRPC",0).toBool();
|
||||
cp->XMLRPCPort=qSettings.value("XMLRPCPort","7362").toInt();
|
||||
cp->txOnDelay=qSettings.value("txOnDelay",0.0).toDouble();
|
||||
cp->pttType=(ptt_type_t)qSettings.value("pttType",(int)RIG_PTT_RIG).toInt();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void rigConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup(cp->configLabel);
|
||||
qSettings.setValue("serialPort",cp->serialPort);
|
||||
qSettings.setValue("radioModel",cp->radioModel);
|
||||
qSettings.setValue("civAddress",cp->civAddress);
|
||||
qSettings.setValue("baudrate",cp->baudrate);
|
||||
qSettings.setValue("parity",cp->parity);
|
||||
qSettings.setValue("stopbits",cp->stopbits);
|
||||
qSettings.setValue("databits",cp->databits);
|
||||
qSettings.setValue("handshake",cp->handshake);
|
||||
qSettings.setValue("enableCAT",cp->enableCAT);
|
||||
qSettings.setValue("enableSerialPTT",cp->enableSerialPTT);
|
||||
qSettings.setValue("pttSerialPort",cp->pttSerialPort);
|
||||
qSettings.setValue("activeRTS",cp->activeRTS);
|
||||
qSettings.setValue("activeDTR",cp->activeDTR);
|
||||
qSettings.setValue("nactiveRTS",cp->nactiveRTS);
|
||||
qSettings.setValue("nactiveDTR",cp->nactiveDTR);
|
||||
qSettings.setValue("pttType",(int) cp->pttType);
|
||||
qSettings.setValue("enableXMLRPC",cp->enableXMLRPC);
|
||||
qSettings.setValue("XMLRPCPort",cp->XMLRPCPort);
|
||||
qSettings.setValue("txOnDelay",cp->txOnDelay);
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void rigConfig::getParams()
|
||||
{
|
||||
scatParams *cpCopy=new scatParams;
|
||||
*cpCopy=*cp;
|
||||
getValue(cp->serialPort,ui->serialPortLineEdit);
|
||||
if(ui->radioModelComboBox->count()!=0) getValue(cp->radioModel,ui->radioModelComboBox);
|
||||
getValue(cp->civAddress,ui->civAddressLineEdit);
|
||||
getValue(cp->baudrate,ui->baudrateComboBox);
|
||||
getValue(cp->parity,ui->parityComboBox);
|
||||
getValue(cp->stopbits,ui->stopbitsComboBox);
|
||||
getValue(cp->databits,ui->databitsComboBox);
|
||||
getValue(cp->handshake,ui->handshakeComboBox);
|
||||
getValue(cp->enableCAT,ui->enableCATCheckBox);
|
||||
getValue(cp->enableSerialPTT,ui->enablePTTCheckBox);
|
||||
getValue(cp->pttSerialPort,ui->pttSerialPortLineEdit);
|
||||
getValue(cp->activeRTS,ui->RTSCheckBox);
|
||||
getValue(cp->activeDTR,ui->DTRCheckBox);
|
||||
getValue(cp->nactiveRTS,ui->nRTSCheckBox);
|
||||
getValue(cp->nactiveDTR,ui->nDTRCheckBox);
|
||||
if(ui->catVoiceRadioButton->isChecked()) cp->pttType=RIG_PTT_RIG;
|
||||
if(ui->catDataRadioButton->isChecked()) cp->pttType=RIG_PTT_RIG_MICDATA;
|
||||
if(ui->rtsRadioButton->isChecked()) cp->pttType=RIG_PTT_SERIAL_RTS;
|
||||
if(ui->dtrRadioButton->isChecked()) cp->pttType=RIG_PTT_SERIAL_DTR;
|
||||
getValue(cp->txOnDelay,ui->txOnDelayDoubleSpinBox);
|
||||
getValue(cp->enableXMLRPC,ui->enableXMLRPCCheckBox);
|
||||
getValue(cp->XMLRPCPort,ui->XMLRPCPortLineEdit);
|
||||
changed=false;
|
||||
if( cpCopy->serialPort!=cp->serialPort
|
||||
|| cpCopy->radioModel!=cp->radioModel
|
||||
|| cpCopy->civAddress!=cp->civAddress
|
||||
|| cpCopy->baudrate!=cp->baudrate
|
||||
|| cpCopy->stopbits!=cp->stopbits
|
||||
|| cpCopy->databits!=cp->databits
|
||||
|| cpCopy->handshake!=cp->handshake
|
||||
|| cpCopy->enableCAT!=cp->enableCAT
|
||||
|| cpCopy->enableSerialPTT!=cp->enableSerialPTT
|
||||
|| cpCopy->pttSerialPort!=cp->pttSerialPort
|
||||
|| cpCopy->activeRTS!=cp->activeRTS
|
||||
|| cpCopy->activeDTR!=cp->activeDTR
|
||||
|| cpCopy->nactiveRTS!=cp->nactiveRTS
|
||||
|| cpCopy->nactiveDTR!=cp->nactiveDTR
|
||||
|| cpCopy->pttType!=cp->pttType
|
||||
|| cpCopy->enableXMLRPC!=cp->enableXMLRPC
|
||||
|| cpCopy->XMLRPCPort!=cp->XMLRPCPort
|
||||
)
|
||||
changed=true;
|
||||
delete cpCopy;
|
||||
}
|
||||
|
||||
|
||||
void rigConfig::setParams()
|
||||
{
|
||||
if(rigController->getRadioList(ui->radioModelComboBox)) setValue(cp->radioModel,ui->radioModelComboBox);
|
||||
setValue(cp->serialPort,ui->serialPortLineEdit);
|
||||
setValue(cp->civAddress,ui->civAddressLineEdit);
|
||||
setValue(cp->baudrate,ui->baudrateComboBox);
|
||||
setValue(cp->parity,ui->parityComboBox);
|
||||
setValue(cp->stopbits,ui->stopbitsComboBox);
|
||||
setValue(cp->databits,ui->databitsComboBox);
|
||||
setValue(cp->handshake,ui->handshakeComboBox);
|
||||
setValue(cp->enableCAT,ui->enableCATCheckBox);
|
||||
setValue(cp->enableSerialPTT,ui->enablePTTCheckBox);
|
||||
setValue(cp->pttSerialPort,ui->pttSerialPortLineEdit);
|
||||
if(cp->activeRTS) cp->nactiveRTS=false;
|
||||
if(cp->activeDTR) cp->nactiveDTR=false;
|
||||
|
||||
setValue(cp->activeRTS,ui->RTSCheckBox);
|
||||
setValue(cp->activeDTR,ui->DTRCheckBox);
|
||||
setValue(cp->nactiveRTS,ui->nRTSCheckBox);
|
||||
setValue(cp->nactiveDTR,ui->nDTRCheckBox);
|
||||
switch(cp->pttType)
|
||||
{
|
||||
case RIG_PTT_RIG:
|
||||
setValue(true,ui->catVoiceRadioButton);
|
||||
break;
|
||||
case RIG_PTT_RIG_MICDATA:
|
||||
setValue(true,ui->catDataRadioButton);
|
||||
break;
|
||||
case RIG_PTT_SERIAL_RTS:
|
||||
setValue(true,ui->rtsRadioButton);
|
||||
break;
|
||||
case RIG_PTT_SERIAL_DTR:
|
||||
setValue(true,ui->dtrRadioButton);
|
||||
break;
|
||||
default:
|
||||
setValue(true,ui->catVoiceRadioButton);
|
||||
break;
|
||||
}
|
||||
if(cp->enableCAT && cp->enableSerialPTT)
|
||||
{
|
||||
if(cp->serialPort==cp->pttSerialPort)
|
||||
{
|
||||
cp->enableSerialPTT=false;
|
||||
}
|
||||
}
|
||||
setValue(cp->enableSerialPTT,ui->enablePTTCheckBox);
|
||||
setValue(cp->txOnDelay,ui->txOnDelayDoubleSpinBox);
|
||||
setValue(cp->enableXMLRPC,ui->enableXMLRPCCheckBox);
|
||||
setValue(cp->XMLRPCPort,ui->XMLRPCPortLineEdit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rigConfig::slotEnableCAT()
|
||||
{
|
||||
if(ui->enableCATCheckBox->isChecked() && ui->enablePTTCheckBox->isChecked())
|
||||
{
|
||||
if(ui->pttSerialPortLineEdit->text()==ui->serialPortLineEdit->text())
|
||||
{
|
||||
QMessageBox::critical(this,"Configuration error",
|
||||
"The PTT serialport must be different from the CAT serial port if both are enabled");
|
||||
ui->enablePTTCheckBox->setChecked(false);
|
||||
}
|
||||
|
||||
}
|
||||
if(ui->enableCATCheckBox->isChecked())
|
||||
{
|
||||
ui->enableXMLRPCCheckBox->setChecked(false);
|
||||
rigController->init();
|
||||
}
|
||||
else
|
||||
{
|
||||
rigController->disable();
|
||||
}
|
||||
getParams();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void rigConfig::slotEnablePTT()
|
||||
{
|
||||
if(ui->enableCATCheckBox->isChecked() && ui->enablePTTCheckBox->isChecked())
|
||||
{
|
||||
if(ui->pttSerialPortLineEdit->text()==ui->serialPortLineEdit->text())
|
||||
{
|
||||
QMessageBox::critical(this,"Configuration error",
|
||||
"The PTT serialport must be different from the CAT serial port if both are enabled");
|
||||
ui->enablePTTCheckBox->setChecked(false);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
if(ui->enablePTTCheckBox->isChecked())
|
||||
{
|
||||
ui->enableXMLRPCCheckBox->setChecked(false);
|
||||
}
|
||||
getParams();
|
||||
}
|
||||
|
||||
void rigConfig::slotEnableXMLRPC()
|
||||
{
|
||||
ui->enableCATCheckBox->setChecked(false);
|
||||
ui->enablePTTCheckBox->setChecked(false);
|
||||
}
|
||||
|
||||
void rigConfig::slotRestart()
|
||||
{
|
||||
getParams();
|
||||
if(ui->enableCATCheckBox->isChecked())
|
||||
{
|
||||
if(rigController->init())
|
||||
{
|
||||
ui->restartPushButton->setStyleSheet("background-color: green");
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->restartPushButton->setStyleSheet("background-color: red");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void rigConfig::slotCheckPTT0()
|
||||
{
|
||||
checkPTT(0,ui->RTSCheckBox->isChecked());
|
||||
}
|
||||
void rigConfig::slotCheckPTT1()
|
||||
{checkPTT(1,ui->DTRCheckBox->isChecked());
|
||||
}
|
||||
void rigConfig::slotCheckPTT2()
|
||||
{
|
||||
checkPTT(2,ui->nRTSCheckBox->isChecked());
|
||||
}
|
||||
void rigConfig::slotCheckPTT3()
|
||||
{
|
||||
checkPTT(3,ui->nDTRCheckBox->isChecked());
|
||||
}
|
||||
|
||||
void rigConfig::checkPTT(int p,bool b)
|
||||
{
|
||||
if(!b) return;
|
||||
switch (p)
|
||||
{
|
||||
case 0:
|
||||
setValue(false,ui->nRTSCheckBox);
|
||||
break;
|
||||
case 1:
|
||||
setValue(false,ui->nDTRCheckBox);
|
||||
break;
|
||||
case 2:
|
||||
setValue(false,ui->RTSCheckBox);
|
||||
break;
|
||||
case 3:
|
||||
setValue(false,ui->DTRCheckBox);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef RIGCONFIG_H
|
||||
#define RIGCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
class rigControl;
|
||||
struct scatParams;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class rigConfig;
|
||||
}
|
||||
|
||||
class rigConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit rigConfig(QWidget *parent = 0);
|
||||
~rigConfig();
|
||||
void attachRigController(rigControl *rigCtrl);
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
public slots:
|
||||
void slotEnableCAT();
|
||||
void slotEnablePTT();
|
||||
void slotEnableXMLRPC();
|
||||
void slotRestart();
|
||||
void slotCheckPTT0();
|
||||
void slotCheckPTT1();
|
||||
void slotCheckPTT2();
|
||||
void slotCheckPTT3();
|
||||
|
||||
private:
|
||||
|
||||
Ui::rigConfig *ui;
|
||||
scatParams *cp;
|
||||
rigControl *rigController;
|
||||
void checkPTT(int p,bool b);
|
||||
};
|
||||
|
||||
#endif // RIGCONFIG_H
|
|
@ -0,0 +1,849 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>rigConfig</class>
|
||||
<widget class="QWidget" name="rigConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>633</width>
|
||||
<height>426</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Special Serial Port</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enablePTTCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable PTT serial Interface</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>19</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PTT Serial Port</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="pttSerialPortLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_15">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="RTSCheckBox">
|
||||
<property name="text">
|
||||
<string>+RTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="DTRCheckBox">
|
||||
<property name="text">
|
||||
<string>+DTR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="nRTSCheckBox">
|
||||
<property name="text">
|
||||
<string>-RTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="nDTRCheckBox">
|
||||
<property name="text">
|
||||
<string>-DTR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>19</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Hamlib Control</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableCATCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable Hamlib Cat Interface</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,1">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Radio Model</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="radioModelComboBox">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Ubuntu Mono</family>
|
||||
<weight>75</weight>
|
||||
<italic>false</italic>
|
||||
<bold>true</bold>
|
||||
<kerning>false</kerning>
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CIV Address</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="civAddressLineEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>108</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Serial Port/Host</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="serialPortLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_8">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Parity</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="parityComboBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Odd</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Even</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2" colspan="2">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_9">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Databits</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QComboBox" name="databitsComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="serialPortTextLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Baudrate</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="baudrateComboBox">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>300</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>600</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1200</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2400</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4800</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>9600</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>19200</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>38400</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>57600</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>115200</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>230400</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>460800</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QLabel" name="stopbitsTextLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>StopBits</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="stopbitsComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_6">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Handshake</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="2">
|
||||
<widget class="QComboBox" name="handshakeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hardware</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>XOn/XOff</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>PTT Control via:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="catVoiceRadioButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string extracomment="PTT with voice port as input"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CAT (Voice port)</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="catDataRadioButton">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CAT (Data port)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rtsRadioButton">
|
||||
<property name="text">
|
||||
<string>RTS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="dtrRadioButton">
|
||||
<property name="text">
|
||||
<string>DTR</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_12">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="restartPushButton">
|
||||
<property name="text">
|
||||
<string>Restart CAT Interface</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="autoFillBackground">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>XMLRPC Interface</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableXMLRPCCheckBox">
|
||||
<property name="text">
|
||||
<string>Enable XMLRPC Interface</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_14">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>138</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="serialInterfaceTextLabel_5">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="XMLRPCPortLineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>138</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QLabel" name="serialPortTextLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TX on Delay</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="txOnDelayDoubleSpinBox">
|
||||
<property name="decimals">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>5.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="serialPortTextLabel_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>in seconds</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_13">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,158 @@
|
|||
/**************************************************************************
|
||||
* Copyright (C) 2000-2012 by Johan Maes *
|
||||
* on4qz@telenet.be *
|
||||
* http://users.telenet.be/on4qz *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#include "soundconfig.h"
|
||||
#include "ui_soundconfig.h"
|
||||
#include "configparams.h"
|
||||
#include "supportfunctions.h"
|
||||
#include "soundalsa.h"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
int samplingrate;
|
||||
double rxClock;
|
||||
double txClock;
|
||||
bool pulseSelected;
|
||||
bool alsaSelected;
|
||||
bool swapChannel;
|
||||
bool pttToneOtherChannel;
|
||||
QString inputAudioDevice;
|
||||
QString outputAudioDevice;
|
||||
soundBase::edataSrc soundRoutingInput;
|
||||
soundBase::edataDst soundRoutingOutput;
|
||||
|
||||
quint32 recordingSize;
|
||||
|
||||
|
||||
|
||||
soundConfig::soundConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::soundConfig)
|
||||
{
|
||||
QStringList inputPCMList, outputPCMList;
|
||||
ui->setupUi(this);
|
||||
getCardList(inputPCMList, outputPCMList);
|
||||
ui->inputPCMNameComboBox->addItems(inputPCMList);
|
||||
ui->outputPCMNameComboBox->addItems(outputPCMList);
|
||||
}
|
||||
|
||||
|
||||
soundConfig::~soundConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void soundConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("SOUND");
|
||||
rxClock=qSettings.value("rxclock",BASESAMPLERATE).toDouble();
|
||||
txClock=qSettings.value("txclock",BASESAMPLERATE).toDouble();
|
||||
if(fabs(1-rxClock/BASESAMPLERATE)>0.002) rxClock=BASESAMPLERATE;
|
||||
if(fabs(1-txClock/BASESAMPLERATE)>0.002) txClock=BASESAMPLERATE;
|
||||
samplingrate=BASESAMPLERATE;
|
||||
inputAudioDevice=qSettings.value("inputAudioDevice","default").toString();
|
||||
outputAudioDevice=qSettings.value("outputAudioDevice","default").toString();
|
||||
alsaSelected=qSettings.value("alsaSelected",false).toBool();
|
||||
pulseSelected=qSettings.value("pulseSelected",false).toBool();
|
||||
swapChannel=qSettings.value("swapChannel",false).toBool();
|
||||
pttToneOtherChannel=qSettings.value("pttToneOtherChannel",false).toBool();
|
||||
soundRoutingInput= (soundBase::edataSrc)qSettings.value("soundRoutingInput", 0 ).toInt();
|
||||
soundRoutingOutput= (soundBase::edataDst)qSettings.value("soundRoutingOutput", 0 ).toInt();
|
||||
recordingSize= qSettings.value("recordingSize", 100 ).toInt();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void soundConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("SOUND");
|
||||
qSettings.setValue("rxclock",rxClock);
|
||||
qSettings.setValue("txclock",txClock);
|
||||
qSettings.setValue("inputAudioDevice",inputAudioDevice);
|
||||
qSettings.setValue("outputAudioDevice",outputAudioDevice);
|
||||
qSettings.setValue("alsaSelected",alsaSelected);
|
||||
qSettings.setValue("pulseSelected",pulseSelected);
|
||||
qSettings.setValue("swapChannel",swapChannel);
|
||||
qSettings.setValue("pttToneOtherChannel",pttToneOtherChannel);
|
||||
qSettings.setValue ("soundRoutingInput", soundRoutingInput );
|
||||
qSettings.setValue ("soundRoutingOutput",soundRoutingOutput );
|
||||
qSettings.setValue ("recordingSize",recordingSize );
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
|
||||
void soundConfig::setParams()
|
||||
{
|
||||
setValue(rxClock,ui->inputClockLineEdit,9);
|
||||
setValue(txClock,ui->outputClockLineEdit,9);
|
||||
setValue(inputAudioDevice,ui->inputPCMNameComboBox);
|
||||
setValue(outputAudioDevice,ui->outputPCMNameComboBox);
|
||||
setValue(alsaSelected,ui->alsaRadioButton);
|
||||
setValue(pulseSelected,ui->pulseRadioButton);
|
||||
setValue(swapChannel,ui->swapChannelCheckBox);
|
||||
setValue(pttToneOtherChannel,ui->pttToneCheckBox);
|
||||
if(soundRoutingInput==soundBase::SNDINCARD) ui->inFromCard->setChecked(true);
|
||||
else if (soundRoutingInput==soundBase::SNDINFROMFILE) ui->inFromFile->setChecked(true);
|
||||
else ui->inRecordFromCard->setChecked(true);
|
||||
|
||||
if(soundRoutingOutput==soundBase::SNDOUTCARD) ui->outToCard->setChecked(true);
|
||||
else ui->outRecord->setChecked(true);
|
||||
setValue(recordingSize,ui->mbSpinBox);
|
||||
}
|
||||
|
||||
void soundConfig::getParams()
|
||||
{
|
||||
QString inputAudioDeviceCopy=inputAudioDevice;
|
||||
QString outputAudioDeviceCopy=outputAudioDevice;
|
||||
bool alsaSelectedCopy=alsaSelected;
|
||||
|
||||
|
||||
soundBase::edataSrc soundRoutingInputCopy=soundRoutingInput;
|
||||
soundBase::edataDst soundRoutingOutputCopy=soundRoutingOutput;
|
||||
|
||||
getValue(rxClock,ui->inputClockLineEdit);
|
||||
getValue(txClock,ui->inputClockLineEdit);
|
||||
getValue(inputAudioDevice,ui->inputPCMNameComboBox);
|
||||
getValue(outputAudioDevice,ui->outputPCMNameComboBox);
|
||||
getValue(alsaSelected,ui->alsaRadioButton);
|
||||
getValue(pulseSelected,ui->pulseRadioButton);
|
||||
getValue(swapChannel,ui->swapChannelCheckBox);
|
||||
getValue(pttToneOtherChannel,ui->pttToneCheckBox);
|
||||
|
||||
if (ui->inFromCard->isChecked()) soundRoutingInput=soundBase::SNDINCARD;
|
||||
else if(ui->inFromFile->isChecked()) soundRoutingInput=soundBase::SNDINFROMFILE;
|
||||
else soundRoutingInput=soundBase::SNDINCARDTOFILE;
|
||||
|
||||
if (ui->outToCard->isChecked()) soundRoutingOutput=soundBase::SNDOUTCARD;
|
||||
else soundRoutingOutput=soundBase::SNDOUTTOFILE;
|
||||
getValue(recordingSize,ui->mbSpinBox);
|
||||
changed=false;
|
||||
if(inputAudioDeviceCopy!=inputAudioDevice
|
||||
|| outputAudioDeviceCopy!=outputAudioDevice
|
||||
|| soundRoutingInputCopy!=soundRoutingInput
|
||||
|| soundRoutingOutputCopy!=soundRoutingOutput
|
||||
|| alsaSelectedCopy!=alsaSelected)
|
||||
{
|
||||
changed=true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef soundConfig_H
|
||||
#define soundConfig_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
#include "soundbase.h"
|
||||
|
||||
extern int samplingrate;
|
||||
extern double rxClock;
|
||||
extern double txClock;
|
||||
extern bool pulseSelected;
|
||||
extern bool alsaSelected;
|
||||
extern bool swapChannel;
|
||||
extern bool pttToneOtherChannel;
|
||||
extern QString inputAudioDevice;
|
||||
extern QString outputAudioDevice;
|
||||
extern soundBase::edataSrc soundRoutingInput;
|
||||
extern soundBase::edataDst soundRoutingOutput;
|
||||
extern quint32 recordingSize;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class soundConfig;
|
||||
}
|
||||
|
||||
class soundConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit soundConfig(QWidget *parent = 0);
|
||||
~soundConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Ui::soundConfig *ui;
|
||||
|
||||
};
|
||||
|
||||
#endif // soundConfig_H
|
|
@ -0,0 +1,362 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>soundConfig</class>
|
||||
<widget class="QWidget" name="soundConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>490</width>
|
||||
<height>326</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Audio Interface</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="alsaRadioButton">
|
||||
<property name="text">
|
||||
<string>ALSA</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="verticalSpacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="inputAudioDeviceLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Input Audio Device</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="inputPCMNameComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="outputAudioDeviceLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Output Audio Device</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="outputPCMNameComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="pulseRadioButton">
|
||||
<property name="text">
|
||||
<string>PulseAudio</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="inputClockLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Input Clock Frequency </string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="inputClockLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="outputClockLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Output Clock Frequency</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="outputClockLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Sound Input</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="inFromCard">
|
||||
<property name="text">
|
||||
<string>From sound card</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="inFromFile">
|
||||
<property name="text">
|
||||
<string>From file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="inRecordFromCard">
|
||||
<property name="text">
|
||||
<string>From sound card and record</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Sound Output</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="outToCard">
|
||||
<property name="text">
|
||||
<string>To sound card</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="outRecord">
|
||||
<property name="text">
|
||||
<string>To sound card and record</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="swapChannelCheckBox">
|
||||
<property name="text">
|
||||
<string>Swap left and right channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="pttToneCheckBox">
|
||||
<property name="text">
|
||||
<string>PTT tone on other audio channel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_5">
|
||||
<item>
|
||||
<widget class="QSpinBox" name="mbSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="textLabel1">
|
||||
<property name="text">
|
||||
<string>Maximum recording size (in MB)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="hspacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>51</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,112 @@
|
|||
#include "waterfallconfig.h"
|
||||
#include "ui_waterfallconfig.h"
|
||||
#include <QFont>
|
||||
|
||||
|
||||
QString startPicWF;
|
||||
QString endPicWF;
|
||||
QString fixWF;
|
||||
QString bsrWF;
|
||||
QString startBinWF;
|
||||
QString endBinWF;
|
||||
QString wfFont;
|
||||
int wfFontSize;
|
||||
bool wfBold;
|
||||
QString sampleString;
|
||||
|
||||
waterfallConfig::waterfallConfig(QWidget *parent) : baseConfig(parent), ui(new Ui::waterfallConfig)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->fontComboBox,SIGNAL(currentIndexChanged(QString)),SLOT(slotFontChanged()));
|
||||
connect(ui->sizeSpinBox,SIGNAL(valueChanged(int)),SLOT(slotFontChanged()));
|
||||
connect(ui->boldCheckBox,SIGNAL(clicked(bool)),SLOT(slotFontChanged()));
|
||||
}
|
||||
|
||||
waterfallConfig::~waterfallConfig()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
void waterfallConfig::readSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
qSettings.beginGroup("WATERFALL");
|
||||
startPicWF=qSettings.value("startPicWF","START PIC").toString();
|
||||
endPicWF=qSettings.value("endPicWF","END PIC").toString();
|
||||
fixWF=qSettings.value("fixWF","FIX").toString();
|
||||
bsrWF=qSettings.value("bsrWF","BSR").toString();
|
||||
startBinWF=qSettings.value("startBinWF","START BIN").toString();
|
||||
endBinWF=qSettings.value("endBinWF","END BIN").toString();
|
||||
wfFont=qSettings.value("wfFont","Arial").toString();
|
||||
wfFontSize=qSettings.value("wfFontSize",12).toInt();
|
||||
wfBold=qSettings.value("wfBold",false).toBool();
|
||||
sampleString=qSettings.value("sampleString","Sample Text").toString();
|
||||
qSettings.endGroup();
|
||||
setParams();
|
||||
}
|
||||
|
||||
void waterfallConfig::writeSettings()
|
||||
{
|
||||
QSettings qSettings;
|
||||
getParams();
|
||||
qSettings.beginGroup("WATERFALL");
|
||||
qSettings.setValue("startPicWF",startPicWF);
|
||||
qSettings.setValue("endPicWF",endPicWF);
|
||||
qSettings.setValue("fixWF",fixWF);
|
||||
qSettings.setValue("bsrWF",bsrWF);
|
||||
qSettings.setValue("startBinWF",startBinWF);
|
||||
qSettings.setValue("endBinWF",endBinWF);
|
||||
qSettings.setValue("wfFont",wfFont);
|
||||
qSettings.setValue("wfFontSize",wfFontSize);
|
||||
qSettings.setValue("wfBold",wfBold);
|
||||
qSettings.setValue("sampleString",sampleString);
|
||||
|
||||
qSettings.endGroup();
|
||||
}
|
||||
|
||||
void waterfallConfig::getParams()
|
||||
{
|
||||
getValue(startPicWF,ui->startPicTextEdit);
|
||||
getValue(endPicWF,ui->endPicTextEdit);
|
||||
getValue(fixWF,ui->fixTextEdit);
|
||||
getValue(bsrWF,ui->bsrTextEdit);
|
||||
getValue(startBinWF,ui->startBinTextEdit);
|
||||
getValue(endBinWF,ui->endBinTextEdit);
|
||||
getValue(wfFont,ui->fontComboBox);
|
||||
getValue(wfFontSize,ui->sizeSpinBox);
|
||||
getValue(wfBold,ui->boldCheckBox);
|
||||
getValue(sampleString,ui->sampleLineEdit);
|
||||
}
|
||||
|
||||
void waterfallConfig::setParams()
|
||||
{
|
||||
setValue(startPicWF,ui->startPicTextEdit);
|
||||
setValue(endPicWF,ui->endPicTextEdit);
|
||||
setValue(fixWF,ui->fixTextEdit);
|
||||
setValue(bsrWF,ui->bsrTextEdit);
|
||||
setValue(startBinWF,ui->startBinTextEdit);
|
||||
setValue(endBinWF,ui->endBinTextEdit);
|
||||
ui->fontComboBox->blockSignals(true);
|
||||
ui->sizeSpinBox->blockSignals(true);
|
||||
setValue(sampleString,ui->sampleLineEdit);
|
||||
setValue(wfFont,ui->fontComboBox);
|
||||
setValue(wfFontSize,ui->sizeSpinBox);
|
||||
ui->fontComboBox->blockSignals(false);
|
||||
ui->sizeSpinBox->blockSignals(false);
|
||||
setValue(wfBold,ui->boldCheckBox);
|
||||
slotFontChanged();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void waterfallConfig::slotFontChanged()
|
||||
{
|
||||
getParams();
|
||||
QFont f(wfFont);
|
||||
f.setBold(wfBold);
|
||||
f.setPixelSize(wfFontSize);
|
||||
ui->sampleLineEdit->setFont(f);
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef WATERFALLCONFIG_H
|
||||
#define WATERFALLCONFIG_H
|
||||
|
||||
#include "baseconfig.h"
|
||||
|
||||
extern QString startPicWF;
|
||||
extern QString endPicWF;
|
||||
extern QString fixWF;
|
||||
extern QString bsrWF;
|
||||
extern QString startBinWF;
|
||||
extern QString endBinWF;
|
||||
extern QString wfFont;
|
||||
extern int wfFontSize;
|
||||
extern bool wfBold;
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class waterfallConfig;
|
||||
}
|
||||
|
||||
class waterfallConfig : public baseConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit waterfallConfig(QWidget *parent = 0);
|
||||
~waterfallConfig();
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void getParams();
|
||||
void setParams();
|
||||
|
||||
public slots:
|
||||
void slotFontChanged();
|
||||
|
||||
private:
|
||||
Ui::waterfallConfig *ui;
|
||||
};
|
||||
|
||||
#endif // WATERFALLCONFIG_H
|
|
@ -0,0 +1,268 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>waterfallConfig</class>
|
||||
<widget class="QWidget" name="waterfallConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>683</width>
|
||||
<height>437</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0,0">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0" columnstretch="0,1" columnminimumwidth="0,0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="fixLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>FIX</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="binLabel_1">
|
||||
<property name="text">
|
||||
<string>Start Binary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="bsrLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BSR</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPlainTextEdit" name="fixTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPlainTextEdit" name="endPicTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="pictureLabel_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>End Picture</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPlainTextEdit" name="startPicTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="midLineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="pictureLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start Picture</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QPlainTextEdit" name="bsrTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPlainTextEdit" name="startBinTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="binLabel_2">
|
||||
<property name="text">
|
||||
<string>End Binary</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPlainTextEdit" name="endBinTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>3</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="fontLabel">
|
||||
<property name="text">
|
||||
<string>Font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFontComboBox" name="fontComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="sizeLabel">
|
||||
<property name="text">
|
||||
<string>Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="sizeSpinBox">
|
||||
<property name="minimum">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>12</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="boldCheckBox">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="sampleLabel">
|
||||
<property name="text">
|
||||
<string>Sample</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="sampleLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>fontLabel</zorder>
|
||||
<zorder>fontLabel</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -0,0 +1,662 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2000-2008 by Johan Maes *
|
||||
* on4qz@telenet.be *
|
||||
* http://users.telenet.be/on4qz *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
/*!
|
||||
The dispatcher is the central system that routes all messages from the different threads.
|
||||
It also starts, stops and synchronizes the threads.
|
||||
|
||||
*/
|
||||
#include "dispatcher.h"
|
||||
#include "appglobal.h"
|
||||
#include "configparams.h"
|
||||
#include "rxwidget.h"
|
||||
#include "txwidget.h"
|
||||
#include "gallerywidget.h"
|
||||
#include "widgets/spectrumwidget.h"
|
||||
#include "widgets/vumeter.h"
|
||||
#include "rxfunctions.h"
|
||||
#include "mainwindow.h"
|
||||
#include "utils/ftp.h"
|
||||
#include "rigcontrol.h"
|
||||
#include "logbook/logbook.h"
|
||||
#include "dirdialog.h"
|
||||
#include <QSettings>
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
creates dispatcher instance
|
||||
*/
|
||||
|
||||
dispatcher::dispatcher()
|
||||
{
|
||||
mbox=NULL;
|
||||
progressFTP=NULL;
|
||||
lastFileName.clear();
|
||||
prTimerIndex=0;
|
||||
}
|
||||
|
||||
/*!
|
||||
delete dispatcher instance
|
||||
*/
|
||||
|
||||
dispatcher::~dispatcher()
|
||||
{
|
||||
}
|
||||
|
||||
void dispatcher::init()
|
||||
{
|
||||
editorActive=false;
|
||||
infoTextPtr=new textDisplay(mainWindowPtr);
|
||||
mainWindowPtr->spectrumFramePtr->init(RXSTRIPE,1,BASESAMPLERATE/SUBSAMPLINGFACTOR);
|
||||
infoTextPtr->hide();
|
||||
setOnlineStatus(true, onlineStatusText);
|
||||
connect(notifyRXIntf, SIGNAL(notification(QString)), this, SLOT(slotRXNotification(QString)));
|
||||
connect(notifyTXIntf, SIGNAL(notification(QString)), this, SLOT(slotTXNotification(QString)));
|
||||
connect(hybridTxIntf, SIGNAL(commandsDone(bool)), this, SLOT(slotHybridTxDone(bool)));
|
||||
|
||||
}
|
||||
|
||||
void dispatcher::setOnlineStatus(bool online, QString info)
|
||||
{
|
||||
txWidgetPtr->functionsPtr()->setOnlineStatus(online, info);
|
||||
|
||||
// TODO: move to rxWidget->functions->?
|
||||
if (!online && enableFTP)
|
||||
{
|
||||
ftpInterface rxftp("RX Image Cleanup");
|
||||
rxftp.setupConnection(ftpRemoteHost,ftpPort,ftpLogin,ftpPassword,ftpRemoteSSTVDirectory);
|
||||
rxftp.uploadToRXServer(""); // mark SSTV offline
|
||||
rxftp.changePath(ftpRemoteDRMDirectory);
|
||||
rxftp.uploadToRXServer(""); // mark DSSTV/DRM offline
|
||||
}
|
||||
}
|
||||
|
||||
void dispatcher::who()
|
||||
{
|
||||
txWidgetPtr->functionsPtr()->who();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
All communication between the threads are passed via this eventhandler.
|
||||
*/
|
||||
|
||||
void dispatcher::customEvent( QEvent * e )
|
||||
{
|
||||
dispatchEventType type;
|
||||
ftpInterface * iPtr;
|
||||
QString fn;
|
||||
type=(dispatchEventType)e->type();
|
||||
addToLog(((baseEvent*)e)->description,LOGDISPATCH);
|
||||
switch(type)
|
||||
{
|
||||
case displayFFT:
|
||||
addToLog("dispatcher: displayFFT",LOGDISPATCH);
|
||||
mainWindowPtr->spectrumFramePtr->realFFT(((displayFFTEvent*)e)->data());
|
||||
rxWidgetPtr->vMeterPtr()->setValue(soundIOPtr->getVolumeDb());
|
||||
// addToLog(QString::number(soundIOPtr->getVolumeDb()),LOGALL);
|
||||
|
||||
break;
|
||||
case displaySync:
|
||||
// addToLog("dispatcher: displaySync",LOGDISPATCH);
|
||||
uint s;
|
||||
((displaySyncEvent*)e)->getInfo(s);
|
||||
rxWidgetPtr->sMeterPtr()->setValue((double)s);
|
||||
break;
|
||||
case rxSSTVStatus:
|
||||
rxWidgetPtr->setSSTVStatusText(((rxSSTVStatusEvent*)e)->getStr());
|
||||
break;
|
||||
|
||||
case startImageRX:
|
||||
addToLog("dispatcher: clearing RxImage",LOGDISPATCH);
|
||||
// rxWidgetPtr->getImageViewerPtr()->createImage( ((startImageRXEvent*)e)->getSize(),QColor(0,0,128),imageStretch);
|
||||
rxWidgetPtr->getImageViewerPtr()->createImage( ((startImageRXEvent*)e)->getSize(),imageBackGroundColor,imageStretch);
|
||||
lastCallsign="";
|
||||
break;
|
||||
|
||||
case lineDisplay:
|
||||
{
|
||||
rxWidgetPtr->getImageViewerPtr()->displayImage();
|
||||
}
|
||||
break;
|
||||
case endSSTVImageRX:
|
||||
if(autoSave)
|
||||
{
|
||||
addToLog("dispatcher:endImage savingRxImage",LOGDISPATCH);
|
||||
saveRxSSTVImage(((endImageSSTVRXEvent*)e)->getModeName());
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case rxDRMStatus:
|
||||
rxWidgetPtr->setDRMStatusText(((rxDRMStatusEvent*)e)->getStr());
|
||||
|
||||
break;
|
||||
|
||||
case statusBarMsg:
|
||||
statusBarPtr->showMessage(((statusBarMsgEvent*)e)->getStr());
|
||||
break;
|
||||
case callEditor:
|
||||
if(editorActive) break;
|
||||
editorActive=true;
|
||||
ed=new editor();
|
||||
ed->show();
|
||||
iv=((callEditorEvent*)e)->getImageViewer();
|
||||
addToLog (QString(" callEditorEvent imageViewPtr: %1").arg(QString::number((ulong)iv,16)),LOGDISPATCH);
|
||||
addToLog(QString("editor: filename %1").arg(((callEditorEvent*)e)->getFilename()),LOGDISPATCH);
|
||||
ed->openFile(((callEditorEvent*)e)->getFilename());
|
||||
break;
|
||||
|
||||
case rxDRMNotify:
|
||||
rxWidgetPtr->setDRMNotifyText(((rxDRMNotifyEvent*)e)->getStr());
|
||||
break;
|
||||
case rxDRMNotifyAppend:
|
||||
rxWidgetPtr->appendDRMNotifyText(((rxDRMNotifyAppendEvent*)e)->getStr());
|
||||
break;
|
||||
case txDRMNotify:
|
||||
txWidgetPtr->setDRMNotifyText(((txDRMNotifyEvent*)e)->getStr());
|
||||
break;
|
||||
case txDRMNotifyAppend:
|
||||
txWidgetPtr->appendDRMNotifyText(((txDRMNotifyAppendEvent*)e)->getStr());
|
||||
break;
|
||||
case txPrepareComplete:
|
||||
txWidgetPtr->prepareTxComplete(((txPrepareCompleteEvent *)e)->ok());
|
||||
break;
|
||||
|
||||
case editorFinished:
|
||||
if(!editorActive) break;
|
||||
if(((editorFinishedEvent*)e)->isOK())
|
||||
{
|
||||
addToLog (QString(" editorFinishedEvent imageViewPtr: %1").arg(QString::number((ulong)iv,16)),LOGDISPATCH);
|
||||
iv->reload();
|
||||
}
|
||||
editorActive=false;
|
||||
delete ed;
|
||||
break;
|
||||
|
||||
case templatesChanged:
|
||||
galleryWidgetPtr->changedMatrix(imageViewer::TEMPLATETHUMB);
|
||||
txWidgetPtr->setupTemplatesComboBox();
|
||||
break;
|
||||
|
||||
case progressTX:
|
||||
txTimeCounter=0;
|
||||
addToLog(QString("dispatcher: progress duration=%1").arg(((progressTXEvent*)e)->getInfo()),LOGDISPATCH);
|
||||
prTimerIndex=startTimer(((progressTXEvent*)e)->getInfo()*10); // time in seconds -> times 1000 for msec,divide by 100 for progress
|
||||
break;
|
||||
|
||||
case stoppingTX:
|
||||
addToLog("dispatcher: endTXImage",LOGDISPATCH);
|
||||
break;
|
||||
|
||||
case endImageTX:
|
||||
//addToLog("dispatcher: endTXImage",LOGDISPATCH);
|
||||
while(soundIOPtr->isPlaying())
|
||||
{
|
||||
qApp->processEvents();
|
||||
}
|
||||
addToLog("dispatcher: endTXImage",LOGDISPATCH);
|
||||
startRX();
|
||||
break;
|
||||
|
||||
case displayDRMInfo:
|
||||
if(!slowCPU)
|
||||
{
|
||||
rxWidgetPtr->mscWdg()->setConstellation(MSC);
|
||||
rxWidgetPtr->facWdg()->setConstellation(FAC);
|
||||
}
|
||||
rxWidgetPtr->statusWdg()->setStatus();
|
||||
break;
|
||||
|
||||
case displayDRMStat:
|
||||
DSPFLOAT s1;
|
||||
((displayDRMStatEvent*)e)->getInfo(s1);
|
||||
rxWidgetPtr->sMeterPtr()->setValue(s1);
|
||||
break;
|
||||
|
||||
case loadRXImage:
|
||||
{
|
||||
QString fn=((loadRXImageEvent *)e)->getFilename();
|
||||
rxWidgetPtr->getImageViewerPtr()->openImage(fn,false,false,false);
|
||||
}
|
||||
break;
|
||||
case moveToTx:
|
||||
{
|
||||
txWidgetPtr->setImage(((moveToTxEvent *)e)->getFilename());
|
||||
}
|
||||
break;
|
||||
case saveDRMImage:
|
||||
{
|
||||
QString info;
|
||||
((saveDRMImageEvent*)e)->getFilename(fn);
|
||||
((saveDRMImageEvent*)e)->getInfo(info);
|
||||
if(!rxWidgetPtr->getImageViewerPtr()->openImage(fn,false,false,false))
|
||||
{
|
||||
if(mbox==NULL) delete mbox;
|
||||
mbox = new QMessageBox(mainWindowPtr);
|
||||
mbox->setWindowTitle("Received file");
|
||||
mbox->setText(QString("Saved file %1").arg(fn));
|
||||
mbox->show();
|
||||
QTimer::singleShot(4000, mbox, SLOT(hide()));
|
||||
break;
|
||||
}
|
||||
saveImage(fn, info);
|
||||
}
|
||||
break;
|
||||
|
||||
case prepareFix:
|
||||
addToLog("prepareFix",LOGDISPATCH);
|
||||
startDRMFIXTx( ((prepareFixEvent*)e)->getData());
|
||||
break;
|
||||
case displayText:
|
||||
infoTextPtr->clear();
|
||||
infoTextPtr->setWindowTitle(QString("Received from %1").arg(drmCallsign));
|
||||
infoTextPtr->append(((displayTextEvent*)e)->getStr());
|
||||
infoTextPtr->show();
|
||||
break;
|
||||
|
||||
case displayMBox:
|
||||
if(mbox==NULL) delete mbox;
|
||||
mbox = new QMessageBox(mainWindowPtr);
|
||||
mbox->setWindowTitle(((displayMBoxEvent*)e)->getTitle());
|
||||
mbox->setText(((displayMBoxEvent*)e)->getStr());
|
||||
mbox->show();
|
||||
QTimer::singleShot(4000, mbox, SLOT(hide()));
|
||||
break;
|
||||
|
||||
case displayProgressFTP:
|
||||
{
|
||||
if(((displayProgressFTPEvent*)e)->getTotal()==0)
|
||||
{
|
||||
delete progressFTP;
|
||||
progressFTP=NULL;
|
||||
break;
|
||||
}
|
||||
if(progressFTP==NULL)
|
||||
{
|
||||
progressFTP=new QProgressDialog("FTP Transfer","Cancel",0,0,mainWindowPtr);
|
||||
}
|
||||
progressFTP->show();
|
||||
progressFTP->setMaximum(((displayProgressFTPEvent*)e)->getTotal());
|
||||
progressFTP->setValue(((displayProgressFTPEvent*)e)->getBytes());
|
||||
}
|
||||
break;
|
||||
case ftpSetup:
|
||||
|
||||
iPtr=((ftpSetupEvent*)e)->getFtpIntfPtr();
|
||||
if(iPtr==notifyRXIntf)
|
||||
{
|
||||
notifyRXDone=DFTPWAITING;
|
||||
}
|
||||
else if(iPtr==hybridTxIntf)
|
||||
{
|
||||
hybridTxDone=DFTPWAITING;
|
||||
}
|
||||
else if(iPtr==notifyTXIntf)
|
||||
{
|
||||
notifyTxDone=DFTPWAITING;
|
||||
}
|
||||
iPtr->setupConnection(
|
||||
((ftpSetupEvent*)e)->getHost(),
|
||||
((ftpSetupEvent*)e)->getPort(),
|
||||
((ftpSetupEvent*)e)->getUser(),
|
||||
((ftpSetupEvent*)e)->getPassword(),
|
||||
((ftpSetupEvent*)e)->getDir());
|
||||
break;
|
||||
|
||||
case ftpUploadFile:
|
||||
|
||||
((ftpUploadFileEvent*)e)->getFtpIntfPtr()->uploadFile(
|
||||
((ftpUploadFileEvent*)e)->getSrcFn(),
|
||||
((ftpUploadFileEvent*)e)->getDstFn(),
|
||||
((ftpUploadFileEvent*)e)->getReconnect()
|
||||
);
|
||||
break;
|
||||
|
||||
|
||||
case notifyAction:
|
||||
notifyRXIntf->mremove(((notifyActionEvent*)e)->getToRemove());
|
||||
notifyRXIntf->uploadData(((notifyActionEvent*)e)->getMsg().toLatin1(), ((notifyActionEvent*)e)->getFilename());
|
||||
break;
|
||||
|
||||
case notifyCheck:
|
||||
|
||||
|
||||
iPtr=((ftpSetupEvent*)e)->getFtpIntfPtr();
|
||||
|
||||
iPtr->startNotifyCheck(
|
||||
((notifyCheckEvent*)e)->getFilename(),
|
||||
((notifyCheckEvent*)e)->getInterval(),
|
||||
((notifyCheckEvent*)e)->getRepeats(),
|
||||
((notifyCheckEvent*)e)->getToRemove()
|
||||
);
|
||||
break;
|
||||
default:
|
||||
addToLog(QString("unsupported event: %1").arg(((baseEvent*)e)->description), LOGALL);
|
||||
break;
|
||||
}
|
||||
((baseEvent *)e)->setDone();
|
||||
}
|
||||
|
||||
|
||||
void dispatcher::idleAll()
|
||||
{
|
||||
if(prTimerIndex>=0)
|
||||
{
|
||||
killTimer(prTimerIndex);
|
||||
prTimerIndex=-1;
|
||||
txWidgetPtr->setProgress(0);
|
||||
}
|
||||
rigControllerPtr->activatePTT(false);
|
||||
rxWidgetPtr->functionsPtr()->stopAndWait();
|
||||
txWidgetPtr->functionsPtr()->stopAndWait();
|
||||
}
|
||||
|
||||
|
||||
void dispatcher::startRX()
|
||||
{
|
||||
idleAll();
|
||||
soundIOPtr->startCapture();
|
||||
rxWidgetPtr->functionsPtr()->startRX();
|
||||
}
|
||||
|
||||
void dispatcher::startTX(txFunctions::etxState state)
|
||||
{
|
||||
idleAll();
|
||||
rigControllerPtr->activatePTT(true);
|
||||
soundIOPtr->startPlayback();
|
||||
txWidgetPtr->functionsPtr()->startTX(state);
|
||||
}
|
||||
|
||||
void dispatcher::prepareTX(txFunctions::etxState state)
|
||||
{
|
||||
txWidgetPtr->functionsPtr()->prepareTX(state);
|
||||
}
|
||||
|
||||
void dispatcher::startDRMFIXTx(QByteArray ba)
|
||||
{
|
||||
if(!txWidgetPtr->functionsPtr()->prepareFIX(ba)) return;
|
||||
startTX(txFunctions::TXSENDDRMFIX);
|
||||
}
|
||||
|
||||
void dispatcher::startDRMTxBinary()
|
||||
{
|
||||
//TODO: this whole thing should probably live in txWidget::slotBinary
|
||||
QFileInfo finfo;
|
||||
int txtime=0;
|
||||
QMessageBox mbox(mainWindowPtr);
|
||||
QPushButton *sendButton;
|
||||
|
||||
dirDialog d((QWidget *)mainWindowPtr,"Binary File");
|
||||
QString filename=d.openFileName("","*");
|
||||
if(filename.isEmpty()) return;
|
||||
if(!txWidgetPtr->functionsPtr()->prepareBinary(filename)) return;
|
||||
|
||||
txtime = txWidgetPtr->functionsPtr()->calcTxTime(true,0);
|
||||
finfo.setFile(filename);
|
||||
|
||||
if (txtime > (3*60))
|
||||
mbox.setIcon(QMessageBox::Warning);
|
||||
|
||||
mbox.setWindowTitle("TX Binary File");
|
||||
mbox.setText(QString("'%1'").arg(filename));
|
||||
mbox.setInformativeText(QString("The file is %1Kb and will take %2 seconds on air to send").
|
||||
arg(finfo.size()/1000.0,0,'f',0).arg(txtime));
|
||||
|
||||
if (useHybrid)
|
||||
sendButton = mbox.addButton(tr("Upload ready to transmit"), QMessageBox::AcceptRole);
|
||||
else
|
||||
sendButton = mbox.addButton(tr("Start Transmitting"), QMessageBox::AcceptRole);
|
||||
mbox.setStandardButtons(QMessageBox::Cancel);
|
||||
|
||||
mbox.exec();
|
||||
if (mbox.clickedButton() == sendButton) {
|
||||
txWidgetPtr->functionsPtr()->prepareTX(txFunctions::TXPREPAREDRMBINARY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dispatcher::logSSTV(QString call,bool fromFSKID)
|
||||
{
|
||||
if(lastFileName.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(fromFSKID)
|
||||
{
|
||||
QDateTime dt(QDateTime::currentDateTime().toUTC());
|
||||
int diffsec=saveTimeStamp.secsTo(dt);
|
||||
if(diffsec<2)
|
||||
{
|
||||
logBookPtr->logQSO(call,"SSTV",lastFileName);
|
||||
}
|
||||
lastCallsign=call;
|
||||
}
|
||||
else
|
||||
{
|
||||
logBookPtr->logQSO(call,"SSTV","");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void dispatcher::saveRxSSTVImage(QString shortModeName)
|
||||
{
|
||||
QString info,s,fileName;
|
||||
int m;
|
||||
QDateTime dt(QDateTime::currentDateTime().toUTC()); //this is compatible with QT 4.6
|
||||
dt.setTimeSpec(Qt::UTC);
|
||||
if (shortModeName.isEmpty())
|
||||
{
|
||||
lastFileName.clear();
|
||||
return;
|
||||
}
|
||||
if(!autoSave)
|
||||
{
|
||||
lastFileName=shortModeName;
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName=QString("%1/%2_%3.%4").arg(rxSSTVImagesPath).arg(shortModeName).arg(dt.toString("yyyyMMdd_HHmmss")).arg(defaultImageFormat);
|
||||
addToLog(QString("dispatcher: saveRxImage():%1 ").arg(fileName),LOGDISPATCH);
|
||||
rxWidgetPtr->getImageViewerPtr()->save(fileName,defaultImageFormat,true,false);
|
||||
|
||||
info="";
|
||||
m=0;
|
||||
while (m<=NUMSSTVMODES && shortModeName!=SSTVTable[m].shortName) m++;
|
||||
if (m<=NUMSSTVMODES)
|
||||
info += SSTVTable[m].name;
|
||||
else
|
||||
info += shortModeName;
|
||||
|
||||
if (!lastCallsign.isEmpty())
|
||||
info += " de "+lastCallsign;
|
||||
|
||||
saveImage(fileName, info);
|
||||
lastFileName=QString("%1_%2.%3").arg(shortModeName).arg(dt.toString("yyyyMMdd_HHmmss")).arg(defaultImageFormat);
|
||||
saveTimeStamp= dt;
|
||||
}
|
||||
}
|
||||
|
||||
void dispatcher::saveImage(QString fileName, QString infotext)
|
||||
{
|
||||
QFileInfo info(fileName);
|
||||
QString fn="/tmp/"+info.baseName()+"."+ftpDefaultImageFormat;
|
||||
galleryWidgetPtr->putRxImage(fileName);
|
||||
txWidgetPtr->setPreviewWidget(fileName);
|
||||
if(enableFTP)
|
||||
{
|
||||
QImage *imp = rxWidgetPtr->getImageViewerPtr()->getImagePtr();
|
||||
QImage im;
|
||||
|
||||
if (imp && imp->width()) {
|
||||
// the original source image is available, possibly in higher quality
|
||||
// than the displayed image. Only for DRM Images.
|
||||
im = QImage(imp->convertToFormat(QImage::Format_RGB32));
|
||||
}
|
||||
else {
|
||||
// Uses the displayed image in whatever quality is displayed.
|
||||
// Applies to SSTV images.
|
||||
rxWidgetPtr->getImageViewerPtr()->save(fn,ftpDefaultImageFormat,true,false);
|
||||
im = QImage(fn);
|
||||
}
|
||||
QString text, remoteDir;
|
||||
QPainter p;
|
||||
double freq=0;
|
||||
int pixelSize, height, width;
|
||||
|
||||
rigControllerPtr->getFrequency(freq);
|
||||
|
||||
text = QString("%1 UTC %2 kHz ").
|
||||
arg(QDateTime::currentDateTime().toUTC().toString("hh:mm ddd MMM d, yyyy")).
|
||||
arg(freq/1000,1,'f',0);
|
||||
|
||||
if (transmissionModeIndex==TRXSSTV) {
|
||||
remoteDir = ftpRemoteSSTVDirectory;
|
||||
}
|
||||
else {
|
||||
remoteDir = ftpRemoteDRMDirectory;
|
||||
}
|
||||
|
||||
if (!infotext.isEmpty()) text += " "+infotext;
|
||||
|
||||
// Limit uploaded size
|
||||
if ((im.width() > 960) || (im.height() > 768)) {
|
||||
im = im.scaled(960,768, Qt::KeepAspectRatio);
|
||||
}
|
||||
|
||||
// Stamp text over the top left of the image
|
||||
// and keep it the same portion, unless the
|
||||
// font would be unreadable
|
||||
QFont font("Arial");
|
||||
pixelSize = 9 * im.width()/320;
|
||||
if (pixelSize<8) pixelSize=8;
|
||||
font.setPixelSize(pixelSize);
|
||||
QFontMetrics fontm(font);
|
||||
|
||||
width = fontm.width(text) + 6;
|
||||
height= fontm.height() + 2;
|
||||
|
||||
p.begin(&im);
|
||||
p.setPen(Qt::black);
|
||||
p.fillRect(0,0,width,height, Qt::black);
|
||||
p.setPen(Qt::white);
|
||||
p.setBrush(Qt::white);
|
||||
p.setFont(font);
|
||||
p.drawText(2,height-fontm.descent()-1, text);
|
||||
|
||||
im.save(fn, ftpDefaultImageFormat.toUpper().toLatin1().data());
|
||||
p.end();
|
||||
|
||||
uploadToRXServer(remoteDir, fn);
|
||||
QFile::remove(fn);
|
||||
}
|
||||
}
|
||||
|
||||
void dispatcher::uploadToRXServer(QString remoteDir, QString fn)
|
||||
{
|
||||
displayMBoxEvent *stmb=0;
|
||||
eftpError ftpResult;
|
||||
|
||||
ftpInterface ftpIntf("Save RX Image");
|
||||
|
||||
ftpIntf.setupConnection(ftpRemoteHost,ftpPort,ftpLogin,ftpPassword,remoteDir);
|
||||
|
||||
ftpResult=ftpIntf.uploadToRXServer(fn);
|
||||
switch(ftpResult)
|
||||
{
|
||||
case FTPOK:
|
||||
break;
|
||||
case FTPERROR:
|
||||
stmb= new displayMBoxEvent("FTP Error",QString("Host: %1: %2").arg(ftpRemoteHost).arg(ftpIntf.getLastError()));
|
||||
break;
|
||||
case FTPNAMEERROR:
|
||||
stmb= new displayMBoxEvent("FTP Error",QString("Host: %1, Error in filename").arg(ftpRemoteHost));
|
||||
break;
|
||||
case FTPCANCELED:
|
||||
stmb= new displayMBoxEvent("FTP Error",QString("Connection to %1 Canceled").arg(ftpRemoteHost));
|
||||
break;
|
||||
case FTPTIMEOUT:
|
||||
stmb= new displayMBoxEvent("FTP Error",QString("Connection to %1 timed out").arg(ftpRemoteHost));
|
||||
break;
|
||||
default:
|
||||
stmb= new displayMBoxEvent("FTP Error",QString("Unknown FTP error: %1").arg(ftpResult));
|
||||
break;
|
||||
}
|
||||
if(ftpResult!=FTPOK)
|
||||
{
|
||||
QApplication::postEvent( dispatcherPtr, stmb ); // Qt will delete it when done
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dispatcher::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
if(event->timerId()==prTimerIndex)
|
||||
{
|
||||
txWidgetPtr->setProgress(++txTimeCounter);
|
||||
if(txTimeCounter>=100)
|
||||
{
|
||||
if(prTimerIndex>=0)
|
||||
{
|
||||
killTimer(prTimerIndex);
|
||||
prTimerIndex=-1;
|
||||
txWidgetPtr->setProgress(0);
|
||||
}
|
||||
}
|
||||
txWidgetPtr->setProgress(txTimeCounter);
|
||||
}
|
||||
}
|
||||
|
||||
void dispatcher::slotRXNotification(QString info)
|
||||
{
|
||||
if (info != "")
|
||||
{
|
||||
rxWidgetPtr->appendDRMNotifyText(info);
|
||||
}
|
||||
}
|
||||
|
||||
void dispatcher::slotTXNotification(QString info)
|
||||
{
|
||||
if (info != "")
|
||||
{
|
||||
txWidgetPtr->appendDRMNotifyText(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void dispatcher::slotHybridTxDone(bool error)
|
||||
{
|
||||
if(error)
|
||||
{
|
||||
hybridTxDone=DFTPERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
hybridTxDone=DFTPOK;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2000-2008 by Johan Maes *
|
||||
* on4qz@telenet.be *
|
||||
* http://users.telenet.be/on4qz *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef DISPATCHER_H
|
||||
#define DISPATCHER_H
|
||||
#include "dispatchevents.h"
|
||||
#include "appglobal.h"
|
||||
#include <QByteArray>
|
||||
#include "textdisplay.h"
|
||||
#include "txfunctions.h"
|
||||
class editor;
|
||||
class imageViewer;
|
||||
#include <QProgressDialog>
|
||||
|
||||
enum eftpResult {DFTPWAITING,DFTPOK,DFTPERROR};
|
||||
|
||||
/**
|
||||
@author Johan Maes
|
||||
*/
|
||||
class dispatcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
dispatcher();
|
||||
~dispatcher();
|
||||
void init();
|
||||
void idleAll();
|
||||
void startRX();
|
||||
void startTX(txFunctions::etxState state);
|
||||
void prepareTX(txFunctions::etxState state);
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
void customEvent( QEvent * e );
|
||||
void startDRMFIXTx(QByteArray ba);
|
||||
void startDRMTxBinary();
|
||||
// void startDRMHybridTx(QString fn);
|
||||
// void startDRMHybridText(QString txt);
|
||||
// void sendSweepTone(double duration,double lowerFreq,double upperFreq);
|
||||
void saveImage(QString fileName, QString infotext);
|
||||
void uploadToRXServer(QString remoteDir, QString fn);
|
||||
void logSSTV(QString call, bool fromFSKID);
|
||||
void setOnlineStatus(bool online, QString info="");
|
||||
void who();
|
||||
eftpResult notifyRXDone;
|
||||
eftpResult hybridTxDone;
|
||||
eftpResult notifyTxDone;
|
||||
|
||||
|
||||
private slots:
|
||||
void slotRXNotification(QString info);
|
||||
void slotTXNotification(QString);
|
||||
// void slotWhoResult();
|
||||
void slotHybridTxDone(bool error);
|
||||
|
||||
|
||||
private:
|
||||
void saveRxSSTVImage(QString shortModeName);
|
||||
void timerEvent(QTimerEvent *event);
|
||||
bool editorActive;
|
||||
editor *ed;
|
||||
imageViewer *iv;
|
||||
int txTimeCounter;
|
||||
int prTimerIndex;
|
||||
int logTimerIndex;
|
||||
textDisplay *infoTextPtr;
|
||||
QMessageBox *mbox;
|
||||
QProgressDialog *progressFTP;
|
||||
QString lastFileName;
|
||||
QString lastCallsign;
|
||||
QDateTime saveTimeStamp;
|
||||
};
|
||||
#endif
|
||||
|
|
@ -0,0 +1,758 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2000-2008 by Johan Maes *
|
||||
* on4qz@telenet.be *
|
||||
* http://users.telenet.be/on4qz *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the *
|
||||
* Free Software Foundation, Inc., *
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
#ifndef DISPATCHEVENT_H
|
||||
#define DISPATCHEVENT_H
|
||||
#include <QEvent>
|
||||
#include "widgets/imageviewer.h"
|
||||
#include "appdefs.h"
|
||||
#include <unistd.h>
|
||||
|
||||
class ftpInterface;
|
||||
|
||||
|
||||
/** dispatch events are used to communicate with the different threads */
|
||||
enum dispatchEventType
|
||||
{
|
||||
info = QEvent::User, //!< send when dsp stops running
|
||||
soundcardIdle, //!< send when soundcard stops running
|
||||
displayFFT,
|
||||
displaySync,
|
||||
displayDRMStat,
|
||||
displayDRMInfo,
|
||||
syncDisp, //!< synchro display event
|
||||
lineDisplay, //!< display 1 line
|
||||
eraseDisp,
|
||||
createMode,
|
||||
startImageRX,
|
||||
endSSTVImageRX,
|
||||
endImageTX,
|
||||
stoppingTX,
|
||||
progressTX,
|
||||
// verticalRetrace,
|
||||
// syncLost,
|
||||
outOfSync,
|
||||
// statusMsg, //!< display status message
|
||||
rxSSTVStatus, //! shows message in sstv tab
|
||||
rxDRMStatus, //! shows message in drm tab
|
||||
rxDRMNotify, //! shows text in rx notifications box
|
||||
rxDRMNotifyAppend,
|
||||
txDRMNotify, //! shows text in tx notifications box
|
||||
txDRMNotifyAppend,
|
||||
txPrepareComplete, //!< tx preparations (uploading etc) complete
|
||||
closeWindows,
|
||||
callEditor,
|
||||
templatesChanged,
|
||||
editorFinished,
|
||||
changeRXFilter,
|
||||
startAutoRepeater,
|
||||
startRepeater,
|
||||
stopRxTx,
|
||||
loadRXImage,
|
||||
saveDRMImage,
|
||||
prepareFix,
|
||||
displayText,
|
||||
displayMBox,
|
||||
displayProgressFTP,
|
||||
moveToTx,
|
||||
notifyAction,
|
||||
ftpSetup,
|
||||
notifyCheck,
|
||||
ftpUploadFile,
|
||||
statusBarMsg
|
||||
};
|
||||
|
||||
class baseEvent: public QEvent
|
||||
{
|
||||
public:
|
||||
baseEvent(QEvent::Type t):QEvent(t) {doneIt=NULL;}
|
||||
void waitFor(bool *d) {doneIt=d;}
|
||||
void setDone()
|
||||
{
|
||||
if(doneIt!=NULL) *doneIt=true;
|
||||
}
|
||||
QString description;
|
||||
private:
|
||||
bool *doneIt;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
this event is send when the dspfunc thread stops running
|
||||
*/
|
||||
class infoEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
infoEvent(QString t):baseEvent( (QEvent::Type) info ), str(t)
|
||||
{
|
||||
description="infoEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
/**
|
||||
this event is send when the soundcard thread goes to idle
|
||||
*/
|
||||
class soundcardIdleEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
soundcardIdleEvent():baseEvent( (QEvent::Type) soundcardIdle )
|
||||
{
|
||||
{
|
||||
description=" soudcardIdleEvent";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
this event is send with teh sync quality info and the signal volume
|
||||
*/
|
||||
class displaySyncEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displaySyncEvent(uint s):baseEvent( (QEvent::Type) displaySync), sync(s)
|
||||
{
|
||||
description=" displaySyncEvent";
|
||||
}
|
||||
/** returns int sync value */
|
||||
void getInfo(uint &s) {s=sync;}
|
||||
|
||||
private:
|
||||
uint sync;
|
||||
DSPFLOAT vol;
|
||||
};
|
||||
|
||||
class displayDRMStatEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayDRMStatEvent(uint s):baseEvent( (QEvent::Type) displayDRMStat), snr(s)
|
||||
{
|
||||
description=" displayDRMStatEvent";
|
||||
}
|
||||
/** returns length and pointer from the event */
|
||||
void getInfo(DSPFLOAT &s) {s=snr;}
|
||||
|
||||
private:
|
||||
DSPFLOAT snr;
|
||||
};
|
||||
|
||||
//class statusMsgEvent : public baseEvent
|
||||
//{
|
||||
//public:
|
||||
// /** create event */
|
||||
// statusMsgEvent(QString t):baseEvent( (QEvent::Type)statusMsg ), str(t)
|
||||
// {
|
||||
// description="statusMsgEvent";
|
||||
// }
|
||||
// /** returns info string from the event */
|
||||
// QString getStr() const { return str; }
|
||||
//private:
|
||||
// QString str;
|
||||
//};
|
||||
|
||||
class ftpSetupEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
ftpSetupEvent(ftpInterface * ftpIntf,QString h,int p,QString u,QString pwd,QString d)
|
||||
:baseEvent( (QEvent::Type)ftpSetup ),ftpIntfPtr(ftpIntf), host(h),port(p),user(u),password(pwd),dir(d)
|
||||
{
|
||||
description="ftpSetupEvent";
|
||||
}
|
||||
/** returns settings from the event */
|
||||
ftpInterface *getFtpIntfPtr() const { return ftpIntfPtr; }
|
||||
QString getHost() const { return host; }
|
||||
int getPort() const { return port; }
|
||||
QString getUser() const { return user; }
|
||||
QString getPassword() const { return password; }
|
||||
QString getDir() const { return dir; }
|
||||
private:
|
||||
ftpInterface *ftpIntfPtr;
|
||||
QString host;
|
||||
int port;
|
||||
QString user;
|
||||
QString password;
|
||||
QString dir;
|
||||
};
|
||||
|
||||
class ftpUploadFileEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
ftpUploadFileEvent(ftpInterface * ftpIntf,QString srcFn,QString dstFn,bool recon)
|
||||
:baseEvent( (QEvent::Type)ftpUploadFile ),ftpIntfPtr(ftpIntf),sourceFilename(srcFn), destFilename(dstFn),reconnect(recon)
|
||||
{
|
||||
description="ftpUploadFileEvent";
|
||||
}
|
||||
/** returns settings from the event */
|
||||
ftpInterface *getFtpIntfPtr() const { return ftpIntfPtr; }
|
||||
QString getSrcFn() const { return sourceFilename; }
|
||||
QString getDstFn() const { return destFilename; }
|
||||
bool getReconnect() const { return reconnect; }
|
||||
private:
|
||||
ftpInterface *ftpIntfPtr;
|
||||
QString sourceFilename;
|
||||
QString destFilename;
|
||||
bool reconnect;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class notifyActionEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
notifyActionEvent(QString toRem,QString message,QString fn)
|
||||
:baseEvent( (QEvent::Type)notifyAction ), toRemove(toRem),msg(message),filename(fn)
|
||||
{
|
||||
description="notifyActionEvent";
|
||||
}
|
||||
/** returns settings from the event */
|
||||
QString getToRemove() const { return toRemove; }
|
||||
QString getMsg() const { return msg; }
|
||||
QString getFilename() const { return filename; }
|
||||
private:
|
||||
QString toRemove;
|
||||
QString msg;
|
||||
QString filename;
|
||||
};
|
||||
|
||||
|
||||
class notifyCheckEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
notifyCheckEvent(ftpInterface * ftpIntf,QString fn,int intv, int rp, bool rm)
|
||||
:baseEvent( (QEvent::Type)notifyCheck),ftpIntfPtr(ftpIntf), filename(fn),interval(intv),repeats(rp),remove(rm)
|
||||
{
|
||||
description="notifyCheckEvent";
|
||||
}
|
||||
/** returns settings from the event */
|
||||
ftpInterface *getFtpIntfPtr() const { return ftpIntfPtr; }
|
||||
QString getFilename() const { return filename; }
|
||||
int getInterval() const { return interval; }
|
||||
int getRepeats() const { return repeats; }
|
||||
bool getToRemove() const { return remove; }
|
||||
private:
|
||||
ftpInterface *ftpIntfPtr;
|
||||
QString filename;
|
||||
int interval;
|
||||
int repeats;
|
||||
bool remove;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class rxSSTVStatusEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
rxSSTVStatusEvent(QString t):baseEvent( (QEvent::Type)rxSSTVStatus ), str(t)
|
||||
{
|
||||
description="rxSSTVStatusEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class rxDRMStatusEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
rxDRMStatusEvent(QString t):baseEvent( (QEvent::Type)rxDRMStatus ), str(t)
|
||||
{
|
||||
description="rxDRMStatusEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class rxDRMNotifyEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
rxDRMNotifyEvent(QString t):baseEvent( (QEvent::Type)rxDRMNotify ), str(t)
|
||||
{
|
||||
description="rxDRMNotifyEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class rxDRMNotifyAppendEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
rxDRMNotifyAppendEvent(QString t):baseEvent( (QEvent::Type)rxDRMNotifyAppend ), str(t)
|
||||
{
|
||||
description="rxDRMNotifyAppendEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class txDRMNotifyEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
txDRMNotifyEvent(QString t):baseEvent( (QEvent::Type)txDRMNotify ), str(t)
|
||||
{
|
||||
description="txDRMNotifyEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class txDRMNotifyAppendEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
txDRMNotifyAppendEvent(QString t):baseEvent( (QEvent::Type)txDRMNotifyAppend ), str(t)
|
||||
{
|
||||
description="txDRMNotifyAppendEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class txPrepareCompleteEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
txPrepareCompleteEvent(bool tok):baseEvent( (QEvent::Type)txPrepareComplete ), _ok(tok)
|
||||
{
|
||||
description="txPrepareCompleteEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
bool ok() const { return _ok; }
|
||||
private:
|
||||
bool _ok;
|
||||
};
|
||||
|
||||
class lineDisplayEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
lineDisplayEvent(uint lineNbr):baseEvent( (QEvent::Type)lineDisplay ), lineNumber(lineNbr)
|
||||
{
|
||||
description="lineDisplayEvent";
|
||||
}
|
||||
/** returns length and pointer from the event */
|
||||
void getInfo(uint &lineNbr) const { lineNbr=lineNumber;}
|
||||
|
||||
private:
|
||||
uint lineNumber;
|
||||
};
|
||||
|
||||
class eraseDisplayEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
eraseDisplayEvent():baseEvent( (QEvent::Type)eraseDisp )
|
||||
{
|
||||
description="eraseDisplayEvent";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class displayDRMInfoEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayDRMInfoEvent():baseEvent( (QEvent::Type)displayDRMInfo)
|
||||
{
|
||||
description="displayDRMInfo";
|
||||
}
|
||||
};
|
||||
|
||||
class startAutoRepeaterEvent: public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
startAutoRepeaterEvent():baseEvent( (QEvent::Type)startAutoRepeater )
|
||||
{
|
||||
description="startAutoRepeaterEvent";
|
||||
}
|
||||
};
|
||||
|
||||
class startRepeaterEvent: public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
startRepeaterEvent():baseEvent( (QEvent::Type)startRepeater )
|
||||
{
|
||||
description="startRepeaterEvent";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class createModeEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
createModeEvent(uint m,QString t):baseEvent( (QEvent::Type)createMode ), mode(m) ,str(t)
|
||||
{
|
||||
description="createModeEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
void getMode(uint &m,QString &s) const { m=mode;s=str; }
|
||||
private:
|
||||
uint mode;
|
||||
QString str;
|
||||
};
|
||||
|
||||
class loadRXImageEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
loadRXImageEvent(QString fn):baseEvent( (QEvent::Type)loadRXImage),fileName(fn)
|
||||
{
|
||||
description="loadRXImageEvent";
|
||||
}
|
||||
QString getFilename() {return fileName;}
|
||||
private:
|
||||
QString fileName;
|
||||
};
|
||||
|
||||
|
||||
class moveToTxEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
moveToTxEvent(QString fn):baseEvent( (QEvent::Type)moveToTx),fileName(fn)
|
||||
{
|
||||
description="moveToTxEvent";
|
||||
}
|
||||
QString getFilename() {return fileName;}
|
||||
private:
|
||||
QString fileName;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class saveDRMImageEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
saveDRMImageEvent(QString fn,QString i):baseEvent( (QEvent::Type)saveDRMImage),fileName(fn),info(i)
|
||||
{
|
||||
description="saveDRMImageEvent";
|
||||
}
|
||||
void getFilename(QString &fn) {fn=fileName;}
|
||||
void getInfo(QString &i) {i=info;}
|
||||
private:
|
||||
QString fileName;
|
||||
QString info;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class startImageRXEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
startImageRXEvent(QSize ims):baseEvent( (QEvent::Type)startImageRX ),imSize(ims)
|
||||
{
|
||||
description="startImageRXEvent";
|
||||
}
|
||||
QSize getSize() {return imSize;}
|
||||
private:
|
||||
QSize imSize;
|
||||
|
||||
};
|
||||
|
||||
class endImageSSTVRXEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
endImageSSTVRXEvent(QString mn):baseEvent( (QEvent::Type)endSSTVImageRX ),modeName(mn)
|
||||
{
|
||||
description="endImageSSTVRXEvent";
|
||||
}
|
||||
QString getModeName() {return modeName;}
|
||||
private:
|
||||
QString modeName;
|
||||
};
|
||||
|
||||
class endImageTXEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
endImageTXEvent():baseEvent( (QEvent::Type)endImageTX )
|
||||
{
|
||||
description="endImageTXEvent";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class stopTXEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
stopTXEvent():baseEvent( (QEvent::Type)stoppingTX )
|
||||
{
|
||||
description="stopTXEvent";
|
||||
}
|
||||
};
|
||||
|
||||
//class verticalRetraceEvent : public baseEvent
|
||||
//{
|
||||
//public:
|
||||
// /** create event */
|
||||
// verticalRetraceEvent():baseEvent( (QEvent::Type) verticalRetrace )
|
||||
// {
|
||||
// description="verticalRetraceEvent";
|
||||
// }
|
||||
//};
|
||||
|
||||
//class syncLostEvent : public baseEvent
|
||||
//{
|
||||
//public:
|
||||
// /** create event */
|
||||
// syncLostEvent():baseEvent( (QEvent::Type) syncLost )
|
||||
// {
|
||||
// description="syncLostEvent";
|
||||
// }
|
||||
//};
|
||||
|
||||
|
||||
|
||||
class outOfSyncEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
outOfSyncEvent():baseEvent( (QEvent::Type)outOfSync )
|
||||
{
|
||||
description="outOfSyncEvent";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class progressTXEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
progressTXEvent(double tim):baseEvent( (QEvent::Type)progressTX ), txTime(tim)
|
||||
{
|
||||
description="progressTXEvent";
|
||||
}
|
||||
/** returns length and pointer from the event */
|
||||
double getInfo() { return txTime;}
|
||||
|
||||
private:
|
||||
double txTime;
|
||||
};
|
||||
|
||||
class closeWindowsEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
closeWindowsEvent():baseEvent( (QEvent::Type)closeWindows)
|
||||
{
|
||||
description="closeWindowEvent";
|
||||
}
|
||||
/** returns length and pointer from the event */
|
||||
};
|
||||
|
||||
|
||||
|
||||
class callEditorEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
callEditorEvent(imageViewer *iv,QString fn):baseEvent( (QEvent::Type) callEditor ), filename(fn),imviewer(iv)
|
||||
{
|
||||
description="callEditorEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getFilename() const { return filename; }
|
||||
imageViewer *getImageViewer() { return imviewer; }
|
||||
private:
|
||||
QString filename;
|
||||
imageViewer *imviewer;
|
||||
};
|
||||
|
||||
|
||||
class templatesChangedEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
templatesChangedEvent():baseEvent( (QEvent::Type) templatesChanged )
|
||||
{
|
||||
description="templateChangeEvent";
|
||||
}
|
||||
};
|
||||
|
||||
class editorFinishedEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
editorFinishedEvent(bool b,QString fn):baseEvent( (QEvent::Type)editorFinished),ok(b),filename(fn)
|
||||
{
|
||||
description="editorFinishedEvent";
|
||||
}
|
||||
bool isOK() { return ok;}
|
||||
QString getFilename() const { return filename; }
|
||||
|
||||
private:
|
||||
bool ok;
|
||||
QString filename;
|
||||
|
||||
};
|
||||
|
||||
|
||||
class displayFFTEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayFFTEvent(DSPFLOAT *buf):baseEvent( (QEvent::Type)displayFFT),buffer(buf)
|
||||
{
|
||||
description="displayFFTEvent";
|
||||
}
|
||||
DSPFLOAT *data() { return buffer;}
|
||||
private:
|
||||
DSPFLOAT *buffer;
|
||||
|
||||
};
|
||||
|
||||
class filterRXChangedEvent: public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
filterRXChangedEvent(int fIndex):baseEvent( (QEvent::Type)changeRXFilter),filterIndex(fIndex)
|
||||
{
|
||||
description="filterChangedEvent";
|
||||
}
|
||||
int index() { return filterIndex;}
|
||||
private:
|
||||
int filterIndex;
|
||||
};
|
||||
|
||||
class stopRxTxEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
stopRxTxEvent():baseEvent( (QEvent::Type)stopRxTx)
|
||||
{
|
||||
description="stopRxTxEvent";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class prepareFixEvent: public baseEvent
|
||||
{
|
||||
public:
|
||||
prepareFixEvent(QByteArray ba):baseEvent( (QEvent::Type)prepareFix),data(ba)
|
||||
{
|
||||
description="filterChangedEvent";
|
||||
}
|
||||
QByteArray &getData() {return data;}
|
||||
private:
|
||||
QByteArray data;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
this event is send when the dspfunc thread stops running
|
||||
*/
|
||||
class displayTextEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayTextEvent(QString t):baseEvent( (QEvent::Type) displayText ), str(t)
|
||||
{
|
||||
description="displayTextEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
class displayMBoxEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayMBoxEvent(QString title,QString text):baseEvent( (QEvent::Type) displayMBox ), str(text), title(title)
|
||||
{
|
||||
description="displayMBoxEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
QString getTitle() const { return title; }
|
||||
|
||||
private:
|
||||
QString str;
|
||||
QString title;
|
||||
};
|
||||
|
||||
|
||||
class displayProgressFTPEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
displayProgressFTPEvent(quint64 byts,quint64 tot):baseEvent( (QEvent::Type) displayProgressFTP ), bytes(byts),total(tot)
|
||||
{
|
||||
description="displayMBoxEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
quint64 getTotal() const { return total; }
|
||||
quint64 getBytes() const { return bytes; }
|
||||
|
||||
private:
|
||||
quint64 bytes;
|
||||
quint64 total;
|
||||
|
||||
};
|
||||
|
||||
class statusBarMsgEvent : public baseEvent
|
||||
{
|
||||
public:
|
||||
/** create event */
|
||||
statusBarMsgEvent(QString t):baseEvent( (QEvent::Type)statusBarMsg ), str(t)
|
||||
{
|
||||
description="statusBarMsgEvent";
|
||||
}
|
||||
/** returns info string from the event */
|
||||
QString getStr() const { return str; }
|
||||
private:
|
||||
QString str;
|
||||
};
|
||||
|
||||
#endif
|
Po Szerokość: | Wysokość: | Rozmiar: 925 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 568 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 99 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 96 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 386 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 180 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 189 B |
Po Szerokość: | Wysokość: | Rozmiar: 8.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 29 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 17 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 15 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 34 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 60 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 42 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 62 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 81 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 51 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 80 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 76 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 31 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 54 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 71 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 34 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 30 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 156 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 45 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 64 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 106 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 9.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 7.1 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 58 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 43 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.2 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 10 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 277 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.7 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 2.3 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 492 B |
Po Szerokość: | Wysokość: | Rozmiar: 10 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 487 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 18 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 5.4 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 1.6 KiB |
Po Szerokość: | Wysokość: | Rozmiar: 288 KiB |