Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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. 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< PanoInfom_ptoInfo
 info about the pto file More...
 
wxImageList m_thumbnails
 image list with all thumbnails More...
 
ThumbnailThreadm_thumbnailThread = nullptr
 background thumbnail creater thread More...
 
wxCriticalSection m_ThreadCS
 critical section to synchronize with ThumbnailThread More...
 

Friends

class ThumbnailThread
 

Detailed Description

Dialog for browsing pto files.

Definition at line 72 of file BrowseDialog.h.

Constructor & Destructor Documentation

BrowsePTOFilesDialog::BrowsePTOFilesDialog ( wxWindow *  parent,
const wxString  startDirectory 
)
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().

Member Function Documentation

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

void BrowsePTOFilesDialog::FillPanoInfo ( const PanoInfo info,
long  index 
)
private
void BrowsePTOFilesDialog::GeneratePreview ( int  index)
private
wxString BrowsePTOFilesDialog::GetSelectedPath ( )

return last selected path

Definition at line 278 of file BrowseDialog.cpp.

References m_dirCtrl.

wxString BrowsePTOFilesDialog::GetSelectedProject ( )

return full path of selected project

Definition at line 261 of file BrowseDialog.cpp.

References m_listCtrl, m_ptoInfo, and TranslateIndex().

void BrowsePTOFilesDialog::OnDblClickListCtrl ( wxMouseEvent &  e)
protected

double click does open file

Definition at line 496 of file BrowseDialog.cpp.

References m_listCtrl.

Referenced by BrowsePTOFilesDialog().

void BrowsePTOFilesDialog::OnDirectoryChanged ( wxTreeEvent &  e)
protected
void BrowsePTOFilesDialog::OnFileChanged ( wxListEvent &  e)
protected

new file selected, generate preview for new file

Definition at line 488 of file BrowseDialog.cpp.

References GeneratePreview(), and TranslateIndex().

Referenced by BrowsePTOFilesDialog().

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

void BrowsePTOFilesDialog::OnListTypeChanged ( wxCommandEvent &  e)
protected

Change display of wxListCtrl.

Definition at line 544 of file BrowseDialog.cpp.

References m_listCtrl, m_thumbnailThread, and UpdateItemTexts().

Referenced by BrowsePTOFilesDialog().

void BrowsePTOFilesDialog::OnOk ( wxCommandEvent &  e)
protected

Saves current expression when closing dialog with Ok.

Definition at line 283 of file BrowseDialog.cpp.

References m_listCtrl.

Referenced by BrowsePTOFilesDialog().

void BrowsePTOFilesDialog::OnShowOnMap ( wxCommandEvent &  e)
protected

show current pano on Openstreetmap

Definition at line 567 of file BrowseDialog.cpp.

References m_listCtrl, and m_ptoInfo.

Referenced by BrowsePTOFilesDialog().

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

PanoInfo BrowsePTOFilesDialog::ParsePTOFile ( const wxFileName  file)
private
void BrowsePTOFilesDialog::SortItems ( )
private
long BrowsePTOFilesDialog::TranslateIndex ( const long  index)
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().

void BrowsePTOFilesDialog::UpdateItemTexts ( long  newStyle)
private

update all item texts

Definition at line 427 of file BrowseDialog.cpp.

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

Referenced by OnListTypeChanged().

Friends And Related Function Documentation

friend class ThumbnailThread
friend

Definition at line 138 of file BrowseDialog.h.

Referenced by OnDirectoryChanged().

Member Data Documentation

wxGenericDirCtrl* BrowsePTOFilesDialog::m_dirCtrl = nullptr
private

Definition at line 119 of file BrowseDialog.h.

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

wxStaticText* BrowsePTOFilesDialog::m_labelControl = nullptr
private

Definition at line 127 of file BrowseDialog.h.

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

wxListCtrl* BrowsePTOFilesDialog::m_listCtrl = nullptr
private
wxChoice* BrowsePTOFilesDialog::m_listType = nullptr
private

Definition at line 121 of file BrowseDialog.h.

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

wxStaticBitmap* BrowsePTOFilesDialog::m_previewCtrl = nullptr
private

Definition at line 126 of file BrowseDialog.h.

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

std::vector<PanoInfo> BrowsePTOFilesDialog::m_ptoInfo
private
wxButton* BrowsePTOFilesDialog::m_showMap = nullptr
private

Definition at line 122 of file BrowseDialog.h.

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

bool BrowsePTOFilesDialog::m_sortAscending = true
private
long BrowsePTOFilesDialog::m_sortCol = -1
private
wxSplitterWindow* BrowsePTOFilesDialog::m_splitter1
private

Definition at line 128 of file BrowseDialog.h.

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

wxSplitterWindow* BrowsePTOFilesDialog::m_splitter2
private

Definition at line 129 of file BrowseDialog.h.

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

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

wxImageList BrowsePTOFilesDialog::m_thumbnails
private

image list with all thumbnails

Definition at line 133 of file BrowseDialog.h.

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

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: