|
Hugin trunk 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. | |
| ~BrowsePTOFilesDialog () | |
| destructor, saves position | |
| wxString | GetSelectedProject () |
| return full path of selected project | |
| wxString | GetSelectedPath () |
| return last selected path | |
Protected Member Functions | |
| void | OnOk (wxCommandEvent &e) |
| Saves current expression when closing dialog with Ok. | |
| void | OnDirectoryChanged (wxTreeEvent &e) |
| directory changed, load files from new directory | |
| void | OnFileChanged (wxListEvent &e) |
| new file selected, generate preview for new file | |
| void | OnDblClickListCtrl (wxMouseEvent &e) |
| double click does open file | |
| void | OnListColClick (wxListEvent &e) |
| click on header to sort by column | |
| void | OnListMouseMove (wxMouseEvent &e) |
| mouse move handler to update tooltips | |
| void | OnThumbnailUpdate (wxCommandEvent &e) |
| for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in event.GetEventObject() | |
| void | OnListTypeChanged (wxCommandEvent &e) |
| Change display of wxListCtrl. | |
| void | OnShowOnMap (wxCommandEvent &e) |
| show current pano on Openstreetmap | |
Private Member Functions | |
| long | TranslateIndex (const long index) |
| translate the index to the index of m_ptoInfo | |
| void | SortItems () |
| sort the items according to selected column | |
| void | EndThumbnailThread () |
| end background thumbnail creating thread | |
| PanoInfo | ParsePTOFile (const wxFileName file) |
| read the given pto file and add all information to wxListCtrl | |
| void | FillPanoInfo (const PanoInfo &info, long index) |
| add a new item to wxListCtrl and populate all columns | |
| void | UpdateItemTexts (long newStyle) |
| update all item texts | |
| void | GeneratePreview (int index) |
| generate preview for pto file with index | |
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 | |
| wxImageList | m_thumbnails |
| image list with all thumbnails | |
| ThumbnailThread * | m_thumbnailThread = nullptr |
| background thumbnail creater thread | |
| wxCriticalSection | m_ThreadCS |
| critical section to synchronize with ThumbnailThread | |
Friends | |
| class | ThumbnailThread |
Dialog for browsing pto files.
Definition at line 70 of file BrowseDialog.h.
Constructor, read from xrc ressource; restore last uses settings and position.
Definition at line 170 of file BrowseDialog.cpp.
References m_dirCtrl, m_labelControl, m_listCtrl, m_listType, m_previewCtrl, m_showMap, m_sortAscending, m_sortCol, m_splitter1, m_splitter2, m_thumbnails, OnDblClickListCtrl(), OnDirectoryChanged(), OnFileChanged(), OnListColClick(), OnListMouseMove(), OnListTypeChanged(), OnOk(), OnShowOnMap(), OnThumbnailUpdate(), hugin_utils::RestoreFramePosition(), threshold(), and THUMBNAIL_SIZE.
| BrowsePTOFilesDialog::~BrowsePTOFilesDialog | ( | ) |
destructor, saves position
Definition at line 251 of file BrowseDialog.cpp.
References EndThumbnailThread(), m_listCtrl, m_listType, m_sortAscending, m_sortCol, m_splitter1, m_splitter2, hugin_utils::StoreFramePosition(), and threshold().
|
private |
end background thumbnail creating thread
Definition at line 903 of file BrowseDialog.cpp.
References m_ThreadCS, m_thumbnailThread, and threshold().
Referenced by OnDirectoryChanged(), and ~BrowsePTOFilesDialog().
add a new item to wxListCtrl and populate all columns
Definition at line 414 of file BrowseDialog.cpp.
References PanoInfo::camera, PanoInfo::duration, PanoInfo::focalLengthString, hugin_utils::GetFormattedTimeSpan(), 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().
generate preview for pto file with index
Definition at line 945 of file BrowseDialog.cpp.
References HuginBase::Color::CorrectImage(), GenerateThumbnail(), huginApp::Get(), MainFrame::Get(), huginApp::HasMonitorProfile(), m_labelControl, m_previewCtrl, m_ptoInfo, m_showMap, and threshold().
Referenced by OnFileChanged().
| wxString BrowsePTOFilesDialog::GetSelectedPath | ( | ) |
| wxString BrowsePTOFilesDialog::GetSelectedProject | ( | ) |
return full path of selected project
Definition at line 271 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, threshold(), and TranslateIndex().
|
protected |
double click does open file
Definition at line 506 of file BrowseDialog.cpp.
References m_listCtrl, and threshold().
Referenced by BrowsePTOFilesDialog().
|
protected |
directory changed, load files from new directory
Definition at line 456 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(), threshold(), and ThumbnailThread.
Referenced by BrowsePTOFilesDialog().
|
protected |
new file selected, generate preview for new file
Definition at line 498 of file BrowseDialog.cpp.
References GeneratePreview(), and TranslateIndex().
Referenced by BrowsePTOFilesDialog().
|
protected |
click on header to sort by column
Definition at line 514 of file BrowseDialog.cpp.
References m_listCtrl, m_sortAscending, m_sortCol, SortItems(), and threshold().
Referenced by BrowsePTOFilesDialog().
|
protected |
mouse move handler to update tooltips
Definition at line 531 of file BrowseDialog.cpp.
References flags, m_listCtrl, m_ptoInfo, threshold(), and TranslateIndex().
Referenced by BrowsePTOFilesDialog().
|
protected |
Change display of wxListCtrl.
Definition at line 573 of file BrowseDialog.cpp.
References m_listCtrl, m_thumbnailThread, threshold(), and UpdateItemTexts().
Referenced by BrowsePTOFilesDialog().
|
protected |
Saves current expression when closing dialog with Ok.
Definition at line 293 of file BrowseDialog.cpp.
References m_listCtrl, and threshold().
Referenced by BrowsePTOFilesDialog().
|
protected |
show current pano on Openstreetmap
Definition at line 597 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, and threshold().
Referenced by BrowsePTOFilesDialog().
|
protected |
for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in event.GetEventObject()
Definition at line 550 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, m_thumbnails, and threshold().
Referenced by BrowsePTOFilesDialog().
|
private |
read the given pto file and add all information to wxListCtrl
Definition at line 305 of file BrowseDialog.cpp.
References HuginBase::SrcPanoImage::calcFocalLength(), PanoInfo::camera, PanoInfo::duration, PanoInfo::end, hugin_utils::FileExists(), PanoInfo::focalLength35, PanoInfo::focalLengthString, HuginBase::Panorama::getActiveImages(), FormatString::GetFocalLength(), HuginBase::Panorama::getNrOfImages(), HuginBase::Panorama::getOptions(), hugin_utils::getPathPrefix(), HuginBase::PanoramaOptions::getProjection(), HuginBase::Panorama::getSrcImage(), PanoInfo::GPSLatitude, PanoInfo::GPSLongitude, HUGIN_CONV_FILENAME, PanoInfo::lens, PanoInfo::nrActiveImages, PanoInfo::nrImages, PanoInfo::options, PanoInfo::projectionName, PanoInfo::ptoFilename, HuginBase::SrcPanoImage::readEXIF(), HuginBase::Panorama::ReadPTOFile(), PanoInfo::start, hugin_utils::stringToDouble(), and threshold().
Referenced by OnDirectoryChanged().
|
private |
sort the items according to selected column
Definition at line 782 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, m_sortAscending, m_sortCol, SortDateAscending(), SortDateDesending(), SortDurationAscending(), SortDurationDesending(), SortFieldOfViewDescending(), and threshold().
Referenced by OnDirectoryChanged(), OnListColClick(), and UpdateItemTexts().
translate the index to the index of m_ptoInfo
Definition at line 614 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by GetSelectedProject(), OnFileChanged(), and OnListMouseMove().
update all item texts
Definition at line 437 of file BrowseDialog.cpp.
References FillPanoInfo(), m_listCtrl, m_ptoInfo, SortItems(), and threshold().
Referenced by OnListTypeChanged().
|
friend |
Definition at line 138 of file BrowseDialog.h.
Referenced by OnDirectoryChanged().
|
private |
Definition at line 119 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), GetSelectedPath(), and OnDirectoryChanged().
|
private |
Definition at line 127 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().
|
private |
Definition at line 120 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), FillPanoInfo(), GetSelectedProject(), OnDblClickListCtrl(), OnDirectoryChanged(), OnListColClick(), OnListMouseMove(), OnListTypeChanged(), OnOk(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), TranslateIndex(), UpdateItemTexts(), and ~BrowsePTOFilesDialog().
Definition at line 121 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 126 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().
|
private |
info about the pto file
Definition at line 131 of file BrowseDialog.h.
Referenced by GeneratePreview(), GetSelectedProject(), OnDirectoryChanged(), OnListMouseMove(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), and UpdateItemTexts().
Definition at line 122 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().
Definition at line 125 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), OnListColClick(), SortItems(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 124 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), OnListColClick(), SortItems(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 128 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().
|
private |
Definition at line 129 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().
|
private |
critical section to synchronize with ThumbnailThread
Definition at line 137 of file BrowseDialog.h.
Referenced by EndThumbnailThread(), and ThumbnailThread::~ThumbnailThread().
|
private |
image list with all thumbnails
Definition at line 133 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), OnDirectoryChanged(), and OnThumbnailUpdate().
|
private |
background thumbnail creater thread
Definition at line 135 of file BrowseDialog.h.
Referenced by EndThumbnailThread(), OnDirectoryChanged(), OnListTypeChanged(), and ThumbnailThread::~ThumbnailThread().