Commit Graph

132 Commits

Author SHA1 Message Date
Soeren Apel 866431680f Adjust unit tests 2018-02-07 19:41:56 +01:00
Soeren Apel 83c59147c7 Fix unit tests 2018-01-10 00:40:44 +01:00
Soeren Apel 2d458a761b Remove signal scale handle
It will be replaced by a different mechanism.
2017-07-22 21:42:50 +02:00
Soeren Apel e97fc08de0 Fix unit tests 2017-07-06 21:19:04 +02:00
Soeren Apel 4774721873 Merge DecoderStack into DecodeSignal
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
2017-07-04 23:14:36 +02:00
Soeren Apel ad908057e1 Introduce DecodeSignal class
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.
2017-07-04 23:14:36 +02:00
Soeren Apel f23c46921d Adjust trace view namespace 2017-06-10 15:37:45 +02:00
Soeren Apel 1573bf16ba Move trace view files 2017-06-10 15:37:28 +02:00
Uwe Hermann bb19aac494 Drop some trailing whitespace. 2017-06-06 11:57:35 +02:00
Soeren Apel 207ae8f6fb Tests: Add another unit test for Segment class 2017-05-05 23:41:27 +02:00
Uwe Hermann e222f01e48 Simplify Qt5 setup, require cmake >= 2.8.12.
We now require cmake >= 2.8.12 (released 2013 or so, should be available
pretty much anywhere by now) which further simplifies the Qt5 setup.

Details:
https://doc.qt.io/qt-5/cmake-manual.html
https://cmake.org/cmake/help/v3.7/prop_tgt/AUTOMOC.html
https://cmake.org/cmake/help/v3.7/prop_tgt/AUTORCC.html
2017-03-29 01:54:42 +02:00
Uwe Hermann e7ab88e368 Drop support for Qt4.
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.
2017-03-29 01:20:18 +02:00
Uwe Hermann aca9aa834c Use alphabetical order for #includes.
This patch was generated using clang-tidy:

  clang-tidy -checks="-*,llvm-include-order" -fix
2017-03-28 11:43:40 +02:00
Uwe Hermann 870ea3dbf3 Consistenty use auto-generated namespace comments.
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.
2017-03-23 19:42:18 +01:00
Uwe Hermann 83b1c8d251 Remove unused "using" declarations.
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)
2017-03-23 17:59:00 +01:00
Uwe Hermann 6f925ba9d6 Don't use std:: in the code directly (where possible).
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.
2017-03-18 20:00:51 +01:00
Uwe Hermann eb8269e3b5 Don't use deprecated headers.
This patch was generated using clang-tidy:

  clang-tidy -checks="-*,modernize-deprecated-headers" -fix

(with some additional manual fixups)
2017-03-11 13:06:03 +01:00
Soeren Apel bf9f12687c Implement initial version of the settings management 2017-03-07 22:59:35 +01:00
Soeren Apel 96436bd9d5 Update unit tests 2017-02-15 12:12:52 +01:00
Soeren Apel 332c6dd8eb Tests: Add tests for Segment class 2017-02-08 18:35:40 +01:00
Gerhard Sittig efdec55aec license: remove FSF postal address from boiler plate license text
Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.
2017-01-07 16:11:15 +01:00
Soeren Apel 5955ebeeac Fix unit tests 2016-12-06 07:35:36 +01:00
Soeren Apel bf0edd2b0c Introduce pv::data::SignalBase 2016-08-19 00:36:02 +02:00
Uwe Hermann 039a381dbd test/CMakeLists.txt: Add missing #include file. 2016-04-08 11:50:16 +02:00
Soeren Apel 5d6ae8a26c Fix unit tests and prevent warnings 2016-01-31 18:06:07 +01:00
Uwe Hermann 39ccf9c39e Fix a bunch of random typos. 2016-01-03 20:40:27 +01:00
Tilman Sauerbeck 51ae69ae74 Add TriggerMarker class.
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.
2015-11-08 18:23:36 +01:00
Uwe Hermann 953a50d1cb test/CMakeLists.txt: Add missing files. 2015-10-18 23:52:12 +02:00
Jens Steinhauser 3ccf0f7f5b Untangle the time formatting functions a bit
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.
2015-09-04 12:54:52 +02:00
Jens Steinhauser c677193dc6 View: Change the type of tick_period to pv::util::Timestamp
This makes the tick position/label calculation in the ruler more precise,
avoiding rounded values for zero which would yield to "+0" or "-0" labels.
2015-09-04 12:54:52 +02:00
Jens Steinhauser d001f416ae Use typesafe enum classes in pv::util 2015-09-04 12:54:52 +02:00
Jens Steinhauser 806d3e1eb3 Add a spin box widget for timestamp values 2015-09-04 12:54:52 +02:00
Jens Steinhauser af95045e90 format_time(): Use the timestamp type in the calculation 2015-09-04 12:54:52 +02:00
Jens Steinhauser f52be90d7f format_si_value(): Use the timestamp type in the calculation 2015-09-04 12:54:52 +02:00
Soeren Apel 476f9ebf07 Tests: Add required files to CMakeLists.txt 2015-07-23 20:48:42 +02:00
Joel Holdsworth 4c60462b00 Replaced NULL with nullptr 2015-06-11 20:38:48 +02:00
Uwe Hermann 0661570b95 Add a workaround for QTBUG-22829.
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).
2015-02-28 20:49:32 +01:00
Joel Holdsworth 3cc9ad7b86 Renamed pv::binding::DeviceOptions and DecoderOptions to Device and Decoder 2015-01-27 16:28:31 +01:00
Joel Holdsworth 61703a0124 Moved pv::prop:bindings classes into pv::bindings namespace 2015-01-27 16:28:31 +01:00
Uwe Hermann fe3a1c2184 Update for libsigrokcxx rename. 2015-01-17 20:49:44 +01:00
Joel Holdsworth 40aca27ed8 Added ViewWidget as a common ancestor of all view widgets 2014-12-29 12:24:04 +00:00
Joel Holdsworth 819e2e9555 Ruler: Recombined with CursorHeader 2014-12-28 18:52:53 +00:00
Joel Holdsworth 8914fe790f Flag: Added flag time markers 2014-12-28 18:52:53 +00:00
Joel Holdsworth 5b5fa4da3b RowItemPaintParams: Renamed to ViewItemPaintParams 2014-12-28 15:35:57 +00:00
Joel Holdsworth 26e3af6b15 SelectableItem: Renamed to ViewItem 2014-12-28 15:35:43 +00:00
Uwe Hermann 3a54cb6832 test/CMakeLists.txt: Add missing #includes.
This fixes the build with enabled unit tests.
2014-12-10 18:06:16 +01:00
Joel Holdsworth f3d66e52ed Snapshot: Renamed to Segment 2014-12-10 18:06:15 +01:00
Joel Holdsworth 3eb29afdb6 RowItem: Bundled painting parameters into RowItemPaintParams 2014-12-09 18:24:56 +00:00
Uwe Hermann 64f4cc4908 test: Add a dummy unit test to fix 'make test'.
This should be dropped again when the real unit tests
are working again.
2014-12-04 00:09:12 +01:00
Joel Holdsworth f65cd27bdb Session: Renamed files to match class name 2014-12-03 22:57:22 +00:00