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 | 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 154 of file BrowseDialog.cpp.
References huginApp::Get(), 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(), OnListTypeChanged(), OnOk(), OnShowOnMap(), OnThumbnailUpdate(), RestoreFramePosition(), and THUMBNAIL_SIZE.
BrowsePTOFilesDialog::~BrowsePTOFilesDialog | ( | ) |
destructor, saves position
Definition at line 241 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 873 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 404 of file BrowseDialog.cpp.
References PanoInfo::camera, PanoInfo::duration, PanoInfo::focalLengthString, 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().
|
private |
generate preview for pto file with index
Definition at line 915 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 261 of file BrowseDialog.cpp.
References m_listCtrl, m_ptoInfo, and TranslateIndex().
|
protected |
double click does open file
Definition at line 496 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by BrowsePTOFilesDialog().
|
protected |
directory changed, load files from new directory
Definition at line 446 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.
Referenced by BrowsePTOFilesDialog().
|
protected |
new file selected, generate preview for new file
Definition at line 488 of file BrowseDialog.cpp.
References GeneratePreview(), and TranslateIndex().
Referenced by BrowsePTOFilesDialog().
|
protected |
click on header to sort by column
Definition at line 504 of file BrowseDialog.cpp.
References m_listCtrl, m_sortAscending, m_sortCol, and SortItems().
Referenced by BrowsePTOFilesDialog().
|
protected |
Change display of wxListCtrl.
Definition at line 544 of file BrowseDialog.cpp.
References m_listCtrl, m_thumbnailThread, and UpdateItemTexts().
Referenced by BrowsePTOFilesDialog().
|
protected |
Saves current expression when closing dialog with Ok.
Definition at line 283 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by BrowsePTOFilesDialog().
|
protected |
show current pano on Openstreetmap
Definition at line 567 of file BrowseDialog.cpp.
References m_listCtrl, and m_ptoInfo.
Referenced by BrowsePTOFilesDialog().
|
protected |
for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in event.GetEventObject()
Definition at line 521 of file BrowseDialog.cpp.
References ThreadImage::GetwxImage(), m_listCtrl, m_ptoInfo, and m_thumbnails.
Referenced by BrowsePTOFilesDialog().
|
private |
read the given pto file and add all information to wxListCtrl
Definition at line 295 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 752 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 584 of file BrowseDialog.cpp.
References m_listCtrl.
Referenced by GetSelectedProject(), and OnFileChanged().
|
private |
update all item texts
Definition at line 427 of file BrowseDialog.cpp.
References FillPanoInfo(), m_listCtrl, m_ptoInfo, and SortItems().
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(), OnListTypeChanged(), OnOk(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), TranslateIndex(), UpdateItemTexts(), and ~BrowsePTOFilesDialog().
|
private |
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(), OnShowOnMap(), OnThumbnailUpdate(), SortItems(), and UpdateItemTexts().
|
private |
Definition at line 122 of file BrowseDialog.h.
Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().
|
private |
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().