Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c919707
updating doc
ChrisHal Jan 9, 2025
1b6adbd
update some copyrigth years
ChrisHal Jan 9, 2025
2a15067
improve design of DlgExportMetadata and make it lokk good on macOS
ChrisHal Dec 12, 2024
9356eb4
code cleanup after clazy clang-tidy, and better comments
ChrisHal Dec 18, 2024
46629a7
times are probably not UTC, so ommit UTC when formatting
ChrisHal Dec 18, 2024
bec6700
keep Y scaling seperate for each trace unit
ChrisHal Jan 6, 2025
f3aff73
shift all y scales while dragging (is configurable)
ChrisHal Jan 6, 2025
1d95730
DlgGraphSetting: add checkbox to select dragging of all Y axes
ChrisHal Jan 8, 2025
cb425c8
renderarea: ensure that currentYScale is always initialized
ChrisHal Jan 8, 2025
c265f46
updating doc
ChrisHal Jan 9, 2025
8fddb4b
update some copyrigth years
ChrisHal Jan 9, 2025
986d7b6
Merge branch 'improvements' of https://github.com/ChrisHal/PMbrowser …
ChrisHal Jan 9, 2025
f81a2bd
json formatting: values should not have unneeded quotes
ChrisHal Jan 13, 2025
5100fe8
JSON files: always use C locale
ChrisHal Jan 15, 2025
ed45b6c
set globale c++ locale to system locale (in RenderArea we already use…
ChrisHal Jan 15, 2025
c11c3f3
use locale aware formatting for double values
ChrisHal Jan 15, 2025
ac3a9b1
make use of system locale an option in Preferences dialog
ChrisHal Jan 15, 2025
928bda8
change list seperator to ';', since ',' might be used as decimal sepe…
ChrisHal Jan 15, 2025
b6d9dd2
enforce const correctness
ChrisHal Jan 17, 2025
26dc08c
more const correctness
ChrisHal Jan 17, 2025
2ddcb61
doc: remove obsolete ref. to no longer supported appimage
ChrisHal Jan 20, 2025
188d8e2
new python script expample: calc means of multiple files
ChrisHal Jan 24, 2025
d07de87
add parameter TrDataPoints
ChrisHal Jan 24, 2025
b0d5379
fix system locale on macOS
ChrisHal Mar 6, 2025
4ed3deb
refine setting of global locale at startup (necessary for macOS)
ChrisHal Mar 11, 2025
e241520
usr utf8 encoding in example python scripts, fixes issue #59
ChrisHal Mar 11, 2025
a3fefe5
fix copyright year
ChrisHal Mar 11, 2025
9014966
fix metadata table export with system locale on macOS
ChrisHal Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16)
project(QtPMbrowser VERSION 2.4.3 LANGUAGES CXX)
set(MY_COPYRIGHT "2020 - 2024 Christian R. Halaszovich")
set(MY_COPYRIGHT "2020 - 2025 Christian R. Halaszovich")
set(LINUX_RELEASE_DESCRIPTION "<p>This is a bugfix release.</p>")

set(CMAKE_CXX_STANDARD 20)
Expand Down
2 changes: 1 addition & 1 deletion QtPMbrowser/DlgGraphSettings.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 - 2022 Christian R. Halaszovich
Copyright 2020 - 2022, 2025 Christian R. Halaszovich

This file is part of PMbrowser.

Expand Down
2 changes: 1 addition & 1 deletion QtPMbrowser/DlgGraphSettings.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 -2022 Christian R. Halaszovich
Copyright 2020 -2022, 2025 Christian R. Halaszovich

This file is part of PMbrowser.

Expand Down
2 changes: 1 addition & 1 deletion QtPMbrowser/renderarea.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 - 2022 Christian R. Halaszovich
Copyright 2020 - 2022, 2025 Christian R. Halaszovich

This file is part of PMbrowser.

Expand Down
2 changes: 1 addition & 1 deletion QtPMbrowser/renderarea.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 - 2022 Christian R. Halaszovich
Copyright 2020 - 2022, 2025 Christian R. Halaszovich

This file is part of PMbrowser.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PMbrowser
Copyright 2020 - 2024 Christian R. Halaszovich
Copyright 2020 - 2025 Christian R. Halaszovich

Created using Qt under GPLv3.

Expand Down
2 changes: 2 additions & 0 deletions doc/usage/displayarea.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ autoscale

Select autoscale from the context menue of the **graph area** or use the keyboard shortcut `Ctrl+A`.

.. _graph-panning-lable:

panning
-------

Expand Down
21 changes: 5 additions & 16 deletions doc/usage/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,27 +62,16 @@ Now, you can start :program:`PMbrowser` with ``QtPMbrowser &`` from a terminal.
Starting with Version 2.2.1, you should find :program:`PM browser`
under *Applications*, too.

.. _appimage:

using the *AppImage* (currently not supported)
**********************************************

Dowload the AppImage file from https://github.com/ChrisHal/PMbrowser/releases. Make
the file executable (usually a right-click in you file manager is involved in this).
Double-clicking the file should start the application.

The *AppImage contains* all necessary Qt libraries, even when your distro does not provide
them.


Installing on macOS
===================

Download the DragN'Dropinstaller :file:`PMbrowser-<version>-Darwin.dmg` from
Download the ZIP-archive :file:`PMbrowser-<version>-Darwin.zip` from
the GitHub repository release
page: https://github.com/ChrisHal/PMbrowser/releases .
After opening the :file:`dmg` image by double-clicking,
drag the application icon *QtPMbrowser* to your Applications directory.
page: https://github.com/ChrisHal/PMbrowser/releases and unzip it. Since the
app is not (yet) notarized (which does cost money) by Apple, you must convince macOS
to open it. Information on how to do this can be found here:
https://support.apple.com/en-us/guide/mac-help/mh40616/mac

Building from Source
====================
Expand Down
9 changes: 6 additions & 3 deletions doc/usage/menues.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ metadata as table
+++++++++++++++++

Export :index:`metadata <export; metadata>` as tab-delimited table. The table can be either copied to the clipboard
or saved to file.
or saved to a file.

Parameters marked for export (see :ref:`select-params-dlg-label` )
will be included in the export. In addition to these parameters, the first four columns of the table will contain
the group, series, sweep, and trace counts.
Expand Down Expand Up @@ -289,6 +290,8 @@ can be set using the context menu of the **tree-view**. By default, the referenc
'Setting and Ranges' Dialog
***************************

Here you can configure the display area: axis ranges, *autoscale on load*, if grid lines should be displayed, colors
used for drawing traces and grid
Here you can configure the display area: axis ranges, *autoscale on load*, if grid lines should be displayed,
if panning / dragging (see :ref:`graph-panning-lable`)
should affect all Y scales or only the scale pertaining to the data unit of the currently selected trace,
colors used for drawing traces and grid
and the number of overlay traces to be kept in the internal display buffer.
63 changes: 46 additions & 17 deletions hekatoolslib/PMparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <sstream>
#include <iomanip>
#include <array>
#include <algorithm>
#include <cassert>
#include "hkTree.h"
#include "PMparameters.h"
Expand Down Expand Up @@ -454,27 +455,55 @@ namespace hkLib {
return tmp;
}

void PMparameter::formatJSON(const hkTreeNode& node, std::ostream& ss) const
constexpr auto format_json_needs_quotes = std::to_array({
PMparameter::Set16, // for bitfields
PMparameter::DateTime, // weird PowerMod date
PMparameter::StringType,
PMparameter::String8, // String of length 8
PMparameter::String16,
PMparameter::String32,
PMparameter::String80,
PMparameter::String400,
PMparameter::Boolean,
PMparameter::LongReal2, // array of 2 doubles
PMparameter::LongReal4, // array of 4 doubles
PMparameter::LongReal8, // array of 8 double
PMparameter::LongReal16, // 16 double
PMparameter::RecordingMode,
PMparameter::AmpModeName,
PMparameter::UserParamDesc4, // 4x UserParamDesc
PMparameter::UserParamDesc2,
PMparameter::UserParamDesc8
});


void PMparameter::formatJSON(const hkTreeNode& node, std::ostream& ss, bool include_unit) const
{
ss << '"' << name << "\": \"";
const bool do_quotes = include_unit || (std::find(format_json_needs_quotes.begin(),
format_json_needs_quotes.end(), data_type)!=
format_json_needs_quotes.end());
ss << '"' << name << "\": ";
if(do_quotes) ss << '"';
std::stringstream tmp;
formatValueOnly(node, tmp);
ss << JSONescapeQuotes(tmp.str());
// hack to choose correctly for holding voltage or current
if (node.getLevel() == hkTreeNode::LevelTrace && std::strcmp("V|A", unit) == 0)
{
int recording_mode = node.getChar(TrRecordingMode);
if (recording_mode == CClamp) {
ss << " A";
}
else {
ss << " V";
}
}
else {
if (unit[0]) { ss << ' ' << JSONescapeQuotes(unit); }
}
ss << '"';
if(include_unit) {
// hack to choose correctly for holding voltage or current
if (node.getLevel() == hkTreeNode::LevelTrace && std::strcmp("V|A", unit) == 0)
{
int recording_mode = node.getChar(TrRecordingMode);
if (recording_mode == CClamp) {
ss << " A";
}
else {
ss << " V";
}
}
else {
if (unit[0]) { ss << ' ' << JSONescapeQuotes(unit); }
}
}
if(do_quotes) ss << '"';
}

void PMparameter::format(const hkTreeNode& node, std::string& s) const
Expand Down
4 changes: 2 additions & 2 deletions hekatoolslib/PMparameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace hkLib {
LongReal2, // array of 2 doubles
LongReal4, // array of 4 doubles
LongReal8, // array of 8 double
LongReal16, // 8 double
LongReal16, // 16 double
RecordingMode,
RelativeTime,
AmpModeName,
Expand All @@ -67,7 +67,7 @@ namespace hkLib {

void format(const hkTreeNode& node, std::string& s) const;
void format(const hkTreeNode& node, std::ostream& ss) const;
void formatJSON(const hkTreeNode& node, std::ostream& ss) const;
void formatJSON(const hkTreeNode& node, std::ostream& ss, bool include_unit = false) const;
void formatValueOnly(const hkTreeNode& node, std::ostream& ss) const;

/// <summary>
Expand Down
Loading