Hugin trunk 0.1
Loading...
Searching...
No Matches
BrowseDialog.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
10/* This is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This software is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public
21 * License along with this software. If not, see
22 * <http://www.gnu.org/licenses/>.
23 *
24 */
25
26#ifndef _BROWSEPTOFILESDIALOG_H
27#define _BROWSEPTOFILESDIALOG_H
28
29#include "wx/dialog.h"
30#include "wx/dirctrl.h"
31#include "wx/listctrl.h"
32#include "wx/statbmp.h"
33#include "wx/stattext.h"
34#include "wx/splitter.h"
35#include "wx/arrstr.h"
36#include "wx/thread.h"
37#include "wx/datetime.h"
38#include "wx/filename.h"
40
42// forward declaration for easier access on members of dialog
43class ThumbnailThread;
44
68
70class BrowsePTOFilesDialog : public wxDialog
71{
72public:
81
82protected:
84 void OnOk(wxCommandEvent& e);
97 void OnThumbnailUpdate(wxCommandEvent& e);
99 void OnListTypeChanged(wxCommandEvent& e);
101 void OnShowOnMap(wxCommandEvent& e);
102
103private:
105 long TranslateIndex(const long index);
107 void SortItems();
109 void EndThumbnailThread();
111 PanoInfo ParsePTOFile(const wxFileName file);
113 void FillPanoInfo(const PanoInfo& info, long index);
115 void UpdateItemTexts(long newStyle);
117 void GeneratePreview(int index);
118 // access to some often needed GUI elements
120 wxListCtrl* m_listCtrl = nullptr;
122 wxButton* m_showMap = nullptr;
123 // store current sorting column
124 long m_sortCol = -1;
125 bool m_sortAscending = true;
131 std::vector<PanoInfo> m_ptoInfo;
138 friend class ThumbnailThread;
139};
140
141#endif //_BROWSEPTOFILESDIALOG_H
Dialog for browsing pto files.
void OnShowOnMap(wxCommandEvent &e)
show current pano on Openstreetmap
wxString GetSelectedPath()
return last selected path
void GeneratePreview(int index)
generate preview for pto file with index
void OnDirectoryChanged(wxTreeEvent &e)
directory changed, load files from new directory
std::vector< PanoInfo > m_ptoInfo
info about the pto file
wxSplitterWindow * m_splitter2
wxStaticText * m_labelControl
void UpdateItemTexts(long newStyle)
update all item texts
ThumbnailThread * m_thumbnailThread
background thumbnail creater thread
void FillPanoInfo(const PanoInfo &info, long index)
add a new item to wxListCtrl and populate all columns
void OnThumbnailUpdate(wxCommandEvent &e)
for notifing from ThumbnailThread about new generated thumbnail generated thumbnail is transfered in ...
wxImageList m_thumbnails
image list with all thumbnails
void OnListMouseMove(wxMouseEvent &e)
mouse move handler to update tooltips
wxListCtrl * m_listCtrl
wxGenericDirCtrl * m_dirCtrl
wxString GetSelectedProject()
return full path of selected project
void OnFileChanged(wxListEvent &e)
new file selected, generate preview for new file
long TranslateIndex(const long index)
translate the index to the index of m_ptoInfo
void EndThumbnailThread()
end background thumbnail creating thread
void SortItems()
sort the items according to selected column
void OnListColClick(wxListEvent &e)
click on header to sort by column
~BrowsePTOFilesDialog()
destructor, saves position
wxStaticBitmap * m_previewCtrl
void OnListTypeChanged(wxCommandEvent &e)
Change display of wxListCtrl.
void OnDblClickListCtrl(wxMouseEvent &e)
double click does open file
wxSplitterWindow * m_splitter1
PanoInfo ParsePTOFile(const wxFileName file)
read the given pto file and add all information to wxListCtrl
wxCriticalSection m_ThreadCS
critical section to synchronize with ThumbnailThread
void OnOk(wxCommandEvent &e)
Saves current expression when closing dialog with Ok.
Panorama image options.
class to store some information about a pto file on disc
wxTimeSpan duration
HuginBase::PanoramaOptions options
wxFileName ptoFilename
int imageIndex
wxString focalLengthString
size_t nrImages
wxDateTime start
double focalLength35
wxString GetToolTip()
wxDateTime end
wxString lens
wxString camera
wxString projectionName
bool HasGPS()
double GPSLongitude
double GPSLatitude
size_t nrActiveImages
background thread to generate thumbnails of all pto files
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.
Definition threshold.h:41