casa
5.7.0-16
|
A holder of WorldCanvasHolders to use for panelling applications. More...
#include <MultiWCHolder.h>
Public Member Functions | |
MultiWCHolder () | |
Constructor which makes an empty MultiWCHolder. More... | |
MultiWCHolder (WorldCanvasHolder &holder) | |
Constructor which makes a MultiWCHolder containing the single specified WorldCanvasHolder. More... | |
virtual | ~MultiWCHolder () |
Destructor. More... | |
virtual void | addWCHolder (WorldCanvasHolder &holder) |
Add or remove a WorldCanvasHolder, or remove all WorldCanvasHolders on this MultiWCHolder. More... | |
virtual void | removeWCHolder (WorldCanvasHolder &holder) |
virtual void | removeWCHolders () |
virtual void | addDisplayData (DisplayData &displaydata, int position=-1) |
Add or remove a DisplayData, or remove all DisplayDatas on this MultiWCHolder. More... | |
virtual void | removeDisplayData (DisplayData &displaydata) |
virtual void | removeDisplayDatas () |
virtual void | setRestriction (const Attribute &restriction) |
Install or remove a single restriction, or a buffer of restrictions, on all of the WorldCanvasHolders managed by this MultiWCHolder. More... | |
virtual void | setRestrictions (const AttributeBuffer &restrictions) |
virtual void | removeRestriction (const casacore::String &name) |
virtual void | removeRestrictions () |
virtual void | setLinearRestrictions (AttributeBuffer &restrictions, const AttributeBuffer &increments) |
Incrementally distribute restrictions to all of the WorldCanvasHolders. More... | |
virtual void | hold () |
Hold and release response to refreshes requested with the refresh() member function. More... | |
virtual void | release () |
virtual void | refresh (const Display::RefreshReason &reason=Display::UserCommand) |
Distribute a refresh event to all the held WorldCanvasHolders. More... | |
virtual casacore::uInt | zLength () |
virtual casacore::Int | bLength () |
These orrespond to 'zIndex, zLength' for animator's 'blink mode'. More... | |
virtual casacore::Int | bIndex () |
void | setBlinkMode (bool blinkMode) |
Sets whether the viewer is in blink mode. More... | |
virtual casacore::Bool | isBlinkDD (DisplayData *dd) |
Determines which DDs will be restricted, which are always active. More... | |
virtual casacore::Bool | conforms (DisplayData *dd, casacore::Bool testRstrs=true, casacore::Bool testCS=true, casacore::Bool testZ=true, casacore::Int wchIndex=0) |
Test conformance of a DD to a WCH of this MWCH (by default, test against the first one (WCH 0), which always exists). More... | |
virtual casacore::Int | nWCHs () |
Return number of WCHs (subpanels). More... | |
virtual void | clear () |
Clear PC in MWCH's area (not implemented on this level). More... | |
std::list< DisplayData * > & | displayDatas () |
Added to collect region statistics from MultiRectTool::update_stats()... More... | |
Protected Member Functions | |
virtual void | setBIndexName () |
Copy constructor - construct a new MultiWCHolder from other . More... | |
virtual void | adjustBIndexName (AttributeBuffer &rstrs) |
Adjust name of "bIndex" Attribute (if any) to indlude ID of this MWCH. More... | |
Private Member Functions | |
casacore::Bool | isAlreadyRegistered (const WorldCanvasHolder &holder) |
Do we already have this WorldCanvasHolder/DisplayData registered? More... | |
casacore::Bool | isAlreadyRegistered (const DisplayData &displaydata) |
void | addAllDisplayDatas (WorldCanvasHolder &holder) |
Add/remove all the DisplayDatas to/from a WorldCanvasHolder. More... | |
void | removeAllDisplayDatas (WorldCanvasHolder &holder, const casacore::Bool &permanent=false) |
void | addToAllWorldCanvasHolders (DisplayData &displaydata, int position) |
Add/remove a DisplayData to/from all WorldCanvasHolders. More... | |
void | removeFromAllWorldCanvasHolders (DisplayData &displaydata) |
void | distributeRestrictions () |
Distribute restrictions to all WorldCanvasHolders. More... | |
void | installRestrictions (WorldCanvasHolder &holder) |
Set restrictions on a particular WorldCanvasHolder. More... | |
Private Attributes | |
std::list< WorldCanvasHolder * > | itsWCHList |
The list of WorldCanvasHolders that are managed by this MultiWCHolder. More... | |
std::list< DisplayData * > | itsDDList |
The list of DisplayDatas that are managed by this MultiWCHolder. More... | |
casacore::Block< void * > | itsBlinkDDs |
Subset of above DDs which will have blinking restrictions added (Countour plots, e.g., do not; they always display). More... | |
casacore::Int | itsBLength |
Number of DDs above. More... | |
casacore::Int | itsBIndex |
Index of DD to show in first WCH when blink mode is active (it is kept up-to-date in any case). More... | |
casacore::String | itsBIndexName |
The (unchanging) name of the blink restriction: "bIndex" followed by an ID unique to this MWCH. More... | |
AttributeBuffer | itsAttributes |
The buffer of attributes which are presently installed on the registered WorldCanvasHolders. More... | |
casacore::Int | itsHoldCount |
The current hold count of this MultiWCHolder. More... | |
casacore::Bool | itsRefreshHeld |
The current state of whether a refresh was held up or not. More... | |
Display::RefreshReason | itsHeldReason |
The reason for the held-up refresh event. More... | |
A holder of WorldCanvasHolders to use for panelling applications.
Public interface
The MultiWCHolder holds a number of WorldCanvasHolders to simplify panelling operations.
This class is a holder of WorldCanvasHolder objects. It exists to facilitate the management of multiple WorldCanvasHolders having in common a set of restrictions, which for example may be for controlling animation, and on which a common set of DisplayDatas may be registered and displayed.
The basic interface to the MultiWCHolder provides methods for adding and removing individual WorldCanvasHolder objects, for globally registering and unregistering DisplayData objects for display on the WorldCanvasHolder objects, and for applying a set of restrictions to the WorldCanvasHolder objects.
At a more advanced level, functions exist to distribute varying restrictions across all the WorldCanvasHolder objects. For example, the programmer can use linearDistributeRestriction
to apply a restriction to each WorldCanvasHolder, where the value of the restriction is incremented by a fixed amount between each WorldCanvasHolder. This would be useful, for example, to easily display a set of planes from a multi-frequency image on a number of WorldCanvases whose WorldCanvasHolders have been added to a MultiWCHolder.
Definition at line 99 of file MultiWCHolder.h.
casa::MultiWCHolder::MultiWCHolder | ( | ) |
Constructor which makes an empty MultiWCHolder.
casa::MultiWCHolder::MultiWCHolder | ( | WorldCanvasHolder & | holder | ) |
Constructor which makes a MultiWCHolder containing the single specified WorldCanvasHolder.
|
virtual |
Destructor.
|
private |
Add/remove all the DisplayDatas to/from a WorldCanvasHolder.
|
virtual |
Add or remove a DisplayData, or remove all DisplayDatas on this MultiWCHolder.
|
private |
Add/remove a DisplayData to/from all WorldCanvasHolders.
|
virtual |
Add or remove a WorldCanvasHolder, or remove all WorldCanvasHolders on this MultiWCHolder.
holder
is added at the end of the list. When a new WorldCanvasHolder is added, it will automatically have all registered DisplayDatas added to it.
|
protectedvirtual |
Adjust name of "bIndex" Attribute (if any) to indlude ID of this MWCH.
|
virtual |
|
virtual |
These orrespond to 'zIndex, zLength' for animator's 'blink mode'.
|
inlinevirtual |
Clear PC in MWCH's area (not implemented on this level).
Reimplemented in casa::PanelDisplay.
Definition at line 203 of file MultiWCHolder.h.
|
virtual |
Test conformance of a DD to a WCH of this MWCH (by default, test against the first one (WCH 0), which always exists).
The three aspects of conformance can be selectively tested.
|
inline |
Added to collect region statistics from MultiRectTool::update_stats()...
Definition at line 206 of file MultiWCHolder.h.
References itsDDList.
|
private |
Distribute restrictions to all WorldCanvasHolders.
|
virtual |
Hold and release response to refreshes requested with the refresh()
member function.
Multiple calls to hold()
can be made, and refreshes will not resume until the same number of calls have been made to release()
. Note that these functions do not affect whether internally (implicitly) generated refreshes continue to occur. That is, refresh events due to PixelCanvas resize events, or Colormap changes, for example, will continue to be acted upon.
|
private |
Set restrictions on a particular WorldCanvasHolder.
|
private |
Do we already have this WorldCanvasHolder/DisplayData registered?
|
private |
|
virtual |
Determines which DDs will be restricted, which are always active.
|
inlinevirtual |
Return number of WCHs (subpanels).
Definition at line 198 of file MultiWCHolder.h.
References itsWCHList.
Referenced by casa::QtDisplayPanel::nPanels().
|
virtual |
Distribute a refresh event to all the held WorldCanvasHolders.
Referenced by casa::QtDisplayPanel::refresh().
|
virtual |
|
private |
|
virtual |
|
virtual |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Copy constructor - construct a new MultiWCHolder from other
.
MultiWCHolder(const MultiWCHolder &other);
Copy assignment using copy semantics. MultiWCHolder &operator==(const MultiWCHolder &other);
(permanently) sets itsBIndexName (below). Called only in constructor.
void casa::MultiWCHolder::setBlinkMode | ( | bool | blinkMode | ) |
Sets whether the viewer is in blink mode.
|
virtual |
Incrementally distribute restrictions to all of the WorldCanvasHolders.
The value of the restrictions are incremented by the given amount for each holder beyond the first one. The given restrictions may have tolerances, and the base types of each restriction and increment must be identical. That is, restriction.getType() == increment.getType()
. Other methods to distribute restrictions in other ways are easily imagined, eg. a vector of Attributes is given. After being called, restrictions
are equal to the values set on the final WorldCanvasHolder in the list.
|
virtual |
Install or remove a single restriction, or a buffer of restrictions, on all of the WorldCanvasHolders managed by this MultiWCHolder.
|
virtual |
|
virtual |
|
private |
The buffer of attributes which are presently installed on the registered WorldCanvasHolders.
Definition at line 258 of file MultiWCHolder.h.
|
private |
Index of DD to show in first WCH when blink mode is active (it is kept up-to-date in any case).
Definition at line 246 of file MultiWCHolder.h.
|
private |
The (unchanging) name of the blink restriction: "bIndex" followed by an ID unique to this MWCH.
The ID is because DDs can be registered on more than one MWCH and need a different "bIndex" restriction on each one. Note, however, that when setLinearRestrictions() is used externally to set the blink restriction onto the WCHs, it simply uses the name "bIndex".
Definition at line 254 of file MultiWCHolder.h.
|
private |
Number of DDs above.
Definition at line 242 of file MultiWCHolder.h.
|
private |
Subset of above DDs which will have blinking restrictions added (Countour plots, e.g., do not; they always display).
This should actually be a casacore::Block<DisplayData*>.
Definition at line 239 of file MultiWCHolder.h.
|
private |
The list of DisplayDatas that are managed by this MultiWCHolder.
Definition at line 234 of file MultiWCHolder.h.
Referenced by displayDatas().
|
private |
The reason for the held-up refresh event.
Definition at line 270 of file MultiWCHolder.h.
|
private |
The current hold count of this MultiWCHolder.
Whenever new WCHolders are added, their count is increased to this value. Calls to hold() and release() modify this count as well as those per canvas.
Definition at line 264 of file MultiWCHolder.h.
|
private |
The current state of whether a refresh was held up or not.
Definition at line 267 of file MultiWCHolder.h.
|
private |
The list of WorldCanvasHolders that are managed by this MultiWCHolder.
Definition at line 231 of file MultiWCHolder.h.
Referenced by nWCHs().