PreviewEditCPTool Class Reference

Tool to delete all cp in a selected rectangle. More...

#include <PreviewEditCPTool.h>

Inheritance diagram for PreviewEditCPTool:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PreviewEditCPTool (ToolHelper *helper)
void Activate ()
 activate the tool
void ReallyAfterDrawImagesEvent ()
 draw selection rectangle
void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 mouse move handling
void MouseButtonEvent (wxMouseEvent &e)
 mouse button handling
HuginBase::UIntSet GetFoundCPs ()
 return set of found control points
vigra::Rect2D GetSelectedROI ()
 returns selected ROI
void SetMenuProcessed ()
 reset popup menu status

Private Member Functions

void FindCPInRect (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
 search for control points in selected rectangle

Private Attributes

bool m_mouseDown
 mouse down status
bool m_menuPopup
 true, when popup menu is shown, this is to ignore a mouse event when the popup menu is closed
hugin_utils::FDiff2D m_startPos
 position where the marking starts
hugin_utils::FDiff2D m_startPosScreen
 position where the marking starts in screen coordinates
hugin_utils::FDiff2D m_currentPos
 current position of selection
hugin_utils::FDiff2D m_currentPosScreen
 current position of selection in screen coordinates
HuginBase::UIntSet m_CPinROI
 contains the found cp

Detailed Description

Tool to delete all cp in a selected rectangle.

Definition at line 43 of file PreviewEditCPTool.h.


Constructor & Destructor Documentation

PreviewEditCPTool::PreviewEditCPTool ( ToolHelper helper  )  [inline, explicit]

Definition at line 46 of file PreviewEditCPTool.h.


Member Function Documentation

void PreviewEditCPTool::Activate (  )  [virtual]

activate the tool

Implements Tool.

Definition at line 46 of file PreviewEditCPTool.cpp.

References Tool::helper, m_mouseDown, ToolHelper::MOUSE_MOVE, ToolHelper::MOUSE_PRESS, ToolHelper::NotifyMe(), ToolHelper::REALLY_DRAW_OVER_IMAGES, and ToolHelper::SetStatusMessage().

void PreviewEditCPTool::FindCPInRect ( const hugin_utils::FDiff2D pos1,
const hugin_utils::FDiff2D pos2 
) [private]

search for control points in selected rectangle

Definition at line 167 of file PreviewEditCPTool.cpp.

References HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getCtrlPoints(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), Tool::helper, m_CPinROI, set_contains(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by MouseButtonEvent().

HuginBase::UIntSet PreviewEditCPTool::GetFoundCPs (  )  [inline]

return set of found control points

Definition at line 56 of file PreviewEditCPTool.h.

References m_CPinROI.

Referenced by GLPreviewFrame::OnRemoveCP().

vigra::Rect2D PreviewEditCPTool::GetSelectedROI (  ) 

returns selected ROI

Definition at line 213 of file PreviewEditCPTool.cpp.

References HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), Tool::helper, m_currentPos, m_startPos, celeste::max(), celeste::min(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by MouseButtonEvent(), and GLPreviewFrame::OnCreateCP().

void PreviewEditCPTool::MouseButtonEvent ( wxMouseEvent &  e  )  [virtual]

mouse button handling

Reimplemented from Tool.

Definition at line 100 of file PreviewEditCPTool.cpp.

References FindCPInRect(), VisualizationState::ForceRequireRedraw(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetMouseScreenPosition(), ToolHelper::GetPreviewFrame(), GetSelectedROI(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, ID_CREATE_CP, ID_REMOVE_CP, m_CPinROI, m_currentPos, m_currentPosScreen, m_menuPopup, m_mouseDown, m_startPos, m_startPosScreen, VisualizationState::Redraw(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

void PreviewEditCPTool::MouseMoveEvent ( double  x,
double  y,
wxMouseEvent &  e 
) [virtual]

mouse move handling

Reimplemented from Tool.

Definition at line 87 of file PreviewEditCPTool.cpp.

References VisualizationState::ForceRequireRedraw(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetMouseScreenPosition(), ToolHelper::GetVisualizationStatePtr(), Tool::helper, m_currentPos, m_currentPosScreen, m_mouseDown, and VisualizationState::Redraw().

void PreviewEditCPTool::ReallyAfterDrawImagesEvent (  )  [virtual]

draw selection rectangle

Reimplemented from Tool.

Definition at line 56 of file PreviewEditCPTool.cpp.

References m_currentPos, m_currentPosScreen, m_mouseDown, m_startPos, m_startPosScreen, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

void PreviewEditCPTool::SetMenuProcessed (  ) 

reset popup menu status

Definition at line 227 of file PreviewEditCPTool.cpp.

References m_menuPopup.

Referenced by GLPreviewFrame::OnCreateCP(), and GLPreviewFrame::OnRemoveCP().


Member Data Documentation

HuginBase::UIntSet PreviewEditCPTool::m_CPinROI [private]

contains the found cp

Definition at line 77 of file PreviewEditCPTool.h.

Referenced by FindCPInRect(), GetFoundCPs(), and MouseButtonEvent().

hugin_utils::FDiff2D PreviewEditCPTool::m_currentPos [private]

current position of selection

Definition at line 73 of file PreviewEditCPTool.h.

Referenced by GetSelectedROI(), MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().

hugin_utils::FDiff2D PreviewEditCPTool::m_currentPosScreen [private]

current position of selection in screen coordinates

Definition at line 75 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().

bool PreviewEditCPTool::m_menuPopup [private]

true, when popup menu is shown, this is to ignore a mouse event when the popup menu is closed

Definition at line 67 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and SetMenuProcessed().

bool PreviewEditCPTool::m_mouseDown [private]

mouse down status

Definition at line 65 of file PreviewEditCPTool.h.

Referenced by Activate(), MouseButtonEvent(), MouseMoveEvent(), and ReallyAfterDrawImagesEvent().

hugin_utils::FDiff2D PreviewEditCPTool::m_startPos [private]

position where the marking starts

Definition at line 69 of file PreviewEditCPTool.h.

Referenced by GetSelectedROI(), MouseButtonEvent(), and ReallyAfterDrawImagesEvent().

hugin_utils::FDiff2D PreviewEditCPTool::m_startPosScreen [private]

position where the marking starts in screen coordinates

Definition at line 71 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().


The documentation for this class was generated from the following files:
Generated on 26 Apr 2018 for Hugintrunk by  doxygen 1.4.7