Compare commits
2 Commits
42e7ac4d58
...
4a5fb9c6c6
Author | SHA1 | Date | |
---|---|---|---|
4a5fb9c6c6 | |||
ab49a42b95 |
@ -23,19 +23,19 @@ jobs:
|
||||
run: ~/stop.sh fourier || echo service was not started
|
||||
|
||||
- name: clear old installation
|
||||
run: xargs rm < ~/build/install_manifest.txt || echo previous installation not found
|
||||
run: xargs rm < ~/build/fourier/install_manifest.txt || echo previous installation not found
|
||||
|
||||
- name: clear old builddir
|
||||
run: rm -rf ~/build || echo previous installation not found
|
||||
run: rm -rf ~/build/fourier || echo previous installation not found
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ~/build -DCMAKE_INSTALL_PREFIX=~/.local
|
||||
run: cmake -B ~/build/fourier -DCMAKE_INSTALL_PREFIX=~/.local
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ~/build
|
||||
run: cmake --build ~/build/fourier
|
||||
|
||||
- name: install
|
||||
run: make -C ~/build install
|
||||
run: make -C ~/build/fourier install
|
||||
|
||||
- name: Start server
|
||||
run: ~/start.sh fourier
|
||||
|
@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(Wt REQUIRED
|
||||
Wt
|
||||
HTTP
|
||||
FCGI
|
||||
)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
@ -22,27 +22,27 @@ add_executable(${PROJECT_NAME}
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
Wt::Wt
|
||||
Wt::HTTP
|
||||
Wt::FCGI
|
||||
)
|
||||
|
||||
configure_file(
|
||||
run.sh.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
|
||||
)
|
||||
# configure_file(
|
||||
# run.sh.in
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
|
||||
# )
|
||||
|
||||
install( TARGETS ${PROJECT_NAME}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
install( FILES wt_config.xml DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME})
|
||||
# install( FILES wt_config.xml DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/${PROJECT_NAME})
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
# install(
|
||||
# FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
|
||||
# DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
# PERMISSIONS
|
||||
# OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
# GROUP_READ GROUP_EXECUTE
|
||||
# WORLD_READ WORLD_EXECUTE
|
||||
# )
|
||||
|
||||
|
@ -104,6 +104,15 @@ public:
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
virtual WString displayData(int row, int column) const override {
|
||||
if ( column == 0 ) {
|
||||
if ( row == rowCount()/2 ) return "π";
|
||||
if ( row == rowCount()-1 ) return "2π";
|
||||
}
|
||||
return Chart::WAbstractChartModel::displayData(row, column);
|
||||
}
|
||||
|
||||
virtual int columnCount() const override { return 3; };
|
||||
virtual int rowCount() const override { return discreteModel->rowCount(); }
|
||||
|
||||
@ -315,11 +324,12 @@ MyApplication::MyApplication(const WEnvironment& env)
|
||||
fourierModel = make_shared<FourierModel>(discreteModel, fourier_data);
|
||||
fourierModel->changed().connect([this](){restoreModel->changed().emit();});
|
||||
fourierChart->setModel(static_pointer_cast<Chart::WAbstractChartModel>(fourierModel));
|
||||
fourierChart->setXSeriesColumn(0);
|
||||
|
||||
auto seriesPtr = make_unique<Chart::WDataSeries>(2, Chart::SeriesType::Point);
|
||||
auto phaseSeries = seriesPtr.get();
|
||||
phaseSeries->setModel(fourierChart->model());
|
||||
phaseSeries->setXSeriesColumn(0);
|
||||
//phaseSeries->setXSeriesColumn(0);
|
||||
phaseSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3));
|
||||
fourierChart->addSeries(std::move(seriesPtr));
|
||||
|
||||
@ -327,7 +337,7 @@ MyApplication::MyApplication(const WEnvironment& env)
|
||||
seriesPtr = make_unique<Chart::WDataSeries>(1, Chart::SeriesType::Line);
|
||||
auto ampSeries = seriesPtr.get();
|
||||
ampSeries->setModel(fourierChart->model());
|
||||
ampSeries->setXSeriesColumn(0);
|
||||
//ampSeries->setXSeriesColumn(0);
|
||||
ampSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3));
|
||||
fourierChart->addSeries(std::move(seriesPtr));
|
||||
auto id = fourierChart->addYAxis(make_unique<Chart::WAxis>());
|
||||
|
Loading…
x
Reference in New Issue
Block a user