ImagesList Class Reference

multi use list. More...

#include <ImagesList.h>

Inheritance diagram for ImagesList:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ImagesList ()
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 ~ImagesList (void)
void panoramaImagesChanged (PT::Panorama &pano, const PT::UIntSet &imgNr)
 receive the update signal and update display accordingly
virtual void CreateItem (unsigned int imgNr)
 create an list item for imgNr
virtual void UpdateItem (unsigned int imgNr)
 update the information in an already existing list item
virtual void UpdatePartNumbersForItem (unsigned int imgNr)
 Update the part numbers (e.g.
virtual void RemoveItem (unsigned int imgNr)
 remove an existing list item
void SelectSingleImage (unsigned int imgNr)
 Select an image.
void SelectImageRange (unsigned int imgStart, unsigned int imgEnd)
 Select an image range.
void SelectImages (const HuginBase::UIntSet imgs)
 selects the given images
void SelectAll ()
 Select all images.
void DeselectAll ()
 Deselects all images.
const UIntSetGetSelected () const
 get the currently selected images

Protected Member Functions

void OnItemSelected (wxListEvent &e)
void OnItemDeselected (wxListEvent &e)
void OnColumnWidthChange (wxListEvent &e)
void OnChar (wxKeyEvent &e)
 event handler to capture special key code

Protected Attributes

Panoramapano
HuginBase::StandardImageVariableGroupsvariable_groups
UIntSet selectedItems
 create icons for an image
wxImageList * m_smallIcons
int m_iconHeight
int m_degDigits
int m_distDigits
int m_pixelDigits
bool m_notifyParents
bool m_singleSelect
wxString m_configClassName

Detailed Description

multi use list.

This list shall contain the overall handling of datas in lists, moving selecting, drag'n drop

the special layouts are realized with subclasses and not implemented in the base class. Subclasses can override CreateItem(), UpdateItem() and RemoveItem() to customize the layout.

They can also handle the list events, for example if they want to veto a selection.

parent controls can use EVT_LIST_ITEM_SELECTED(id, func) EVT_LIST_ITEM_DESELECTED(id, func) to get notified when the selection changes. WARNING: Do not read the event in the parent control, just use GetSelected()!

Todo:
make the listcontents editable -> wxListCtrl->wxGrid?

Definition at line 72 of file ImagesList.h.


Constructor & Destructor Documentation

ImagesList::ImagesList  ) 
 

Definition at line 66 of file ImagesList.cpp.

ImagesList::~ImagesList void   )  [virtual]
 

Definition at line 117 of file ImagesList.cpp.

References DEBUG_TRACE, pano, and HuginBase::Panorama::removeObserver().


Member Function Documentation

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

Reimplemented in ImagesListMask.

Definition at line 71 of file ImagesList.cpp.

References DEBUG_DEBUG, DEBUG_TRACE, m_degDigits, m_distDigits, m_iconHeight, m_notifyParents, m_pixelDigits, and m_singleSelect.

Referenced by ImagesListMask::Create().

void ImagesList::CreateItem unsigned int  imgNr  )  [virtual]
 

create an list item for imgNr

This creates the list item and calles UpdateItem(imgNr) to fill it with information usually, just UpdateItem needs to be overridden by base classes

Definition at line 251 of file ImagesList.cpp.

References DEBUG_DEBUG, and UpdateItem().

Referenced by panoramaImagesChanged(), and ImagesListMask::SetSingleSelect().

void ImagesList::DeselectAll  ) 
 

Deselects all images.

Definition at line 327 of file ImagesList.cpp.

const UIntSet & ImagesList::GetSelected  )  const
 

get the currently selected images

Definition at line 194 of file ImagesList.cpp.

Referenced by MaskEditorPanel::OnImageSelect().

void ImagesList::Init PT::Panorama panorama  ) 
 

Reimplemented in ImagesListMask.

Definition at line 103 of file ImagesList.cpp.

References HuginBase::Panorama::addObserver(), DEBUG_ASSERT, pano, and variable_groups.

Referenced by ImagesListMask::Init().

void ImagesList::OnChar wxKeyEvent &  e  )  [protected]
 

event handler to capture special key code

Definition at line 351 of file ImagesList.cpp.

References m_singleSelect, and SelectAll().

void ImagesList::OnColumnWidthChange wxListEvent &  e  )  [protected]
 

Definition at line 414 of file ImagesList.cpp.

References m_configClassName.

void ImagesList::OnItemDeselected wxListEvent &  e  )  [protected]
 

Definition at line 380 of file ImagesList.cpp.

References DEBUG_TRACE, and selectedItems.

void ImagesList::OnItemSelected wxListEvent &  e  )  [protected]
 

Definition at line 338 of file ImagesList.cpp.

References DEBUG_TRACE, and selectedItems.

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

receive the update signal and update display accordingly

Definition at line 124 of file ImagesList.cpp.

References CreateItem(), DEBUG_DEBUG, DEBUG_TRACE, HuginBase::Panorama::getNrOfImages(), m_iconHeight, m_notifyParents, RemoveItem(), HuginBase::StandardImageVariableGroups::update(), UpdateItem(), UpdatePartNumbersForItem(), and variable_groups.

void ImagesList::RemoveItem unsigned int  imgNr  )  [virtual]
 

remove an existing list item

just calles wxListCtrl::DeleteItem, but might be overriden to release ressources associated with the item

Definition at line 259 of file ImagesList.cpp.

Referenced by panoramaImagesChanged().

void ImagesList::SelectAll  ) 
 

Select all images.

Definition at line 318 of file ImagesList.cpp.

Referenced by OnChar().

void ImagesList::SelectImageRange unsigned int  imgStart,
unsigned int  imgEnd
 

Select an image range.

selects images between imgNs and imgNe, and deselects all other images

Definition at line 294 of file ImagesList.cpp.

void ImagesList::SelectImages const HuginBase::UIntSet  imgs  ) 
 

selects the given images

Definition at line 277 of file ImagesList.cpp.

References selectedItems, and set_contains().

Referenced by ImagesListMask::SetSingleSelect().

void ImagesList::SelectSingleImage unsigned int  imgNr  ) 
 

Select an image.

selects image imgNr, and deselects all other images

Definition at line 265 of file ImagesList.cpp.

Referenced by MaskEditorPanel::OnModeChanged(), and MaskEditorPanel::setImage().

void ImagesList::UpdateItem unsigned int  imgNr  )  [virtual]
 

update the information in an already existing list item

Reimplemented in ImagesListMask.

Definition at line 423 of file ImagesList.cpp.

Referenced by CreateItem(), and panoramaImagesChanged().

void ImagesList::UpdatePartNumbersForItem unsigned int  imgNr  )  [virtual]
 

Update the part numbers (e.g.

Lens number) in an already existing list item.

Needed as the part numbers can change without the rest of the image

Definition at line 428 of file ImagesList.cpp.

Referenced by panoramaImagesChanged().


Member Data Documentation

wxString ImagesList::m_configClassName [protected]
 

Definition at line 171 of file ImagesList.h.

Referenced by OnColumnWidthChange().

int ImagesList::m_degDigits [protected]
 

Definition at line 162 of file ImagesList.h.

Referenced by Create().

int ImagesList::m_distDigits [protected]
 

Definition at line 163 of file ImagesList.h.

Referenced by Create().

int ImagesList::m_iconHeight [protected]
 

Definition at line 161 of file ImagesList.h.

Referenced by Create(), and panoramaImagesChanged().

bool ImagesList::m_notifyParents [protected]
 

Definition at line 167 of file ImagesList.h.

Referenced by Create(), and panoramaImagesChanged().

int ImagesList::m_pixelDigits [protected]
 

Definition at line 164 of file ImagesList.h.

Referenced by Create().

bool ImagesList::m_singleSelect [protected]
 

Definition at line 168 of file ImagesList.h.

Referenced by Create(), and OnChar().

wxImageList* ImagesList::m_smallIcons [protected]
 

Definition at line 160 of file ImagesList.h.

Panorama* ImagesList::pano [protected]
 

Definition at line 140 of file ImagesList.h.

Referenced by Init(), and ~ImagesList().

UIntSet ImagesList::selectedItems [protected]
 

create icons for an image

Definition at line 157 of file ImagesList.h.

Referenced by OnItemDeselected(), OnItemSelected(), and SelectImages().

HuginBase::StandardImageVariableGroups* ImagesList::variable_groups [protected]
 

Definition at line 143 of file ImagesList.h.

Referenced by Init(), and panoramaImagesChanged().


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