casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSPlotParameterGroups.h
Go to the documentation of this file.
1 //# PlotMSPlotParameterGroups.h: Implementations of plot subparameter groups.
2 //# Copyright (C) 2009
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef PLOTMSPLOTPARAMETERGROUPS_H_
28 #define PLOTMSPLOTPARAMETERGROUPS_H_
29 
31 
41 
42 #include <tables/Tables/Table.h>
44 
45 namespace casa {
46 
47 // Container class to hold constants for groups.
48 class PMS_PP {
49 
50 public:
51  // Update flag for redrawing.
52  // <group>
54  static const int UPDATE_REDRAW;
55  // </group>
56 
57  // Update flag for casacore::MS data group.
58  // <group>
60  static const int UPDATE_MSDATA;
61  // </group>
62 
63  // Update flag for cache group.
64  // <group>
66  static const int UPDATE_CACHE;
67  // </group>
68 
69  // Update flag for axes group.
70  // <group>
72  static const int UPDATE_AXES;
73  // </group>
74 
75  // Update flag for canvas group.
76  // <group>
78  static const int UPDATE_CANVAS;
79  // </group>
80 
81  // Update flag for display group.
82  // <group>
84  static const int UPDATE_DISPLAY;
85  // </group>
86 
87  // Update flag for page header group.
88  // <group>
90  static const int UPDATE_PAGEHEADER;
91  // </group>
92 
93  // Update flag for iteration group.
94  // <group>
96  static const int UPDATE_ITERATION;
97  // </group>
98 
99  // Update flag for log group.
100  // <group>
102  static const int UPDATE_LOG;
103  // </group>
104  //
105  // Update flag for plotms_options group.
106  // <group>
108  static const int UPDATE_PLOTMS_OPTIONS;
109  // </group>
110 
111 private:
112  // Disable constructor.
113  PMS_PP() {
114  }
115 };
116 
117 
118 
119 
120 // Subclass of PlotMSPlotParameters::Group to handle subparameters for casacore::MS data.
121 // Currently includes:
122 // * filename
123 // * selection
124 // * averaging
125 //
127 
128 public:
129  /* Constructor which takes a factory */
131 
132  /* Copy constructor. See operator=(). */
133  PMS_PP_MSData (const PMS_PP_MSData & copy);
134  ~PMS_PP_MSData();
135 
136 
137  /* Overrides PlotMSPlotParameters::Group::operator=(). */
138  Group *clone() const {
139  return new PMS_PP_MSData (*this);
140  }
141 
142  /* Implements PlotMSPlotParameters::Group::name(). */
143  const casacore::String & name() const {
144  static casacore::String groupName = PMS_PP::UPDATE_MSDATA_NAME;
145  return groupName;
146  }
147 
148  /* Implements PlotMSPlotParameters::Group::toRecord(). */
149  casacore::Record toRecord() const;
150 
151  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
152  void fromRecord (const casacore::Record & record);
153 
154  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
155  bool requiresRedrawOnChange() const {
156  return true;
157  }
158 
159  /* Overrides the real assignment operator, operator=(). */
160  PMS_PP_MSData& operator=(const PMS_PP_MSData& other);
161 
162  /* Overrides PlotMSPlotParameters::Group::operator=(). */
163  PMS_PP_MSData & operator= (const Group & other);
164 
165  /* Overrides PlotMSPlotParameters::Group::operator==(). */
166  bool operator== (const Group & other) const;
167 
168 
169  bool filenameIsSet() const {
170  return !itsFilename_.empty();
171  }
172 
173  const casacore::String & filename() const {
174  return itsFilename_;
175  }
177  if (itsFilename_ != value) {
179  updated();
180  }
181  }
182 
183  // based on PlotMSCacheBase::Type enum {MS, CAL}
184  const casacore::Int & cacheType() const {
185  return itsCacheType_;
186  }
188  if (itsCacheType_ != value) {
190  updated();
191  }
192  }
193  const casacore::String & calType() const {
194  return itsCalType_;
195  }
197  if (itsCalType_ != value) {
198  itsCalType_ = value;
199  updated();
200  }
201  }
202 
203  const PlotMSSelection & selection() const {
204  return itsSelection_;
205  }
207  if (itsSelection_ != value) {
209  updated();
210  }
211  }
212 
213  const PlotMSAveraging & averaging() const {
214  return itsAveraging_;
215  }
217  if (itsAveraging_ != value) {
219  updated();
220  }
221  }
222 
224  return itsTransformations_;
225  }
227  if (itsTransformations_ != value) {
229  updated();
230  }
231  }
232 
233  const PlotMSCalibration & calibration() const {
234  return itsCalibration_;
235  }
237  if (itsCalibration_ != value) {
239  updated();
240  }
241  }
242 
243 
244 private:
245  //Does the work of the operator=()s.
246  PMS_PP_MSData& assign(const PMS_PP_MSData* other);
247 
248  /* Parameters' values */
256 
257  /* Key strings for casacore::Record */
265 
266  void setDefaults();
267 };
268 
269 
270 
271 
272 
273 
274 // Subclass of PlotMSPlotParameters::Group to handle cache parameters.
275 // Currently includes:
276 // * x and y axes
277 // * x and y data columns
278 // Parameters are vector-based, on a per-plot basis.
279 //
281 
282 public:
283  /* Constructor which takes a factory */
285 
286  /* Copy constructor. See operator=(). */
287  PMS_PP_Cache (const PMS_PP_Cache & copy);
288 
289  ~PMS_PP_Cache();
290 
291  /* Implements PlotMSPlotParameters::Group::clone(). */
292  Group *clone() const {
293  return new PMS_PP_Cache (*this);
294  }
295 
296  /* Implements PlotMSPlotParameters::Group::name(). */
297  const casacore::String & name() const {
298  static casacore::String groupName = PMS_PP::UPDATE_CACHE_NAME;
299  return groupName;
300  }
301 
302  /* Implements PlotMSPlotParameters::Group::toRecord(). */
303  casacore::Record toRecord() const;
304 
305  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
306  void fromRecord (const casacore::Record & record);
307 
308  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
309  bool requiresRedrawOnChange() const {
310  return true;
311  }
312 
313  /* Overrides the real assignment operator=().*/
314  PMS_PP_Cache& operator=(const PMS_PP_Cache& other);
315 
316  /* Overrides PlotMSPlotParameters::Group::operator=(). */
317  PMS_PP_Cache & operator= (const Group & other);
318 
319  /* Overrides PlotMSPlotParameters::Group::operator==(). */
320  bool operator== (const Group & other) const;
321 
322  // Gets how many axes and data columns there are.
323  // <group>
324  unsigned int numXAxes() const;
325  unsigned int numYAxes() const;
326  // </group>
327 
328 
329  // Setting the data and data columns for the x- and y-axes
330  // <group>
331  void setXAxis (const PMS::Axis & axis, const PMS::DataColumn & data,
332  unsigned int index = 0);
333  void setYAxis (const PMS::Axis & axis, const PMS::DataColumn & data,
334  unsigned int index = 0);
335  void setAxes (const PMS::Axis & xAxis, const PMS::Axis & yAxis,
336  const PMS::DataColumn & xData,
337  const PMS::DataColumn & yData, unsigned int index = 0);
338  //<group>
339 
340  const std::vector<PMS::Axis> &xAxes() const {
341  return itsXAxes_;
342  }
343  void setXAxes (const std::vector<PMS::Axis> &value) {
344  if (itsXAxes_ != value) {
345  itsXAxes_ = value;
346  updated();
347  }
348  }
349  PMS::Axis xAxis (unsigned int index = 0) const {
350  if (index >= itsXAxes_.size())
351  const_cast< std::vector<PMS::Axis>& >(itsXAxes_).resize (index + 1);
352  return itsXAxes_[index];
353  }
354  void setXAxis (const PMS::Axis & value, unsigned int index = 0) {
355  if (index >= itsXAxes_.size())
356  itsXAxes_.resize (index + 1);
357  if (itsXAxes_[index] != value) {
358  itsXAxes_[index] = value;
359  updated();
360  }
361  }
362 
363 
364  const std::vector<PMS::Axis>&yAxes() const {
365  return itsYAxes_;
366  }
367  void setYAxes (const std::vector<PMS::Axis> &value) {
368  if (itsYAxes_ != value) {
369  itsYAxes_ = value;
370  updated();
371  }
372  }
373  PMS::Axis yAxis (unsigned int index = 0) const {
374  if (index >= itsYAxes_.size())
375  const_cast< std::vector<PMS::Axis> &>(itsYAxes_).resize (index + 1);
376  return itsYAxes_[index];
377  }
378  void setYAxis (const PMS::Axis & value, unsigned int index = 0) {
379  if (index >= itsYAxes_.size())
380  itsYAxes_.resize (index + 1);
381  if (itsYAxes_[index] != value) {
382  itsYAxes_[index] = value;
383  updated();
384  }
385  }
386 
387 
388 
389  const std::vector<PMS::DataColumn> &xDataColumns() const {
390  return itsXData_;
391  }
392  void setXDataColumns (const vector < PMS::DataColumn > &value) {
393  if (itsXData_ != value) {
394  itsXData_ = value;
395  updated();
396  }
397  }
398  PMS::DataColumn xDataColumn (unsigned int index = 0) const {
399  if (index >= itsXData_.size())
400  const_cast < vector < PMS::DataColumn >
401  &>(itsXData_).resize (index + 1);
402  return itsXData_[index];
403  }
404  void setXDataColumn (const PMS::DataColumn & value, unsigned int index =
405  0) {
406  if (index >= itsXData_.size())
407  itsXData_.resize (index + 1);
408  if (itsXData_[index] != value) {
409  itsXData_[index] = value;
410  updated();
411  }
412  }
413 
414 
415  const vector < PMS::DataColumn > &yDataColumns() const {
416  return itsYData_;
417  }
418  void setYDataColumns (const vector < PMS::DataColumn > &value) {
419  if (itsYData_ != value) {
420  itsYData_ = value;
421  updated();
422  }
423  }
424  PMS::DataColumn yDataColumn (unsigned int index = 0) const {
425  if (index >= itsYData_.size())
426  const_cast < vector < PMS::DataColumn >
427  &>(itsYData_).resize (index + 1);
428  return itsYData_[index];
429  }
430  void setYDataColumn (const PMS::DataColumn & value, unsigned int index =
431  0) {
432  if (index >= itsYData_.size())
433  itsYData_.resize (index + 1);
434  if (itsYData_[index] != value) {
435  itsYData_[index] = value;
436  updated();
437  }
438  }
439 
440 
441  const vector < PMS::CoordSystem > &xFrames() const {
442  return itsXFrame_;
443  }
444  void setXFrames (const vector < PMS::CoordSystem > &value) {
445  if (itsXFrame_ != value) {
446  itsXFrame_ = value;
447  updated();
448  }
449  }
450  PMS::CoordSystem xFrame (unsigned int index = 0) const {
451  if (index >= itsXFrame_.size())
452  const_cast < vector < PMS::CoordSystem >
453  &>(itsXFrame_).resize (index + 1);
454  return itsXFrame_[index];
455  }
456  void setXFrame (const PMS::CoordSystem & value, unsigned int index =
457  0) {
458  if (index >= itsXFrame_.size())
459  itsXFrame_.resize (index + 1);
460  if (itsXFrame_[index] != value) {
461  itsXFrame_[index] = value;
462  updated();
463  }
464  }
465 
466 
467  const vector < PMS::CoordSystem > &yFrames() const {
468  return itsYFrame_;
469  }
470  void setYFrames (const vector < PMS::CoordSystem > &value) {
471  if (itsYFrame_ != value) {
472  itsYFrame_ = value;
473  updated();
474  }
475  }
476  PMS::CoordSystem yFrame (unsigned int index = 0) const {
477  if (index >= itsYFrame_.size())
478  const_cast < vector < PMS::CoordSystem >
479  &>(itsYFrame_).resize (index + 1);
480  return itsYFrame_[index];
481  }
482 
483  void setYFrame (const PMS::CoordSystem & value, unsigned int index =
484  0) {
485  if (index >= itsYFrame_.size())
486  itsYFrame_.resize (index + 1);
487  if (itsYFrame_[index] != value) {
488  itsYFrame_[index] = value;
489  updated();
490  }
491  }
492 
493 
494  const vector < PMS::InterpMethod > &xInterps() const {
495  return itsXInterp_;
496  }
497  void setXInterps (const vector < PMS::InterpMethod > &value) {
498  if (itsXInterp_ != value) {
499  itsXInterp_ = value;
500  updated();
501  }
502  }
503  PMS::InterpMethod xInterp (unsigned int index = 0) const {
504  if (index >= itsXInterp_.size())
505  const_cast < vector < PMS::InterpMethod >
506  &>(itsXInterp_).resize (index + 1);
507  return itsXInterp_[index];
508  }
509  void setXInterp (const PMS::InterpMethod & value, unsigned int index =
510  0) {
511  if (index >= itsXInterp_.size())
512  itsXInterp_.resize (index + 1);
513  if (itsXInterp_[index] != value) {
514  itsXInterp_[index] = value;
515  updated();
516  }
517  }
518 
519 
520  const vector < PMS::InterpMethod > &yInterps() const {
521  return itsYInterp_;
522  }
523  void setYInterps (const vector < PMS::InterpMethod > &value) {
524  if (itsYInterp_ != value) {
525  itsYInterp_ = value;
526  updated();
527  }
528  }
529  PMS::InterpMethod yInterp (unsigned int index = 0) const {
530  if (index >= itsYInterp_.size())
531  const_cast < vector < PMS::InterpMethod >
532  &>(itsYInterp_).resize (index + 1);
533  return itsYInterp_[index];
534  }
535  void setYInterp (const PMS::InterpMethod & value, unsigned int index =
536  0) {
537  if (index >= itsYInterp_.size())
538  itsYInterp_.resize (index + 1);
539  if (itsYInterp_[index] != value) {
540  itsYInterp_[index] = value;
541  updated();
542  }
543  }
544 
545  DirectionAxisParams xDirectionParams (unsigned int index = 0) const {
546  return DirectionAxisParams(xFrame(index),xInterp(index));
547  }
548  DirectionAxisParams yDirectionParams (unsigned int index = 0) const {
549  return DirectionAxisParams(yFrame(index),yInterp(index));
550  }
551 
552 
553  bool showAtm() const {
554  return itsShowAtm_;
555  }
556  void setShowAtm (const bool & value) {
557  if (itsShowAtm_ != value) {
558  itsShowAtm_ = value;
559  updated();
560  }
561  }
562 
563  bool showTsky() const {
564  return itsShowTsky_;
565  }
566  void setShowTsky (const bool & value) {
567  if (itsShowTsky_ != value) {
569  updated();
570  }
571  }
572 
573  bool showImage() const {
574  return itsShowImage_;
575  }
576  void setShowImage (const bool & value) {
577  if (itsShowImage_ != value) {
579  updated();
580  }
581  }
582  void resize( int count );
583 
584 private:
585  //Does the work for the operator=()s.
586  PMS_PP_Cache& assign(const PMS_PP_Cache* o);
587 
588  /* Parameters' values */
589  std::vector<PMS::Axis> itsXAxes_;
590  std::vector<PMS::Axis> itsYAxes_;
591  std::vector<PMS::DataColumn> itsXData_;
592  std::vector<PMS::DataColumn> itsYData_;
593  std::vector<PMS::CoordSystem> itsXFrame_;
594  std::vector<PMS::InterpMethod> itsXInterp_;
595  std::vector<PMS::CoordSystem> itsYFrame_;
596  std::vector<PMS::InterpMethod> itsYInterp_;
597 
601 
602 
603  /* Key strings for casacore::Record */
615 
616  void setDefaults();
617 };
618 
619 
620 // Subclass of PlotMSPlotParameters::Group to handle axes parameters.
621 // Currently includes:
622 // * canvas attach axes
623 // * axes ranges, if any
624 // Parameters are vector-based, on a per-plot basis.
625 //
627 
628 public:
629  /* Constructor which takes a factory */
631 
632  /* Copy constructor. See operator=(). */
633  PMS_PP_Axes (const PMS_PP_Axes & copy);
634 
635  ~PMS_PP_Axes();
636 
637 
638  /* Implements PlotMSPlotParameters::Group::clone(). */
639  Group *clone() const {
640  return new PMS_PP_Axes (*this);
641  }
642 
643  /* Implements PlotMSPlotParameters::Group::name(). */
644  const casacore::String & name() const {
645  static casacore::String groupName = PMS_PP::UPDATE_AXES_NAME;
646  return groupName;
647  }
648 
649  /* Implements PlotMSPlotParameters::Group::toRecord(). */
650  casacore::Record toRecord() const;
651 
652  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
653  void fromRecord (const casacore::Record & record);
654 
655  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
656  bool requiresRedrawOnChange() const {
657  return true;
658  }
659 
660  /* Overrides the real assignment operator, operator= */
661  PMS_PP_Axes& operator=(const PMS_PP_Axes& other);
662 
663  /* Overrides PlotMSPlotParameters::Group::operator=(). */
664  PMS_PP_Axes & operator= (const Group & other);
665 
666  /* Overrides PlotMSPlotParameters::Group::operator==(). */
667  bool operator== (const Group & other) const;
668 
669 
670  // Gets how many axes there are.
671  // <group>
672  unsigned int numXAxes() const;
673  unsigned int numYAxes() const;
674  // </group>
675 
676 
677  // Sets single versions of the parameters for the given index.
678  // <group>
679  void setAxes (const PlotAxis & xAxis, const PlotAxis & yAxis,
680  unsigned int index = 0);
681  void setXRange (const bool & set, const prange_t & range,
682  unsigned int index = 0) {
683  setRanges (set, yRangeSet (index), range, yRange (index), index);
684  }
685  void setYRange (const bool & set, const prange_t & range,
686  unsigned int index = 0) {
687  setRanges (xRangeSet (index), set, xRange (index), range, index);
688  }
689  void setRanges (const bool & xSet, const bool & ySet,
690  const prange_t & xRange, const prange_t & yRange,
691  unsigned int index = 0);
692  // </group>
693 
694 
695  const vector < PlotAxis > &xAxes() const {
696  return itsXAxes_;
697  }
698  void setXAxes (const vector < PlotAxis > &value) {
699  if (itsXAxes_ != value) {
700  itsXAxes_ = value;
701  updated();
702  }
703  }
704 
705 
706  PlotAxis xAxis (unsigned int index = 0) const {
707  if (index >= itsXAxes_.size())
708  const_cast < vector < PlotAxis > &>(itsXAxes_).resize (index + 1);
709  return itsXAxes_[index];
710  }
711  void setXAxis(const PlotAxis & value, unsigned int index = 0) {
712  if (index >= itsXAxes_.size()){
713  itsXAxes_.resize (index + 1);
714 
715  }
716  if (itsXAxes_[index] != value) {
717 
718  itsXAxes_[index] = value;
719  updated();
720  }
721  }
722 
723 
724  const std::vector<PlotAxis> &yAxes() const {
725  return itsYAxes_;
726  }
727  void setYAxes (const vector < PlotAxis > &value) {
728  if (itsYAxes_ != value) {
729  itsYAxes_ = value;
730  updated();
731  }
732  }
733 
734 
735  PlotAxis yAxis (unsigned int index = 0) const {
736  if (index >= itsYAxes_.size())
737  const_cast < vector < PlotAxis > &>(itsYAxes_).resize (index + 1);
738  return itsYAxes_[index];
739  }
740  void setYAxis (const PlotAxis & value, unsigned int index = 0) {
741  if (index >= itsYAxes_.size())
742  itsYAxes_.resize (index + 1);
743  if (itsYAxes_[index] != value) {
744  itsYAxes_[index] = value;
745  updated();
746  }
747  }
748 
749  void setYAxis( casacore::String& value, unsigned int index = 0 ){
750  PlotAxis axisLocation = Y_LEFT;
751  if ( value == "right"){
752  axisLocation = Y_RIGHT;
753  }
754  setYAxis( axisLocation, index );
755  }
756 
757 
758 
759  const std::vector<bool> &xRangesSet() const {
760  return itsXRangesSet_;
761  }
762  void setXRanges (const vector < bool > &value) {
763  if (itsXRangesSet_ != value) {
765  updated();
766  }
767  }
768 
769 
770  bool xRangeSet (unsigned int index = 0) const {
771  if (index >= itsXRangesSet_.size())
772  const_cast < vector < bool > &>(itsXRangesSet_).resize (index + 1);
773  return itsXRangesSet_[index];
774  }
775  void setXRange (const bool & value, unsigned int index = 0) {
776  if (index >= itsXRangesSet_.size())
777  itsXRangesSet_.resize (index + 1);
778  if (itsXRangesSet_[index] != value) {
779  itsXRangesSet_[index] = value;
780  updated();
781  }
782  }
783 
784 
785  const vector < bool > &yRangesSet() const {
786  return itsYRangesSet_;
787  }
788  void setYRanges (const vector < bool > &value) {
789  if (itsYRangesSet_ != value) {
791  updated();
792  }
793  }
794 
795 
796  bool yRangeSet (unsigned int index = 0) const {
797  if (index >= itsYRangesSet_.size())
798  const_cast < vector < bool > &>(itsYRangesSet_).resize (index + 1);
799  return itsYRangesSet_[index];
800  }
801  void setYRange (const bool & value, unsigned int index = 0) {
802  if (index >= itsYRangesSet_.size())
803  itsYRangesSet_.resize (index + 1);
804  if (itsYRangesSet_[index] != value) {
805  itsYRangesSet_[index] = value;
806  updated();
807  }
808  }
809 
810 
811 
812  const vector < prange_t > &xRanges() const {
813  return itsXRanges_;
814  }
815  void setXRanges (const vector < prange_t > &value) {
816  if (itsXRanges_ != value) {
817  itsXRanges_ = value;
818  updated();
819  }
820  }
821 
822 
823  const prange_t & xRange (unsigned int index = 0) const {
824  return itsXRanges_[index];
825  }
826  void setXRange (const prange_t & value, unsigned int index = 0) {
827  if (itsXRanges_[index] != value) {
828  itsXRanges_[index] = value;
829  updated();
830  }
831  }
832 
833 
834  const vector < prange_t > &yRanges() const {
835  return itsYRanges_;
836  }
837  void setYRanges (const vector < prange_t > &value) {
838  if (itsYRanges_ != value) {
839  itsYRanges_ = value;
840  updated();
841  }
842  }
843 
844 
845  const prange_t & yRange (unsigned int index = 0) const {
846  return itsYRanges_[index];
847  }
848  void setYRange (const prange_t & value, unsigned int index = 0) {
849  if (itsYRanges_[index] != value) {
850  itsYRanges_[index] = value;
851  updated();
852  }
853  }
854 
855  //Change the size of the vectors.
856  void resize( int count, bool copyValues=False );
857 
858 private:
859 
860  //Does the work for operator=()s.
861  PMS_PP_Axes& assign(const PMS_PP_Axes* o);
862 
863  /* Parameters' values */
864  std::vector<PlotAxis> itsXAxes_;
865  std::vector<PlotAxis> itsYAxes_;
866  std::vector<bool> itsXRangesSet_;
867  std::vector<bool> itsYRangesSet_;
868  std::vector<prange_t> itsXRanges_;
869  std::vector<prange_t> itsYRanges_;
870 
871  /* Key strings for casacore::Record */
878 
879  void setDefaults();
880 };
881 
882 
883 
884 // Subclass of PlotMSPlotParameters::Group to handle canvas parameters.
885 // Currently includes:
886 // * axes label formats
887 // * whether to show the canvas axes or not
888 // * whether to show the legend or not, and its position
889 // * canvas title label format
890 // * whether to show grid lines, and their properties
891 // Parameters are vector-based, on a per-canvas basis.
892 //
894 
895 public:
896  /* Constructor which takes a factory */
898 
899  /* Copy constructor. See operator=(). */
900  PMS_PP_Canvas (const PMS_PP_Canvas & copy);
901 
902  ~PMS_PP_Canvas();
903 
904  /* Implements PlotMSPlotParameters::Group::clone(). */
905  Group *clone() const {
906  return new PMS_PP_Canvas (*this);
907  }
908 
909  /* Implements PlotMSPlotParameters::Group::name(). */
910  const casacore::String & name() const {
911  static casacore::String groupName = PMS_PP::UPDATE_CANVAS_NAME;
912  return groupName;
913  }
914 
915  /* Implements PlotMSPlotParameters::Group::toRecord(). */
916  casacore::Record toRecord() const;
917 
918  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
919  void fromRecord (const casacore::Record & record);
920 
921  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
922  bool requiresRedrawOnChange() const {
923  return true;
924  }
925 
926  /* Overrides PlotMSPlotParameters::Group::operator=(). */
927  PMS_PP_Canvas& operator= (const Group & other);
928 
929  /* Overrides the actual operator=(). */
930  PMS_PP_Canvas& operator=(const PMS_PP_Canvas& other );
931 
932  /* Overrides PlotMSPlotParameters::Group::operator==(). */
933  bool operator== (const Group & other) const;
934 
935 
936  // Gets how many canvases there are.
937  unsigned int numCanvases() const;
938 
939  // Sets single versions of the parameters for the given index.
940  // <group>
941  void setLabelFormats (const PlotMSLabelFormat & xFormat,
942  const PlotMSLabelFormat & yFormat,
943  unsigned int index = 0);
944  void showAxesLabels (const bool & xLabelShow, const bool & yLabelShow,
945  unsigned int index = 0);
946  void showLegend (const bool & show,
947  const PlotCanvas::LegendPosition & pos,
948  unsigned int index = 0);
949 
950  void showLegend( const bool& show, const casacore::String& pos, unsigned int index=0);
951 
952  void showGridMajor (const bool & show, const PlotLinePtr & line,
953  unsigned int index = 0) {
954  showGrid (show, gridMinorShown (index), line, gridMinorLine (index),
955  index);
956  }
957  void showGridMinor (const bool & show, const PlotLinePtr & line,
958  unsigned int index = 0) {
959  showGrid (gridMajorShown (index), show, gridMajorLine (index), line,
960  index);
961  }
962  void showGrid (const bool & showMajor, const bool & showMinor,
963  const PlotLinePtr & majorLine,
964  const PlotLinePtr & minorLine, unsigned int index = 0);
965  // </group>
966 
967 
968 
969  const vector < PlotMSLabelFormat > &xLabelFormats() const {
970  return itsXLabels_;
971  }
972  void setXLabelFormats (const vector < PlotMSLabelFormat > &value) {
973  if (itsXLabels_ != value) {
974  itsXLabels_ = value;
975  updated();
976  }
977  }
978  const PlotMSLabelFormat & xLabelFormat (unsigned int index = 0) const {
979  return itsXLabels_[index];
980  }
982  unsigned int index = 0) {
983  if (itsXLabels_[index] != value) {
984  itsXLabels_[index] = value;
985  updated();
986  }
987  }
988 
989 
990  const vector < PlotMSLabelFormat > &yLabelFormats() const {
991  return itsYLabels_;
992  }
993  void setYLabelFormats (const vector < PlotMSLabelFormat > &value) {
994  if (itsYLabels_ != value) {
995  itsYLabels_ = value;
996  updated();
997  }
998  }
999  const PlotMSLabelFormat & yLabelFormat (unsigned int index = 0) const {
1000  return itsYLabels_[index];
1001  }
1003  unsigned int index = 0) {
1004  if (itsYLabels_[index] != value) {
1005  itsYLabels_[index] = value;
1006  updated();
1007  }
1008  }
1009 
1010  const vector < bool > &xFontsSet() const {
1011  return itsXFontsSet_;
1012  }
1013  void setXFontsSet (const vector < bool > &value) {
1014  if (itsXFontsSet_ != value) {
1015  itsXFontsSet_ = value;
1016  updated();
1017  }
1018  }
1019  bool xFontSet (unsigned int index = 0) const {
1020  return itsXFontsSet_[index];
1021  }
1022  void setXFontSet (const bool & value, unsigned int index = 0) {
1023  if (itsXFontsSet_[index] != value) {
1024  itsXFontsSet_[index] = value;
1025  updated();
1026  }
1027  }
1028  const vector < bool > &yFontsSet() const {
1029  return itsYFontsSet_;
1030  }
1031  void setYFontsSet (const vector < bool > &value) {
1032  if (itsYFontsSet_ != value) {
1033  itsYFontsSet_ = value;
1034  updated();
1035  }
1036  }
1037  bool yFontSet (unsigned int index = 0) const {
1038  return itsYFontsSet_[index];
1039  }
1040  void setYFontSet (const bool & value, unsigned int index = 0) {
1041  if (itsYFontsSet_[index] != value) {
1042  itsYFontsSet_[index] = value;
1043  updated();
1044  }
1045  }
1046 
1047  const vector < casacore::Int > &xAxisFonts() const {
1048  return itsXAxisFonts_;
1049  }
1050  void setXAxisFonts (const vector < casacore::Int > &value) {
1051  if (itsXAxisFonts_ != value) {
1053  updated();
1054  }
1055  }
1056  const casacore::Int & xAxisFont (unsigned int index = 0) const {
1057  return itsXAxisFonts_[index];
1058  }
1059  void setXAxisFont (const casacore::Int value, unsigned int index = 0) {
1060  if (itsXAxisFonts_[index] != value) {
1061  itsXAxisFonts_[index] = value;
1062  updated();
1063  }
1064  }
1065 
1066  const vector < casacore::Int > &yAxisFonts() const {
1067  return itsYAxisFonts_;
1068  }
1069  void setYAxisFonts (const vector < casacore::Int > &value) {
1070  if (itsYAxisFonts_ != value) {
1072  updated();
1073  }
1074  }
1075  const casacore::Int & yAxisFont (unsigned int index = 0) const {
1076  return itsYAxisFonts_[index];
1077  }
1078  void setYAxisFont (const casacore::Int value, unsigned int index = 0) {
1079  if (itsYAxisFonts_[index] != value) {
1080  itsYAxisFonts_[index] = value;
1081  updated();
1082  }
1083  }
1084 
1085 
1086  const vector < bool > &xLabelsShown() const {
1087  return itsXLabelsShown_;
1088  }
1089  void showXLabels (const vector < bool > &value) {
1090  if (itsXLabelsShown_ != value) {
1092  updated();
1093  }
1094  }
1095  bool xLabelShown (unsigned int index = 0) const {
1096  if (index >= itsXLabelsShown_.size())
1097  const_cast < vector < bool > &>(itsXLabelsShown_).resize (index + 1);
1098  return itsXLabelsShown_[index];
1099  }
1100  void showXLabel (const bool & value, unsigned int index = 0) {
1101  if (index >= itsXLabelsShown_.size())
1102  itsXLabelsShown_.resize (index + 1);
1103  if (itsXLabelsShown_[index] != value) {
1104  itsXLabelsShown_[index] = value;
1105  updated();
1106  }
1107  }
1108 
1109 
1110  const vector < bool > &yLabelsShown() const {
1111  return itsYLabelsShown_;
1112  }
1113  void showYLabels (const vector < bool > &value) {
1114  if (itsYLabelsShown_ != value) {
1116  updated();
1117  }
1118  }
1119  bool yLabelShown (unsigned int index = 0) const {
1120  if (index >= itsYLabelsShown_.size())
1121  const_cast < vector < bool > &>(itsYLabelsShown_).resize (index + 1);
1122  return itsYLabelsShown_[index];
1123  }
1124  void showYLabel (const bool & value, unsigned int index = 0) {
1125  if (index >= itsYLabelsShown_.size())
1126  itsYLabelsShown_.resize (index + 1);
1127  if (itsYLabelsShown_[index] != value) {
1128  itsYLabelsShown_[index] = value;
1129  updated();
1130  }
1131  }
1132 
1133  const vector < bool > &legendsShown() const {
1134  return itsLegendsShown_;
1135  }
1136  void showLegends (const vector < bool > &value) {
1137  if (itsLegendsShown_ != value) {
1139  updated();
1140  }
1141  }
1142  bool legendShown (unsigned int index = 0) const {
1143  if (index >= itsLegendsShown_.size())
1144  const_cast < vector < bool > &>(itsLegendsShown_).resize (index + 1);
1145  return itsLegendsShown_[index];
1146  }
1147  void showLegend (const bool & value, unsigned int index = 0) {
1148  if (index >= itsLegendsShown_.size())
1149  itsLegendsShown_.resize (index + 1);
1150  if (itsLegendsShown_[index] != value) {
1151  itsLegendsShown_[index] = value;
1152  updated();
1153  }
1154  }
1155 
1156 
1157  const vector < PlotCanvas::LegendPosition > &legendPositions() const {
1158  return itsLegendsPos_;
1159  }
1160  void setLegendPositions (const vector < PlotCanvas::LegendPosition > &value) {
1161  if (itsLegendsPos_ != value) {
1163  updated();
1164  }
1165  }
1166  PlotCanvas::LegendPosition legendPosition (unsigned int index = 0) const {
1167  if (index >= itsLegendsPos_.size())
1168  const_cast < vector < PlotCanvas::LegendPosition >
1169  &>(itsLegendsPos_).resize (index + 1);
1170  return itsLegendsPos_[index];
1171  }
1173  unsigned int index = 0) {
1174  if (index >= itsLegendsPos_.size())
1175  itsLegendsPos_.resize (index + 1);
1176  if (itsLegendsPos_[index] != value) {
1177  itsLegendsPos_[index] = value;
1178  updated();
1179  }
1180  }
1181 
1182 
1183  const vector < PlotMSLabelFormat > &titleFormats() const {
1184  return itsTitles_;
1185  }
1186  void setTitleFormats (const vector < PlotMSLabelFormat > &value) {
1187  if (itsTitles_ != value) {
1188  itsTitles_ = value;
1189  updated();
1190  }
1191  }
1192  const PlotMSLabelFormat & titleFormat (unsigned int index = 0) const {
1193  return itsTitles_[index];
1194  }
1195  void setTitleFormat (const PlotMSLabelFormat & value, unsigned int index =
1196  0) {
1197  if (itsTitles_[index] != value) {
1198  itsTitles_[index] = value;
1199  updated();
1200  }
1201  }
1202  const vector < bool > &titleFontsSet() const {
1203  return itsTitleFontsSet_;
1204  }
1205  void setTitleFontsSet (const vector < bool > &value) {
1206  if (itsTitleFontsSet_ != value) {
1208  updated();
1209  }
1210  }
1211  bool titleFontSet (unsigned int index = 0) const {
1212  return itsTitleFontsSet_[index];
1213  }
1214  void setTitleFontSet (const bool & value, unsigned int index = 0) {
1215  if (itsTitleFontsSet_[index] != value) {
1216  itsTitleFontsSet_[index] = value;
1217  updated();
1218  }
1219  }
1220  const vector < casacore::Int > &titleFonts() const {
1221  return itsTitleFonts_;
1222  }
1223  void setTitleFonts (const vector < casacore::Int > &value) {
1224  if (itsTitleFonts_ != value) {
1226  updated();
1227  }
1228  }
1229  const casacore::Int & titleFont (unsigned int index = 0) const {
1230  return itsTitleFonts_[index];
1231  }
1232  void setTitleFont (const casacore::Int value, unsigned int index =
1233  0) {
1234  if (itsTitleFonts_[index] != value) {
1235  itsTitleFonts_[index] = value;
1236  updated();
1237  }
1238  }
1239 
1240  const vector < bool > &gridMajorsShown() const {
1241  return itsGridMajsShown_;
1242  }
1243  void showGridMajors (const vector < bool > &value) {
1244  if (itsGridMajsShown_ != value) {
1246  updated();
1247  }
1248  }
1249  bool gridMajorShown (unsigned int index = 0) const {
1250  if (index >= itsGridMajsShown_.size())
1251  const_cast < vector < bool > &>(itsGridMajsShown_).resize (index + 1);
1252  return itsGridMajsShown_[index];
1253  }
1254  void showGridMajor (const bool & value, unsigned int index = 0) {
1255  if (index >= itsGridMajsShown_.size())
1256  itsGridMajsShown_.resize (index + 1);
1257  if (itsGridMajsShown_[index] != value) {
1258  itsGridMajsShown_[index] = value;
1259  updated();
1260  }
1261  }
1262 
1263 
1264  const vector < bool > &gridMinorsShown() const {
1265  return itsGridMinsShown_;
1266  }
1267  void showGridMinors (const vector < bool > &value) {
1268  if (itsGridMinsShown_ != value) {
1270  updated();
1271  }
1272  }
1273  bool gridMinorShown (unsigned int index = 0) const {
1274  if (index >= itsGridMinsShown_.size())
1275  const_cast < vector < bool > &>(itsGridMinsShown_).resize (index + 1);
1276  return itsGridMinsShown_[index];
1277  }
1278  void showGridMinor (const bool & value, unsigned int index = 0) {
1279  if (index >= itsGridMinsShown_.size())
1280  itsGridMinsShown_.resize (index + 1);
1281  if (itsGridMinsShown_[index] != value) {
1282  itsGridMinsShown_[index] = value;
1283  updated();
1284  }
1285  }
1286 
1287 
1288  const vector < PlotLinePtr > &gridMajorLines() const {
1289  return itsGridMajLines_;
1290  }
1291  void setGridMajorLines (const vector < PlotLinePtr > &value) {
1292  if (itsGridMajLines_ != value) {
1294  updated();
1295  }
1296  }
1297  PlotLinePtr gridMajorLine (unsigned int index = 0) const {
1298  if (index >= itsGridMajLines_.size())
1299  const_cast < vector < PlotLinePtr >
1300  &>(itsGridMajLines_).resize (index + 1);
1301  return itsGridMajLines_[index];
1302  }
1303  void setGridMajorLine (const PlotLinePtr & value, unsigned int index = 0) {
1304  if (index >= itsGridMajLines_.size())
1305  itsGridMajLines_.resize (index + 1);
1306  if (itsGridMajLines_[index] != value) {
1307  itsGridMajLines_[index] = value;
1308  updated();
1309  }
1310  }
1311 
1312 
1313  const vector < PlotLinePtr > &gridMinorLines() const {
1314  return itsGridMinLines_;
1315  }
1316  void setGridMinorLines (const vector < PlotLinePtr > &value) {
1317  if (itsGridMinLines_ != value) {
1319  updated();
1320  }
1321  }
1322  PlotLinePtr gridMinorLine (unsigned int index = 0) const {
1323  if (index >= itsGridMinLines_.size())
1324  const_cast < vector < PlotLinePtr >
1325  &>(itsGridMinLines_).resize (index + 1);
1326  return itsGridMinLines_[index];
1327  }
1328  void setGridMinorLine (const PlotLinePtr & value, unsigned int index = 0) {
1329  if (index >= itsGridMinLines_.size())
1330  itsGridMinLines_.resize (index + 1);
1331  if (itsGridMinLines_[index] != value) {
1332  itsGridMinLines_[index] = value;
1333  updated();
1334  }
1335  }
1336 
1337 
1338 private:
1339 
1340  //Does the work for the operator=()s.
1341  PMS_PP_Canvas& assign(const PMS_PP_Canvas* o );
1342 
1343  /* Parameters' values */
1344  std::vector<PlotMSLabelFormat> itsXLabels_;
1345  std::vector<bool> itsXFontsSet_;
1346  std::vector<casacore::Int> itsXAxisFonts_;
1347  std::vector<PlotMSLabelFormat> itsYLabels_;
1348  std::vector<bool> itsYFontsSet_;
1349  std::vector<casacore::Int> itsYAxisFonts_;
1350  std::vector<bool> itsXLabelsShown_;
1351  std::vector<bool> itsYLabelsShown_;
1352  std::vector<bool> itsLegendsShown_;
1353  std::vector<PlotCanvas::LegendPosition > itsLegendsPos_;
1354  std::vector<PlotMSLabelFormat> itsTitles_;
1355  std::vector<bool> itsTitleFontsSet_;
1356  std::vector<casacore::Int> itsTitleFonts_;
1357  std::vector<bool> itsGridMajsShown_;
1358  std::vector<bool> itsGridMinsShown_;
1359  std::vector<PlotLinePtr> itsGridMajLines_;
1360  std::vector<PlotLinePtr> itsGridMinLines_;
1361 
1362  /* Key strings for casacore::Record */
1380 
1381 
1382  void setDefaults();
1383 };
1384 
1385 
1386 
1387 
1388 
1389 // Subclass of PlotMSPlotParameters::Group to handle display parameters.
1390 // Currently includes:
1391 // * flagged and unflagged symbols
1392 // * plot title format
1393 // * colorize flag and axis
1394 // * xconnect and timeconnect (connect points on plot along x- or time-axis)
1395 // Parameters are vector-based, on a per-plot basis.
1396 //
1398 
1399 public:
1400  /* Constructor which takes a factory */
1402 
1403  /* Copy constructor. See operator=(). */
1405 
1406  ~PMS_PP_Display();
1407 
1408 
1409  /* Implements PlotMSPlotParameters::Group::clone(). */
1410  Group *clone() const {
1411  return new PMS_PP_Display (*this);
1412  }
1413 
1414  /* Implements PlotMSPlotParameters::Group::name(). */
1415  const casacore::String & name() const {
1416  static casacore::String groupName = PMS_PP::UPDATE_DISPLAY_NAME;
1417  return groupName;
1418  }
1419 
1420  /* Implements PlotMSPlotParameters::Group::toRecord(). */
1421  casacore::Record toRecord() const;
1422 
1423  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
1424  void fromRecord (const casacore::Record & record);
1425 
1426  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
1427  bool requiresRedrawOnChange() const {
1428  return true;
1429  }
1430 
1431  /* Overrides PlotMSPlotParameters::Group::operator=(). */
1432  PMS_PP_Display & operator= (const Group & other);
1433 
1434  /* Overrides the actual assignment operator=() */
1435  PMS_PP_Display& operator=(const PMS_PP_Display& other);
1436 
1437  /* Overrides PlotMSPlotParameters::Group::operator==(). */
1438  bool operator== (const Group & other) const;
1439 
1440 
1441  void setColorize (const bool & colorize, const PMS::Axis & axis,
1442  unsigned int index = 0);
1443 
1444 
1445  void resizeVectors (unsigned int newSize);
1446 
1447 
1448  const vector < PlotSymbolPtr > &unflaggedSymbols() const {
1449  return itsUnflaggedSymbols_;
1450  }
1451  void setUnflaggedSymbols (const vector < PlotSymbolPtr > &value) {
1452  if (itsUnflaggedSymbols_ != value) {
1454  updated();
1455  }
1456  }
1457  PlotSymbolPtr unflaggedSymbol (unsigned int index = 0) const {
1458  if (index >= itsUnflaggedSymbols_.size()){
1459  int newSize = index+1;
1460  std::vector<PlotSymbolPtr> & unflaggedSymbols = const_cast < vector <PlotSymbolPtr > &>(itsUnflaggedSymbols_);
1461  unflaggedSymbols.resize ( newSize);
1462  for ( int j = 0; j < newSize; j++ ){
1463  if ( unflaggedSymbols[j].null() ){
1464  unflaggedSymbols[j]=PMS::DEFAULT_UNFLAGGED_SYMBOL(factory());
1465  }
1466  }
1467  }
1468  return itsUnflaggedSymbols_[index];
1469  }
1470  void setUnflaggedSymbol (const PlotSymbolPtr & value, unsigned int index =0);
1471 
1472  const vector < PlotSymbolPtr > &flaggedSymbols() const {
1473  return itsFlaggedSymbols_;
1474  }
1475  void setFlaggedSymbols (const vector < PlotSymbolPtr > &value) {
1476  if (itsFlaggedSymbols_ != value) {
1478  updated();
1479  }
1480  }
1481  PlotSymbolPtr flaggedSymbol (unsigned int index = 0) const {
1482  if (index >= itsFlaggedSymbols_.size()){
1483  int newSize = index + 1;
1484  std::vector<PlotSymbolPtr> & flaggedSymbols = const_cast < vector <PlotSymbolPtr > &>(itsFlaggedSymbols_);
1485  flaggedSymbols.resize( newSize );
1486  for ( int j = 0; j < newSize; j++ ){
1487  if ( flaggedSymbols[j].null()){
1488  flaggedSymbols[j] = PMS::DEFAULT_FLAGGED_SYMBOL(factory());
1489  }
1490  }
1491  }
1492  return itsFlaggedSymbols_[index];
1493  }
1494  void setFlaggedSymbol (const PlotSymbolPtr & value, unsigned int index =0);
1495 
1496  const vector < PlotMSLabelFormat > &titleFormats() const {
1497  return itsTitleFormats_;
1498  }
1499  void setTitleFormats (const vector < PlotMSLabelFormat > &value) {
1500  if (itsTitleFormats_ != value) {
1502  updated();
1503  }
1504  }
1505  const PlotMSLabelFormat & titleFormat (unsigned int index = 0) const {
1506  return itsTitleFormats_[index];
1507  }
1508  void setTitleFormat (const PlotMSLabelFormat & value, unsigned int index =
1509  0) {
1510  if (itsTitleFormats_[index] != value) {
1511  itsTitleFormats_[index] = value;
1512  updated();
1513  }
1514  }
1515 
1516 
1517  const vector < bool > &colorizeFlags() const {
1518  return itsColorizeFlags_;
1519  }
1520  void setColorize (const vector < bool > &value) {
1521  if (itsColorizeFlags_ != value) {
1523  updated();
1524  }
1525  }
1526  bool colorizeFlag (unsigned int index = 0) const {
1527  if (index >= itsColorizeFlags_.size())
1528  const_cast < vector < bool > &>(itsColorizeFlags_).resize (index + 1);
1529  return itsColorizeFlags_[index];
1530  }
1531  void setColorize (const bool & value, unsigned int index = 0);
1532 
1533  const vector < PMS::Axis > &colorizeAxes() const {
1534  return itsColorizeAxes_;
1535  }
1536  void setColorize (const vector < PMS::Axis > &value) {
1537  if (itsColorizeAxes_ != value) {
1539  updated();
1540  }
1541  }
1542  PMS::Axis colorizeAxis (unsigned int index = 0) const {
1543  if (index >= itsColorizeAxes_.size())
1544  const_cast < vector < PMS::Axis >&>(itsColorizeAxes_).resize (index + 1);
1545  return itsColorizeAxes_[index];
1546  }
1547  void setColorize (const PMS::Axis & value, unsigned int index = 0) {
1548  if (index >= itsColorizeAxes_.size())
1549  itsColorizeAxes_.resize (index + 1);
1550  if (itsColorizeAxes_[index] != value) {
1551  itsColorizeAxes_[index] = value;
1552  updated();
1553  }
1554  }
1555 
1556 
1557  void setConnect(const casacore::String& xconnect, const bool& timeconnect, unsigned int index = 0);
1558 
1559  const vector<casacore::String>& xConnects() const {
1560  return itsXConnects_;
1561  }
1562  void setXConnects(const vector<casacore::String>& value) {
1563  if (itsXConnects_ != value) {
1564  itsXConnects_ = value;
1565  updated();
1566  }
1567  }
1568  casacore::String xConnect(unsigned int index=0) const {
1569  if (index >= itsXConnects_.size())
1570  const_cast < vector < casacore::String >&>(itsXConnects_).resize (index + 1);
1571  return itsXConnects_[index];
1572  }
1573  void setXConnect(const casacore::String& value, unsigned int index=0) {
1574  if (index >= itsXConnects_.size())
1575  itsXConnects_.resize (index + 1);
1576  if (itsXConnects_[index] != value) {
1577  itsXConnects_[index] = value;
1578  updated();
1579  }
1580  }
1581 
1582  const vector<bool>& timeConnects() const {
1583  return itsTimeConnects_;
1584  }
1585  void setTimeConnects(const vector<bool>& value) {
1586  if (itsTimeConnects_ != value) {
1588  updated();
1589  }
1590  }
1591  bool timeConnect(unsigned int index=0) const {
1592  if (index >= itsTimeConnects_.size())
1593  const_cast < vector < bool >&>(itsTimeConnects_).resize (index + 1);
1594  return itsTimeConnects_[index];
1595  }
1596  void setTimeConnect(const bool& value, unsigned int index=0) {
1597  if (index >= itsTimeConnects_.size())
1598  itsTimeConnects_.resize (index + 1);
1599  if (itsTimeConnects_[index] != value) {
1600  itsTimeConnects_[index] = value;
1601  updated();
1602  }
1603  }
1604 
1605 private:
1606 
1607  /* Does the work for both versions of operator=() */
1608  PMS_PP_Display& assign( const PMS_PP_Display* o );
1609 
1610 
1611  /* Parameters' values */
1612  vector<PlotSymbolPtr> itsUnflaggedSymbols_;
1613  vector<PlotSymbolPtr> itsFlaggedSymbols_;
1614  vector<PlotMSLabelFormat> itsTitleFormats_;
1615  vector<bool> itsColorizeFlags_;
1616  vector<PMS::Axis> itsColorizeAxes_;
1617  vector<casacore::String> itsXConnects_;
1618  vector<bool> itsTimeConnects_;
1619 
1620 
1621  /* Key strings for casacore::Record */
1629 
1630  void setDefaults();
1631 };
1632 
1633 // Subclass of PlotMSPlotParameters::Group to handle page header parameters.
1634 // Currently includes:
1635 // * page header items
1636 
1637 // Parameters are vector-based, on a per-plot basis.
1638 //
1640 
1641 public:
1642  /* Constructor which takes a factory */
1644 
1645  /* Copy constructor. See operator=(). */
1647 
1649 
1650  /* Implements PlotMSPlotParameters::Group::clone(). */
1651  Group *clone() const {
1652  return new PMS_PP_PageHeader (*this);
1653  }
1654 
1655  /* Implements PlotMSPlotParameters::Group::name(). */
1656  const casacore::String & name() const {
1658  return groupName;
1659  }
1660 
1661  /* Implements PlotMSPlotParameters::Group::toRecord(). */
1662  casacore::Record toRecord() const;
1663 
1664  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
1665  void fromRecord (const casacore::Record & record);
1666 
1667  /* Overrides PlotMSPlotParameters::Group::operator=(). */
1668  PMS_PP_PageHeader & operator= (const Group & other);
1669 
1670  /* Overrides the actual assignment operator=() */
1672 
1673  /* Overrides PlotMSPlotParameters::Group::operator==(). */
1674  bool operator== (const Group & other) const;
1675 
1676  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
1677  bool requiresRedrawOnChange() const {
1678  return false;
1679  }
1680 
1682  if (itsPageHeaderItems_ != value) {
1684  updated();
1685  }
1686  }
1687 
1689 
1690 private:
1691  /* Parameters' values */
1693 
1694  /* Key strings for casacore::Record */
1696 
1697  //Does the work for the operator=()s.
1699  void setDefaults();
1700 
1701 };
1702 
1703 
1704 // Subclass of PlotMSPlotParameters::Group to handle iteration parameters.
1705 // Currently includes:
1706 // * which axis to use
1707 // * rows, columns to fit onto each page
1708 // Parameters apply to whole set of plots
1709 //
1711 
1712 
1713 
1714 public:
1715 
1716  /* Constructor which takes a factory */
1718 
1719  /* Copy constructor. See operator=(). */
1721 
1723 
1724 
1725  /* Implements PlotMSPlotParameters::Group::clone(). */
1726  Group *clone() const {
1727  return new PMS_PP_Iteration (*this);
1728  }
1729 
1730  /* Implements PlotMSPlotParameters::Group::name(). */
1731  const casacore::String & name() const {
1733  return groupName;
1734  }
1735 
1736  /* Implements PlotMSPlotParameters::Group::toRecord(). */
1737  casacore::Record toRecord() const;
1738 
1739  /* Implements PlotMSPlotParameters::Group::fromRecord(). */
1740  void fromRecord (const casacore::Record & record);
1741 
1742  /* Implements PlotMSPlotParameters::Group::requiresRedrawOnChanged(). */
1743  bool requiresRedrawOnChange() const {
1744  return true;
1745  }
1746 
1747  /* Overrides the real operator=(). */
1749 
1750  /* Overrides PlotMSPlotParameters::Group::operator=(). */
1751  PMS_PP_Iteration & operator= (const Group & other);
1752 
1753  /* Overrides PlotMSPlotParameters::Group::operator==(). */
1754  bool operator== (const Group & other) const;
1755 
1756  //Returns whether or not we are iterating on an axis.
1757  bool isIteration() const;
1758 
1759  const PlotMSIterParam& iterParam() const {
1760  return itsIterParam_;
1761  }
1762  void setIterParam(PlotMSIterParam iterparam) {
1763  if (itsIterParam_ != iterparam) {
1764  itsIterParam_=iterparam;
1765  updated();
1766  }
1767  }
1768 
1769  PMS::Axis iterationAxis() const {
1770  return itsIterParam_.iterAxis();
1771  }
1772 
1773  void setIterationAxis (const PMS::Axis & value) {
1774  if (iterationAxis()!=value) {
1775  itsIterParam_.setIterAxis(value);
1776  updated();
1777  }
1778  }
1779 
1780 
1781  int getGridRow() const {
1782  return itsIterParam_.getGridRow();
1783  }
1784  void setGridRow(const int &value) {
1785  if (getGridRow() != value) {
1786  itsIterParam_.setGridRow(value);
1787  updated();
1788  }
1789  }
1790 
1791  int getGridCol() const {
1792  return itsIterParam_.getGridCol();
1793  }
1794  void setGridCol(const int &value) {
1795  if (getGridCol() != value) {
1796  itsIterParam_.setGridCol(value);
1797  updated();
1798  }
1799  }
1800 
1802  return itsIterParam_.isCommonAxisX();
1803  }
1804  void setCommonAxisX( bool commonAxis ){
1805  if ( isCommonAxisX() != commonAxis ){
1806  bool validValue = false;
1807  if ( isGlobalScaleX()){
1808  validValue = true;
1809  }
1810  else if ( !commonAxis ){
1811  validValue = true;
1812  }
1813 
1814  if ( validValue ){
1815  itsIterParam_.setCommonAxisX( commonAxis );
1816  updated();
1817  }
1818  }
1819  }
1821  return itsIterParam_.isCommonAxisY();
1822  }
1823  void setCommonAxisY( bool commonAxis ){
1824  if ( isCommonAxisY() != commonAxis ){
1825  bool validValue = false;
1826  if ( isGlobalScaleY() ){
1827  validValue = true;
1828  }
1829  else if ( !commonAxis ){
1830  validValue = true;
1831  }
1832  if ( validValue ){
1833  itsIterParam_.setCommonAxisY( commonAxis );
1834  updated();
1835  }
1836  }
1837  }
1839  return itsIterParam_.isGlobalAxisX();
1840  }
1841  void setGlobalScaleX( bool globalAxis ){
1842  if ( isGlobalScaleX() != globalAxis ){
1843  itsIterParam_.setGlobalScaleX( globalAxis );
1844  updated();
1845  }
1846  }
1848  return itsIterParam_.isGlobalAxisY();
1849  }
1850  void setGlobalScaleY( bool globalAxis ){
1851  if ( isGlobalScaleY() != globalAxis ){
1852  itsIterParam_.setGlobalScaleY( globalAxis );
1853  updated();
1854  }
1855  }
1856 private:
1857 
1858  //Does the work for the operator=()s.
1860 
1861  /* Parameters' values */
1863  void setDefaults();
1864 };
1865 
1866 
1867 
1868 
1869 }
1870 
1871 #endif /* PLOTMSPLOTPARAMETERGROUPS_H_ */
PMS_PP_PageHeader & operator=(const Group &other)
void resize(int count, bool copyValues=False)
Change the size of the vectors.
const std::vector< PlotAxis > & yAxes() const
PMS_PP_MSData(PlotFactoryPtr factory)
void setXFrames(const vector< PMS::CoordSystem > &value)
std::vector< bool > itsYLabelsShown_
const std::vector< PMS::Axis > & yAxes() const
void showGridMinor(const bool &show, const PlotLinePtr &line, unsigned int index=0)
LegendPosition
Static //.
Definition: PlotCanvas.h:88
bool yRangeSet(unsigned int index=0) const
static const int UPDATE_PAGEHEADER
void setCommonAxisY(bool commonAxis)
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
PMS::Axis iterAxis() const
Convenience methods for returning the standard field values.
void setYAxisFonts(const vector< casacore::Int > &value)
std::vector< casacore::Int > itsTitleFonts_
bool titleFontSet(unsigned int index=0) const
void setIterParam(PlotMSIterParam iterparam)
void setYDataColumn(const PMS::DataColumn &value, unsigned int index=0)
const casacore::String & name() const
Returns the name of this group of subparameters.
Specifies averaging parameters for an MS.
int Int
Definition: aipstype.h:50
DirectionAxisParams xDirectionParams(unsigned int index=0) const
static const casacore::String REC_YLABELS
const vector< PlotMSLabelFormat > & titleFormats() const
void setGridMinorLines(const vector< PlotLinePtr > &value)
static const int UPDATE_ITERATION
static const casacore::String REC_YFONTSSET
void setXRanges(const vector< prange_t > &value)
const vector< casacore::Int > & xAxisFonts() const
void setYRange(const bool &set, const prange_t &range, unsigned int index=0)
PlotAxis yAxis(unsigned int index=0) const
void setXRange(const prange_t &value, unsigned int index=0)
void setTitleFont(const casacore::Int value, unsigned int index=0)
const vector< PlotCanvas::LegendPosition > & legendPositions() const
const vector< bool > & xFontsSet() const
void setTitleFormat(const PlotMSLabelFormat &value, unsigned int index=0)
void setCacheType(const casacore::Int &value)
unsigned int numYAxes() const
const casacore::String & name() const
Returns the name of this group of subparameters.
PMS_PP_Axes & assign(const PMS_PP_Axes *o)
Does the work for operator=()s.
Group * clone() const
Abstract Methods //.
static const casacore::String REC_ITEMS
casacore::Int getGridCol() const
StatsData< AccumType > copy(const StatsData< AccumType > &stats)
static const int UPDATE_PLOTMS_OPTIONS
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
bool xFontSet(unsigned int index=0) const
casacore::Int getGridRow() const
static const casacore::String REC_XAXISFONTS
PlotFactoryPtr factory()
Returns the factory.
void setCommonAxisX(casacore::Bool commonAxisX)
const vector< casacore::String > & xConnects() const
std::vector< prange_t > itsYRanges_
bool isIteration() const
Returns whether or not we are iterating on an axis.
PMS_PP_Cache & operator=(const PMS_PP_Cache &other)
std::vector< PlotAxis > itsXAxes_
static const casacore::String REC_YRANGES
const vector< bool > & yFontsSet() const
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
std::vector< bool > itsXLabelsShown_
void setXRanges(const vector< bool > &value)
void setGlobalScaleY(casacore::Bool globalAxisY)
void showGridMajor(const bool &show, const PlotLinePtr &line, unsigned int index=0)
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
void resizeVectors(unsigned int newSize)
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
const std::vector< PMS::Axis > & xAxes() const
void setXAxis(const PMS::Axis &axis, const PMS::DataColumn &data, unsigned int index=0)
Setting the data and data columns for the x- and y-axes.
const casacore::String & name() const
Returns the name of this group of subparameters.
const casacore::String & name() const
Returns the name of this group of subparameters.
PlotMSCalibration itsCalibration_
const vector< bool > & yLabelsShown() const
void setYDataColumns(const vector< PMS::DataColumn > &value)
void setLegendPositions(const vector< PlotCanvas::LegendPosition > &value)
const vector< bool > & gridMajorsShown() const
PlotSymbolPtr unflaggedSymbol(unsigned int index=0) const
bool operator==(const Group &other) const
void setYRanges(const vector< bool > &value)
void setXFontsSet(const vector< bool > &value)
void setShowImage(const bool &value)
PMS_PP_Iteration & operator=(const PMS_PP_Iteration &other)
std::vector< PlotMSLabelFormat > itsYLabels_
void setXInterp(const PMS::InterpMethod &value, unsigned int index=0)
Subclass of PlotMSPlotParameters::Group to handle display parameters.
std::vector< bool > itsGridMinsShown_
void setShowAtm(const bool &value)
unsigned int numXAxes() const
Gets how many axes and data columns there are.
PMS_PP_Display(PlotFactoryPtr factory)
PMS_PP()
Disable constructor.
const PlotMSLabelFormat & xLabelFormat(unsigned int index=0) const
const vector< PlotSymbolPtr > & unflaggedSymbols() const
static const casacore::String UPDATE_MSDATA_NAME
Update flag for casacore::MS data group.
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
const vector< bool > & xLabelsShown() const
const casacore::String & name() const
Returns the name of this group of subparameters.
static const casacore::String REC_LEGENDSPOS
String & resize(size_type n)
Resize by truncating or extending with copies of &lt;tt&gt;c&lt;/tt&gt; (default Char())
Definition: String.h:359
void setYLabelFormats(const vector< PlotMSLabelFormat > &value)
PMS::Axis colorizeAxis(unsigned int index=0) const
static const int UPDATE_AXES
Specifies an casacore::MS selection.
vector< PlotSymbolPtr > itsUnflaggedSymbols_
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
static const casacore::String REC_XINTERPS
const vector< PMS::CoordSystem > & xFrames() const
PMS_PP_MSData & operator=(const PMS_PP_MSData &other)
vector< PlotMSLabelFormat > itsTitleFormats_
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
const vector< PlotMSLabelFormat > & xLabelFormats() const
void setTitleFontSet(const bool &value, unsigned int index=0)
PMS::InterpMethod yInterp(unsigned int index=0) const
const std::vector< bool > & xRangesSet() const
void setXConnects(const vector< casacore::String > &value)
void setGridMajorLine(const PlotLinePtr &value, unsigned int index=0)
casacore::Bool isGlobalAxisY() const
const prange_t & xRange(unsigned int index=0) const
static const casacore::String REC_SHOWGRIDMINS
void setYFontSet(const bool &value, unsigned int index=0)
static const casacore::String REC_SELECTION
void setTimeConnects(const vector< bool > &value)
const vector< bool > & yRangesSet() const
void setTitleFontsSet(const vector< bool > &value)
void setIterationAxis(const PMS::Axis &value)
void setYAxes(const std::vector< PMS::Axis > &value)
const PlotMSLabelFormat & titleFormat(unsigned int index=0) const
Subclass of PlotMSPlotParameters::Group to handle canvas parameters.
void setFilename(const casacore::String &value)
void setIterAxis(PMS::Axis iterAxis)
Convenience methods for setting the standard field values.
static const casacore::String REC_COLAXES
void setGlobalScaleY(bool globalAxis)
const PlotMSLabelFormat & titleFormat(unsigned int index=0) const
void setXConnect(const casacore::String &value, unsigned int index=0)
std::vector< PlotLinePtr > itsGridMinLines_
const vector< bool > & timeConnects() const
void setGridCol(casacore::Int ny)
void showXLabels(const vector< bool > &value)
const vector< PMS::InterpMethod > & yInterps() const
static const casacore::String REC_YDATACOLS
void setYAxis(casacore::String &value, unsigned int index=0)
static const casacore::String UPDATE_CANVAS_NAME
Update flag for canvas group.
const vector< PlotAxis > & xAxes() const
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
const PlotMSIterParam & iterParam() const
void setLabelFormats(const PlotMSLabelFormat &xFormat, const PlotMSLabelFormat &yFormat, unsigned int index=0)
Sets single versions of the parameters for the given index.
void setCalType(const casacore::String &value)
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
void setGlobalScaleX(casacore::Bool globalAxisX)
static const casacore::String REC_XFRAMES
static const int UPDATE_LOG
void show(const variant &v)
Group * clone() const
Abstract Methods //.
static const casacore::String REC_TRANSFORMATIONS
void setColorize(const vector< bool > &value)
Subclass of PlotMSPlotParameters::Group to handle page header parameters.
void setAxes(const PMS::Axis &xAxis, const PMS::Axis &yAxis, const PMS::DataColumn &xData, const PMS::DataColumn &yData, unsigned int index=0)
static const casacore::String REC_FILENAME
static const int UPDATE_MSDATA
static const casacore::String REC_TITLES
PMS::InterpMethod xInterp(unsigned int index=0) const
Group * clone() const
Abstract Methods //.
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of data
Definition: PlotData.h:48
void setPageHeaderItems(const PageHeaderItems &value)
static const casacore::String REC_SHOWATM
PMS_PP_Canvas & assign(const PMS_PP_Canvas *o)
Does the work for the operator=()s.
const casacore::Int & titleFont(unsigned int index=0) const
vector< PlotSymbolPtr > itsFlaggedSymbols_
std::vector< PMS::InterpMethod > itsYInterp_
static const casacore::String UPDATE_LOG_NAME
Update flag for log group.
static const casacore::String REC_SHOWXLABELS
Class for generating labels based upon axes, units, etc.
casacore::String xConnect(unsigned int index=0) const
bool yFontSet(unsigned int index=0) const
std::vector< PMS::Axis > itsYAxes_
casacore::Bool isCommonAxisX() const
const prange_t & yRange(unsigned int index=0) const
const casacore::Int & cacheType() const
based on PlotMSCacheBase::Type enum {MS, CAL}
PMS_PP_Display & assign(const PMS_PP_Display *o)
PMS_PP_MSData & assign(const PMS_PP_MSData *other)
Does the work of the operator=()s.
bool yLabelShown(unsigned int index=0) const
void setFlaggedSymbol(const PlotSymbolPtr &value, unsigned int index=0)
const casacore::String & filename() const
void setYFontsSet(const vector< bool > &value)
void setFlaggedSymbols(const vector< PlotSymbolPtr > &value)
PlotAxis xAxis(unsigned int index=0) const
casacore::Bool isCommonAxisX() const
void setTitleFormats(const vector< PlotMSLabelFormat > &value)
PMS_PP_Cache(PlotFactoryPtr factory)
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
static const casacore::String REC_FLAGGEDS
static const casacore::String REC_XRANGES
Specifies iteration parameters for plotms.
bool operator==(const Group &other) const
void setGridRow(const int &value)
void setAxes(const PlotAxis &xAxis, const PlotAxis &yAxis, unsigned int index=0)
Sets single versions of the parameters for the given index.
void setRanges(const bool &xSet, const bool &ySet, const prange_t &xRange, const prange_t &yRange, unsigned int index=0)
void setYAxis(const PMS::Axis &axis, const PMS::DataColumn &data, unsigned int index=0)
static const casacore::String UPDATE_REDRAW_NAME
Update flag for redrawing.
static const casacore::String REC_XAXES
const vector< PMS::DataColumn > & yDataColumns() const
void setXFontSet(const bool &value, unsigned int index=0)
PMS::DataColumn xDataColumn(unsigned int index=0) const
static const casacore::String REC_YINTERPS
std::vector< PlotCanvas::LegendPosition > itsLegendsPos_
void setXRange(const bool &value, unsigned int index=0)
Subclass of PlotMSPlotParameters::Group to handle subparameters for casacore::MS data.
void setGridRow(casacore::Int nx)
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
const vector< bool > & gridMinorsShown() const
const casacore::String & calType() const
std::vector< PMS::Axis > itsXAxes_
void setYRange(const prange_t &value, unsigned int index=0)
void showGridMinors(const vector< bool > &value)
std::vector< bool > itsTitleFontsSet_
casacore::Bool isGlobalScaleX() const
void setXAxis(const PMS::Axis &value, unsigned int index=0)
void setXAxes(const vector< PlotAxis > &value)
bool timeConnect(unsigned int index=0) const
void setColorize(const PMS::Axis &value, unsigned int index=0)
static const casacore::String UPDATE_PAGEHEADER_NAME
Update flag for page header group.
void setXDataColumn(const PMS::DataColumn &value, unsigned int index=0)
const vector< casacore::Int > & yAxisFonts() const
Subclass of PlotMSPlotParameters::Group to handle axes parameters.
const vector< PlotLinePtr > & gridMinorLines() const
Group * clone() const
Abstract Methods //.
const PageHeaderItems & pageHeaderItems() const
const vector< PlotSymbolPtr > & flaggedSymbols() const
std::vector< PMS::CoordSystem > itsXFrame_
static const casacore::String REC_TITLES
void setYRange(const bool &value, unsigned int index=0)
static const casacore::String REC_SHOWIMAGE
unsigned int numXAxes() const
Gets how many axes there are.
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
void setXAxes(const std::vector< PMS::Axis > &value)
std::vector< PMS::DataColumn > itsXData_
void setXRange(const bool &set, const prange_t &range, unsigned int index=0)
void setAveraging(const PlotMSAveraging &value)
void showYLabel(const bool &value, unsigned int index=0)
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
void showGrid(const bool &showMajor, const bool &showMinor, const PlotLinePtr &majorLine, const PlotLinePtr &minorLine, unsigned int index=0)
void setXInterps(const vector< PMS::InterpMethod > &value)
PMS_PP_PageHeader(PlotFactoryPtr factory)
static const casacore::String REC_XLABELS
static const casacore::String UPDATE_CACHE_NAME
Update flag for cache group.
static const casacore::String REC_COLFLAGS
const PlotMSTransformations & transformations() const
const std::vector< PMS::DataColumn > & xDataColumns() const
std::vector< bool > itsLegendsShown_
PlotSymbolPtr flaggedSymbol(unsigned int index=0) const
void setColorize(const bool &colorize, const PMS::Axis &axis, unsigned int index=0)
void setXLabelFormat(const PlotMSLabelFormat &value, unsigned int index=0)
void setXAxisFont(const casacore::Int value, unsigned int index=0)
void setCalibration(const PlotMSCalibration &value)
Group * clone() const
Abstract Methods //.
void showLegend(const bool &show, const PlotCanvas::LegendPosition &pos, unsigned int index=0)
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
PlotAxis
Enum for the four plot axes.
Definition: PlotOptions.h:62
void resize(int count)
bool colorizeFlag(unsigned int index=0) const
Group * clone() const
Abstract Methods //.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
DirectionAxisParams yDirectionParams(unsigned int index=0) const
void setYLabelFormat(const PlotMSLabelFormat &value, unsigned int index=0)
const vector< prange_t > & xRanges() const
const casacore::Int & yAxisFont(unsigned int index=0) const
std::vector< PMS::CoordSystem > itsYFrame_
void setXLabelFormats(const vector< PlotMSLabelFormat > &value)
std::vector< bool > itsXRangesSet_
static const casacore::String REC_SHOWGRIDMAJS
void showLegend(const bool &value, unsigned int index=0)
static const casacore::String REC_YFRAMES
PMS::Axis yAxis(unsigned int index=0) const
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
bool operator==(const Group &other) const
static PlotSymbolPtr DEFAULT_FLAGGED_SYMBOL(PlotFactoryPtr factory)
void setGridMinorLine(const PlotLinePtr &value, unsigned int index=0)
static const int UPDATE_CANVAS
const PlotMSLabelFormat & yLabelFormat(unsigned int index=0) const
std::vector< PMS::DataColumn > itsYData_
void setYRanges(const vector< prange_t > &value)
PMS_PP_Axes(PlotFactoryPtr factory)
static const int UPDATE_CACHE
const Bool False
Definition: aipstype.h:44
const vector< casacore::Int > & titleFonts() const
const PlotMSAveraging & averaging() const
void setGlobalScaleX(bool globalAxis)
PMS_PP_PageHeader & assign(const PMS_PP_PageHeader *o)
Does the work for the operator=()s.
static const casacore::String REC_TITLEFONTSSET
PMS_PP_Iteration(PlotFactoryPtr factory)
const PlotMSSelection & selection() const
PMS::Axis xAxis(unsigned int index=0) const
casacore::Bool isCommonAxisY() const
void setTitleFormats(const vector< PlotMSLabelFormat > &value)
void setXAxisFonts(const vector< casacore::Int > &value)
std::vector< bool > itsYRangesSet_
bool xRangeSet(unsigned int index=0) const
static const casacore::String REC_UNFLAGGEDS
const vector< PMS::InterpMethod > & xInterps() const
void setTitleFormat(const PlotMSLabelFormat &value, unsigned int index=0)
static const casacore::String REC_CALTYPE
const vector< bool > & legendsShown() const
void setYInterps(const vector< PMS::InterpMethod > &value)
unsigned int numYAxes() const
PMS_PP_Canvas(PlotFactoryPtr factory)
casacore::Bool isCommonAxisY() const
casacore::Bool isGlobalScaleY() const
static const int UPDATE_DISPLAY
bool gridMinorShown(unsigned int index=0) const
std::pair< double, double > prange_t
Typedef for range, which is two doubles (min and max).
Definition: PlotOptions.h:41
PlotCanvas::LegendPosition legendPosition(unsigned int index=0) const
PMS::DataColumn yDataColumn(unsigned int index=0) const
void setYFrame(const PMS::CoordSystem &value, unsigned int index=0)
Subclass of PlotMSPlotParameters::Group to handle cache parameters.
vector< casacore::String > itsXConnects_
void showAxesLabels(const bool &xLabelShow, const bool &yLabelShow, unsigned int index=0)
const vector< bool > & colorizeFlags() const
void showXLabel(const bool &value, unsigned int index=0)
void setXFrame(const PMS::CoordSystem &value, unsigned int index=0)
std::vector< PlotLinePtr > itsGridMajLines_
void setYAxis(const PlotAxis &value, unsigned int index=0)
const vector< PlotLinePtr > & gridMajorLines() const
void setTimeConnect(const bool &value, unsigned int index=0)
static const casacore::String REC_CALIBRATION
void setCommonAxisX(bool commonAxis)
std::vector< PlotMSLabelFormat > itsTitles_
void setConnect(const casacore::String &xconnect, const bool &timeconnect, unsigned int index=0)
Specifies averaging parameters for an MS.
void setColorize(const vector< PMS::Axis > &value)
const vector< PlotMSLabelFormat > & yLabelFormats() const
PMS_PP_Iteration & assign(const PMS_PP_Iteration *o)
Does the work for the operator=()s.
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
const casacore::String & name() const
Returns the name of this group of subparameters.
std::vector< PlotAxis > itsYAxes_
std::vector< casacore::Int > itsYAxisFonts_
const vector< PMS::CoordSystem > & yFrames() const
static const int UPDATE_REDRAW
std::vector< bool > itsXFontsSet_
static const casacore::String REC_GRIDMAJLINES
void setCommonAxisY(casacore::Bool commonAxisY)
PMS::CoordSystem yFrame(unsigned int index=0) const
Group(PlotFactoryPtr factory)
Constructor which takes a plot factory.
void showLegends(const vector< bool > &value)
Group * clone() const
Abstract Methods //.
const PlotMSCalibration & calibration() const
static const casacore::String REC_XRANGESSET
bool operator==(const Group &other) const
void setXAxis(const PlotAxis &value, unsigned int index=0)
const vector< PlotMSLabelFormat > & titleFormats() const
void setYAxisFont(const casacore::Int value, unsigned int index=0)
vector< PMS::Axis > itsColorizeAxes_
PMS_PP_Axes & operator=(const PMS_PP_Axes &other)
void setSelection(const PlotMSSelection &value)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
bool operator==(const Group &other) const
void setXDataColumns(const vector< PMS::DataColumn > &value)
void setGridMajorLines(const vector< PlotLinePtr > &value)
Subclass of PlotMSPlotParameters::Group to handle iteration parameters.
void showGridMajor(const bool &value, unsigned int index=0)
static const casacore::String REC_XCONNECT
static const casacore::String REC_YAXES
void setYAxes(const vector< PlotAxis > &value)
void setShowTsky(const bool &value)
bool operator==(const Group &other) const
static const casacore::String UPDATE_AXES_NAME
Update flag for axes group.
Container class to hold constants for groups.
unsigned int numCanvases() const
Gets how many canvases there are.
static const casacore::String REC_TITLEFONTS
void setTransformations(const PlotMSTransformations &value)
void showYLabels(const vector< bool > &value)
void setTitleFonts(const vector< casacore::Int > &value)
static const casacore::String REC_XAXES
void setYAxis(const PMS::Axis &value, unsigned int index=0)
void setUnflaggedSymbol(const PlotSymbolPtr &value, unsigned int index=0)
void setYFrames(const vector< PMS::CoordSystem > &value)
static const casacore::String REC_SHOWTSKY
bool gridMajorShown(unsigned int index=0) const
PlotMSTransformations itsTransformations_
void fromRecord(const casacore::Record &record)
Sets the values for this group of subparameters using the given Record.
Specifies calibration parameters for an MS.
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
const vector< PMS::Axis > & colorizeAxes() const
static const casacore::String REC_YAXES
void showGridMinor(const bool &value, unsigned int index=0)
void setYInterp(const PMS::InterpMethod &value, unsigned int index=0)
static const casacore::String REC_XFONTSSET
static const casacore::String UPDATE_ITERATION_NAME
Update flag for iteration group.
static const casacore::String REC_XDATACOLS
static const casacore::String REC_YAXISFONTS
const casacore::String & name() const
Returns the name of this group of subparameters.
const vector< bool > & titleFontsSet() const
casacore::Bool isGlobalAxisX() const
bool xLabelShown(unsigned int index=0) const
static const casacore::String REC_CACHETYPE
std::vector< bool > itsGridMajsShown_
Ordered selection of distinct (no duplicates) page header items.
void showGridMajors(const vector< bool > &value)
void setUnflaggedSymbols(const vector< PlotSymbolPtr > &value)
PMS_PP_Cache & assign(const PMS_PP_Cache *o)
Does the work for the operator=()s.
bool operator==(const Group &other) const
PMS_PP_Canvas & operator=(const Group &other)
std::vector< casacore::Int > itsXAxisFonts_
std::vector< PlotMSLabelFormat > itsXLabels_
static const casacore::String REC_SHOWYLABELS
static const casacore::String REC_SHOWLEGENDS
static const casacore::String REC_YRANGESSET
void updated()
Should be called by the child class whenever any of the subparameter values have been updated...
void setLegendPosition(const PlotCanvas::LegendPosition &value, unsigned int index=0)
void setGridCol(const int &value)
PMS::CoordSystem xFrame(unsigned int index=0) const
std::vector< prange_t > itsXRanges_
casacore::Record toRecord() const
Returns a casacore::Record representing this group of subparameters.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const casacore::String REC_AVERAGING
PMS_PP_Display & operator=(const Group &other)
std::vector< PMS::InterpMethod > itsXInterp_
static const casacore::String REC_GRIDMINLINES
static const casacore::String REC_TIMECONNECT
bool requiresRedrawOnChange() const
Returns true if the plot needs to be redrawn when subpamarameters in this group have changed...
std::vector< bool > itsYFontsSet_
static PlotSymbolPtr DEFAULT_UNFLAGGED_SYMBOL(PlotFactoryPtr factory)
Default values for PMS_PP_Display.
PlotLinePtr gridMinorLine(unsigned int index=0) const
const casacore::Int & xAxisFont(unsigned int index=0) const
static const casacore::String UPDATE_PLOTMS_OPTIONS_NAME
Update flag for plotms_options group.
const vector< prange_t > & yRanges() const
PlotLinePtr gridMajorLine(unsigned int index=0) const
static const casacore::String UPDATE_DISPLAY_NAME
Update flag for display group.
bool legendShown(unsigned int index=0) const
Bool empty() const
Test for empty.
Definition: String.h:375