Hugin trunk 0.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
BrowsePTOFilesDialog Class Reference

Dialog for browsing pto files. More...

#include <BrowseDialog.h>

Inheritance diagram for BrowsePTOFilesDialog:
Inheritance graph

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

wxGenericDirCtrlm_dirCtrl = nullptr
 
wxListCtrl * m_listCtrl = nullptr
 
wxChoicem_listType = nullptr
 
wxButtonm_showMap = nullptr
 
long m_sortCol = -1
 
bool m_sortAscending = true
 
wxStaticBitmapm_previewCtrl = nullptr
 
wxStaticTextm_labelControl = nullptr
 
wxSplitterWindowm_splitter1
 
wxSplitterWindowm_splitter2
 
std::vector< PanoInfom_ptoInfo
 info about the pto file
 
wxImageList m_thumbnails
 image list with all thumbnails
 
ThumbnailThreadm_thumbnailThread = nullptr
 background thumbnail creater thread
 
wxCriticalSection m_ThreadCS
 critical section to synchronize with ThumbnailThread
 

Friends

class ThumbnailThread
 

Detailed Description

Dialog for browsing pto files.

Definition at line 70 of file BrowseDialog.h.

Constructor & Destructor Documentation

◆ BrowsePTOFilesDialog()

BrowsePTOFilesDialog::BrowsePTOFilesDialog ( wxWindow *  parent,
const wxString  startDirectory 
)

◆ ~BrowsePTOFilesDialog()

BrowsePTOFilesDialog::~BrowsePTOFilesDialog ( )

Member Function Documentation

◆ EndThumbnailThread()

void BrowsePTOFilesDialog::EndThumbnailThread ( )
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().

◆ FillPanoInfo()

void BrowsePTOFilesDialog::FillPanoInfo ( const PanoInfo info,
long  index 
)
private

◆ GeneratePreview()

void BrowsePTOFilesDialog::GeneratePreview ( int  index)
private

◆ GetSelectedPath()

wxString BrowsePTOFilesDialog::GetSelectedPath ( )

return last selected path

Definition at line 288 of file BrowseDialog.cpp.

References m_dirCtrl.

◆ GetSelectedProject()

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().

◆ OnDblClickListCtrl()

void BrowsePTOFilesDialog::OnDblClickListCtrl ( wxMouseEvent e)
protected

double click does open file

Definition at line 506 of file BrowseDialog.cpp.

References m_listCtrl, and threshold().

Referenced by BrowsePTOFilesDialog().

◆ OnDirectoryChanged()

void BrowsePTOFilesDialog::OnDirectoryChanged ( wxTreeEvent e)
protected

◆ OnFileChanged()

void BrowsePTOFilesDialog::OnFileChanged ( wxListEvent e)
protected

new file selected, generate preview for new file

Definition at line 498 of file BrowseDialog.cpp.

References GeneratePreview(), and TranslateIndex().

Referenced by BrowsePTOFilesDialog().

◆ OnListColClick()

void BrowsePTOFilesDialog::OnListColClick ( wxListEvent e)
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().

◆ OnListMouseMove()

void BrowsePTOFilesDialog::OnListMouseMove ( wxMouseEvent e)
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().

◆ OnListTypeChanged()

void BrowsePTOFilesDialog::OnListTypeChanged ( wxCommandEvent &  e)
protected

Change display of wxListCtrl.

Definition at line 573 of file BrowseDialog.cpp.

References m_listCtrl, m_thumbnailThread, threshold(), and UpdateItemTexts().

Referenced by BrowsePTOFilesDialog().

◆ OnOk()

void BrowsePTOFilesDialog::OnOk ( wxCommandEvent &  e)
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().

◆ OnShowOnMap()

void BrowsePTOFilesDialog::OnShowOnMap ( wxCommandEvent &  e)
protected

show current pano on Openstreetmap

Definition at line 597 of file BrowseDialog.cpp.

References m_listCtrl, m_ptoInfo, and threshold().

Referenced by BrowsePTOFilesDialog().

◆ OnThumbnailUpdate()

void BrowsePTOFilesDialog::OnThumbnailUpdate ( wxCommandEvent &  e)
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().

◆ ParsePTOFile()

PanoInfo BrowsePTOFilesDialog::ParsePTOFile ( const wxFileName  file)
private

◆ SortItems()

void BrowsePTOFilesDialog::SortItems ( )
private

◆ TranslateIndex()

long BrowsePTOFilesDialog::TranslateIndex ( const long  index)
private

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().

◆ UpdateItemTexts()

void BrowsePTOFilesDialog::UpdateItemTexts ( long  newStyle)
private

update all item texts

Definition at line 437 of file BrowseDialog.cpp.

References FillPanoInfo(), m_listCtrl, m_ptoInfo, SortItems(), and threshold().

Referenced by OnListTypeChanged().

Friends And Related Symbol Documentation

◆ ThumbnailThread

Definition at line 138 of file BrowseDialog.h.

Referenced by OnDirectoryChanged().

Member Data Documentation

◆ m_dirCtrl

wxGenericDirCtrl* BrowsePTOFilesDialog::m_dirCtrl = nullptr
private

Definition at line 119 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), GetSelectedPath(), and OnDirectoryChanged().

◆ m_labelControl

wxStaticText* BrowsePTOFilesDialog::m_labelControl = nullptr
private

Definition at line 127 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().

◆ m_listCtrl

wxListCtrl* BrowsePTOFilesDialog::m_listCtrl = nullptr
private

◆ m_listType

wxChoice* BrowsePTOFilesDialog::m_listType = nullptr
private

Definition at line 121 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().

◆ m_previewCtrl

wxStaticBitmap* BrowsePTOFilesDialog::m_previewCtrl = nullptr
private

Definition at line 126 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().

◆ m_ptoInfo

std::vector<PanoInfo> BrowsePTOFilesDialog::m_ptoInfo
private

◆ m_showMap

wxButton* BrowsePTOFilesDialog::m_showMap = nullptr
private

Definition at line 122 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), GeneratePreview(), and OnDirectoryChanged().

◆ m_sortAscending

bool BrowsePTOFilesDialog::m_sortAscending = true
private

◆ m_sortCol

long BrowsePTOFilesDialog::m_sortCol = -1
private

◆ m_splitter1

wxSplitterWindow* BrowsePTOFilesDialog::m_splitter1
private

Definition at line 128 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().

◆ m_splitter2

wxSplitterWindow* BrowsePTOFilesDialog::m_splitter2
private

Definition at line 129 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), and ~BrowsePTOFilesDialog().

◆ m_ThreadCS

wxCriticalSection BrowsePTOFilesDialog::m_ThreadCS
private

critical section to synchronize with ThumbnailThread

Definition at line 137 of file BrowseDialog.h.

Referenced by EndThumbnailThread(), and ThumbnailThread::~ThumbnailThread().

◆ m_thumbnails

wxImageList BrowsePTOFilesDialog::m_thumbnails
private

image list with all thumbnails

Definition at line 133 of file BrowseDialog.h.

Referenced by BrowsePTOFilesDialog(), OnDirectoryChanged(), and OnThumbnailUpdate().

◆ m_thumbnailThread

ThumbnailThread* BrowsePTOFilesDialog::m_thumbnailThread = nullptr
private

background thumbnail creater thread

Definition at line 135 of file BrowseDialog.h.

Referenced by EndThumbnailThread(), OnDirectoryChanged(), OnListTypeChanged(), and ThumbnailThread::~ThumbnailThread().


The documentation for this class was generated from the following files: