From 45debbed072ea453decffe731c445a5489e0a402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= Date: Fri, 30 Jun 2023 11:57:19 +0200 Subject: [PATCH 1/2] [refact] Remove RPM behavior from applogic --- Application/Client/LidarViewMainWindow.ui | 19 --------- Application/Wrapping/Python/applogic.py | 49 +---------------------- 2 files changed, 1 insertion(+), 67 deletions(-) diff --git a/Application/Client/LidarViewMainWindow.ui b/Application/Client/LidarViewMainWindow.ui index 47c41af8c..4fa39709c 100644 --- a/Application/Client/LidarViewMainWindow.ui +++ b/Application/Client/LidarViewMainWindow.ui @@ -81,18 +81,13 @@ - - - - - @@ -706,20 +701,6 @@ Crop Returns... - - - true - - - true - - - Show FrameRate - - - Display the rotations per minute - - true diff --git a/Application/Wrapping/Python/applogic.py b/Application/Wrapping/Python/applogic.py index bad9ffbda..60ec95f9c 100644 --- a/Application/Wrapping/Python/applogic.py +++ b/Application/Wrapping/Python/applogic.py @@ -292,7 +292,7 @@ def disableSaveActions(): def unloadData(): for k, src in smp.GetSources().items(): - if src != app.grid and src != smp.FindSource("RPM"): + if src != app.grid: smp.Delete(src) clearSpreadSheetView() @@ -462,7 +462,6 @@ def start(): setupActions() disableSaveActions() hideColorByComponent() - createRPMBehaviour() # Create Grid #WIP not perfect requires loaded plugin createGrid() @@ -523,15 +522,6 @@ def adjustScalarBarRangeLabelFormat(): sb.RangeLabelFormat = '%g' smp.Render() -def toggleRPM(): - rpm = smp.FindSource("RPM") - if rpm: - if app.actions['actionShowRPM'].isChecked(): - smp.Show(rpm) - else: - smp.Hide(rpm) - smp.Render() - def transformMode(): reader = getReader() if not reader: @@ -602,7 +592,6 @@ def setupActions(): app.actions['actionGrid_Properties'].connect('triggered()', onGridProperties) app.actions['actionCropReturns'].connect('triggered()', onCropReturns) app.actions['actionShowPosition'].connect('triggered()', ShowPosition) - app.actions['actionShowRPM'].connect('triggered()', toggleRPM) # Restore action states from settings settings = getPVSettings() @@ -659,39 +648,3 @@ def setupActions(): displayWidget = getMainWindow().findChild('lqColorToolbar').findChild('pqDisplayColorWidget') displayWidget.connect('arraySelectionChanged ()',adjustScalarBarRangeLabelFormat) app.actions['actionScalarBarVisibility'].connect('triggered()',adjustScalarBarRangeLabelFormat) - - -def createRPMBehaviour(): - # create and customize a label to display the rpm - rpm = smp.Text(guiName="RPM", Text="No RPM/FPS") - representation = smp.GetRepresentation(rpm) - representation.FontSize = 16 - representation.Color = [1,1,0] - # create an python animation cue to update the rpm value in the label - PythonAnimationCue1 = smp.PythonAnimationCue() - PythonAnimationCue1.Script= """ -import paraview.simple as smp -import lidarview.applogic as lv -def start_cue(self): - pass - -def tick(self): - rpm = smp.FindSource("RPM") - lidar = lv.getLidar() - if (lidar): - valrpm = int(lidar.Interpreter.GetClientSideObject().GetRpm()) - valfps = int(lidar.Interpreter.GetClientSideObject().GetFrequency()) - if (valrpm): - rpm.Text = f"{str(valrpm)} RPM" - elif(valfps): - rpm.Text = f"{str(valfps)} FPS" - else: - rpm.Text = "No RPM/FPS Info" - -def end_cue(self): - pass -""" - smp.GetAnimationScene().Cues.append(PythonAnimationCue1) - # force to be consistant with the UI - toggleRPM() - smp.SetActiveSource(None) -- GitLab From 482da31c49194c62c6b1a094bcf52b853fb6cd18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Couble?= Date: Mon, 24 Jul 2023 10:19:42 +0200 Subject: [PATCH 2/2] [submodule] Bump LVCore f53dc047 Merge branch 'feat/addRPMFilter' into 'master' --- LVCore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LVCore b/LVCore index 7db6346c3..f53dc0472 160000 --- a/LVCore +++ b/LVCore @@ -1 +1 @@ -Subproject commit 7db6346c31c221771e2f607f81f933c031489cd3 +Subproject commit f53dc0472888a3c643b9474824f30fffe707ea84 -- GitLab