Developer Guide¶
This page provides an orientation to the Engauge Digitizer C++ source code for contributors and maintainers.
Source Layout¶
All application code lives under src/. Each subdirectory is a logical
module with a clear single responsibility:
Core logic
Cmd/— Undo/redo command objects (QUndoCommand subclasses)Curve/— Curve data model and managementDocument/— The in-memory document (loaded image + digitized data)CoordSystem/— Coordinate system definitions and transformationsTransformation/— Affine and nonlinear coordinate transformationsExport/— CSV/TSV export formatting and logic
Digitizing state machine
DigitizeState/— Application modes (axis points, curve points, point match, segment fill, …) implemented as a state machineCreate/— Factory methods that wire up menus, toolbars, and the help window on startupChecklist/— The step-by-step checklist wizard
Dialogs and UI
Dlg/— All QDialog subclasses (settings, export, about, …)Settings/— Persistent QSettings wrapper objectsStatusBar/— Status bar message managementView/— Custom QGraphicsView and scene overlaysWindow/— Secondary window helpers
Import / image handling
Import/— Image import pipeline (JPEG, PNG, JPEG2000, …)NonPdf/— Raster-specific import cropping pathsJpeg2000/— Optional JPEG 2000 support via OpenJPEGFilter//Color/— Image discretization and color filtersSegment/— Segment-fill path tracing
Graphics and interaction
Graphics/— Custom QGraphicsItem types for axis/curve/guide pointsGuideline//GuidelineView/— Guideline overlaysCursor/— Custom cursor managementGrid/— Grid line rendering
Math / fitting
Matrix/— Small matrix operations for coordinate mathFitting/— Curve fitting helpersSpline/— Cubic spline interpolationCorrelation/— Point-match correlation
Utilities
Logger//log4cpp_null/— Logging; the null backend removes the log4cpp dependency for release buildsutil/— Miscellaneous helpersCallback/— Functor callbacks used across the state machine
Integration and tests
Test/— Unit test support classesmain/—MainWindow(top-level QMainWindow) andmain.cpp
Build System¶
The project uses CMake (>= 3.16) targeting Qt6 only. The two supported build configurations are:
# Linux — system Qt6 + Conan-managed third-party deps
pipx install conan # one-time
./scripts/build_linux_systemqt.sh
# Windows — MXE Qt6 + Conan-managed third-party deps
pipx install conan # one-time
export MXE_ROOT=/path/to/your/mxe # e.g. $HOME/workspace/mxe-qt6
./scripts/build_windows_conan.sh
The default scripts enable optional JPEG2000 support. Dependencies such as FFTW3 and OpenJPEG are installed by Conan.
See the Build and Release page for full instructions.
API Documentation¶
The source has sparse Doxygen-style comments (only in a handful of header files). Full auto-generated API docs are not currently published.
If you want to browse the API locally, install Doxygen
and run it from src/:
cd src
doxygen -g Doxyfile # generate a default config
doxygen Doxyfile # builds HTML in doc/doxygen/html/
A future improvement would be to add breathe integration to publish API docs here automatically.
Sample Images (samples/)¶
The samples/ directory contains demonstration images that can be loaded
directly into Engauge for experimenting. They were produced by the gnuplot
scripts and helper programs in dev/ and are tracked in Git LFS.
Adding a new sample image:
# add the file — LFS handles it automatically via .gitattributes
git add samples/myimage.png
git commit -m "samples: add myimage"
Contributing¶
Please open a GitHub issue before starting large changes. For small bug fixes, a pull request is welcome directly.