Skip to content

QPlotMarker – an interactive marker for QChart (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.

License

Notifications You must be signed in to change notification settings

Mark194/qplotmarker

Repository files navigation

QPlotMarker

Баннер проекта

QPlotMarker – an interactive marker for QChart (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.

🛠 Technology used:

C++ CMake Qt QtSvg QtCharts QDoc Qt Help CLion CMD Git GitHub

⬇️ Install

You must have installed project dependencies

# Clone repository

git clone https://github.com/Mark194/qplotmarker

# Go to directory

cd qplotmarker

# Create and go to the build directory

mkdir build

cd build

# Project configuration via CMake

cmake ..

# If you need to specify a specific generator, use

cmake -G "Visual Studio 17 2022" ..

# If you want to configure the library as static, add the option

-DBUILD_SHARED_LIBS=OFF

# Build project

cmake --build .

# Installing the library into the system

cmake --install .

# By default, installation goes to /usr/local/ on Linux/macOS or C:\ProgramFiles (x86)\ on Windows. To change the path, specify

-DCMAKE_INSTALL_PREFIX=/your/path 

🧩 Integration

🔧 QMake Integration

# Add include path

INCLUDEPATH += $$PWD/thirdparty/qplotmarker/include

# Link static library

LIBS += -L$$PWD/thirdparty/qplotmarker/lib -lqplotmarker

# OR compile sources directly (if needed)

SOURCES += $$PWD/thirdparty/qplotmarker/src/*.cpp
HEADERS += $$PWD/thirdparty/qplotmarker/include/*.h

🧱 CMake Integration

Method 1: Using find_package (Recommended if installed system-wide)

find_package(qplotmarker REQUIRED)

target_link_libraries(your_target PRIVATE qplotmarker::qplotmarker)

Method 2: Manual configuration (For custom locations)

# For header files

target_include_directories(your_target PRIVATE
        path/to/qplotmarker/include
)

# For static library
target_link_libraries(your_target PRIVATE
        path/to/qplotmarker/lib/libqplotmarker.a
)

# Or for shared library
target_link_libraries(your_target PRIVATE
        path/to/qplotmarker/lib/libqplotmarker.so)

Method 3: Using FetchContent (For direct GitHub integration)

include(FetchContent)
FetchContent_Declare(
        qplotmarker
        GIT_REPOSITORY https://github.com/Mark194/qplotmarker.git
        GIT_TAG v1.1.0
)
FetchContent_MakeAvailable(qplotmarker)
target_link_libraries(your_target PRIVATE qplotmarker)

🆘 Support

If you have any difficulties or questions about using the package, create a discussion in this repository or write to email

📦 Dependencies

  • Qt Core: Version 5.15.2+ or 6.4.2+
  • Required Modules:
    • QtCharts (for plotting functionality)
    • QtSvg (for SVG support)
  • Compiler:
    • Qt5: GCC 7+, Clang 6+, MSVC 2017 (v19.16+)
    • Qt6: GCC 9+, Clang 10+, MSVC 2019 (v19.28+)
  • Additional Notes:
    • On Windows: MSVC is recommended (MinGW may have issues with QtCharts)
    • On macOS: Xcode 12+ required for Qt6
    • On Linux: Install libgl1-mesa-dev and other development tools

Found compatibility issues? Please report in Issues.

📚 Documentation in Qt Assistant

🔍 Summary

  • 📦 Format: Documentation provided in Qt Compressed Help (.qch) format, viewable in Qt Assistant.
  • 📂 Main File: qplotmarker.qch – QPlotMarker module documentation.
  • ⚙️ Integration: Two methods supported (GUI or command-line).

⬇️ Download

Get the .qch file from the repository:
🔗 docs/ in qplotmarker

🔧 Integration with Qt Assistant

🖥️ Method 1: GUI Setup

  1. Launch Qt Assistant (assistant in terminal).
  2. Go to: Edit → Preferences → Documentation → Add....
  3. Select qplotmarker.qch.
  4. Click OK – docs will appear in the content tab.

⌨️ Method 2: Command Line

assistant -register qplotmarker.qch

💻 Examples

Ready-to-use code examples are available in the examples folder. These demonstrate:

  • Basic usage of plotting functionality
  • Advanced marker customization
  • Integration with Qt widgets

👁️ Visual Examples

Miniature Description
Full size
Base Example
Full size
Inverted Markers
Invert horizontal and vertical marker
Full size
PlotMarker Distance
Coord difference between markers
Full size
Show Coord Marker
Displays the coordinates of the intersection points
Full size
Grouping Markers
Grouping markers for synchronous movement

🙏 Special Thanks

We would like to express our special gratitude to * ShonZelno* for their valuable contributions to this project, including:

  • Active participation in development and testing
  • Suggesting innovative ideas and improvements
  • Helping to identify and fix critical issues

Your involvement made this library significantly better!

About

QPlotMarker – an interactive marker for QChart (Qt). Supports color and orientation (vertical/horizontal) changes, snaps to data points, and displays intersection coordinates.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •