mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-25 20:33:08 -05:00
f200506571
Working frequencies are mode dependent and a reset to defaults button has been added. Also re-factored much of the model and item delegate code to simplify several of the model implementations. Introduced a single routine called from main to register the custom types with Qt. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5453 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#include "Transceiver.hpp"
|
|
|
|
#include "moc_Transceiver.cpp"
|
|
|
|
#if !defined (QT_NO_DEBUG_STREAM)
|
|
|
|
ENUM_QDEBUG_OPS_IMPL (Transceiver, MODE);
|
|
|
|
QDebug operator << (QDebug d, Transceiver::TransceiverState const& s)
|
|
{
|
|
d.nospace ()
|
|
<< "Transceiver::TransceiverState(online: " << (s.online_ ? "yes" : "no")
|
|
<< " Frequency {" << s.frequency_[0] << "Hz, " << s.frequency_[1] << "Hz} " << s.mode_
|
|
<< "; SPLIT: " << (Transceiver::TransceiverState::on == s.split_ ? "on" : Transceiver::TransceiverState::off == s.split_ ? "off" : "unknown")
|
|
<< "; PTT: " << (s.ptt_ ? "on" : "off")
|
|
<< ')';
|
|
return d.space ();
|
|
}
|
|
|
|
#endif
|
|
|
|
ENUM_QDATASTREAM_OPS_IMPL (Transceiver, MODE);
|
|
|
|
ENUM_CONVERSION_OPS_IMPL (Transceiver, MODE);
|
|
|
|
bool operator != (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs)
|
|
{
|
|
return lhs.online_ != rhs.online_
|
|
|| lhs.frequency_[0] != rhs.frequency_[0]
|
|
|| lhs.frequency_[1] != rhs.frequency_[1]
|
|
|| lhs.mode_ != rhs.mode_
|
|
|| lhs.split_ != rhs.split_
|
|
|| lhs.ptt_ != rhs.ptt_;
|
|
}
|
|
|
|
bool operator == (Transceiver::TransceiverState const& lhs, Transceiver::TransceiverState const& rhs)
|
|
{
|
|
return !(lhs != rhs);
|
|
}
|