pulseview.git
3 years agoMainWindow: Update session tab when focusing a different view
Soeren Apel [Sun, 9 Oct 2016 18:55:19 +0000 (20:55 +0200)]
MainWindow: Update session tab when focusing a different view

3 years agoMove the "new session" button to the main window's tab area
Soeren Apel [Sat, 8 Oct 2016 13:47:12 +0000 (15:47 +0200)]
Move the "new session" button to the main window's tab area

3 years agoMainWindow: Fix dock nesting
Soeren Apel [Tue, 4 Oct 2016 17:52:56 +0000 (19:52 +0200)]
MainWindow: Fix dock nesting

The nesting flag was applied to the wrong QMainWindow
after the introduction of the tab widget.

3 years agoMainWindow: Allow tabs to be closed
Soeren Apel [Tue, 4 Oct 2016 17:52:29 +0000 (19:52 +0200)]
MainWindow: Allow tabs to be closed

3 years agoMainWindow: Use regular pointer for QDockWidgets
Soeren Apel [Tue, 4 Oct 2016 17:32:58 +0000 (19:32 +0200)]
MainWindow: Use regular pointer for QDockWidgets

Using shared_ptrs conflicts with the Qt memory management,
so we can't use them if we don't have control over when
those objects are deleted by Qt. In this case, we need to
handle the dock widgets properly.

3 years agoMainWindow: Use a QTabWidget to display the QDockWidgets
Soeren Apel [Thu, 29 Sep 2016 17:36:48 +0000 (19:36 +0200)]
MainWindow: Use a QTabWidget to display the QDockWidgets

3 years agoChange namespace for the trace view and implement ViewBase
Soeren Apel [Mon, 26 Sep 2016 06:45:38 +0000 (08:45 +0200)]
Change namespace for the trace view and implement ViewBase

3 years agoMainWindow: Make session naming consistent
Soeren Apel [Mon, 12 Sep 2016 19:42:59 +0000 (21:42 +0200)]
MainWindow: Make session naming consistent

3 years agoCMakeLists.txt: Avoid -fext-numeric-literals, (not supported by clang).
Uwe Hermann [Sat, 3 Dec 2016 21:23:24 +0000 (22:23 +0100)]
CMakeLists.txt: Avoid -fext-numeric-literals, (not supported by clang).

This (re-)fixes bug #863.

3 years agoWorkaround for a gcc 6.2.1 bug causing boost-related build issues.
Uwe Hermann [Fri, 4 Nov 2016 22:46:08 +0000 (23:46 +0100)]
Workaround for a gcc 6.2.1 bug causing boost-related build issues.

Patch provided by AurĂ©lien Jacobs, thanks a lot!

This fixes bug #863.

3 years agocmake, INSTALL: Bump the Boost requirement to >= 1.55.
Gerhard Sittig [Thu, 13 Oct 2016 14:25:39 +0000 (16:25 +0200)]
cmake, INSTALL: Bump the Boost requirement to >= 1.55.

Support for serialization of multiprecision data (which is used for view
timestamps) was introduced in boost version 1.55. Since commit 3a21afa6
builds with versions up to and including 1.54 are reported to fail.

Bump the required version from 1.53 to 1.55. Rephrase the CMake logic
which searches for the Boost dependency. Create a list of libraries from
fixed and optional parts, which as a byproduct avoids long lines. Pass
that list of required libraries to one common find_package() call.

Signed-off-by: Gerhard Sittig <gerhard.sittig@gmx.net>
3 years agoINSTALL: Add new libboost-serialization dependency.
Uwe Hermann [Sun, 4 Sep 2016 14:15:47 +0000 (16:15 +0200)]
INSTALL: Add new libboost-serialization dependency.

3 years agoMainWindow: Fix crash on closing last session
Soeren Apel [Sun, 4 Sep 2016 12:49:29 +0000 (14:49 +0200)]
MainWindow: Fix crash on closing last session

3 years agopulseview.qrc: Add missing entries for new icons.
Uwe Hermann [Sun, 4 Sep 2016 12:21:34 +0000 (14:21 +0200)]
pulseview.qrc: Add missing entries for new icons.

3 years agoMainBar: Remove empty menu button
Soeren Apel [Sun, 4 Sep 2016 06:03:30 +0000 (08:03 +0200)]
MainBar: Remove empty menu button

3 years agoMainWindow: Don't return bogus view
Soeren Apel [Sat, 3 Sep 2016 22:17:32 +0000 (00:17 +0200)]
MainWindow: Don't return bogus view

3 years agoUpdate main window and dock widget titles as session name changes
Soeren Apel [Sat, 3 Sep 2016 22:15:42 +0000 (00:15 +0200)]
Update main window and dock widget titles as session name changes

3 years agoMainWindow: Don't save sessions that have no device
Soeren Apel [Sat, 3 Sep 2016 21:40:20 +0000 (23:40 +0200)]
MainWindow: Don't save sessions that have no device

3 years agoSession: Fix signal mappings for the views
Soeren Apel [Fri, 2 Sep 2016 17:59:33 +0000 (19:59 +0200)]
Session: Fix signal mappings for the views

3 years agoAllow dock windows to be closed and handle this properly
Soeren Apel [Fri, 2 Sep 2016 16:20:41 +0000 (18:20 +0200)]
Allow dock windows to be closed and handle this properly

3 years agoAdd "new session" and "new view" toolbar buttons
Soeren Apel [Thu, 1 Sep 2016 19:11:18 +0000 (21:11 +0200)]
Add "new session" and "new view" toolbar buttons

Those are temporary and will eventually replaced by
a proper UI.

3 years agoMainWindow: Enable dock nesting
Soeren Apel [Thu, 1 Sep 2016 06:46:04 +0000 (08:46 +0200)]
MainWindow: Enable dock nesting

3 years agoSave/restore view states and signal settings
Soeren Apel [Wed, 31 Aug 2016 06:19:02 +0000 (08:19 +0200)]
Save/restore view states and signal settings

3 years agoSession: Implement .sr file save/restore
Soeren Apel [Mon, 29 Aug 2016 19:41:17 +0000 (21:41 +0200)]
Session: Implement .sr file save/restore

3 years agoFix crash when saving session with open files
Soeren Apel [Mon, 29 Aug 2016 16:10:09 +0000 (18:10 +0200)]
Fix crash when saving session with open files

3 years agoLet SignalBase store/restore its internal data
Soeren Apel [Mon, 29 Aug 2016 16:08:11 +0000 (18:08 +0200)]
Let SignalBase store/restore its internal data

3 years agoSession: Save/restore channel info and top-level decoder
Soeren Apel [Sun, 28 Aug 2016 20:03:50 +0000 (22:03 +0200)]
Session: Save/restore channel info and top-level decoder

3 years agoSignalBase: Add internal name
Soeren Apel [Sun, 28 Aug 2016 15:44:42 +0000 (17:44 +0200)]
SignalBase: Add internal name

3 years agoMainWindow/MainBar: Fix signals
Soeren Apel [Sun, 28 Aug 2016 14:54:58 +0000 (16:54 +0200)]
MainWindow/MainBar: Fix signals

Before, QMetaObject::connectSlotsByName(this) was used to connect
the signals to the slots automagically. This is no longer feasible
for the MainBar as there are slots that can't be auto-assigned and
the MainWindow doesn't have any signals at the moment.

3 years agoSession/MainBar: Fix device change handling
Soeren Apel [Sat, 27 Aug 2016 20:23:28 +0000 (22:23 +0200)]
Session/MainBar: Fix device change handling

3 years agoSession: Fix include order
Soeren Apel [Sat, 27 Aug 2016 19:58:48 +0000 (21:58 +0200)]
Session: Fix include order

3 years agoImplement multi-session handling
Soeren Apel [Sat, 27 Aug 2016 19:55:57 +0000 (21:55 +0200)]
Implement multi-session handling

This includes letting sessions restore their internal state on
their own and that there are unique names associated with each
session that the GUI can use when there is no data.

3 years agoMake the first view own the toolbar instead of the main window
Soeren Apel [Fri, 26 Aug 2016 20:29:40 +0000 (22:29 +0200)]
Make the first view own the toolbar instead of the main window

Handling multiple sessions requires that every session can be
controlled individually. This means that either

a) there could be one toolbar that adjusts dynamically to the
session whose view currently has focus

or

b) every session has its own toolbar.

I opted for b) because it's more intuitive and more straightforward
to implement. So now every session has a main view (the first one
created) and a main bar that sits in the same dock widget.

3 years agoMainWindow: Remove menu bar
Soeren Apel [Mon, 22 Aug 2016 15:32:34 +0000 (17:32 +0200)]
MainWindow: Remove menu bar

3 years agoMainWindow: Prevent Qt from restoring the dock widgets
Soeren Apel [Thu, 18 Aug 2016 18:02:18 +0000 (20:02 +0200)]
MainWindow: Prevent Qt from restoring the dock widgets

3 years agoRemove context menu for central MainWindow widget
Soeren Apel [Wed, 17 Aug 2016 06:25:03 +0000 (08:25 +0200)]
Remove context menu for central MainWindow widget

3 years agoFix signal connection for view::Signal and SignalBase enabled state
Soeren Apel [Tue, 16 Aug 2016 19:34:30 +0000 (21:34 +0200)]
Fix signal connection for view::Signal and SignalBase enabled state

3 years agoMove view-independent data from view::DecodeTrace to SignalBase
Soeren Apel [Tue, 16 Aug 2016 19:32:56 +0000 (21:32 +0200)]
Move view-independent data from view::DecodeTrace to SignalBase

3 years agoMove signals to views and make Session handle multiple views
Soeren Apel [Tue, 16 Aug 2016 19:31:59 +0000 (21:31 +0200)]
Move signals to views and make Session handle multiple views

3 years agoUse SignalBase instead of LogicSignal for decoders
Soeren Apel [Tue, 16 Aug 2016 19:30:46 +0000 (21:30 +0200)]
Use SignalBase instead of LogicSignal for decoders

3 years agoRemove data_ also for LogicSignal and use SignalBase data instead
Soeren Apel [Tue, 16 Aug 2016 19:14:55 +0000 (21:14 +0200)]
Remove data_ also for LogicSignal and use SignalBase data instead

3 years agoMove signal data to SignalBase and adjust view::AnalogSignal
Soeren Apel [Tue, 16 Aug 2016 19:13:25 +0000 (21:13 +0200)]
Move signal data to SignalBase and adjust view::AnalogSignal

The signal data belongs to the signal base (M) and not
the view's AnalogSignal (V). Hence we need to move it.

3 years agoRename Trace::channel_ to Trace::base_, including dependencies
Soeren Apel [Tue, 16 Aug 2016 19:10:40 +0000 (21:10 +0200)]
Rename Trace::channel_ to Trace::base_, including dependencies

3 years agoIntroduce pv::data::SignalBase
Soeren Apel [Tue, 16 Aug 2016 19:09:58 +0000 (21:09 +0200)]
Introduce pv::data::SignalBase

3 years agoFix #814 by using PNG application logo instead of SVG
Soeren Apel [Tue, 16 Aug 2016 19:00:16 +0000 (21:00 +0200)]
Fix #814 by using PNG application logo instead of SVG

3 years agoMake view windows non-closeable
Soeren Apel [Tue, 16 Aug 2016 18:46:56 +0000 (20:46 +0200)]
Make view windows non-closeable

3 years agoImplement MainWindow::add_view()
Soeren Apel [Tue, 16 Aug 2016 16:11:41 +0000 (18:11 +0200)]
Implement MainWindow::add_view()

4 years agoViewWidget: Define ViewTypes
Soeren Apel [Thu, 5 May 2016 19:23:19 +0000 (21:23 +0200)]
ViewWidget: Define ViewTypes

4 years agoIntroduce MainWindow::get_active_view()
Soeren Apel [Sat, 16 Apr 2016 21:49:07 +0000 (23:49 +0200)]
Introduce MainWindow::get_active_view()

4 years agoUse a QDockWidget to contain the view
Soeren Apel [Sat, 16 Apr 2016 20:51:25 +0000 (22:51 +0200)]
Use a QDockWidget to contain the view

4 years agoView: Move assertion after assignment
Soeren Apel [Wed, 20 Jul 2016 06:52:50 +0000 (08:52 +0200)]
View: Move assertion after assignment

4 years agoDevice: add support for list of discrete values for probe factor
Aurelien Jacobs [Sat, 25 Jun 2016 19:44:46 +0000 (21:44 +0200)]
Device: add support for list of discrete values for probe factor

4 years agoConnect dialog: Fix up UI and allow for VXI
Soeren Apel [Thu, 16 Jun 2016 17:56:54 +0000 (19:56 +0200)]
Connect dialog: Fix up UI and allow for VXI

4 years agoConnect dialog: Fix constructor initialization order
Soeren Apel [Thu, 9 Jun 2016 03:04:57 +0000 (05:04 +0200)]
Connect dialog: Fix constructor initialization order

4 years agoConnect dialog: Add support for connecting to raw-tcp devices
whitequark [Thu, 9 Jun 2016 03:02:52 +0000 (05:02 +0200)]
Connect dialog: Add support for connecting to raw-tcp devices

This fixes bug #769.

4 years agoRevert "cmake: use pkg-config ldflags directly instead of spliting libs and dirs"
Uwe Hermann [Fri, 24 Jun 2016 21:17:51 +0000 (23:17 +0200)]
Revert "cmake: use pkg-config ldflags directly instead of spliting libs and dirs"

This reverts commit bb4dede4c8bd711628566d3eb2136442f7205a41.

The -Wl,--whole-archive in libsigrok that lead to this change no longer
exists, so this change can be reverted (since it also causes issues with
"make test").

This fixes bug #808.

4 years agoFix #805 by resetting selected device on failure
Soeren Apel [Wed, 22 Jun 2016 16:02:34 +0000 (18:02 +0200)]
Fix #805 by resetting selected device on failure

It can happen that devices can be selected but not used
(permissions problems, connection issues, driver issues, etc.),
so in those cases we want to fail gracefully instead of
segfaulting.
The reason for the segfault is the device selector button
isn't reset in case the device couldn't be opened, causing
the rest of the application to try and work with a device
instance that is actually invalid.

Resetting the device selector when the device failed to
open not only fixes this but also makes the UI more
consistent with the internal state.

4 years agoFix warning for unused Session::sample_thread_proc() parameter
Soeren Apel [Sun, 29 May 2016 15:30:49 +0000 (17:30 +0200)]
Fix warning for unused Session::sample_thread_proc() parameter

4 years agoSession: Improve session robustness
Soeren Apel [Sun, 29 May 2016 15:21:13 +0000 (17:21 +0200)]
Session: Improve session robustness

Don't try to start an acquisition if the device is undefined.

4 years agocmake: add check for explicit linking against libatomic
Samuel Martin [Thu, 26 May 2016 21:46:40 +0000 (23:46 +0200)]
cmake: add check for explicit linking against libatomic

To use atomics functions, some toolchains requires to explicitly add
-latomic to the linker flags (because they are not provided by libc,
but libatomic).

This change adds a helper function trying to build/link a test program
using atomics, then calls it to:
* first check if atomics are directly available in the libc;
* if not and libatomic has been found, then run the same test with
  "-latomic" added to the linker flags.
The pulseview link library list is updated according to the results of
these tests.

This issue was triggered by the Buildroot farms:
  http://autobuild.buildroot.org/results/1e3/1e3101261252d5f30fdf842cc99604e4f4c25eef/build-end.log

Notes:
1- CMAKE_REQUIRED_* variables are only used in check functions. They
   are not automatically forwarded to/handled by the target commands
   (such as target_link_library), because the check functions are
   implemented as macro in CMake code, whereas many target commands
   are native.
2- Because of note #1, CMAKE_REQUIRED_LIBRARIES (or its value) must be
   explicitly passed to the target_link_library command when this is
   needed.
3- In this implementation, LIBATOMIC_LIBRARY is only set when it is
   needed; so, unconditionally appending it to PULSEVIEW_LINK_LIBS
   will produce the expected behavior.

This fixes bug #810.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
4 years agocmake: use pkg-config ldflags directly instead of spliting libs and dirs
Aurelien Jacobs [Thu, 19 May 2016 22:23:11 +0000 (00:23 +0200)]
cmake: use pkg-config ldflags directly instead of spliting libs and dirs

This allows picking some necessary linker flags such as
-Wl,--whole-archive

4 years agoTrace: Make popup forms compatible with OSX
Elias Oenal [Thu, 19 May 2016 18:34:45 +0000 (20:34 +0200)]
Trace: Make popup forms compatible with OSX

Qt behaves differently on OSX regarding widget lifetime it seems,
causing the addition of a stacked decoder to crash PV.

According to Elias, the object popup_form_ gets destroyed, yet
it still has the parent popup_ which in turn will destroy it
again at the end of its life. Either removing the parent, or the
preliminary destruction, fixes the crash.

4 years agoSession: Keep track of signal data locally
Soeren Apel [Thu, 19 May 2016 18:29:37 +0000 (20:29 +0200)]
Session: Keep track of signal data locally

Currently, the Session class doesn't hold pointers to the signal
data itself but instead fetches the data on demand using the list
of signals it has. As the Session is providing the model in the
MVC paradigm, it owns the data and thus should keep track of it
directly. The signals are (in an ideal world) mere views on that
data, so querying them for the signal data isn't good style.

4 years agoInputFile: Use new reset() function to allow re-reading file
Soeren Apel [Mon, 2 May 2016 20:22:39 +0000 (22:22 +0200)]
InputFile: Use new reset() function to allow re-reading file

Commit 519d0ccbe67d005a9c442795ce3b8255e78ca46d tried to solve
the problem of being unable to re-read an opened file by clicking
the "run" button. However, the solution is insufficient.
PV expects the session device to be updated after the open()
call. If it is not, the device settings popup will show the
settings of the previously used device.

This patch fixes this and also makes use of the new reset()
method to allow re-reading of the file contents. The method
is necessary because otherwise we have to destroy the input
module and create a new instance. This however also means
setting a new session device, which is highly undesirable.
So reset() it is.

4 years agoDecoderStack: Force a viewport update more frequently
Soeren Apel [Tue, 3 May 2016 19:49:00 +0000 (21:49 +0200)]
DecoderStack: Force a viewport update more frequently

Updating the viewport every 65kib of input data causes
the decode trace to make really big leaps, leaving the
user with the feeling of a not-so-snappy user interface.
We can easily change this by updating the trace every 1kib
since the decoder and the UI thread are separate and the
decode trace drawing is much faster since when the limit
was originally set.

4 years agoFix #792 by making sure we don't request samples that don't exist
Soeren Apel [Tue, 3 May 2016 06:53:24 +0000 (08:53 +0200)]
Fix #792 by making sure we don't request samples that don't exist

4 years agoConnect dialog: Make button caption more clear
Soeren Apel [Tue, 26 Apr 2016 06:30:02 +0000 (08:30 +0200)]
Connect dialog: Make button caption more clear

Users are expecting *any* device to be found when pressing
the "Scan for Devices" button. As that is not what it's doing,
we need to clarify what it does.

4 years agoDecodeTrace: Let the view know when we need more space
Soeren Apel [Wed, 20 Apr 2016 16:27:29 +0000 (18:27 +0200)]
DecodeTrace: Let the view know when we need more space

4 years agoDecodeTrace: Make sure first row's label width can be calculated
Soeren Apel [Wed, 20 Apr 2016 16:15:12 +0000 (18:15 +0200)]
DecodeTrace: Make sure first row's label width can be calculated

Without a pen set, p.boundingRect() returns 0. All other rows
have their label text width calculated with a pen, which makes
p.boundingRect() work as intended. Fix this by setting a pen
before the first row is processed.

4 years agoView: Remove unnecessary methods
Soeren Apel [Mon, 18 Apr 2016 19:44:48 +0000 (21:44 +0200)]
View: Remove unnecessary methods

4 years agoFix #771 by using black with alpha instead of an opaque grey
Soeren Apel [Mon, 18 Apr 2016 06:25:36 +0000 (08:25 +0200)]
Fix #771 by using black with alpha instead of an opaque grey

4 years agoFix #777 by using a workaround for assumed glibmm bug
Soeren Apel [Sun, 17 Apr 2016 13:29:09 +0000 (15:29 +0200)]
Fix #777 by using a workaround for assumed glibmm bug

4 years agoFix #705 by preventing the use of invalid instances
Soeren Apel [Sun, 17 Apr 2016 13:28:51 +0000 (15:28 +0200)]
Fix #705 by preventing the use of invalid instances

As QCache owns the object instances it manages, inserting
an object into the cache transfers ownership automatically.
This means we can't use an instance after it has been
inserted into the cache as this results in a double free
situation as we'd end up calling the destructor on the same
object instance as the cache.

4 years agoAnalogSignal: Make sure the trace is redrawn when changing vdiv count
Soeren Apel [Wed, 13 Apr 2016 18:17:53 +0000 (20:17 +0200)]
AnalogSignal: Make sure the trace is redrawn when changing vdiv count

4 years agoTrace/AnalogSignal: Improve contrast and precision of the trace lines
Soeren Apel [Wed, 13 Apr 2016 17:45:22 +0000 (19:45 +0200)]
Trace/AnalogSignal: Improve contrast and precision of the trace lines

4 years agoView: Make sure unused groups are freed
Soeren Apel [Wed, 13 Apr 2016 06:29:17 +0000 (08:29 +0200)]
View: Make sure unused groups are freed

4 years agoSession: Make sure all data is deleted before changing devices
Soeren Apel [Mon, 11 Apr 2016 06:45:36 +0000 (08:45 +0200)]
Session: Make sure all data is deleted before changing devices

4 years agoInputFile: Don't try to create device twice
Soeren Apel [Fri, 8 Apr 2016 21:32:54 +0000 (23:32 +0200)]
InputFile: Don't try to create device twice

The InputFile currently only keeps track of the
need for a device instance local to run().
This means that when calling run() a second time
(e.g. by clicking the "Run" button after loading
a file), the function will try to create the
device instance and add it to the session.
This fails as the first created instance is
still assigned to the session and thus the
session will reject adding another device.

Furthermore, simply clearing the session
devices isn't enough for proper operation.
The issue is that once a file's content has
been sent to an input module, the module is
not going to accept another file. It needs
to be reset to its initial state. To do this,
we create the input module instance every time
we want to read the file.

4 years agoDecodeTrace: Make an empty decode trace appear symmetrical
Soeren Apel [Fri, 8 Apr 2016 16:32:41 +0000 (18:32 +0200)]
DecodeTrace: Make an empty decode trace appear symmetrical

4 years agoDecodeTrace: Replace magic number by proper calculation
Soeren Apel [Fri, 8 Apr 2016 16:25:58 +0000 (18:25 +0200)]
DecodeTrace: Replace magic number by proper calculation

4 years agotest/CMakeLists.txt: Add missing #include file.
Uwe Hermann [Fri, 8 Apr 2016 09:49:22 +0000 (11:49 +0200)]
test/CMakeLists.txt: Add missing #include file.

4 years agoAnalogSignal: Implement info text for V/div display
Soeren Apel [Thu, 7 Apr 2016 20:03:40 +0000 (22:03 +0200)]
AnalogSignal: Implement info text for V/div display

4 years agoAnalogSignal: Implement resolution selector in dialog
Soeren Apel [Thu, 7 Apr 2016 20:03:30 +0000 (22:03 +0200)]
AnalogSignal: Implement resolution selector in dialog

4 years agoAnalogSignal: Use Q_OBJECT and implement vdiv selector in dialog
Soeren Apel [Thu, 7 Apr 2016 20:03:17 +0000 (22:03 +0200)]
AnalogSignal: Use Q_OBJECT and implement vdiv selector in dialog

4 years agoAnalogSignal: Use correct scaling factor for the grid to work
Soeren Apel [Thu, 7 Apr 2016 20:03:05 +0000 (22:03 +0200)]
AnalogSignal: Use correct scaling factor for the grid to work

4 years agoAnalogSignal: Implement vertical grid
Soeren Apel [Thu, 7 Apr 2016 20:02:50 +0000 (22:02 +0200)]
AnalogSignal: Implement vertical grid

4 years agoView: Handle pre-existing trace groups correctly
Soeren Apel [Thu, 7 Apr 2016 20:02:04 +0000 (22:02 +0200)]
View: Handle pre-existing trace groups correctly

4 years agoView: Restore the original signals_changed() positioning code
Soeren Apel [Thu, 7 Apr 2016 20:01:31 +0000 (22:01 +0200)]
View: Restore the original signals_changed() positioning code

4 years agoView: Remove empty trace groups in signals_changed()
Soeren Apel [Sun, 3 Apr 2016 19:15:00 +0000 (21:15 +0200)]
View: Remove empty trace groups in signals_changed()

4 years agoView: Provide a clear setup path for the initial v_offset value
Soeren Apel [Sun, 3 Apr 2016 18:37:53 +0000 (20:37 +0200)]
View: Provide a clear setup path for the initial v_offset value

- View::update_scroll():
  The range for the vertical scrollbar is only updated if there
  are traces in the view.

- View::set_scroll_default():
  This new function adjusts the vertical offset of the view so
  that all traces are visible. Needs to be executed once after a
  new device was selected.

- View::signals_changed():
  We want to be able to clear stale items in-between devices, so
  we no longer want to simply return when no device is selected.
  This means we need to handle a missing device more gracefully.

  Also, we now reset the vertical scroll bar when no device is
  selected and call set_scroll_default() when needed.

4 years agoView: Make signals_changed() more predictable
Soeren Apel [Sun, 3 Apr 2016 18:35:57 +0000 (20:35 +0200)]
View: Make signals_changed() more predictable

Newly created trace groups have their traces restacked
immediately to make sure we can rely on the group's v_extents.

We no longer unconditionally add trace groups that could
actually be empty.

The code that adds the new top-level items is more
straightforward now.

4 years agoTraceTreeItemOwner: Change behavior for empty containers
Soeren Apel [Sun, 3 Apr 2016 18:34:50 +0000 (20:34 +0200)]
TraceTreeItemOwner: Change behavior for empty containers

An empty TraceTreeItemOwner's v_extents are no longer
[INT_MAX, INT_MIN] but [0, 0] instead. As new items were added
relative to the view's own v_extents, items were added at
positions close to the over-/underflow margin. This messed up
the scrollbar among other things. Returning [0, 0] instead
allows for better handling of such cases.

4 years agoSession: Don't crash when session.device_ is empty
Soeren Apel [Sun, 3 Apr 2016 18:34:01 +0000 (20:34 +0200)]
Session: Don't crash when session.device_ is empty

4 years agoSession: Improve signal handling during device selection
Soeren Apel [Sun, 3 Apr 2016 18:33:19 +0000 (20:33 +0200)]
Session: Improve signal handling during device selection

Changing devices now forces an update of the view's signal handling.
This will allow clearing the view properly in-between devices.

4 years agoStoreSession: Add analog saving support
Soeren Apel [Sun, 13 Mar 2016 16:46:27 +0000 (17:46 +0100)]
StoreSession: Add analog saving support

4 years agoUse natural sort order for DecodeTrace channel selector drop-down
Soeren Apel [Sun, 13 Mar 2016 16:46:14 +0000 (17:46 +0100)]
Use natural sort order for DecodeTrace channel selector drop-down

4 years agofix 'Exception: not applicable' when connecting to hantek-dso
ntruchsess [Fri, 11 Mar 2016 21:52:47 +0000 (22:52 +0100)]
fix 'Exception: not applicable' when connecting to hantek-dso

4 years agoFix various typos in code comments.
Uwe Hermann [Wed, 24 Feb 2016 18:44:40 +0000 (19:44 +0100)]
Fix various typos in code comments.

4 years agoAndroidManifest.xml: Bump PV version to 0.4.0.
Uwe Hermann [Wed, 17 Feb 2016 21:08:17 +0000 (22:08 +0100)]
AndroidManifest.xml: Bump PV version to 0.4.0.

4 years agoUse the 'default' keyword where applicable. This patch
Soeren Apel [Tue, 16 Feb 2016 20:15:03 +0000 (21:15 +0100)]
Use the 'default' keyword where applicable. This patch
 was initially created using clang-tidy:

  clang-tidy -checks="-*,moderize-use-default" -fix

However, the resulting patch only wanted to alter the
definitions in the .cpp file. I think it makes more
sense to remove the definitions completely and just
add "= default" to the declarations in the header file.