Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Functions | Variables
BrowseDialog.cpp File Reference

implementation of dialog to browse directory with pto files More...

#include "hugin/BrowseDialog.h"
#include "hugin/huginApp.h"
#include "wx/dir.h"
#include "wx/busyinfo.h"
#include "hugin/GenerateThumbnail.h"
#include "hugin/MainFrame.h"
#include "base_wx/wxcms.h"
#include "base_wx/LensTools.h"
#include "base_wx/platform.h"
Include dependency graph for BrowseDialog.cpp:

Go to the source code of this file.

Classes

class  ThreadImage
 helper class to transfer thumbnail data from worker thread to GUI thread More...
 
class  ThumbnailThread
 background thread to generate thumbnails of all pto files More...
 

Macros

#define THUMBNAIL_SIZE   128
 
#define SORTASCENDING(functionName, var)
 
#define SORTDESCENDING(functionName, var)
 
#define SORTASCENDING(functionName, var)
 
#define SORTDESCENDING(functionName, var)
 

Functions

 wxDECLARE_EVENT (wxEVT_COMMAND_THUMBNAILTHREAD_UPDATE, wxCommandEvent)
 
 wxDEFINE_EVENT (wxEVT_COMMAND_THUMBNAILTHREAD_UPDATE, wxCommandEvent)
 
void SetMyColumnImage (wxListCtrl *list, int col, int image)
 
wxString FormatDateTimeSpan (const wxTimeSpan timespan)
 
template<class Type >
int GreaterComparisonOperator (const Type &a, const Type &b)
 
template<class Type >
int SmallerComparisonOperator (const Type &a, const Type &b)
 
 SORTASCENDING (SortCanvasSizeAcending, options.getSize().area()) SORTDESCENDING(SortCanvasSizeDescending
 
options getSize ().area()) int wxCALLBACK SortFieldOfViewAscending(wxIntPtr item1
 
return GreaterComparisonOperator (fieldOfView1, fieldOfView2)
 
int wxCALLBACK SortFieldOfViewDescending (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK SortDateAscending (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK SortDateDesending (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK SortDurationAscending (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 
int wxCALLBACK SortDurationDesending (wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
 

Variables

options wxIntPtr item2
 
options wxIntPtr wxIntPtr
sortData std::vector< PanoInfo > * 
data = (std::vector<PanoInfo>*)(sortData)
 
const float fieldOfView1 = data->at(item1).options.getHFOV() * 1000 + data->at(item1).options.getVFOV()
 
const float fieldOfView2 = data->at(item2).options.getHFOV() * 1000 + data->at(item2).options.getVFOV()
 

Detailed Description

implementation of dialog to browse directory with pto files

Author
T. Modes

Definition in file BrowseDialog.cpp.

Macro Definition Documentation

#define SORTASCENDING (   functionName,
  var 
)
Value:
int wxCALLBACK functionName(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)\
{\
std::vector<PanoInfo>* data = (std::vector<PanoInfo>*)(sortData);\
return GreaterComparisonOperator(data->at(item1).var, data->at(item2).var);\
}
options wxIntPtr item2
options wxIntPtr wxIntPtr sortData std::vector< PanoInfo > * data
int GreaterComparisonOperator(const Type &a, const Type &b)

Definition at line 742 of file BrowseDialog.cpp.

#define SORTASCENDING (   functionName,
  var 
)
Value:
int wxCALLBACK functionName(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)\
{\
std::vector<PanoInfo>* data = (std::vector<PanoInfo>*)(sortData);\
return data->at(item1).var.CmpNoCase(data->at(item2).var);\
}
options wxIntPtr item2
options wxIntPtr wxIntPtr sortData std::vector< PanoInfo > * data

Definition at line 742 of file BrowseDialog.cpp.

#define SORTDESCENDING (   functionName,
  var 
)
Value:
int wxCALLBACK functionName(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)\
{\
std::vector<PanoInfo>* data = (std::vector<PanoInfo>*)(sortData);\
return SmallerComparisonOperator(data->at(item1).var, data->at(item2).var);\
}
int SmallerComparisonOperator(const Type &a, const Type &b)
options wxIntPtr item2
options wxIntPtr wxIntPtr sortData std::vector< PanoInfo > * data

Definition at line 748 of file BrowseDialog.cpp.

#define SORTDESCENDING (   functionName,
  var 
)
Value:
int wxCALLBACK functionName(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)\
{\
std::vector<PanoInfo>* data = (std::vector<PanoInfo>*)(sortData);\
return -(data->at(item1).var.CmpNoCase(data->at(item2).var));\
}
options wxIntPtr item2
options wxIntPtr wxIntPtr sortData std::vector< PanoInfo > * data

Definition at line 748 of file BrowseDialog.cpp.

#define THUMBNAIL_SIZE   128

Definition at line 151 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::BrowsePTOFilesDialog().

Function Documentation

wxString FormatDateTimeSpan ( const wxTimeSpan  timespan)

Definition at line 453 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::FillPanoInfo().

options getSize ( )
template<class Type >
int GreaterComparisonOperator ( const Type &  a,
const Type &  b 
)

Definition at line 705 of file BrowseDialog.cpp.

return GreaterComparisonOperator ( fieldOfView1  ,
fieldOfView2   
)
void SetMyColumnImage ( wxListCtrl *  list,
int  col,
int  image 
)
template<class Type >
int SmallerComparisonOperator ( const Type &  a,
const Type &  b 
)

Definition at line 724 of file BrowseDialog.cpp.

Referenced by SortFieldOfViewDescending().

SORTASCENDING ( SortCanvasSizeAcending  ,
options.  getSize).area( 
)
int wxCALLBACK SortDateAscending ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 810 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

int wxCALLBACK SortDateDesending ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 824 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

int wxCALLBACK SortDurationAscending ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 839 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

int wxCALLBACK SortDurationDesending ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 853 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

int wxCALLBACK SortFieldOfViewDescending ( wxIntPtr  item1,
wxIntPtr  item2,
wxIntPtr  sortData 
)

Definition at line 801 of file BrowseDialog.cpp.

References SmallerComparisonOperator().

Referenced by BrowsePTOFilesDialog::SortItems().

wxDECLARE_EVENT ( wxEVT_COMMAND_THUMBNAILTHREAD_UPDATE  ,
wxCommandEvent   
)
wxDEFINE_EVENT ( wxEVT_COMMAND_THUMBNAILTHREAD_UPDATE  ,
wxCommandEvent   
)

Variable Documentation

options wxIntPtr wxIntPtr sortData std::vector<PanoInfo>* data = (std::vector<PanoInfo>*)(sortData)
const float fieldOfView1 = data->at(item1).options.getHFOV() * 1000 + data->at(item1).options.getVFOV()

Definition at line 796 of file BrowseDialog.cpp.

const float fieldOfView2 = data->at(item2).options.getHFOV() * 1000 + data->at(item2).options.getVFOV()

Definition at line 797 of file BrowseDialog.cpp.

options wxIntPtr item2

Definition at line 793 of file BrowseDialog.cpp.

Referenced by huginApp::OnInit().