Skip to content

Commit c07664c

Browse files
committed
Initial working version
1 parent cc926ae commit c07664c

File tree

4 files changed

+82
-9
lines changed

4 files changed

+82
-9
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,8 @@ FetchContent_Declare(JKQTPlotter
670670

671671
FetchContent_MakeAvailable(JKQTPlotter)
672672

673-
list(APPEND JKQT_LIBS Qt6::WebEngineCore)
674-
list(APPEND JKQT_LIBS Qt6::WebEngineWidgets)
673+
list(APPEND JKQT_LIBS JKQTCommonSharedLib)
674+
list(APPEND JKQT_LIBS JKQTPlotterSharedLib)
675675

676676
set(CMAKE_AUTOMOC OFF)
677677

src/openstudio_app/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,14 @@ elseif( WIN32 )
275275
#COMMAND ${CMAKE_COMMAND} -E copy_if_different ${qweb_resources_v8_context_snapshot} $<TARGET_FILE_DIR:${target_name}>/resources/
276276
)
277277

278+
add_custom_command(TARGET ${target_name}
279+
POST_BUILD
280+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:JKQTCommonSharedLib> $<TARGET_FILE_DIR:${target_name}>/
281+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:JKQTFastPlotterSharedLib> $<TARGET_FILE_DIR:${target_name}>/
282+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:JKQTMathTextSharedLib> $<TARGET_FILE_DIR:${target_name}>/
283+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:JKQTPlotterSharedLib> $<TARGET_FILE_DIR:${target_name}>/
284+
)
285+
278286
# On Windows, we must copy the DLLs inside the build folder or it won't find them
279287
# TODO: IMPORTED_SONAME_RELEASE now contains @rpath so it fails
280288
# get_target_property(LIBOSLIB openstudio::openstudiolib IMPORTED_LOCATION_RELEASE)

src/openstudio_lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,7 @@ set(${target_name}_depends
776776
${QT_WEB_LIBS}
777777
${JKQT_LIBS}
778778
)
779+
779780
if(WIN32)
780781
list(APPEND ${target_name}_depends qtwinmigrate)
781782
endif()

src/openstudio_lib/HVACSystemsView.cpp

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ OAResetSPMView::OAResetSPMView(const model::SetpointManagerOutdoorAirReset& spm)
688688

689689
// Create a JKQTPlotter widget
690690
JKQTPlotter* plotter = new JKQTPlotter();
691+
plotter->setPlotUpdateEnabled(false);
691692
JKQTPDatastore* ds = plotter->getDatastore();
692693

693694
// Generate the data for the plot
@@ -713,10 +714,25 @@ OAResetSPMView::OAResetSPMView(const model::SetpointManagerOutdoorAirReset& spm)
713714
JKQTPXYLineGraph* graph = new JKQTPXYLineGraph(plotter);
714715
graph->setXColumn(columnX);
715716
graph->setYColumn(columnY);
716-
graph->setTitle(QObject::tr("Setpoint Outdoor Air Temp Reset"));
717+
graph->setTitle("Setpoint Outdoor Air Temp Reset");
718+
717719
plotter->getXAxis()->setAxisLabel("Outdoor Air Temperature [C]");
718720
plotter->getYAxis()->setAxisLabel("Setpoint Temperature [C]");
719721
plotter->setMinimumSize(400, 400);
722+
plotter->setMaximumSize(600, 400);
723+
plotter->setToolbarEnabled(false);
724+
plotter->clearAllMouseWheelActions();
725+
plotter->clearAllRegisteredMouseDoubleClickActions();
726+
plotter->clearAllRegisteredMouseDragActions();
727+
plotter->getPlotter()->setUseAntiAliasingForGraphs(false);
728+
plotter->getPlotter()->setUseAntiAliasingForSystem(false);
729+
plotter->getPlotter()->setUseAntiAliasingForText(false);
730+
plotter->getPlotter()->setPlotLabel("Setpoint Follow Outdoor Air Temperature");
731+
plotter->addGraph(graph);
732+
plotter->zoomToFit();
733+
plotter->setPlotUpdateEnabled(true);
734+
plotter->redrawPlot();
735+
720736
mainVLayout->addWidget(plotter);
721737
mainVLayout->addStretch();
722738
}
@@ -740,6 +756,7 @@ SystemNodeResetSPMView::SystemNodeResetSPMView(const model::SetpointManagerSyste
740756

741757
// Create a JKQTPlotter widget
742758
JKQTPlotter* plotter = new JKQTPlotter();
759+
plotter->setPlotUpdateEnabled(false);
743760
JKQTPDatastore* ds = plotter->getDatastore();
744761

745762
// Generate the data for the plot
@@ -765,10 +782,25 @@ SystemNodeResetSPMView::SystemNodeResetSPMView(const model::SetpointManagerSyste
765782
JKQTPXYLineGraph* graph = new JKQTPXYLineGraph(plotter);
766783
graph->setXColumn(columnX);
767784
graph->setYColumn(columnY);
768-
graph->setTitle(QObject::tr("Setpoint System Node Reset Temperature"));
785+
graph->setTitle("Setpoint System Node Reset Temperature");
786+
769787
plotter->getXAxis()->setAxisLabel("System Node Temperature [C]");
770788
plotter->getYAxis()->setAxisLabel("Setpoint Temperature [C]");
771789
plotter->setMinimumSize(400, 400);
790+
plotter->setMaximumSize(600, 400);
791+
plotter->setToolbarEnabled(false);
792+
plotter->clearAllMouseWheelActions();
793+
plotter->clearAllRegisteredMouseDoubleClickActions();
794+
plotter->clearAllRegisteredMouseDragActions();
795+
plotter->getPlotter()->setUseAntiAliasingForGraphs(false);
796+
plotter->getPlotter()->setUseAntiAliasingForSystem(false);
797+
plotter->getPlotter()->setUseAntiAliasingForText(false);
798+
plotter->getPlotter()->setPlotLabel("Setpoint Follow System Node Temperature");
799+
plotter->addGraph(graph);
800+
plotter->zoomToFit();
801+
plotter->setPlotUpdateEnabled(true);
802+
plotter->redrawPlot();
803+
772804
mainVLayout->addWidget(plotter);
773805
mainVLayout->addStretch();
774806
}
@@ -808,6 +840,7 @@ FollowOATempSPMView::FollowOATempSPMView(const model::SetpointManagerFollowOutdo
808840

809841
// Create a JKQTPlotter widget
810842
JKQTPlotter* plotter = new JKQTPlotter();
843+
plotter->setPlotUpdateEnabled(false);
811844
JKQTPDatastore* ds = plotter->getDatastore();
812845

813846
// Generate the data for the plot
@@ -828,15 +861,30 @@ FollowOATempSPMView::FollowOATempSPMView(const model::SetpointManagerFollowOutdo
828861
JKQTPXYLineGraph* graph1 = new JKQTPXYLineGraph(plotter);
829862
graph1->setXColumn(columnX);
830863
graph1->setYColumn(columnY);
831-
graph1->setTitle(QObject::tr("Setpoint Follow Outdoor Air Temperature"));
864+
graph1->setTitle("Setpoint Temperature");
832865
JKQTPXYLineGraph* graph2 = new JKQTPXYLineGraph(plotter);
833866
graph2->setXColumn(columnX);
834867
graph2->setYColumn(columnYOA);
835-
graph2->setTitle(QObject::tr("Setpoint Follow Outdoor Air Temperature"));
868+
graph2->setTitle(refTempType);
836869

837870
plotter->getXAxis()->setAxisLabel(QString("%1 Temperature [C]").arg(refTempType));
838871
plotter->getYAxis()->setAxisLabel("Setpoint Temperature [C]");
839872
plotter->setMinimumSize(400, 400);
873+
plotter->setMaximumSize(600, 400);
874+
plotter->setToolbarEnabled(false);
875+
plotter->clearAllMouseWheelActions();
876+
plotter->clearAllRegisteredMouseDoubleClickActions();
877+
plotter->clearAllRegisteredMouseDragActions();
878+
plotter->getPlotter()->setUseAntiAliasingForGraphs(false);
879+
plotter->getPlotter()->setUseAntiAliasingForSystem(false);
880+
plotter->getPlotter()->setUseAntiAliasingForText(false);
881+
plotter->getPlotter()->setPlotLabel(QString("Setpoint Follow %1 Temperature").arg(refTempType));
882+
plotter->addGraph(graph1);
883+
plotter->addGraph(graph2);
884+
plotter->zoomToFit();
885+
plotter->setPlotUpdateEnabled(true);
886+
plotter->redrawPlot();
887+
840888
mainVLayout->addWidget(plotter);
841889
mainVLayout->addStretch();
842890
}
@@ -857,6 +905,7 @@ FollowGroundTempSPMView::FollowGroundTempSPMView(const model::SetpointManagerFol
857905

858906
// Create a JKQTPlotter widget
859907
JKQTPlotter* plotter = new JKQTPlotter();
908+
plotter->setPlotUpdateEnabled(false);
860909
JKQTPDatastore* ds = plotter->getDatastore();
861910

862911
// Generate the data for the plot
@@ -877,15 +926,30 @@ FollowGroundTempSPMView::FollowGroundTempSPMView(const model::SetpointManagerFol
877926
JKQTPXYLineGraph* graph1 = new JKQTPXYLineGraph(plotter);
878927
graph1->setXColumn(columnX);
879928
graph1->setYColumn(columnY);
880-
graph1->setTitle(QObject::tr("Setpoint Follow Ground Temperature"));
929+
graph1->setTitle("Setpoint Follow Ground Temperature");
881930
JKQTPXYLineGraph* graph2 = new JKQTPXYLineGraph(plotter);
882931
graph2->setXColumn(columnX);
883932
graph2->setYColumn(columnYGround);
884-
graph2->setTitle(QObject::tr("Setpoint Follow Ground Temperature"));
933+
graph2->setTitle("Setpoint Follow Ground Temperature");
885934

886-
plotter->getXAxis()->setAxisLabel("Ground Temperature [C]");
935+
plotter->getXAxis()->setAxisLabel(QString("Ground Temperature [C]"));
887936
plotter->getYAxis()->setAxisLabel("Setpoint Temperature [C]");
888937
plotter->setMinimumSize(400, 400);
938+
plotter->setMaximumSize(600, 400);
939+
plotter->setToolbarEnabled(false);
940+
plotter->clearAllMouseWheelActions();
941+
plotter->clearAllRegisteredMouseDoubleClickActions();
942+
plotter->clearAllRegisteredMouseDragActions();
943+
plotter->getPlotter()->setUseAntiAliasingForGraphs(false);
944+
plotter->getPlotter()->setUseAntiAliasingForSystem(false);
945+
plotter->getPlotter()->setUseAntiAliasingForText(false);
946+
plotter->getPlotter()->setPlotLabel("Setpoint Follow Ground Temperature");
947+
plotter->addGraph(graph1);
948+
plotter->addGraph(graph2);
949+
plotter->zoomToFit();
950+
plotter->setPlotUpdateEnabled(true);
951+
plotter->redrawPlot();
952+
889953
mainVLayout->addWidget(plotter);
890954
mainVLayout->addStretch();
891955
}

0 commit comments

Comments
 (0)