Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PreviewColorPickerTool Class Reference

The PreviewColorPickerTool allows to select a region in the panorama which should be grey. More...

#include <PreviewColorPickerTool.h>

Inheritance diagram for PreviewColorPickerTool:
Inheritance graph

Public Member Functions

 PreviewColorPickerTool (PreviewToolHelper *helper)
 constructor
 
void Activate () override
 Switch on a tool.
 
void Deactivate () override
 Switch off a tool.
 
void MouseButtonEvent (wxMouseEvent &e) override
 process mouse button events
 
- 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 MouseMoveEvent (double x, double y, wxMouseEvent &e)
 Notify when the mouse pointer has moved over the panorama preview.
 
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 void ReallyAfterDrawImagesEvent ()
 Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
 
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 CalcCorrection (hugin_utils::FDiff2D pos)
 
void CalcCorrectionForImage (unsigned int i, vigra::Point2D pos)
 

Private Attributes

double m_red
 
double m_blue
 
unsigned int m_count
 

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

The PreviewColorPickerTool allows to select a region in the panorama which should be grey.

In the selected region it calculates the new red multiplier and blue multiplier to get a grey region.

Definition at line 36 of file PreviewColorPickerTool.h.

Constructor & Destructor Documentation

◆ PreviewColorPickerTool()

PreviewColorPickerTool::PreviewColorPickerTool ( PreviewToolHelper helper)
inlineexplicit

constructor

Definition at line 40 of file PreviewColorPickerTool.h.

Member Function Documentation

◆ Activate()

void PreviewColorPickerTool::Activate ( )
overridevirtual

Switch on a tool.

Inherited classes also register events they want to respond to with the PreviewToolHelper. As events are lost when the tool is deactivated without notification to the PreviewTool, things from the last activation can be cleaned up here too.

Implements Tool.

Definition at line 43 of file PreviewColorPickerTool.cpp.

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

◆ CalcCorrection()

void PreviewColorPickerTool::CalcCorrection ( hugin_utils::FDiff2D  pos)
private

◆ CalcCorrectionForImage()

void PreviewColorPickerTool::CalcCorrectionForImage ( unsigned int  i,
vigra::Point2D  pos 
)
private

◆ Deactivate()

void PreviewColorPickerTool::Deactivate ( )
overridevirtual

Switch off a tool.

Deactivation of all notifications is done automatically, it is not needed in these function.

Reimplemented from Tool.

Definition at line 50 of file PreviewColorPickerTool.cpp.

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

◆ MouseButtonEvent()

void PreviewColorPickerTool::MouseButtonEvent ( wxMouseEvent e)
overridevirtual

Member Data Documentation

◆ m_blue

double PreviewColorPickerTool::m_blue
private

◆ m_count

unsigned int PreviewColorPickerTool::m_count
private

◆ m_red

double PreviewColorPickerTool::m_red
private

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