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 "base_wx/wxutils.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)
 
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 627 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 627 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 633 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 633 of file BrowseDialog.cpp.

#define THUMBNAIL_SIZE   128

Definition at line 152 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::BrowsePTOFilesDialog().

Function Documentation

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

Definition at line 590 of file BrowseDialog.cpp.

return GreaterComparisonOperator ( fieldOfView1  ,
fieldOfView2   
)
template<class Type >
int SmallerComparisonOperator ( const Type &  a,
const Type &  b 
)

Definition at line 609 of file BrowseDialog.cpp.

Referenced by SortFieldOfViewDescending().

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

Definition at line 695 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

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

Definition at line 709 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

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

Definition at line 724 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

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

Definition at line 738 of file BrowseDialog.cpp.

Referenced by BrowsePTOFilesDialog::SortItems().

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

Definition at line 686 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 681 of file BrowseDialog.cpp.

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

Definition at line 682 of file BrowseDialog.cpp.

options wxIntPtr item2

Definition at line 678 of file BrowseDialog.cpp.

Referenced by huginApp::OnInit().