Hugintrunk
0.1
|
multi use list. More...
#include <ImagesList.h>
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 More... | |
virtual void | panoramaChanged (HuginBase::Panorama &pano) |
Notification about a Panorama change. More... | |
virtual void | CreateItem (unsigned int imgNr) |
create an list item for imgNr More... | |
virtual void | UpdateItem (unsigned int imgNr) |
update the information in an already existing list item More... | |
virtual void | UpdatePartNumbersForItem (unsigned int imgNr) |
Update the part numbers (e.g. More... | |
virtual void | RemoveItem (unsigned int imgNr) |
remove an existing list item More... | |
void | SelectSingleImage (unsigned int imgNr) |
Select an image. More... | |
void | SelectImageRange (unsigned int imgStart, unsigned int imgEnd) |
Select an image range. More... | |
void | SelectImages (const HuginBase::UIntSet imgs) |
selects the given images More... | |
void | SelectAll () |
Select all images. More... | |
void | DeselectAll () |
Deselects all images. More... | |
const HuginBase::UIntSet & | GetSelected () const |
get the currently selected images More... | |
Public Member Functions inherited from HuginBase::PanoramaObserver | |
virtual | ~PanoramaObserver () |
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 More... | |
Protected Attributes | |
HuginBase::Panorama * | pano |
HuginBase::StandardImageVariableGroups * | variable_groups |
HuginBase::UIntSet | selectedItems |
create icons for an image More... | |
wxImageList * | m_smallIcons |
int | m_iconHeight |
int | m_degDigits |
int | m_distDigits |
int | m_pixelDigits |
bool | m_notifyParents |
bool | m_singleSelect |
wxString | m_configClassName |
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()!
Definition at line 60 of file ImagesList.h.
ImagesList::ImagesList | ( | ) |
Definition at line 53 of file ImagesList.cpp.
|
virtual |
Definition at line 104 of file ImagesList.cpp.
References DEBUG_TRACE, pano, HuginBase::Panorama::removeObserver(), and variable_groups.
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") |
||
) |
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().
|
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 | ) |
Definition at line 90 of file ImagesList.cpp.
References HuginBase::Panorama::addObserver(), DEBUG_ASSERT, pano, and variable_groups.
Referenced by ImagesListMask::Init().
|
protected |
event handler to capture special key code
Definition at line 338 of file ImagesList.cpp.
References m_singleSelect, and SelectAll().
|
protected |
Definition at line 401 of file ImagesList.cpp.
References m_configClassName.
|
protected |
Definition at line 367 of file ImagesList.cpp.
References DEBUG_TRACE, m_notifyParents, and selectedItems.
|
protected |
Definition at line 325 of file ImagesList.cpp.
References DEBUG_TRACE, m_notifyParents, and selectedItems.
|
inlinevirtual |
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.
|
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, RemoveItem(), HuginBase::StandardImageVariableGroups::update(), UpdateItem(), UpdatePartNumbersForItem(), and variable_groups.
|
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 | ( | ) |
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().
|
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().
|
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().
|
protected |
Definition at line 160 of file ImagesList.h.
Referenced by ImagesListMask::Create(), and OnColumnWidthChange().
|
protected |
Definition at line 151 of file ImagesList.h.
Referenced by Create().
|
protected |
Definition at line 152 of file ImagesList.h.
Referenced by Create().
|
protected |
Definition at line 150 of file ImagesList.h.
Referenced by Create(), and panoramaImagesChanged().
|
protected |
Definition at line 156 of file ImagesList.h.
Referenced by Create(), OnItemDeselected(), OnItemSelected(), and panoramaImagesChanged().
|
protected |
Definition at line 153 of file ImagesList.h.
Referenced by Create().
|
protected |
Definition at line 157 of file ImagesList.h.
Referenced by Create(), OnChar(), and ImagesListMask::SetSingleSelect().
|
protected |
Definition at line 149 of file ImagesList.h.
|
protected |
Definition at line 129 of file ImagesList.h.
Referenced by Init(), ImagesListMask::UpdateItem(), and ~ImagesList().
|
protected |
create icons for an image
Definition at line 146 of file ImagesList.h.
Referenced by GetSelected(), OnItemDeselected(), OnItemSelected(), and SelectImages().
|
protected |
Definition at line 132 of file ImagesList.h.
Referenced by Init(), panoramaImagesChanged(), and ~ImagesList().