Compare commits

..

1 Commits

Author SHA1 Message Date
42e7ac4d58 обратное преобразование
All checks were successful
CMake on a single platform / build (push) Successful in 22s
2024-09-18 20:48:40 +04:00
3 changed files with 22 additions and 32 deletions

View File

@ -23,19 +23,19 @@ jobs:
run: ~/stop.sh fourier || echo service was not started run: ~/stop.sh fourier || echo service was not started
- name: clear old installation - name: clear old installation
run: xargs rm < ~/build/fourier/install_manifest.txt || echo previous installation not found run: xargs rm < ~/build/install_manifest.txt || echo previous installation not found
- name: clear old builddir - name: clear old builddir
run: rm -rf ~/build/fourier || echo previous installation not found run: rm -rf ~/build || echo previous installation not found
- name: Configure CMake - name: Configure CMake
run: cmake -B ~/build/fourier -DCMAKE_INSTALL_PREFIX=~/.local run: cmake -B ~/build -DCMAKE_INSTALL_PREFIX=~/.local
- name: Build - name: Build
run: cmake --build ~/build/fourier run: cmake --build ~/build
- name: install - name: install
run: make -C ~/build/fourier install run: make -C ~/build install
- name: Start server - name: Start server
run: ~/start.sh fourier run: ~/start.sh fourier

View File

@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Wt REQUIRED find_package(Wt REQUIRED
Wt Wt
FCGI HTTP
) )
include(GNUInstallDirs) include(GNUInstallDirs)
@ -22,27 +22,27 @@ add_executable(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME}
Wt::Wt Wt::Wt
Wt::FCGI Wt::HTTP
) )
# configure_file( configure_file(
# run.sh.in run.sh.in
# ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
# ) )
install( TARGETS ${PROJECT_NAME} install( TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 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( install(
# FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.wt
# DESTINATION ${CMAKE_INSTALL_BINDIR} DESTINATION ${CMAKE_INSTALL_BINDIR}
# PERMISSIONS PERMISSIONS
# OWNER_READ OWNER_WRITE OWNER_EXECUTE OWNER_READ OWNER_WRITE OWNER_EXECUTE
# GROUP_READ GROUP_EXECUTE GROUP_READ GROUP_EXECUTE
# WORLD_READ WORLD_EXECUTE WORLD_READ WORLD_EXECUTE
# ) )

View File

@ -104,15 +104,6 @@ public:
default: return 0; 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 "";
}
return Chart::WAbstractChartModel::displayData(row, column);
}
virtual int columnCount() const override { return 3; }; virtual int columnCount() const override { return 3; };
virtual int rowCount() const override { return discreteModel->rowCount(); } virtual int rowCount() const override { return discreteModel->rowCount(); }
@ -324,12 +315,11 @@ MyApplication::MyApplication(const WEnvironment& env)
fourierModel = make_shared<FourierModel>(discreteModel, fourier_data); fourierModel = make_shared<FourierModel>(discreteModel, fourier_data);
fourierModel->changed().connect([this](){restoreModel->changed().emit();}); fourierModel->changed().connect([this](){restoreModel->changed().emit();});
fourierChart->setModel(static_pointer_cast<Chart::WAbstractChartModel>(fourierModel)); fourierChart->setModel(static_pointer_cast<Chart::WAbstractChartModel>(fourierModel));
fourierChart->setXSeriesColumn(0);
auto seriesPtr = make_unique<Chart::WDataSeries>(2, Chart::SeriesType::Point); auto seriesPtr = make_unique<Chart::WDataSeries>(2, Chart::SeriesType::Point);
auto phaseSeries = seriesPtr.get(); auto phaseSeries = seriesPtr.get();
phaseSeries->setModel(fourierChart->model()); phaseSeries->setModel(fourierChart->model());
//phaseSeries->setXSeriesColumn(0); phaseSeries->setXSeriesColumn(0);
phaseSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); phaseSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3));
fourierChart->addSeries(std::move(seriesPtr)); fourierChart->addSeries(std::move(seriesPtr));
@ -337,7 +327,7 @@ MyApplication::MyApplication(const WEnvironment& env)
seriesPtr = make_unique<Chart::WDataSeries>(1, Chart::SeriesType::Line); seriesPtr = make_unique<Chart::WDataSeries>(1, Chart::SeriesType::Line);
auto ampSeries = seriesPtr.get(); auto ampSeries = seriesPtr.get();
ampSeries->setModel(fourierChart->model()); ampSeries->setModel(fourierChart->model());
//ampSeries->setXSeriesColumn(0); ampSeries->setXSeriesColumn(0);
ampSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3)); ampSeries->setShadow(WShadow(3, 3, WColor(0, 0, 0, 127), 3));
fourierChart->addSeries(std::move(seriesPtr)); fourierChart->addSeries(std::move(seriesPtr));
auto id = fourierChart->addYAxis(make_unique<Chart::WAxis>()); auto id = fourierChart->addYAxis(make_unique<Chart::WAxis>());