Add a source file and a header file, which implement the color scheme used by the statistics module. Besides a few color constants, the centerpiece is a function that returns the color representing a bin and an appropriate label color. It picks a roughly equi-distant set of colors out of an already balanced set of 50 candidate colors. And it also picks white as text color when adding a label to a segment with a dark color. The color list was created using a tool by Gregor Aisch that is available on GitHub as https://github.com/gka/palettes to create multi-hued, multi-stop color scales that are safe for color blind people. This commit contains code from three authors. Dirk (main author): adaptive color scheme. Willem: Colors of single-bin charts and lines. Berthold: Infrastructure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
18 lines
398 B
CMake
18 lines
398 B
CMake
# the stats-graph widget
|
|
include_directories(.
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_BINARY_DIR}
|
|
)
|
|
|
|
set(SUBSURFACE_STATS_SRCS
|
|
statscolors.h
|
|
statscolors.cpp
|
|
statsvariables.h
|
|
statsvariables.cpp
|
|
)
|
|
|
|
source_group("Subsurface statistics sourcecode" FILES ${SUBSURFACE_STATS_SRCS})
|
|
|
|
add_library(subsurface_stats STATIC ${SUBSURFACE_STATS_SRCS})
|
|
target_link_libraries(subsurface_stats ${QT_LIBRARIES})
|