Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jepessen committed Sep 27, 2015
2 parents 7864d26 + c739f30 commit 25cf6d0
Show file tree
Hide file tree
Showing 126 changed files with 3,438 additions and 839 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@

*.user.*
doc/html/
*.swp

10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

# In order to work following variables must be set
#
# QT_DIR: Path to Qt installation.
# QT_ROOT: Path to Qt installation.

cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

# Variables that should be set before execution
if (WIN32)
set (QT_DIR "" CACHE PATH "Qt library path")
set (QT_ROOT "" CACHE PATH "Qt library path")
else (WIN32)
set (QT_DIR "/usr/include" CACHE PATH "Qt library path")
set (QT_ROOT "/usr/include" CACHE PATH "Qt library path")
endif (WIN32)

message ("Generating WPlot project")
message ("Setting QT_DIR To ${QT_DIR}")
message ("Setting QT_ROOT To ${QT_ROOT}")

add_subdirectory (wplot)
add_subdirectory (demo)
60 changes: 37 additions & 23 deletions demo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,57 +1,71 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

add_subdirectory (background_solid)
add_subdirectory (background_gradient)
add_subdirectory (grid_black)
add_subdirectory (grid_color)
add_subdirectory (cartesiangrid2d_black)
add_subdirectory (cartesiangrid2d_color)
add_subdirectory (polargrid2d_simple)
add_subdirectory (circle_simple)
add_subdirectory (circle_styled)
add_subdirectory (rectangle_simple)
add_subdirectory (rectangle_styled)
add_subdirectory (scatterplot_circle)
add_subdirectory (lineplot)
add_subdirectory (cartesianscatterplot2d_circle)
add_subdirectory (cartesianlineplot2d_simple)
add_subdirectory (cartesianlineplot2d_styled)
add_subdirectory (cartesianlineplot2d_filling)
add_subdirectory (polarlineplot2d_simple)
add_subdirectory (polarlineplot2d_styled)
add_subdirectory (polarlineplot2d_filled)
add_subdirectory (polarlineplot2d_gradient)
add_subdirectory (arrow_simple)
add_subdirectory (arrow_styled)
add_subdirectory (axes_simple)
add_subdirectory (axes_styled)
add_subdirectory (text_simple)
add_subdirectory (text_styled)
add_subdirectory (tick_labels_simple)
add_subdirectory (barplot2d_simple)
add_subdirectory (barplot2d_styled)
add_subdirectory (candlestick2d_simple)
add_subdirectory (cartesianbarplot2d_simple)
add_subdirectory (cartesianbarplot2d_styled)
add_subdirectory (cartesiancandlestick2d_simple)
add_subdirectory (candlestick2d_styled)
add_subdirectory (ohlcbar2d_simple)
add_subdirectory (ohlcbar2d_styled)
add_subdirectory (candlestickgraph2d_simple)
add_subdirectory (candlestickgraph2d_styled)
add_subdirectory (ohlcgraph2d_simple)
add_subdirectory (ohlcgraph2d_styled)
add_subdirectory (cartesiancandlestickgraph2d_simple)
add_subdirectory (cartesiancandlestickgraph2d_styled)
add_subdirectory (cartesianohlcgraph2d_simple)
add_subdirectory (cartesianohlcgraph2d_styled)

add_dependencies (demo_background_solid wplot)
add_dependencies (demo_background_gradient wplot)
add_dependencies (demo_grid_black wplot)
add_dependencies (demo_grid_color wplot)
add_dependencies (demo_cartesiangrid2d_black wplot)
add_dependencies (demo_cartesiangrid2d_color wplot)
add_dependencies (demo_polargrid2d_simple wplot)
add_dependencies (demo_circle_simple wplot)
add_dependencies (demo_circle_styled wplot)
add_dependencies (demo_rectangle_simple wplot)
add_dependencies (demo_rectangle_styled wplot)
add_dependencies (demo_scatterplot_circle wplot)
add_dependencies (demo_lineplot wplot)
add_dependencies (demo_cartesianscatterplot2d_circle wplot)
add_dependencies (demo_cartesianlineplot2d_simple wplot)
add_dependencies (demo_cartesianlineplot2d_styled wplot)
add_dependencies (demo_cartesianlineplot2d_filling wplot)
add_dependencies (demo_polarlineplot2d_simple wplot)
add_dependencies (demo_polarlineplot2d_styled wplot)
add_dependencies (demo_polarlineplot2d_filled wplot)
add_dependencies (demo_polarlineplot2d_gradient wplot)
add_dependencies (demo_arrow_simple wplot)
add_dependencies (demo_arrow_styled wplot)
add_dependencies (demo_axes_simple wplot)
add_dependencies (demo_axes_styled wplot)
add_dependencies (demo_text_simple wplot)
add_dependencies (demo_text_styled wplot)
add_dependencies (demo_tick_labels_simple wplot)
add_dependencies (demo_barplot2d_simple wplot)
add_dependencies (demo_barplot2d_styled wplot)
add_dependencies (demo_candlestick2d_simple wplot)
add_dependencies (demo_cartesianbarplot2d_simple wplot)
add_dependencies (demo_cartesianbarplot2d_styled wplot)
add_dependencies (demo_cartesiancandlestick2d_simple wplot)
add_dependencies (demo_candlestick2d_styled wplot)
add_dependencies (demo_ohlcbar2d_simple wplot)
add_dependencies (demo_ohlcbar2d_styled wplot)
add_dependencies (demo_candlestickgraph2d wplot)
add_dependencies (demo_candlestickgraph2d_styled wplot)
add_dependencies (demo_ohlcgraph2d_simple wplot)
add_dependencies (demo_ohlcgraph2d_styled wplot)
add_dependencies (demo_cartesiancandlestickgraph2d_simple wplot)
add_dependencies (demo_cartesiancandlestickgraph2d_styled wplot)
add_dependencies (demo_cartesianohlcgraph2d_simple wplot)
add_dependencies (demo_cartesianohlcgraph2d_styled wplot)
19 changes: 15 additions & 4 deletions demo/arrow_simple/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_arrow_simple)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,16 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_arrow_simple ${DEMO_SOURCES})
target_link_libraries(demo_arrow_simple ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_arrow_simple wplot)
set_property(TARGET demo_arrow_simple PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_arrow_simple PROPERTY CXX_STANDARD_REQUIRED ON)
# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()
4 changes: 2 additions & 2 deletions demo/arrow_simple/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "wplot/Plot2D.h"
#include "wplot/CartesianPlot2D.h"
#include "wplot/Arrow2D.h"
#include <QApplication>
#include <iostream>
Expand All @@ -7,7 +7,7 @@ int main(int argc, char *argv[])
{
std::cout << "Simple arrow inset demo" << std::endl;
QApplication a(argc, argv);
WPlot::Plot2D* plot2D(new WPlot::Plot2D);
WPlot::CartesianPlot2D* plot2D(new WPlot::CartesianPlot2D);
WPlot::Arrow2D::Ptr arrowWidget(new WPlot::Arrow2D);
WPlot::Arrow2D::Ptr arrowPlot(new WPlot::Arrow2D);
// By default widget coordinate system is used
Expand Down
21 changes: 17 additions & 4 deletions demo/arrow_styled/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_arrow_styled)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,18 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_arrow_styled ${DEMO_SOURCES})
target_link_libraries(demo_arrow_styled ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_arrow_styled wplot)
set_property(TARGET demo_arrow_styled PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_arrow_styled PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

4 changes: 2 additions & 2 deletions demo/arrow_styled/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "wplot/Plot2D.h"
#include "wplot/CartesianPlot2D.h"
#include "wplot/Arrow2D.h"
#include <QApplication>
#include <iostream>
Expand All @@ -7,7 +7,7 @@ int main(int argc, char *argv[])
{
std::cout << "Styled arrow inset demo" << std::endl;
QApplication a(argc, argv);
WPlot::Plot2D* plot2D(new WPlot::Plot2D);
WPlot::CartesianPlot2D* plot2D(new WPlot::CartesianPlot2D);
WPlot::Arrow2D::Ptr arrow(new WPlot::Arrow2D);
arrow->setPivotCoordinates(WPlot::Item2D::COORDINATE_PLOT, WPlot::Item2D::AXIS_BOTH);
arrow->setDimensionCoordinates(WPlot::Item2D::COORDINATE_WIDGET, WPlot::Item2D::AXIS_BOTH);
Expand Down
21 changes: 17 additions & 4 deletions demo/axes_simple/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_axes_simple)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,18 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_axes_simple ${DEMO_SOURCES})
target_link_libraries(demo_axes_simple ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_axes_simple wplot)
set_property(TARGET demo_axes_simple PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_axes_simple PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

4 changes: 2 additions & 2 deletions demo/axes_simple/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "wplot/Plot2D.h"
#include "wplot/CartesianPlot2D.h"
#include "wplot/Axes2D.h"
#include <QApplication>
#include <iostream>
Expand All @@ -7,7 +7,7 @@ int main(int argc, char *argv[])
{
std::cout << "Simple axes inset demo" << std::endl;
QApplication a(argc, argv);
WPlot::Plot2D* plot2D(new WPlot::Plot2D);
WPlot::CartesianPlot2D* plot2D(new WPlot::CartesianPlot2D);
WPlot::Axes2D::Ptr axesInside(new WPlot::Axes2D);
WPlot::Axes2D::Ptr axesOutside(new WPlot::Axes2D);
axesInside->setOrigin(0.5, 1.3);
Expand Down
21 changes: 17 additions & 4 deletions demo/axes_styled/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_axes_styled)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,18 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_axes_styled ${DEMO_SOURCES})
target_link_libraries(demo_axes_styled ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_axes_styled wplot)
set_property(TARGET demo_axes_styled PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_axes_styled PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

4 changes: 2 additions & 2 deletions demo/axes_styled/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "wplot/Plot2D.h"
#include "wplot/CartesianPlot2D.h"
#include "wplot/Axes2D.h"
#include <QApplication>
#include <iostream>
Expand All @@ -7,7 +7,7 @@ int main(int argc, char *argv[])
{
std::cout << "Simple axes inset demo" << std::endl;
QApplication a(argc, argv);
WPlot::Plot2D* plot2D(new WPlot::Plot2D);
WPlot::CartesianPlot2D* plot2D(new WPlot::CartesianPlot2D);
WPlot::Axes2D::Ptr axes(new WPlot::Axes2D);
axes->setOrigin(0.5, 1.3);
axes->setAxisXColor(Qt::red);
Expand Down
21 changes: 17 additions & 4 deletions demo/background_gradient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_background_gradient)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,18 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_background_gradient ${DEMO_SOURCES})
target_link_libraries(demo_background_gradient ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_background_gradient wplot)
set_property(TARGET demo_background_gradient PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_background_gradient PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

20 changes: 16 additions & 4 deletions demo/background_solid/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required (VERSION 3.1.0)
cmake_minimum_required (VERSION 3.0.2)

project (demo_background_solid)

set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/export/bin)
set (CMAKE_PREFIX_PATH ${QT_DIR}/lib/cmake)
set (CMAKE_PREFIX_PATH ${QT_ROOT}/lib/cmake)
set (CMAKE_AUTOMOC ON)
set (CMAKE_INCLUDE_CURRENT_DIR ON)

Expand All @@ -15,5 +15,17 @@ file (GLOB DEMO_SOURCES "*.cpp")
add_executable (demo_background_solid ${DEMO_SOURCES})
target_link_libraries(demo_background_solid ${Qt5Widgets_LIBRARIES})
target_link_libraries(demo_background_solid wplot)
set_property(TARGET demo_background_solid PROPERTY CXX_STANDARD 11)
set_property(TARGET demo_background_solid PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for CMake version >= 3.1.0
set_property(TARGET wplot PROPERTY CXX_STANDARD 11)
set_property(TARGET wplot PROPERTY CXX_STANDARD_REQUIRED ON)

# This enable C++11 for gcc for CMake version priors to 3.1.0
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()
Loading

0 comments on commit 25cf6d0

Please sign in to comment.