Several changes make up this commit, which unfortunately
can't be separated:
1) Move decoder stack management from DecoderStack to
DecodeSignal, thereby making DecoderStack unnecessary
2) Change the decoder stack from std::list to an
std::vector for direct decoder access
3) Introduce logic_mux_thread which will take care
of muxing the individual SignalBases' logic data into
(cached) logic data that libsigrokdecode expects.
This is necessary as we can no longer do simple bit
mapping within a single logic data segment's logic
data as we now may feed from multiple logic data
segments at once
4) Refactored the creation of decode traces, making
it more streamlined and flexible while simplifying
the class interface
5) Refactored the auto-assignment of channels
6) Refactored is_decode_signal()
7) Reworked decode signal save/restore, allowing
proper handling and with the decoder stack now
being part of the signal, easier save/restore of
the stack and its settings
For starters, we equip it with some basic wrappers
around the decode stack, rework the annotation signal
a little and use the new DecodeSignal in favor of the
SignalBase class.
We now require Qt5 for PulseView. Qt5 has been out since 2012 or so and
is available pretty much everywhere now.
We're successfully using Qt5 on Linux, Windows, *BSD, Mac OS X, and Android.
Dropping Qt4 support simplifies the build system quite a bit, reduces the
number of test scenarios we have to consider etc. etc.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,google-readability-namespace-comments" -fix
Switch to the format used by clang-tidy to allow easy, automatic,
tool-based maintenance / checking of the comments.
This also found a few instances of comments that were out of sync.
This patch was generated using clang-tidy:
clang-tidy -checks="-*,misc-unused-using-decls" -fix
(with manual add-on fixes such as dropping unused headers as well,
and commenting some false-positive cases)
Use "using std::foo" to make the actual code itself a lot more readable.
There are some exceptions where we usually cannot do this, e.g. std::thread
often conflicts with "thread" from Qt or Boost.
This will be used in a follow-up changeset for the markers that
visualize the time of SR_DF_TRIGGER.
Note that this copies a little code from the TimeMarker class,
but that seemed a better idea than deriving from it and disabling
the popup and label-drawing code.
The formatting depending on the distance between two timestamps is
reintroduced with the responding function residing in the 'Ruler' class
(the prime user of that function).
Fixes a rounding bug for the least significant digit in the
'format_time_minutes()' function.
The 'Cursor' and 'CursorPair' classes now use the same precision when
formatting timestamps as the rest of the program.
Qt4's MOC has issues parsing some C++ constructs, yielding errors like:
[...]/include/boost/type_traits/detail/has_binary_operator.hp:50:
Parse error at "BOOST_JOIN"
Full details:
https://bugreports.qt.io/browse/QTBUG-22829
Use -DBOOST_NEXT_PRIOR_HPP_INCLUDED as MOC option to workaround these
issues. This is currently sufficient, however, depending on the future
PulseView code it may be necessary to add further options mentioned in the
above bugreport (e.g. BOOST_TT_HAS_OPERATOR_HPP_INCLUDED,
BOOST_LEXICAL_CAST_INCLUDED, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION).
This fixes bug #532 (fixing the build on at least Mac OS X and MinGW).