casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DisplayDataHolder.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 
26 #ifndef DISPLAYDATAHOLDER_H_
27 #define DISPLAYDATAHOLDER_H_
28 
29 #include <list>
30 #include <string>
31 #include <memory>
32 
33 namespace casa {
34 
35  class DisplayData;
36  class QtDisplayData;
37  class ImageTracker;
38  class ImageDisplayer;
39 
45  public:
47 
48  //Adds the DisplayData.
49  void addDD( QtDisplayData* dd, int position, bool autoRegister,
50  bool masterCoordinate = false, bool masterSaturation= false,
51  bool masterHue=false);
52 
53  // Removes the QDD from the list and deletes it (if it existed --
54  // Return value: whether qdd was in the list in the first place).
55  bool removeDD(QtDisplayData* qdd);
56  void removeDDAll();
57 
58  // Insert and discard to basically the same thing as add/remove
59  // except that they perform the operation through a GUI level
60  // if one is available.
61  void insertDD( QtDisplayData* dd, int position, bool registered );
62  void discardDD( QtDisplayData* dd );
63 
64  //Iteration support
65  typedef std::list<QtDisplayData *> DisplayDataList;
67  int getCount() const;
68  bool isEmpty() const;
69  bool isCoordinateMaster( QtDisplayData* displayData) const;
71  DisplayDataIterator endDD () const;
72 
73  //Controlling DD
75  void setDDControlling( QtDisplayData* controllingDD );
76 
77  //Returns the DD that will be animating the channels in
78  //normal mode.
79  QtDisplayData* getChannelDD( int index ) const;
80 
81  // retrieve a DD with given name (0 if none).
82  QtDisplayData* getDD(const std::string& name) const;
83  QtDisplayData *getDD( const DisplayData *dd ) const;
84  QtDisplayData* getDD( int index );
85 
86  // Check that a given DD is on the list.
87  bool exists(QtDisplayData* qdd) const;
88 
89  void setImageTracker( std::shared_ptr<ImageTracker> tracker );
90  void setImageDisplayer( ImageDisplayer* displayer );
91 
93  virtual ~DisplayDataHolder();
94  private:
95  DisplayDataHolder( const DisplayDataHolder& displayDataHolder );
96  DisplayDataHolder operator=( const DisplayDataHolder& displayDataHolder );
97  std::shared_ptr<ImageTracker> imageTracker;
100  std::list<QtDisplayData*> dataList;
101  };
102 
103 } /* namespace casa */
104 #endif /* DISPLAYDATAHOLDER_H_ */
void insertDD(QtDisplayData *dd, int position, bool registered)
Insert and discard to basically the same thing as add/remove except that they perform the operation t...
QtDisplayData * getDD(const std::string &name) const
retrieve a DD with given name (0 if none).
Elements::const_iterator const_iterator
ImageDisplayer * imageDisplayer
DisplayDataIterator endDD() const
Interface implemented by QtDisplayPanel that can add/remove registered DDs and set the controlling Qt...
Definition: ImageTracker.h:57
void setDDControlling(QtDisplayData *controllingDD)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
std::list< QtDisplayData * > DisplayDataList
Iteration support.
DisplayDataList::const_iterator DisplayDataIterator
Manages and controls access to a lit of QtDisplayDatas.
bool removeDD(QtDisplayData *qdd)
Removes the QDD from the list and deletes it (if it existed – Return value: whether qdd was in the li...
QtDisplayData * controlling_dd
std::shared_ptr< ImageTracker > imageTracker
void discardDD(QtDisplayData *dd)
bool exists(QtDisplayData *qdd) const
Check that a given DD is on the list.
QtDisplayData * getDDControlling()
Controlling DD.
void setImageDisplayer(ImageDisplayer *displayer)
void addDD(QtDisplayData *dd, int position, bool autoRegister, bool masterCoordinate=false, bool masterSaturation=false, bool masterHue=false)
Adds the DisplayData.
DisplayDataIterator beginDD() const
Base class for display objects.
Definition: DisplayData.h:317
void setImageTracker(std::shared_ptr< ImageTracker > tracker)
QtDisplayData * getChannelDD(int index) const
Returns the DD that will be animating the channels in normal mode.
bool isCoordinateMaster(QtDisplayData *displayData) const
DisplayDataHolder operator=(const DisplayDataHolder &displayDataHolder)
std::list< QtDisplayData * > dataList