Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PreviewEditCPTool Class Reference

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

#include <PreviewEditCPTool.h>

Inheritance diagram for PreviewEditCPTool:
Inheritance graph

Public Member Functions

 PreviewEditCPTool (ToolHelper *helper)
 
void Activate ()
 activate the tool More...
 
void ReallyAfterDrawImagesEvent ()
 draw selection rectangle More...
 
void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 mouse move handling More...
 
void MouseButtonEvent (wxMouseEvent &e)
 mouse button handling More...
 
HuginBase::UIntSet GetFoundCPs ()
 return set of found control points More...
 
vigra::Rect2D GetSelectedROI ()
 returns selected ROI More...
 
void SetMenuProcessed ()
 reset popup menu status More...
 
- Public Member Functions inherited from Tool
 Tool (ToolHelper *helper)
 Construct keeping a pointer to a PreviewToolHelper. More...
 
virtual ~Tool ()
 
virtual void MouseWheelEvent (wxMouseEvent &e)
 Notify of a mouse wheel event on the panorama preview. More...
 
virtual void ImagesUnderMouseChangedEvent ()
 Notify when the images directly underneath the mouse pointer have changed. More...
 
virtual void KeypressEvent (int keycode, int modifiers, bool pressed)
 Notify of a Keypress event. More...
 
virtual void BeforeDrawImagesEvent ()
 Draw using OpenGL anything the tool requires underneath the images. More...
 
virtual void AfterDrawImagesEvent ()
 Draw (using OpenGL) images above the others. More...
 
virtual bool BeforeDrawImageEvent (unsigned int image)
 Draw what the tool requires just before a given image is drawn. More...
 
virtual void AfterDrawImageEvent (unsigned int image)
 Notification called just after the image was drawn normally. More...
 
virtual void MarkDirty ()
 

Private Member Functions

void AddLineCP (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
 called to add line control point More...
 
void FindCPInRect (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
 search for control points in selected rectangle More...
 

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from Tool
ToolHelperhelper
 The PreviewToolHelper that uses the same preview window and panorama as the tool should. More...
 

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)
inlineexplicit

Definition at line 46 of file PreviewEditCPTool.h.

Member Function Documentation

void PreviewEditCPTool::Activate ( )
virtual
void PreviewEditCPTool::AddLineCP ( const hugin_utils::FDiff2D pos1,
const hugin_utils::FDiff2D pos2 
)
private
void PreviewEditCPTool::FindCPInRect ( const hugin_utils::FDiff2D pos1,
const hugin_utils::FDiff2D pos2 
)
private
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 ( )
void PreviewEditCPTool::MouseButtonEvent ( wxMouseEvent &  e)
virtual
void PreviewEditCPTool::MouseMoveEvent ( double  x,
double  y,
wxMouseEvent &  e 
)
virtual
void PreviewEditCPTool::ReallyAfterDrawImagesEvent ( )
virtual

draw selection rectangle

Reimplemented from Tool.

Definition at line 58 of file PreviewEditCPTool.cpp.

References m_currentPos, m_currentPosScreen, m_line, 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 248 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 79 of file PreviewEditCPTool.h.

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

hugin_utils::FDiff2D PreviewEditCPTool::m_currentPos
private

current position of selection

Definition at line 75 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 77 of file PreviewEditCPTool.h.

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

bool PreviewEditCPTool::m_line
private

if selecting a rectangle or a line

Definition at line 81 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), 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 69 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and SetMenuProcessed().

bool PreviewEditCPTool::m_mouseDown
private

mouse down status

Definition at line 67 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 71 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 73 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().


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