Hugintrunk
0.1
|
Dialog for browsing pto files. More...
#include <BrowseDialog.h>
Public Member Functions | |
BrowsePTOFilesDialog (wxWindow *parent, const wxString startDirectory) | |
Constructor, read from xrc ressource; restore last uses settings and position. More... | |
~BrowsePTOFilesDialog () | |
destructor, saves position More... | |
wxString | GetSelectedProject () |
return full path of selected project More... | |
wxString | GetSelectedPath () |
return last selected path More... | |
Protected Member Functions | |
void | OnOk (wxCommandEvent &e) |
Saves current expression when closing dialog with Ok. More... | |
void | OnDirectoryChanged (wxTreeEvent &e) |
directory changed, load files from new directory More... | |
void | OnFileChanged (wxListEvent &e) |
new file selected, generate preview for new file More... | |
void | OnDblClickListCtrl (wxMouseEvent &e) |
double click does open file More... | |
void | OnListColClick (wxListEvent &e) |
click on header to sort by column More... | |
void | OnThumbnailUpdate (wxCommandEvent &e) |
for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in event.GetEventObject() More... | |
void | OnListTypeChanged (wxCommandEvent &e) |
Change display of wxListCtrl. More... | |
void | OnShowOnMap (wxCommandEvent &e) |
show current pano on Openstreetmap More... | |
Private Member Functions | |
long | TranslateIndex (const long index) |
translate the index to the index of m_ptoInfo More... | |
void | SortItems () |
sort the items according to selected column More... | |
void | EndThumbnailThread () |
end background thumbnail creating thread More... | |
PanoInfo | ParsePTOFile (const wxFileName file) |
read the given pto file and add all information to wxListCtrl More... | |
void | FillPanoInfo (const PanoInfo &info, long index) |
add a new item to wxListCtrl and populate all columns More... | |
void | UpdateItemTexts (long newStyle) |
update all item texts More... | |
void | UpdateImagesIndex () |
update the image indexes More... | |
void | GeneratePreview (int index) |
generate preview for pto file with index More... | |
Private Attributes | |
wxGenericDirCtrl * | m_dirCtrl = nullptr |
wxListCtrl * | m_listCtrl = nullptr |
wxChoice * | m_listType = nullptr |
wxButton * | m_showMap = nullptr |
long | m_sortCol = -1 |
bool | m_sortAscending = true |
wxStaticBitmap * | m_previewCtrl = nullptr |
wxStaticText * | m_labelControl = nullptr |
wxSplitterWindow * | m_splitter1 |
wxSplitterWindow * | m_splitter2 |
std::vector< PanoInfo > | m_ptoInfo |
info about the pto file More... | |
wxImageList | m_thumbnails |
image list with all thumbnails More... | |
ThumbnailThread * | m_thumbnailThread = nullptr |
background thumbnail creater thread More... | |
wxCriticalSection | m_ThreadCS |
critical section to synchronize with ThumbnailThread More... | |
Friends | |
class | ThumbnailThread |
Dialog for browsing pto files.
Definition at line 72 of file BrowseDialog.h.
BrowsePTOFilesDialog::BrowsePTOFilesDialog | ( | wxWindow * | parent, |
const wxString | startDirectory | ||
) |
Constructor, read from xrc ressource; restore last uses settings and position.
Definition at line 174 of file BrowseDialog.cpp.
References huginApp::Get(), celeste::max(), OnDblClickListCtrl(), RestoreFramePosition(), SetMyColumnImage(), and THUMBNAIL_SIZE.
BrowsePTOFilesDialog::~BrowsePTOFilesDialog | ( | ) |
destructor, saves position
Definition at line 290 of file BrowseDialog.cpp.
References EndThumbnailThread(), m_listCtrl, m_listType, m_sortAscending, m_sortCol, m_splitter1, m_splitter2, and StoreFramePosition().
|
private |
end background thumbnail creating thread
Definition at line 988 of file BrowseDialog.cpp.
References m_ThreadCS, and m_thumbnailThread.
Referenced by OnDirectoryChanged(), and ~BrowsePTOFilesDialog().
|
private |
add a new item to wxListCtrl and populate all columns
Definition at line 472 of file BrowseDialog.cpp.
References PanoInfo::camera, PanoInfo::duration, PanoInfo::focalLengthString, FormatDateTimeSpan(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::PanoramaOptions::getWidth(), PanoInfo::lens, m_listCtrl, PanoInfo::nrActiveImages, PanoInfo::nrImages, PanoInfo::options, PanoInfo::projectionName, and PanoInfo::start.
Referenced by OnDirectoryChanged(), and UpdateItemTexts().
|
private |
generate preview for pto file with index
Definition at line 1030 of file BrowseDialog.cpp.
References HuginBase::Color::CorrectImage(), GenerateThumbnail(), huginApp::Get(), MainFrame::Get(), HuginBase::Color::detail::GetMonitorProfile(), huginApp::HasMonitorProfile(), m_labelControl, m_previewCtrl, m_ptoInfo, and m_showMap.
Referenced by OnFileChanged().
wxString BrowsePTOFilesDialog::GetSelectedPath | ( | ) |
wxString BrowsePTOFilesDialog::GetSelectedProject | ( | ) |
return full path of selected project
Definition at line 310 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, and TranslateIndex().
|
protected |
double click does open file
Definition at line 586 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by BrowsePTOFilesDialog().
|
protected |
directory changed, load files from new directory
Definition at line 536 of file BrowseDialog.cpp.
References EndThumbnailThread(), FillPanoInfo(), MainFrame::Get(), m_dirCtrl, m_labelControl, m_listCtrl, m_previewCtrl, m_ptoInfo, m_showMap, m_thumbnails, m_thumbnailThread, ParsePTOFile(), SortItems(), and ThumbnailThread.
|
protected |
new file selected, generate preview for new file
Definition at line 578 of file BrowseDialog.cpp.
References GeneratePreview(), and TranslateIndex().
|
protected |
click on header to sort by column
Definition at line 594 of file BrowseDialog.cpp.
References m_listCtrl, m_sortAscending, m_sortCol, SetMyColumnImage(), and SortItems().
|
protected |
Change display of wxListCtrl.
Definition at line 656 of file BrowseDialog.cpp.
References m_listCtrl, m_thumbnailThread, UpdateImagesIndex(), and UpdateItemTexts().
|
protected |
Saves current expression when closing dialog with Ok.
Definition at line 332 of file BrowseDialog.cpp.
References m_listCtrl.
|
protected |
show current pano on Openstreetmap
Definition at line 682 of file BrowseDialog.cpp.
References m_listCtrl, and m_ptoInfo.
|
protected |
for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in event.GetEventObject()
Definition at line 629 of file BrowseDialog.cpp.
References ThreadImage::GetwxImage(), m_listCtrl, m_ptoInfo, m_thumbnails, and UpdateImagesIndex().
|
private |
read the given pto file and add all information to wxListCtrl
Definition at line 344 of file BrowseDialog.cpp.
References HuginBase::SrcPanoImage::calcFocalLength(), PanoInfo::camera, PanoInfo::duration, PanoInfo::end, hugin_utils::FileExists(), PanoInfo::focalLength35, PanoInfo::focalLengthString, HuginBase::Panorama::getActiveImages(), HuginBase::SrcPanoImage::getExifDateTime(), FormatString::GetFocalLength(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), hugin_utils::getPathPrefix(), HuginBase::PanoramaOptions::getProjection(), HuginBase::Panorama::getSrcImage(), PanoInfo::GPSLatitude, PanoInfo::GPSLongitude, HUGIN_CONV_FILENAME, celeste::info(), PanoInfo::lens, PanoInfo::nrActiveImages, PanoInfo::nrImages, PanoInfo::options, PanoInfo::projectionName, PanoInfo::ptoFilename, HuginBase::SrcPanoImage::readEXIF(), HuginBase::Panorama::ReadPTOFile(), PanoInfo::start, and hugin_utils::stringToDouble().
Referenced by OnDirectoryChanged().
|
private |
sort the items according to selected column
Definition at line 867 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, m_sortAscending, m_sortCol, SortDateAscending(), SortDateDesending(), SortDurationAscending(), SortDurationDesending(), and SortFieldOfViewDescending().
Referenced by OnDirectoryChanged(), OnListColClick(), and UpdateItemTexts().
|
private |
translate the index to the index of m_ptoInfo
Definition at line 699 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by GetSelectedProject(), OnFileChanged(), and UpdateImagesIndex().
|
private |
update the image indexes
Definition at line 515 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, and TranslateIndex().
Referenced by OnListTypeChanged(), and OnThumbnailUpdate().
|
private |
update all item texts
Definition at line 495 of file BrowseDialog.cpp.
References FillPanoInfo(), m_listCtrl, m_ptoInfo, and SortItems().
Referenced by OnListTypeChanged().
|
friend |
Definition at line 142 of file BrowseDialog.h.
Referenced by OnDirectoryChanged().
|
private |
Definition at line 123 of file BrowseDialog.h.
Referenced by GetSelectedPath(), and OnDirectoryChanged().
|
private |
Definition at line 131 of file BrowseDialog.h.
Referenced by GeneratePreview(), and OnDirectoryChanged().
|
private |
Definition at line 124 of file BrowseDialog.h.
Referenced by FillPanoInfo(), GetSelectedProject(), OnDblClickListCtrl(), OnDirectoryChanged(), OnListColClick(), OnListTypeChanged(), OnOk(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), TranslateIndex(), UpdateImagesIndex(), UpdateItemTexts(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 125 of file BrowseDialog.h.
Referenced by ~BrowsePTOFilesDialog().
|
private |
Definition at line 130 of file BrowseDialog.h.
Referenced by GeneratePreview(), and OnDirectoryChanged().
|
private |
info about the pto file
Definition at line 135 of file BrowseDialog.h.
Referenced by GeneratePreview(), GetSelectedProject(), OnDirectoryChanged(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), UpdateImagesIndex(), and UpdateItemTexts().
|
private |
Definition at line 126 of file BrowseDialog.h.
Referenced by GeneratePreview(), and OnDirectoryChanged().
|
private |
Definition at line 129 of file BrowseDialog.h.
Referenced by OnListColClick(), SortItems(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 128 of file BrowseDialog.h.
Referenced by OnListColClick(), SortItems(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 132 of file BrowseDialog.h.
Referenced by ~BrowsePTOFilesDialog().
|
private |
Definition at line 133 of file BrowseDialog.h.
Referenced by ~BrowsePTOFilesDialog().
|
private |
critical section to synchronize with ThumbnailThread
Definition at line 141 of file BrowseDialog.h.
Referenced by EndThumbnailThread(), and ThumbnailThread::~ThumbnailThread().
|
private |
image list with all thumbnails
Definition at line 137 of file BrowseDialog.h.
Referenced by OnDirectoryChanged(), and OnThumbnailUpdate().
|
private |
background thumbnail creater thread
Definition at line 139 of file BrowseDialog.h.
Referenced by EndThumbnailThread(), OnDirectoryChanged(), OnListTypeChanged(), and ThumbnailThread::~ThumbnailThread().