2012-05-22 13:09:48 -04:00
|
|
|
#include "widegraph.h"
|
2017-06-04 18:51:26 -04:00
|
|
|
|
2017-05-07 11:14:42 -04:00
|
|
|
#include <algorithm>
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include <QApplication>
|
|
|
|
#include <QSettings>
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "ui_widegraph.h"
|
2012-10-10 20:51:16 -04:00
|
|
|
#include "commons.h"
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include "Configuration.hpp"
|
2016-07-03 16:31:19 -04:00
|
|
|
#include "MessageBox.hpp"
|
2016-12-30 10:45:31 -05:00
|
|
|
#include "SettingsGroup.hpp"
|
2017-06-04 18:51:26 -04:00
|
|
|
#include "moc_widegraph.cpp"
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2014-03-30 20:03:44 -04:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
auto user_defined = QObject::tr ("User Defined");
|
2016-07-03 16:31:19 -04:00
|
|
|
float swide[MAX_SCREENSIZE];
|
2014-03-30 20:03:44 -04:00
|
|
|
}
|
|
|
|
|
2013-08-10 11:29:55 -04:00
|
|
|
WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
2012-05-22 13:09:48 -04:00
|
|
|
QDialog(parent),
|
2013-08-10 11:29:55 -04:00
|
|
|
ui(new Ui::WideGraph),
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_settings (settings),
|
2016-04-30 20:40:51 -04:00
|
|
|
m_palettes_path {":/Palettes"},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_ntr0 {0},
|
|
|
|
m_lockTxFreq {false},
|
2017-05-07 11:14:42 -04:00
|
|
|
m_bHaveTransmitted {false},
|
2016-04-30 20:40:51 -04:00
|
|
|
m_n {0}
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2013-08-10 21:30:05 -04:00
|
|
|
ui->setupUi(this);
|
2013-08-10 11:29:55 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
setWindowTitle (QApplication::applicationName () + " - " + tr ("Wide Graph"));
|
2013-08-10 11:29:55 -04:00
|
|
|
setWindowFlags (Qt::WindowCloseButtonHint | Qt::WindowMinimizeButtonHint);
|
|
|
|
setMaximumWidth (MAX_SCREENSIZE);
|
|
|
|
setMaximumHeight (880);
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
ui->widePlot->setCursor(Qt::CrossCursor);
|
|
|
|
ui->widePlot->setMaximumHeight(800);
|
2014-03-30 20:03:44 -04:00
|
|
|
ui->widePlot->setCurrent(false);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
connect(ui->widePlot, SIGNAL(freezeDecode1(int)),this,
|
|
|
|
SLOT(wideFreezeDecode(int)));
|
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
connect(ui->widePlot, SIGNAL(setFreq1(int,int)),this,
|
|
|
|
SLOT(setFreq2(int,int)));
|
|
|
|
|
2017-05-07 11:14:42 -04:00
|
|
|
{
|
|
|
|
//Restore user's settings
|
|
|
|
SettingsGroup g {m_settings, "WideGraph"};
|
|
|
|
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
|
|
|
ui->widePlot->setPlotZero(m_settings->value("PlotZero", 0).toInt());
|
|
|
|
ui->widePlot->setPlotGain(m_settings->value("PlotGain", 0).toInt());
|
|
|
|
ui->widePlot->setPlot2dGain(m_settings->value("Plot2dGain", 0).toInt());
|
|
|
|
ui->widePlot->setPlot2dZero(m_settings->value("Plot2dZero", 0).toInt());
|
|
|
|
ui->zeroSlider->setValue(ui->widePlot->plotZero());
|
|
|
|
ui->gainSlider->setValue(ui->widePlot->plotGain());
|
|
|
|
ui->gain2dSlider->setValue(ui->widePlot->plot2dGain());
|
|
|
|
ui->zero2dSlider->setValue(ui->widePlot->plot2dZero());
|
|
|
|
int n = m_settings->value("BinsPerPixel",2).toInt();
|
|
|
|
m_bFlatten=m_settings->value("Flatten",true).toBool();
|
|
|
|
m_bRef=m_settings->value("UseRef",false).toBool();
|
|
|
|
ui->cbFlatten->setChecked(m_bFlatten);
|
|
|
|
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
|
|
|
|
ui->cbRef->setChecked(m_bRef);
|
|
|
|
ui->widePlot->setBreadth(m_settings->value("PlotWidth",1000).toInt());
|
|
|
|
ui->bppSpinBox->setValue(n);
|
|
|
|
m_nsmo=m_settings->value("SmoothYellow",1).toInt();
|
|
|
|
ui->smoSpinBox->setValue(m_nsmo);
|
|
|
|
m_Percent2DScreen=m_settings->value("Percent2D",30).toInt();
|
|
|
|
m_waterfallAvg = m_settings->value("WaterfallAvg",5).toInt();
|
|
|
|
ui->waterfallAvgSpinBox->setValue(m_waterfallAvg);
|
|
|
|
ui->widePlot->setWaterfallAvg(m_waterfallAvg);
|
|
|
|
ui->widePlot->setCurrent(m_settings->value("Current",false).toBool());
|
|
|
|
ui->widePlot->setCumulative(m_settings->value("Cumulative",true).toBool());
|
|
|
|
ui->widePlot->setLinearAvg(m_settings->value("LinearAvg",false).toBool());
|
|
|
|
ui->widePlot->setReference(m_settings->value("Reference",false).toBool());
|
|
|
|
if(ui->widePlot->current()) ui->spec2dComboBox->setCurrentIndex(0);
|
|
|
|
if(ui->widePlot->cumulative()) ui->spec2dComboBox->setCurrentIndex(1);
|
|
|
|
if(ui->widePlot->linearAvg()) ui->spec2dComboBox->setCurrentIndex(2);
|
|
|
|
if(ui->widePlot->Reference()) ui->spec2dComboBox->setCurrentIndex(3);
|
|
|
|
int nbpp=m_settings->value("BinsPerPixel",2).toInt();
|
|
|
|
ui->widePlot->setBinsPerPixel(nbpp);
|
2017-08-13 19:31:43 -04:00
|
|
|
ui->sbPercent2dPlot->setValue(m_Percent2DScreen);
|
2017-05-07 11:14:42 -04:00
|
|
|
ui->widePlot->setStartFreq(m_settings->value("StartFreq",0).toInt());
|
|
|
|
ui->fStartSpinBox->setValue(ui->widePlot->startFreq());
|
|
|
|
m_waterfallPalette=m_settings->value("WaterfallPalette","Default").toString();
|
|
|
|
m_userPalette = WFPalette {m_settings->value("UserPalette").value<WFPalette::Colours> ()};
|
2017-07-07 19:11:24 -04:00
|
|
|
m_fMinPerBand = m_settings->value ("FminPerBand").toHash ();
|
2017-05-07 11:14:42 -04:00
|
|
|
setRxRange ();
|
2017-07-04 10:39:07 -04:00
|
|
|
ui->controls_widget->setVisible(!m_settings->value("HideControls",false).toBool());
|
|
|
|
ui->cbControls->setChecked(!m_settings->value("HideControls",false).toBool());
|
2017-05-07 11:14:42 -04:00
|
|
|
}
|
2013-08-07 14:59:11 -04:00
|
|
|
|
|
|
|
int index=0;
|
2017-05-07 11:14:42 -04:00
|
|
|
for (QString const& file:
|
|
|
|
m_palettes_path.entryList(QDir::NoDotAndDotDot |
|
|
|
|
QDir::System | QDir::Hidden |
|
|
|
|
QDir::AllDirs | QDir::Files,
|
|
|
|
QDir::DirsFirst)) {
|
2013-08-07 14:59:11 -04:00
|
|
|
QString t=file.mid(0,file.length()-4);
|
|
|
|
ui->paletteComboBox->addItem(t);
|
2015-04-22 13:48:03 -04:00
|
|
|
if(t==m_waterfallPalette) ui->paletteComboBox->setCurrentIndex(index);
|
2013-08-07 14:59:11 -04:00
|
|
|
index++;
|
|
|
|
}
|
2014-03-30 20:03:44 -04:00
|
|
|
ui->paletteComboBox->addItem (user_defined);
|
2015-04-22 13:48:03 -04:00
|
|
|
if (user_defined == m_waterfallPalette) ui->paletteComboBox->setCurrentIndex(index);
|
2014-03-30 20:03:44 -04:00
|
|
|
readPalette ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2013-08-10 11:29:55 -04:00
|
|
|
WideGraph::~WideGraph ()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void WideGraph::closeEvent (QCloseEvent * e)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2013-08-10 11:29:55 -04:00
|
|
|
saveSettings ();
|
|
|
|
QDialog::closeEvent (e);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::saveSettings() //saveSettings
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-05-07 11:14:42 -04:00
|
|
|
SettingsGroup g {m_settings, "WideGraph"};
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue ("geometry", saveGeometry ());
|
2015-04-22 13:48:03 -04:00
|
|
|
m_settings->setValue ("PlotZero", ui->widePlot->plotZero());
|
|
|
|
m_settings->setValue ("PlotGain", ui->widePlot->plotGain());
|
|
|
|
m_settings->setValue ("Plot2dGain", ui->widePlot->plot2dGain());
|
|
|
|
m_settings->setValue ("Plot2dZero", ui->widePlot->plot2dZero());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue ("PlotWidth", ui->widePlot->plotWidth ());
|
2015-04-22 13:48:03 -04:00
|
|
|
m_settings->setValue ("BinsPerPixel", ui->bppSpinBox->value ());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_settings->setValue ("SmoothYellow", ui->smoSpinBox->value ());
|
2015-11-22 18:38:42 -05:00
|
|
|
m_settings->setValue ("Percent2D",m_Percent2DScreen);
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue ("WaterfallAvg", ui->waterfallAvgSpinBox->value ());
|
2014-03-30 20:03:44 -04:00
|
|
|
m_settings->setValue ("Current", ui->widePlot->current());
|
|
|
|
m_settings->setValue ("Cumulative", ui->widePlot->cumulative());
|
|
|
|
m_settings->setValue ("LinearAvg", ui->widePlot->linearAvg());
|
2015-11-17 20:28:12 -05:00
|
|
|
m_settings->setValue ("Reference", ui->widePlot->Reference());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue ("BinsPerPixel", ui->widePlot->binsPerPixel ());
|
|
|
|
m_settings->setValue ("StartFreq", ui->widePlot->startFreq ());
|
|
|
|
m_settings->setValue ("WaterfallPalette", m_waterfallPalette);
|
2014-03-30 20:03:44 -04:00
|
|
|
m_settings->setValue ("UserPalette", QVariant::fromValue (m_userPalette.colours ()));
|
2014-01-17 09:46:23 -05:00
|
|
|
m_settings->setValue("Flatten",m_bFlatten);
|
2016-04-11 16:53:54 -04:00
|
|
|
m_settings->setValue("UseRef",m_bRef);
|
2017-06-04 18:51:26 -04:00
|
|
|
m_settings->setValue ("HideControls", ui->controls_widget->isHidden ());
|
2017-07-07 19:11:24 -04:00
|
|
|
m_settings->setValue ("FminPerBand", m_fMinPerBand);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-07-06 10:18:23 -04:00
|
|
|
void WideGraph::drawRed(int ia, int ib)
|
|
|
|
{
|
|
|
|
ui->widePlot->drawRed(ia,ib,swide);
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::dataSink2(float s[], float df3, int ihsym, int ndiskdata) //dataSink2
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2012-09-25 20:48:49 -04:00
|
|
|
static float splot[NSMAX];
|
2012-05-22 13:09:48 -04:00
|
|
|
int nbpp = ui->widePlot->binsPerPixel();
|
|
|
|
|
2016-10-13 15:20:24 -04:00
|
|
|
//Average spectra over specified number, m_waterfallAvg
|
2016-04-30 20:40:51 -04:00
|
|
|
if (m_n==0) {
|
2012-09-25 20:48:49 -04:00
|
|
|
for (int i=0; i<NSMAX; i++)
|
2012-05-22 13:09:48 -04:00
|
|
|
splot[i]=s[i];
|
|
|
|
} else {
|
2012-09-25 20:48:49 -04:00
|
|
|
for (int i=0; i<NSMAX; i++)
|
2012-05-22 13:09:48 -04:00
|
|
|
splot[i] += s[i];
|
|
|
|
}
|
2016-04-30 20:40:51 -04:00
|
|
|
m_n++;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2016-04-30 20:40:51 -04:00
|
|
|
if (m_n>=m_waterfallAvg) {
|
2012-09-25 20:48:49 -04:00
|
|
|
for (int i=0; i<NSMAX; i++)
|
2016-04-30 20:40:51 -04:00
|
|
|
splot[i] /= m_n; //Normalize the average
|
|
|
|
m_n=0;
|
2013-07-25 12:48:10 -04:00
|
|
|
int i=int(ui->widePlot->startFreq()/df3 + 0.5);
|
2013-07-08 09:17:22 -04:00
|
|
|
int jz=5000.0/(nbpp*df3);
|
2013-07-30 16:36:14 -04:00
|
|
|
if(jz>MAX_SCREENSIZE) jz=MAX_SCREENSIZE;
|
2012-10-03 22:05:14 -04:00
|
|
|
for (int j=0; j<jz; j++) {
|
2016-10-13 15:20:24 -04:00
|
|
|
float ss=0;
|
2012-09-28 19:59:50 -04:00
|
|
|
for (int k=0; k<nbpp; k++) {
|
2016-10-13 15:20:24 -04:00
|
|
|
if(splot[i]>ss) ss=splot[i];
|
|
|
|
i++;
|
2012-09-28 19:59:50 -04:00
|
|
|
}
|
2016-10-13 15:20:24 -04:00
|
|
|
swide[j]=nbpp*ss;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Time according to this computer
|
|
|
|
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
2012-09-24 19:36:38 -04:00
|
|
|
int ntr = (ms/1000) % m_TRperiod;
|
2012-10-26 12:01:57 -04:00
|
|
|
if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && ntr<m_ntr0)) {
|
2015-05-30 12:08:20 -04:00
|
|
|
float flagValue=1.0e30;
|
|
|
|
if(m_bHaveTransmitted) flagValue=2.0e30;
|
2012-05-22 13:09:48 -04:00
|
|
|
for (int i=0; i<2048; i++) {
|
2015-05-30 12:08:20 -04:00
|
|
|
swide[i] = flagValue;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2015-05-30 12:08:20 -04:00
|
|
|
m_bHaveTransmitted=false;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-10-26 12:01:57 -04:00
|
|
|
m_ntr0=ntr;
|
2016-07-06 10:18:23 -04:00
|
|
|
ui->widePlot->draw(swide,true,false);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-09-24 19:36:38 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_bppSpinBox_valueChanged(int n) //bpp
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2012-09-29 13:09:05 -04:00
|
|
|
ui->widePlot->setBinsPerPixel(n);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_waterfallAvgSpinBox_valueChanged(int n) //Navg
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
|
|
|
m_waterfallAvg = n;
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->widePlot->setWaterfallAvg(n);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::keyPressEvent(QKeyEvent *e) //F11, F12
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
|
|
|
switch(e->key())
|
|
|
|
{
|
2012-11-23 11:05:50 -05:00
|
|
|
int n;
|
2012-05-22 13:09:48 -04:00
|
|
|
case Qt::Key_F11:
|
2012-11-23 11:05:50 -05:00
|
|
|
n=11;
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
|
|
|
emit f11f12(n);
|
2012-05-22 13:09:48 -04:00
|
|
|
break;
|
|
|
|
case Qt::Key_F12:
|
2012-11-23 11:05:50 -05:00
|
|
|
n=12;
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
|
|
|
emit f11f12(n);
|
2012-05-22 13:09:48 -04:00
|
|
|
break;
|
|
|
|
default:
|
2014-09-25 07:35:50 -04:00
|
|
|
QDialog::keyPressEvent (e);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setRxFreq(int n) //setRxFreq
|
2012-10-19 15:26:07 -04:00
|
|
|
{
|
2014-09-24 13:25:19 -04:00
|
|
|
ui->widePlot->setRxFreq(n);
|
2016-07-06 10:18:23 -04:00
|
|
|
ui->widePlot->draw(swide,false,false);
|
2017-09-27 08:39:50 -04:00
|
|
|
// if(m_lockTxFreq) setTxFreq(n);
|
2012-10-19 15:26:07 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
int WideGraph::rxFreq() //rxFreq
|
2012-09-24 19:36:38 -04:00
|
|
|
{
|
2013-07-08 09:17:22 -04:00
|
|
|
return ui->widePlot->rxFreq();
|
2012-09-24 19:36:38 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
int WideGraph::nStartFreq() //nStartFreq
|
2012-09-24 19:36:38 -04:00
|
|
|
{
|
|
|
|
return ui->widePlot->startFreq();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::wideFreezeDecode(int n) //wideFreezeDecode
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
|
|
|
emit freezeDecode2(n);
|
|
|
|
}
|
|
|
|
|
2017-05-07 11:14:42 -04:00
|
|
|
void WideGraph::setRxRange ()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-05-07 11:14:42 -04:00
|
|
|
ui->widePlot->setRxRange (Fmin ());
|
2012-05-22 13:09:48 -04:00
|
|
|
ui->widePlot->DrawOverlay();
|
|
|
|
ui->widePlot->update();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
int WideGraph::Fmin() //Fmin
|
2013-04-10 10:41:16 -04:00
|
|
|
{
|
2017-07-07 19:11:24 -04:00
|
|
|
return "60m" == m_rxBand ? 0 : m_fMinPerBand.value (m_rxBand, 2500).toUInt ();
|
2013-04-10 10:41:16 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
int WideGraph::Fmax() //Fmax
|
2013-04-10 10:41:16 -04:00
|
|
|
{
|
2017-06-28 10:38:06 -04:00
|
|
|
return std::min(5000,ui->widePlot->Fmax());
|
2013-04-05 12:48:10 -04:00
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:34 -04:00
|
|
|
int WideGraph::fSpan()
|
|
|
|
{
|
|
|
|
return ui->widePlot->fSpan ();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setPeriod(int ntrperiod, int nsps) //SetPeriod
|
2012-09-24 19:36:38 -04:00
|
|
|
{
|
2012-09-25 20:48:49 -04:00
|
|
|
m_TRperiod=ntrperiod;
|
|
|
|
m_nsps=nsps;
|
2012-11-14 10:30:21 -05:00
|
|
|
ui->widePlot->setNsps(ntrperiod, nsps);
|
2012-09-24 19:36:38 -04:00
|
|
|
}
|
2012-10-10 20:51:16 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setTxFreq(int n) //setTxFreq
|
2012-10-10 20:51:16 -04:00
|
|
|
{
|
2013-07-08 09:17:22 -04:00
|
|
|
emit setXIT2(n);
|
2013-03-06 11:37:28 -05:00
|
|
|
ui->widePlot->setTxFreq(n);
|
2012-10-15 13:43:49 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setMode(QString mode) //setMode
|
2013-07-08 09:17:22 -04:00
|
|
|
{
|
|
|
|
m_mode=mode;
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->fSplitSpinBox->setEnabled(m_mode=="JT9+JT65");
|
2013-07-08 09:17:22 -04:00
|
|
|
ui->widePlot->setMode(mode);
|
|
|
|
ui->widePlot->DrawOverlay();
|
|
|
|
ui->widePlot->update();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setSubMode(int n) //setSubMode
|
|
|
|
{
|
|
|
|
m_nSubMode=n;
|
|
|
|
ui->widePlot->setSubMode(n);
|
|
|
|
ui->widePlot->DrawOverlay();
|
|
|
|
ui->widePlot->update();
|
|
|
|
}
|
|
|
|
void WideGraph::setModeTx(QString modeTx) //setModeTx
|
2013-07-08 09:17:22 -04:00
|
|
|
{
|
|
|
|
m_modeTx=modeTx;
|
|
|
|
ui->widePlot->setModeTx(modeTx);
|
|
|
|
ui->widePlot->DrawOverlay();
|
|
|
|
ui->widePlot->update();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
//Current-Cumulative-Yellow
|
2013-03-06 11:37:28 -05:00
|
|
|
void WideGraph::on_spec2dComboBox_currentIndexChanged(const QString &arg1)
|
2012-10-15 13:43:49 -04:00
|
|
|
{
|
2014-03-30 20:03:44 -04:00
|
|
|
ui->widePlot->setCurrent(false);
|
|
|
|
ui->widePlot->setCumulative(false);
|
|
|
|
ui->widePlot->setLinearAvg(false);
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->widePlot->setReference(false);
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->smoSpinBox->setEnabled(false);
|
2014-03-30 20:03:44 -04:00
|
|
|
if(arg1=="Current") ui->widePlot->setCurrent(true);
|
|
|
|
if(arg1=="Cumulative") ui->widePlot->setCumulative(true);
|
2015-05-27 09:08:28 -04:00
|
|
|
if(arg1=="Linear Avg") {
|
|
|
|
ui->widePlot->setLinearAvg(true);
|
|
|
|
ui->smoSpinBox->setEnabled(true);
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
if(arg1=="Reference") {
|
|
|
|
ui->widePlot->setReference(true);
|
|
|
|
}
|
2016-07-06 10:18:23 -04:00
|
|
|
if(ui->widePlot->m_bScaleOK) ui->widePlot->draw(swide,false,false);
|
2012-11-23 11:05:50 -05:00
|
|
|
}
|
2013-04-05 12:48:10 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_fSplitSpinBox_valueChanged(int n) //fSplit
|
2013-04-05 12:48:10 -04:00
|
|
|
{
|
2017-07-07 19:11:24 -04:00
|
|
|
if (m_rxBand != "60m") m_fMinPerBand[m_rxBand] = n;
|
2017-05-07 11:14:42 -04:00
|
|
|
setRxRange ();
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setLockTxFreq(bool b) //LockTxFreq
|
2013-07-08 09:17:22 -04:00
|
|
|
{
|
|
|
|
m_lockTxFreq=b;
|
2014-03-30 20:03:44 -04:00
|
|
|
ui->widePlot->setLockTxFreq(b);
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
2013-04-05 12:48:10 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setFreq2(int rxFreq, int txFreq) //setFreq2
|
2013-07-08 09:17:22 -04:00
|
|
|
{
|
|
|
|
emit setFreq3(rxFreq,txFreq);
|
|
|
|
}
|
2013-07-12 09:45:28 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::setDialFreq(double d) //setDialFreq
|
2013-07-12 09:45:28 -04:00
|
|
|
{
|
|
|
|
ui->widePlot->setDialFreq(d);
|
|
|
|
}
|
2013-07-25 12:48:10 -04:00
|
|
|
|
2017-05-07 11:14:42 -04:00
|
|
|
void WideGraph::setRxBand (QString const& band)
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
2017-05-07 11:14:42 -04:00
|
|
|
m_rxBand = band;
|
|
|
|
if ("60m" == m_rxBand)
|
|
|
|
{
|
|
|
|
ui->fSplitSpinBox->setEnabled (false);
|
|
|
|
ui->fSplitSpinBox->setValue (0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-07-07 19:11:24 -04:00
|
|
|
ui->fSplitSpinBox->setValue (m_fMinPerBand.value (band, 2500).toUInt ());
|
2017-07-25 12:51:34 -04:00
|
|
|
ui->fSplitSpinBox->setEnabled (m_mode=="JT9+JT65");
|
2017-05-07 11:14:42 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->widePlot->setRxBand(band);
|
2017-05-07 11:14:42 -04:00
|
|
|
setRxRange ();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_fStartSpinBox_valueChanged(int n) //fStart
|
2013-07-25 12:48:10 -04:00
|
|
|
{
|
|
|
|
ui->widePlot->setStartFreq(n);
|
|
|
|
}
|
2013-08-07 10:49:45 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::readPalette () //readPalette
|
2013-08-07 10:49:45 -04:00
|
|
|
{
|
2014-03-30 20:03:44 -04:00
|
|
|
try
|
|
|
|
{
|
|
|
|
if (user_defined == m_waterfallPalette)
|
|
|
|
{
|
|
|
|
ui->widePlot->setColours (WFPalette {m_userPalette}.interpolate ());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->widePlot->setColours (WFPalette {m_palettes_path.absoluteFilePath (m_waterfallPalette + ".pal")}.interpolate());
|
|
|
|
}
|
2013-08-07 10:49:45 -04:00
|
|
|
}
|
2014-03-30 20:03:44 -04:00
|
|
|
catch (std::exception const& e)
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Read Palette"), e.what ());
|
2013-08-07 10:49:45 -04:00
|
|
|
}
|
|
|
|
}
|
2013-08-07 14:59:11 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_paletteComboBox_activated (QString const& palette) //palette selector
|
2013-08-07 14:59:11 -04:00
|
|
|
{
|
2014-03-30 20:03:44 -04:00
|
|
|
m_waterfallPalette = palette;
|
|
|
|
readPalette();
|
2013-08-07 14:59:11 -04:00
|
|
|
}
|
2014-01-17 09:46:23 -05:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_cbFlatten_toggled(bool b) //Flatten On/Off
|
2014-01-17 09:46:23 -05:00
|
|
|
{
|
|
|
|
m_bFlatten=b;
|
2016-04-11 16:53:54 -04:00
|
|
|
if(m_bRef and m_bFlatten) {
|
|
|
|
m_bRef=false;
|
|
|
|
ui->cbRef->setChecked(false);
|
|
|
|
}
|
2016-04-12 15:54:15 -04:00
|
|
|
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
|
2014-01-17 09:46:23 -05:00
|
|
|
}
|
|
|
|
|
2016-04-11 16:53:54 -04:00
|
|
|
void WideGraph::on_cbRef_toggled(bool b)
|
|
|
|
{
|
|
|
|
m_bRef=b;
|
|
|
|
if(m_bRef and m_bFlatten) {
|
|
|
|
m_bFlatten=false;
|
|
|
|
ui->cbFlatten->setChecked(false);
|
|
|
|
}
|
2016-04-12 15:54:15 -04:00
|
|
|
ui->widePlot->setFlatten(m_bFlatten,m_bRef);
|
2016-04-11 16:53:54 -04:00
|
|
|
}
|
|
|
|
|
2017-07-01 15:05:52 -04:00
|
|
|
void WideGraph::on_cbControls_toggled(bool b)
|
|
|
|
{
|
|
|
|
ui->controls_widget->setVisible(b);
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_adjust_palette_push_button_clicked (bool) //Adjust Palette
|
2014-03-30 20:03:44 -04:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
if (m_userPalette.design ())
|
|
|
|
{
|
|
|
|
m_waterfallPalette = user_defined;
|
|
|
|
ui->paletteComboBox->setCurrentText (m_waterfallPalette);
|
|
|
|
readPalette ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (std::exception const& e)
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Read Palette"), e.what ());
|
2014-03-30 20:03:44 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
bool WideGraph::flatten() //Flatten
|
2014-01-17 09:46:23 -05:00
|
|
|
{
|
|
|
|
return m_bFlatten;
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2016-04-11 16:53:54 -04:00
|
|
|
bool WideGraph::useRef() //Flatten
|
|
|
|
{
|
|
|
|
return m_bRef;
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void WideGraph::on_gainSlider_valueChanged(int value) //Gain
|
|
|
|
{
|
|
|
|
ui->widePlot->setPlotGain(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WideGraph::on_zeroSlider_valueChanged(int value) //Zero
|
|
|
|
{
|
|
|
|
ui->widePlot->setPlotZero(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WideGraph::on_gain2dSlider_valueChanged(int value) //Gain2
|
|
|
|
{
|
|
|
|
ui->widePlot->setPlot2dGain(value);
|
2016-07-06 10:18:23 -04:00
|
|
|
if(ui->widePlot->m_bScaleOK) {
|
|
|
|
ui->widePlot->draw(swide,false,false);
|
|
|
|
if(m_mode=="QRA64") ui->widePlot->draw(swide,false,true);
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void WideGraph::on_zero2dSlider_valueChanged(int value) //Zero2
|
|
|
|
{
|
|
|
|
ui->widePlot->setPlot2dZero(value);
|
2016-07-06 10:18:23 -04:00
|
|
|
if(ui->widePlot->m_bScaleOK) {
|
|
|
|
ui->widePlot->draw(swide,false,false);
|
|
|
|
if(m_mode=="QRA64") ui->widePlot->draw(swide,false,true);
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void WideGraph::setTol(int n) //setTol
|
|
|
|
{
|
|
|
|
ui->widePlot->setTol(n);
|
|
|
|
ui->widePlot->DrawOverlay();
|
|
|
|
ui->widePlot->update();
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
|
|
|
|
void WideGraph::on_smoSpinBox_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_nsmo=n;
|
|
|
|
}
|
|
|
|
|
|
|
|
int WideGraph::smoothYellow()
|
|
|
|
{
|
|
|
|
return m_nsmo;
|
|
|
|
}
|
2015-05-30 12:08:20 -04:00
|
|
|
|
|
|
|
void WideGraph::setWSPRtransmitted()
|
|
|
|
{
|
|
|
|
m_bHaveTransmitted=true;
|
|
|
|
}
|
2015-11-22 18:38:42 -05:00
|
|
|
|
2016-10-24 10:56:14 -04:00
|
|
|
void WideGraph::setVHF(bool bVHF)
|
|
|
|
{
|
|
|
|
ui->widePlot->setVHF(bVHF);
|
|
|
|
}
|
|
|
|
|
2015-11-22 18:38:42 -05:00
|
|
|
void WideGraph::on_sbPercent2dPlot_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_Percent2DScreen=n;
|
|
|
|
ui->widePlot->SetPercent2DScreen(n);
|
|
|
|
}
|
2017-02-10 11:38:19 -05:00
|
|
|
|
|
|
|
void WideGraph::setRedFile(QString fRed)
|
|
|
|
{
|
|
|
|
ui->widePlot->setRedFile(fRed);
|
|
|
|
}
|