Commit 044a93058a4ace94f28b7417f4bf830d210bee15
1 parent
52c1e291
Exists in
master
and in
57 other branches
Add intervals drawing type
Showing
2 changed files
with
19 additions
and
1 deletions
Show diff stats
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
@@ -720,7 +720,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -720,7 +720,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
720 | case 'ispectro' : | 720 | case 'ispectro' : |
721 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); | 721 | $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); |
722 | $this->unmarshallInstantSpectro($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']); | 722 | $this->unmarshallInstantSpectro($paramData->{'param-drawing-object'}, $plotNode, $paramNode, $paramInfo['indexes']); |
723 | - break; | 723 | + break; |
724 | + case 'intervals' : | ||
725 | + $paramNode = $plotNode->getParams()->getParamById($paramInfo['id']); | ||
726 | + $this->unmarshallIntervals($paramData->{'param-drawing-object'}, $paramNode); | ||
727 | + break; | ||
724 | default : | 728 | default : |
725 | throw new Exception('Drawing type not implemented.'); | 729 | throw new Exception('Drawing type not implemented.'); |
726 | } | 730 | } |
@@ -1012,6 +1016,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | @@ -1012,6 +1016,11 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass | ||
1012 | foreach ($indexes as $index) | 1016 | foreach ($indexes as $index) |
1013 | $paramNode->addStatusBar($index); | 1017 | $paramNode->addStatusBar($index); |
1014 | } | 1018 | } |
1019 | + | ||
1020 | + protected function unmarshallIntervals($paramDrawingData, $paramNode) | ||
1021 | + { | ||
1022 | + $paramNode->addIntervals(); | ||
1023 | + } | ||
1015 | 1024 | ||
1016 | protected function unmarshallTickBar($paramDrawingData, $paramNode, $indexes) | 1025 | protected function unmarshallTickBar($paramDrawingData, $paramNode, $indexes) |
1017 | { | 1026 | { |
src/Request/ParamsRequestImpl/Nodes/Requests/RequestOutputPlotParamsNodeClass.php
@@ -38,6 +38,8 @@ define ("REQUESTOUTPUTPLOTSTATUSBAR_INDEX", "index"); | @@ -38,6 +38,8 @@ define ("REQUESTOUTPUTPLOTSTATUSBAR_INDEX", "index"); | ||
38 | define ("REQUESTOUTPUTPLOTTICKBAR_NAME", "serie"); | 38 | define ("REQUESTOUTPUTPLOTTICKBAR_NAME", "serie"); |
39 | define ("REQUESTOUTPUTPLOTTICKBAR_INDEX", "index"); | 39 | define ("REQUESTOUTPUTPLOTTICKBAR_INDEX", "index"); |
40 | 40 | ||
41 | +define ("REQUESTOUTPUTPLOTINTERVALS_NAME", "intervals"); | ||
42 | + | ||
41 | /** | 43 | /** |
42 | * @class RequestOutputPlotParamNodeClass | 44 | * @class RequestOutputPlotParamNodeClass |
43 | * @brief Definition of a param for a plot of a plot request | 45 | * @brief Definition of a param for a plot of a plot request |
@@ -177,6 +179,13 @@ class RequestOutputPlotParamNodeClass extends NodeClass | @@ -177,6 +179,13 @@ class RequestOutputPlotParamNodeClass extends NodeClass | ||
177 | $this->addChild($tickBarNode); | 179 | $this->addChild($tickBarNode); |
178 | return $tickBarNode; | 180 | return $tickBarNode; |
179 | } | 181 | } |
182 | + | ||
183 | + public function addIntervals() | ||
184 | + { | ||
185 | + $intervalsNode = new NodeClass(REQUESTOUTPUTPLOTINTERVALS_NAME); | ||
186 | + $this->addChild($intervalsNode); | ||
187 | + return $intervalsNode; | ||
188 | + } | ||
180 | 189 | ||
181 | public function loadFromNode($xmlNode) | 190 | public function loadFromNode($xmlNode) |
182 | { | 191 | { |