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

Private Member Functions

void AddLineCP (const hugin_utils::FDiff2D &pos1, const hugin_utils::FDiff2D &pos2)
 called to add line control point
 
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
 
bool m_line
 if selecting a rectangle or a line
 

Additional Inherited Members

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

Detailed Description

Tool to delete all cp in a selected rectangle.

Definition at line 43 of file PreviewEditCPTool.h.

Constructor & Destructor Documentation

◆ PreviewEditCPTool()

PreviewEditCPTool::PreviewEditCPTool ( PreviewToolHelper helper)
inlineexplicit

Definition at line 46 of file PreviewEditCPTool.h.

Member Function Documentation

◆ Activate()

void PreviewEditCPTool::Activate ( )
overridevirtual

◆ AddLineCP()

void PreviewEditCPTool::AddLineCP ( const hugin_utils::FDiff2D pos1,
const hugin_utils::FDiff2D pos2 
)
private

◆ Deactivate()

void PreviewEditCPTool::Deactivate ( )
overridevirtual

deactivate the tool, reset the cursor

Reimplemented from Tool.

Definition at line 60 of file PreviewEditCPTool.cpp.

References GLPreviewFrame::getPreview(), ToolHelper::GetPreviewFrame(), Tool::helper, and threshold().

◆ FindCPInRect()

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

◆ GetFoundCPs()

HuginBase::UIntSet PreviewEditCPTool::GetFoundCPs ( )
inline

return set of found control points

Definition at line 58 of file PreviewEditCPTool.h.

References m_CPinROI.

Referenced by GLPreviewFrame::OnRemoveCP().

◆ GetSelectedROI()

vigra::Rect2D PreviewEditCPTool::GetSelectedROI ( )

◆ MouseButtonEvent()

void PreviewEditCPTool::MouseButtonEvent ( wxMouseEvent e)
overridevirtual

◆ MouseMoveEvent()

void PreviewEditCPTool::MouseMoveEvent ( double  x,
double  y,
wxMouseEvent e 
)
overridevirtual

◆ ReallyAfterDrawImagesEvent()

void PreviewEditCPTool::ReallyAfterDrawImagesEvent ( )
overridevirtual

◆ SetMenuProcessed()

void PreviewEditCPTool::SetMenuProcessed ( )

reset popup menu status

Definition at line 257 of file PreviewEditCPTool.cpp.

References m_menuPopup.

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

Member Data Documentation

◆ m_CPinROI

HuginBase::UIntSet PreviewEditCPTool::m_CPinROI
private

contains the found cp

Definition at line 81 of file PreviewEditCPTool.h.

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

◆ m_currentPos

hugin_utils::FDiff2D PreviewEditCPTool::m_currentPos
private

current position of selection

Definition at line 77 of file PreviewEditCPTool.h.

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

◆ m_currentPosScreen

hugin_utils::FDiff2D PreviewEditCPTool::m_currentPosScreen
private

current position of selection in screen coordinates

Definition at line 79 of file PreviewEditCPTool.h.

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

◆ m_line

bool PreviewEditCPTool::m_line
private

if selecting a rectangle or a line

Definition at line 83 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().

◆ m_menuPopup

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 71 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and SetMenuProcessed().

◆ m_mouseDown

bool PreviewEditCPTool::m_mouseDown
private

mouse down status

Definition at line 69 of file PreviewEditCPTool.h.

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

◆ m_startPos

hugin_utils::FDiff2D PreviewEditCPTool::m_startPos
private

position where the marking starts

Definition at line 73 of file PreviewEditCPTool.h.

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

◆ m_startPosScreen

hugin_utils::FDiff2D PreviewEditCPTool::m_startPosScreen
private

position where the marking starts in screen coordinates

Definition at line 75 of file PreviewEditCPTool.h.

Referenced by MouseButtonEvent(), and ReallyAfterDrawImagesEvent().


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