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 (HuginBase::Panorama *pano)
virtual ~ImagesList (void)
virtual void panoramaImagesChanged (HuginBase::Panorama &pano, const HuginBase::UIntSet &imgNr)
 receive the update signal and update display accordingly
virtual void panoramaChanged (HuginBase::Panorama &pano)
 Notification about a Panorama change.
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 HuginBase::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

HuginBase::Panoramapano
HuginBase::StandardImageVariableGroupsvariable_groups
HuginBase::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 60 of file ImagesList.h.


Constructor & Destructor Documentation

ImagesList::ImagesList (  ) 

Definition at line 53 of file ImagesList.cpp.

ImagesList::~ImagesList ( void   )  [virtual]

Definition at line 104 of file ImagesList.cpp.

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


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 58 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 238 of file ImagesList.cpp.

References DEBUG_DEBUG, and UpdateItem().

Referenced by panoramaImagesChanged().

void ImagesList::DeselectAll (  ) 

Deselects all images.

Definition at line 314 of file ImagesList.cpp.

const HuginBase::UIntSet & ImagesList::GetSelected (  )  const

get the currently selected images

Definition at line 181 of file ImagesList.cpp.

References selectedItems.

Referenced by MaskEditorPanel::OnImageSelect().

void ImagesList::Init ( HuginBase::Panorama pano  ) 

Reimplemented in ImagesListMask.

Definition at line 90 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 338 of file ImagesList.cpp.

References m_singleSelect, and SelectAll().

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

Definition at line 401 of file ImagesList.cpp.

References m_configClassName.

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

Definition at line 367 of file ImagesList.cpp.

References DEBUG_TRACE, m_notifyParents, and selectedItems.

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

Definition at line 325 of file ImagesList.cpp.

References DEBUG_TRACE, m_notifyParents, and selectedItems.

virtual void ImagesList::panoramaChanged ( HuginBase::Panorama pano  )  [inline, virtual]

Notification about a Panorama change.

This function will always be called, even when the change could be handled by panoramaImageAdded() or other notify functions.

This allows lazy observers to just listen to panoramaChanged().

Implements HuginBase::PanoramaObserver.

Definition at line 74 of file ImagesList.h.

void ImagesList::panoramaImagesChanged ( HuginBase::Panorama pano,
const HuginBase::UIntSet imgNr 
) [virtual]

receive the update signal and update display accordingly

Implements HuginBase::PanoramaObserver.

Definition at line 111 of file ImagesList.cpp.

References CreateItem(), DEBUG_DEBUG, DEBUG_TRACE, HuginBase::Panorama::getNrOfImages(), m_iconHeight, m_notifyParents, pano, 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 246 of file ImagesList.cpp.

Referenced by panoramaImagesChanged().

void ImagesList::SelectAll (  ) 

Select all images.

Definition at line 305 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 281 of file ImagesList.cpp.

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

selects the given images

Definition at line 264 of file ImagesList.cpp.

References selectedItems, and set_contains().

void ImagesList::SelectSingleImage ( unsigned int  imgNr  ) 

Select an image.

selects image imgNr, and deselects all other images

Definition at line 252 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 410 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 415 of file ImagesList.cpp.

Referenced by panoramaImagesChanged().


Member Data Documentation

wxString ImagesList::m_configClassName [protected]

Definition at line 160 of file ImagesList.h.

Referenced by ImagesListMask::Create(), and OnColumnWidthChange().

int ImagesList::m_degDigits [protected]

Definition at line 151 of file ImagesList.h.

Referenced by Create().

int ImagesList::m_distDigits [protected]

Definition at line 152 of file ImagesList.h.

Referenced by Create().

int ImagesList::m_iconHeight [protected]

Definition at line 150 of file ImagesList.h.

Referenced by Create(), and panoramaImagesChanged().

bool ImagesList::m_notifyParents [protected]

Definition at line 156 of file ImagesList.h.

Referenced by Create(), OnItemDeselected(), OnItemSelected(), and panoramaImagesChanged().

int ImagesList::m_pixelDigits [protected]

Definition at line 153 of file ImagesList.h.

Referenced by Create().

bool ImagesList::m_singleSelect [protected]

Definition at line 157 of file ImagesList.h.

Referenced by Create(), OnChar(), and ImagesListMask::SetSingleSelect().

wxImageList* ImagesList::m_smallIcons [protected]

Definition at line 149 of file ImagesList.h.

HuginBase::Panorama* ImagesList::pano [protected]

Definition at line 129 of file ImagesList.h.

Referenced by Init(), panoramaImagesChanged(), ImagesListMask::UpdateItem(), and ~ImagesList().

HuginBase::UIntSet ImagesList::selectedItems [protected]

create icons for an image

Definition at line 146 of file ImagesList.h.

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

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

Definition at line 132 of file ImagesList.h.

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


The documentation for this class was generated from the following files:
Generated on 27 Aug 2016 for Hugintrunk by  doxygen 1.4.7