PreviewCropTool Class Reference

Allow the user to change the cropping region by dragging it in the fast preview. More...

#include <PreviewCropTool.h>

Inheritance diagram for PreviewCropTool:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PreviewCropTool (PreviewToolHelper *helper)
void Activate ()
 Switch on a tool.
void ReallyAfterDrawImagesEvent ()
 Draw (using OpenGL) the overlays, e.g. crop highlights, guides.
void MouseMoveEvent (double x, double y, wxMouseEvent &e)
 Notify when the mouse pointer has moved over the panorama preview.
void MouseButtonEvent (wxMouseEvent &e)
 Notify of a mouse button press on the panorama preview.

Private Attributes

bool moving_left
bool moving_right
bool moving_top
bool moving_bottom
bool mouse_down
double top
double bottom
double left
double right
double start_drag_x
double start_drag_y
HuginBase::PanoramaOptions start_drag_options
HuginBase::PanoramaOptions opts
vigra::Rect2D new_roi

Detailed Description

Allow the user to change the cropping region by dragging it in the fast preview.

Definition at line 31 of file PreviewCropTool.h.


Constructor & Destructor Documentation

PreviewCropTool::PreviewCropTool PreviewToolHelper helper  ) 
 

Definition at line 39 of file PreviewCropTool.cpp.


Member Function Documentation

void PreviewCropTool::Activate  )  [virtual]
 

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 45 of file PreviewCropTool.cpp.

References mouse_down, moving_bottom, moving_left, moving_right, moving_top, ToolHelper::NotifyMe(), and ToolHelper::SetStatusMessage().

void PreviewCropTool::MouseButtonEvent wxMouseEvent &  e  )  [virtual]
 

Notify of a mouse button press on the panorama preview.

Parameters:
e The event created by wxWidgets.

Reimplemented from Tool.

Definition at line 233 of file PreviewCropTool.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), ViewState::GetOptions(), ToolHelper::GetPanoramaPtr(), HuginBase::PanoramaOptions::getROI(), VisualizationState::getViewState(), ToolHelper::GetVisualizationStatePtr(), mouse_down, moving_bottom, moving_left, moving_right, moving_top, new_roi, opts, start_drag_options, start_drag_x, and start_drag_y.

void PreviewCropTool::MouseMoveEvent double  x,
double  y,
wxMouseEvent &  e
[virtual]
 

Notify when the mouse pointer has moved over the panorama preview.

The coordinates are in the space of the panorama output at full size, with no output cropping.

Parameters:
x The horizontal position of the mouse pointer in panorama pixels.
y The vertical position of the mouse pointer in panorama pixels.
e The event created by wxWidgets.

Reimplemented from Tool.

Definition at line 117 of file PreviewCropTool.cpp.

References VisualizationState::ForceRequireRedraw(), HuginBase::PanoramaOptions::getROI(), VisualizationState::getViewState(), ToolHelper::GetVisualizationStatePtr(), moving_bottom, moving_left, moving_right, moving_top, new_roi, opts, VisualizationState::Redraw(), ViewState::SetOptions(), HuginBase::PanoramaOptions::setROI(), start_drag_options, start_drag_x, and start_drag_y.

void PreviewCropTool::ReallyAfterDrawImagesEvent  )  [virtual]
 

Draw (using OpenGL) the overlays, e.g. crop highlights, guides.

Reimplemented from Tool.

Definition at line 58 of file PreviewCropTool.cpp.

References bottom, TextureManager::DisableTexture(), ViewState::GetOptions(), HuginBase::PanoramaOptions::getROI(), ViewState::GetTextureManager(), VisualizationState::getViewState(), ToolHelper::GetViewStatePtr(), ToolHelper::GetVisualizationStatePtr(), left, new_roi, opts, right, ViewState::SetOptions(), HuginBase::PanoramaOptions::setROI(), and top.


Member Data Documentation

double PreviewCropTool::bottom [private]
 

Definition at line 41 of file PreviewCropTool.h.

Referenced by ReallyAfterDrawImagesEvent().

double PreviewCropTool::left [private]
 

Definition at line 41 of file PreviewCropTool.h.

Referenced by ReallyAfterDrawImagesEvent().

bool PreviewCropTool::mouse_down [private]
 

Definition at line 40 of file PreviewCropTool.h.

Referenced by Activate(), and MouseButtonEvent().

bool PreviewCropTool::moving_bottom [private]
 

Definition at line 40 of file PreviewCropTool.h.

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

bool PreviewCropTool::moving_left [private]
 

Definition at line 40 of file PreviewCropTool.h.

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

bool PreviewCropTool::moving_right [private]
 

Definition at line 40 of file PreviewCropTool.h.

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

bool PreviewCropTool::moving_top [private]
 

Definition at line 40 of file PreviewCropTool.h.

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

vigra::Rect2D PreviewCropTool::new_roi [private]
 

Definition at line 45 of file PreviewCropTool.h.

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

HuginBase::PanoramaOptions PreviewCropTool::opts [private]
 

Definition at line 43 of file PreviewCropTool.h.

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

double PreviewCropTool::right [private]
 

Definition at line 41 of file PreviewCropTool.h.

Referenced by ReallyAfterDrawImagesEvent().

HuginBase::PanoramaOptions PreviewCropTool::start_drag_options [private]
 

Definition at line 43 of file PreviewCropTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PreviewCropTool::start_drag_x [private]
 

Definition at line 42 of file PreviewCropTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PreviewCropTool::start_drag_y [private]
 

Definition at line 42 of file PreviewCropTool.h.

Referenced by MouseButtonEvent(), and MouseMoveEvent().

double PreviewCropTool::top [private]
 

Definition at line 41 of file PreviewCropTool.h.

Referenced by ReallyAfterDrawImagesEvent().


The documentation for this class was generated from the following files:
Generated on Thu Aug 28 01:25:47 2014 for Hugintrunk by  doxygen 1.3.9.1