casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
casa::viewer::RegionToolManager Class Reference

the RegionCreator class now has static members which allow for the retrieval of lists of RegionCreator objects for creating each type of region (currently rectangle, polygon, ellipse, and point). More...

#include <RegionToolManager.qo.h>

Inheritance diagram for casa::viewer::RegionToolManager:
casa::WCPositionEH casa::WCMotionEH casa::WCRefreshEH casa::DisplayEH

Public Types

enum  ToolTypes {
  RectTool,
  PointTool,
  EllipseTool,
  PolyTool,
  PolylineTool,
  PVTool
}
 

Public Member Functions

 RegionToolManager (QtRegionSourceFactory *rsf, QtDisplayPanelGui *dpg, PanelDisplay *pd)
 
 ~RegionToolManager ()
 
void operator() (const WCPositionEvent &ev)
 Required operators for event handling - these are called when events occur, and distribute the events to the "user-level" methods. More...
 
void operator() (const WCMotionEvent &ev)
 default sends event to cout More...
 
void operator() (const WCRefreshEvent &ev)
 original handler interface (still used for WCRefreshEvents) More...
 
void loadRegions (const std::string &path, const std::string &type)
 
std::shared_ptr< RegionTooltool (region::RegionTypes)
 fetch tool for a particular region type... More...
 
- Public Member Functions inherited from casa::WCPositionEH
 WCPositionEH ()
 Default Constructor Required. More...
 
virtual ~WCPositionEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::WCMotionEH
 WCMotionEH ()
 Default Constructor Required. More...
 
virtual ~WCMotionEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::WCRefreshEH
 WCRefreshEH ()
 Default Constructor Required. More...
 
virtual ~WCRefreshEH ()
 Destructor. More...
 
- Public Member Functions inherited from casa::DisplayEH
virtual void handleEvent (DisplayEvent &)
 Classes that contain this interface (i.e., derive from it) can override this method to implement actions for whatever types of DisplayEvent they're interested in. More...
 
virtual ~DisplayEH ()
 

Private Types

typedef std::pair< double, double > linear_point_type
 
typedef std::map< ToolTypes,
std::shared_ptr< RegionTool > > 
tool_map
 

Private Member Functions

region::RegionSelect tool_to_select (RegionTool::RegionToolTypes type) const
 
bool inDrawArea (WorldCanvas *wc, const linear_point_type &new_blc, const linear_point_type &new_trc) const
 members for keeping track of marked (sticky-selected) regions... More...
 
bool add_mark_select (RegionTool::State &state, region::RegionSelect)
 returns new region marked state... More...
 
void clear_mark_select (RegionTool::State &state, region::RegionSelect)
 
bool setup_moving_regions (RegionTool::State &state, region::RegionSelect)
 
void setup_moving_regions_state (double linx, double liny, const region::region_list_type &)
 
void translate_moving_regions (WorldCanvas *wc, double dx, double dy)
 
bool process_double_click (RegionTool::State &state, region::RegionSelect)
 

Private Attributes

PanelDisplaypd
 
tool_map tools
 
region::region_list_type moving_regions
 
linear_point_type moving_ref_point
 
linear_point_type moving_blc
 
linear_point_type moving_trc
 
bool moving_handle
 members for state when moving a region handle... More...
 
viewer::region::PointInfo moving_handle_info
 
viewer::Regionmoving_handle_region
 
QtRegionSourceFactoryfactory
 region source factory is needed to retrieve the region dock which can provide a list of selected regions... More...
 
QtDisplayPanelGuipanel
 

Detailed Description

the RegionCreator class now has static members which allow for the retrieval of lists of RegionCreator objects for creating each type of region (currently rectangle, polygon, ellipse, and point).

Definition at line 52 of file RegionToolManager.qo.h.

Member Typedef Documentation

typedef std::pair<double,double> casa::viewer::RegionToolManager::linear_point_type
private

Definition at line 86 of file RegionToolManager.qo.h.

typedef std::map<ToolTypes,std::shared_ptr<RegionTool> > casa::viewer::RegionToolManager::tool_map
private

Definition at line 88 of file RegionToolManager.qo.h.

Member Enumeration Documentation

Enumerator
RectTool 
PointTool 
EllipseTool 
PolyTool 
PolylineTool 
PVTool 

Definition at line 56 of file RegionToolManager.qo.h.

Constructor & Destructor Documentation

casa::viewer::RegionToolManager::RegionToolManager ( QtRegionSourceFactory rsf,
QtDisplayPanelGui dpg,
PanelDisplay pd 
)
casa::viewer::RegionToolManager::~RegionToolManager ( )

Member Function Documentation

bool casa::viewer::RegionToolManager::add_mark_select ( RegionTool::State state,
region::RegionSelect   
)
private

returns new region marked state...

void casa::viewer::RegionToolManager::clear_mark_select ( RegionTool::State state,
region::RegionSelect   
)
private
bool casa::viewer::RegionToolManager::inDrawArea ( WorldCanvas wc,
const linear_point_type new_blc,
const linear_point_type new_trc 
) const
private

members for keeping track of marked (sticky-selected) regions...

members for state when moving selected region...

void casa::viewer::RegionToolManager::loadRegions ( const std::string &  path,
const std::string &  type 
)
void casa::viewer::RegionToolManager::operator() ( const WCPositionEvent ev)
virtual

Required operators for event handling - these are called when events occur, and distribute the events to the "user-level" methods.

Implements casa::WCPositionEH.

void casa::viewer::RegionToolManager::operator() ( const WCMotionEvent ev)
virtual

default sends event to cout

Implements casa::WCMotionEH.

void casa::viewer::RegionToolManager::operator() ( const WCRefreshEvent ev)
virtual

original handler interface (still used for WCRefreshEvents)

Implements casa::WCRefreshEH.

bool casa::viewer::RegionToolManager::process_double_click ( RegionTool::State state,
region::RegionSelect   
)
private
bool casa::viewer::RegionToolManager::setup_moving_regions ( RegionTool::State state,
region::RegionSelect   
)
private
void casa::viewer::RegionToolManager::setup_moving_regions_state ( double  linx,
double  liny,
const region::region_list_type  
)
private
std::shared_ptr<RegionTool> casa::viewer::RegionToolManager::tool ( region::RegionTypes  )

fetch tool for a particular region type...

Referenced by casa::viewer::ds9context::tool().

region::RegionSelect casa::viewer::RegionToolManager::tool_to_select ( RegionTool::RegionToolTypes  type) const
inlineprivate
void casa::viewer::RegionToolManager::translate_moving_regions ( WorldCanvas wc,
double  dx,
double  dy 
)
private

Member Data Documentation

QtRegionSourceFactory* casa::viewer::RegionToolManager::factory
private

region source factory is needed to retrieve the region dock which can provide a list of selected regions...

Definition at line 116 of file RegionToolManager.qo.h.

linear_point_type casa::viewer::RegionToolManager::moving_blc
private

Definition at line 98 of file RegionToolManager.qo.h.

bool casa::viewer::RegionToolManager::moving_handle
private

members for state when moving a region handle...

Definition at line 102 of file RegionToolManager.qo.h.

viewer::region::PointInfo casa::viewer::RegionToolManager::moving_handle_info
private

Definition at line 103 of file RegionToolManager.qo.h.

viewer::Region* casa::viewer::RegionToolManager::moving_handle_region
private

Definition at line 104 of file RegionToolManager.qo.h.

linear_point_type casa::viewer::RegionToolManager::moving_ref_point
private

Definition at line 97 of file RegionToolManager.qo.h.

region::region_list_type casa::viewer::RegionToolManager::moving_regions
private

Definition at line 96 of file RegionToolManager.qo.h.

linear_point_type casa::viewer::RegionToolManager::moving_trc
private

Definition at line 99 of file RegionToolManager.qo.h.

QtDisplayPanelGui* casa::viewer::RegionToolManager::panel
private

Definition at line 117 of file RegionToolManager.qo.h.

PanelDisplay* casa::viewer::RegionToolManager::pd
private

Definition at line 87 of file RegionToolManager.qo.h.

tool_map casa::viewer::RegionToolManager::tools
private

Definition at line 89 of file RegionToolManager.qo.h.


The documentation for this class was generated from the following file: