CropPanel Class Reference

adjustment dialog More...

#include <CropPanel.h>

Inheritance diagram for CropPanel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CropPanel ()
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL, const wxString &name=wxT("panel"))
void Init (PT::Panorama *pano)
virtual ~CropPanel (void)
void panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet &imgNr)
void CropChanged (vigra::Rect2D &crop, bool dragging)

Protected Member Functions

void Pano2Display (int imgNr)
void Display2Pano ()
void UpdateDisplay ()
 update GUI display
void ListSelectionChanged (wxListEvent &e)
 catches changes to the list selection
void OnAsyncLoad (ImageCache::EntryPtr entry, std::string filename, bool load_small)
void OnResetButton (wxCommandEvent &e)
void OnSetLeft (wxCommandEvent &e)
void OnSetRight (wxCommandEvent &e)
void OnSetTop (wxCommandEvent &e)
void OnSetBottom (wxCommandEvent &e)
void OnAutoCenter (wxCommandEvent &e)
void CenterCrop ()

Protected Attributes

wxTextCtrl * m_left_textctrl
wxTextCtrl * m_right_textctrl
wxTextCtrl * m_top_textctrl
wxTextCtrl * m_bottom_textctrl
wxCheckBox * m_autocenter_cb

Private Attributes

Panorama * m_pano
CenterCanvasm_Canvas
ImagesListCropm_imagesList
UIntSet m_selectedImages
std::string m_currentImageFile
ImageCache::RequestPtr m_imageRequest
ImageCache::EntryPtr m_transparentImage
 Place holder for the image.
std::string m_transparentFilename
 File name for m_transparentImage.
HuginBase::SrcPanoImage::CropMode m_cropMode
vigra::Rect2D m_cropRect
bool m_autoCenterCrop
vigra::Point2D m_center

Detailed Description

adjustment dialog

Definition at line 35 of file CropPanel.h.


Constructor & Destructor Documentation

CropPanel::ListSelectionChanged CropPanel::OnSetRight CropPanel::OnSetBottom CropPanel::OnAutoCenter CropPanel::CropPanel  ) 
 

Definition at line 65 of file CropPanel.cpp.

CropPanel::~CropPanel void   )  [virtual]
 

Definition at line 135 of file CropPanel.cpp.

References DEBUG_TRACE, m_bottom_textctrl, m_left_textctrl, m_pano, m_right_textctrl, m_top_textctrl, and HuginBase::Panorama::removeObserver().


Member Function Documentation

void CropPanel::CenterCrop  )  [protected]
 

Definition at line 371 of file CropPanel.cpp.

References m_center, and m_cropRect.

Referenced by CropChanged(), OnAutoCenter(), OnSetBottom(), OnSetLeft(), OnSetRight(), and OnSetTop().

bool CropPanel::Create wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxT("panel")
 

Definition at line 71 of file CropPanel.cpp.

References DEBUG_ASSERT, DEBUG_TRACE, huginApp::Get(), huginApp::GetXRCPath(), m_autocenter_cb, m_bottom_textctrl, m_Canvas, m_imagesList, m_left_textctrl, m_right_textctrl, m_top_textctrl, m_transparentFilename, m_transparentImage, and makefile::string.

Referenced by CenterCanvasXmlHandler::DoCreateResource(), and CenterCanvas::DrawView().

void CropPanel::CropChanged vigra::Rect2D &  crop,
bool  dragging
 

Definition at line 353 of file CropPanel.cpp.

References CenterCrop(), Display2Pano(), m_bottom_textctrl, m_cropRect, m_left_textctrl, m_right_textctrl, m_top_textctrl, and UpdateDisplay().

Referenced by CenterCanvas::UpdateCropCircle().

void CropPanel::Display2Pano  )  [protected]
 

Definition at line 235 of file CropPanel.cpp.

References CommandHistory::addCommand(), GlobalCmdHist::getInstance(), HuginBase::Panorama::getSrcImage(), m_autoCenterCrop, m_cropRect, m_pano, m_selectedImages, HuginBase::BaseSrcPanoImage::setAutoCenterCrop(), and HuginBase::BaseSrcPanoImage::setCropRect().

Referenced by CropChanged(), OnAutoCenter(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), and OnSetTop().

void CropPanel::Init PT::Panorama pano  ) 
 

Definition at line 124 of file CropPanel.cpp.

References HuginBase::Panorama::addObserver(), CenterCanvas::Init(), ImagesListCrop::Init(), m_Canvas, m_imagesList, and m_pano.

void CropPanel::ListSelectionChanged wxListEvent &  e  )  [protected]
 

catches changes to the list selection

Definition at line 146 of file CropPanel.cpp.

References DEBUG_DEBUG, DEBUG_TRACE, ImagesList::GetSelected(), m_bottom_textctrl, m_imagesList, m_left_textctrl, m_right_textctrl, m_selectedImages, m_top_textctrl, and Pano2Display().

void CropPanel::OnAsyncLoad ImageCache::EntryPtr  entry,
std::string  filename,
bool  load_small
[protected]
 

Definition at line 224 of file CropPanel.cpp.

References m_Canvas, m_currentImageFile, and CenterCanvas::SetImage().

Referenced by Pano2Display().

void CropPanel::OnAutoCenter wxCommandEvent &  e  )  [protected]
 

Definition at line 342 of file CropPanel.cpp.

References CenterCrop(), Display2Pano(), m_autoCenterCrop, and UpdateDisplay().

void CropPanel::OnResetButton wxCommandEvent &  e  )  [protected]
 

Definition at line 331 of file CropPanel.cpp.

References Display2Pano(), m_autoCenterCrop, m_cropMode, m_cropRect, and UpdateDisplay().

void CropPanel::OnSetBottom wxCommandEvent &  e  )  [protected]
 

Definition at line 283 of file CropPanel.cpp.

References CenterCrop(), DEBUG_DEBUG, Display2Pano(), m_bottom_textctrl, m_cropRect, and UpdateDisplay().

void CropPanel::OnSetLeft wxCommandEvent &  e  )  [protected]
 

Definition at line 299 of file CropPanel.cpp.

References CenterCrop(), DEBUG_DEBUG, Display2Pano(), m_cropRect, m_left_textctrl, and UpdateDisplay().

void CropPanel::OnSetRight wxCommandEvent &  e  )  [protected]
 

Definition at line 315 of file CropPanel.cpp.

References CenterCrop(), DEBUG_DEBUG, Display2Pano(), m_cropRect, m_right_textctrl, and UpdateDisplay().

void CropPanel::OnSetTop wxCommandEvent &  e  )  [protected]
 

Definition at line 267 of file CropPanel.cpp.

References CenterCrop(), DEBUG_DEBUG, Display2Pano(), m_cropRect, m_top_textctrl, and UpdateDisplay().

void CropPanel::Pano2Display int  imgNr  )  [protected]
 

Definition at line 185 of file CropPanel.cpp.

References HuginBase::Panorama::getImage(), m_autoCenterCrop, m_Canvas, m_center, m_cropMode, m_cropRect, m_currentImageFile, m_imageRequest, m_pano, m_transparentImage, OnAsyncLoad(), hugin_utils::roundi(), CenterCanvas::SetImage(), and UpdateDisplay().

Referenced by ListSelectionChanged(), and panoramaImagesChanged().

void CropPanel::panoramaImagesChanged PT::Panorama pano,
const PT::UIntSet imgNr
 

Definition at line 166 of file CropPanel.cpp.

References ImagesList::GetSelected(), m_Canvas, m_currentImageFile, m_imagesList, m_selectedImages, m_transparentImage, Pano2Display(), ImagesList::panoramaImagesChanged(), set_contains(), CenterCanvas::SetImage(), and UpdateDisplay().

void CropPanel::UpdateDisplay  )  [protected]
 

update GUI display

Definition at line 254 of file CropPanel.cpp.

References DEBUG_TRACE, m_autocenter_cb, m_autoCenterCrop, m_bottom_textctrl, m_Canvas, m_center, m_cropMode, m_cropRect, m_left_textctrl, m_right_textctrl, m_top_textctrl, and CenterCanvas::UpdateDisplay().

Referenced by CropChanged(), OnAutoCenter(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), OnSetTop(), Pano2Display(), and panoramaImagesChanged().


Member Data Documentation

wxCheckBox* CropPanel::m_autocenter_cb [protected]
 

Definition at line 87 of file CropPanel.h.

Referenced by Create(), and UpdateDisplay().

bool CropPanel::m_autoCenterCrop [private]
 

Definition at line 108 of file CropPanel.h.

Referenced by Display2Pano(), OnAutoCenter(), OnResetButton(), Pano2Display(), and UpdateDisplay().

wxTextCtrl* CropPanel::m_bottom_textctrl [protected]
 

Definition at line 86 of file CropPanel.h.

Referenced by Create(), CropChanged(), ListSelectionChanged(), OnSetBottom(), UpdateDisplay(), and ~CropPanel().

CenterCanvas* CropPanel::m_Canvas [private]
 

Definition at line 93 of file CropPanel.h.

Referenced by Create(), Init(), OnAsyncLoad(), Pano2Display(), panoramaImagesChanged(), and UpdateDisplay().

vigra::Point2D CropPanel::m_center [private]
 

Definition at line 109 of file CropPanel.h.

Referenced by CenterCrop(), Pano2Display(), and UpdateDisplay().

HuginBase::SrcPanoImage::CropMode CropPanel::m_cropMode [private]
 

Definition at line 106 of file CropPanel.h.

Referenced by OnResetButton(), Pano2Display(), and UpdateDisplay().

vigra::Rect2D CropPanel::m_cropRect [private]
 

Definition at line 107 of file CropPanel.h.

Referenced by CenterCrop(), CropChanged(), Display2Pano(), OnResetButton(), OnSetBottom(), OnSetLeft(), OnSetRight(), OnSetTop(), Pano2Display(), and UpdateDisplay().

std::string CropPanel::m_currentImageFile [private]
 

Definition at line 97 of file CropPanel.h.

Referenced by OnAsyncLoad(), Pano2Display(), and panoramaImagesChanged().

ImageCache::RequestPtr CropPanel::m_imageRequest [private]
 

Definition at line 98 of file CropPanel.h.

Referenced by Pano2Display().

ImagesListCrop* CropPanel::m_imagesList [private]
 

Definition at line 94 of file CropPanel.h.

Referenced by Create(), Init(), ListSelectionChanged(), and panoramaImagesChanged().

wxTextCtrl* CropPanel::m_left_textctrl [protected]
 

Definition at line 83 of file CropPanel.h.

Referenced by Create(), CropChanged(), ListSelectionChanged(), OnSetLeft(), UpdateDisplay(), and ~CropPanel().

Panorama* CropPanel::m_pano [private]
 

Definition at line 91 of file CropPanel.h.

Referenced by Display2Pano(), Init(), Pano2Display(), and ~CropPanel().

wxTextCtrl* CropPanel::m_right_textctrl [protected]
 

Definition at line 84 of file CropPanel.h.

Referenced by Create(), CropChanged(), ListSelectionChanged(), OnSetRight(), UpdateDisplay(), and ~CropPanel().

UIntSet CropPanel::m_selectedImages [private]
 

Definition at line 96 of file CropPanel.h.

Referenced by Display2Pano(), ListSelectionChanged(), and panoramaImagesChanged().

wxTextCtrl* CropPanel::m_top_textctrl [protected]
 

Definition at line 85 of file CropPanel.h.

Referenced by Create(), CropChanged(), ListSelectionChanged(), OnSetTop(), UpdateDisplay(), and ~CropPanel().

std::string CropPanel::m_transparentFilename [private]
 

File name for m_transparentImage.

Definition at line 104 of file CropPanel.h.

Referenced by Create().

ImageCache::EntryPtr CropPanel::m_transparentImage [private]
 

Place holder for the image.

Used when no image is selected, or we are waiting for an image to load.

Definition at line 102 of file CropPanel.h.

Referenced by Create(), Pano2Display(), and panoramaImagesChanged().


The documentation for this class was generated from the following files:
Generated on Wed Jul 25 01:01:55 2012 for Hugintrunk by  doxygen 1.3.9.1