Hugin trunk 0.1
Loading...
Searching...
No Matches
huginApp.cpp
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
2
27#include "hugin_config.h"
28
29#include "panoinc_WX.h"
30
31#ifdef __WXMAC__
32#include <wx/sysopt.h>
33#include <wx/dir.h>
34#endif
35
36#include "panoinc.h"
37
39#include "hugin/huginApp.h"
40#include "hugin/ImagesPanel.h"
42#include "hugin/CPEditorPanel.h"
44#include "hugin/PanoPanel.h"
45#include "hugin/CPListFrame.h"
46#include "hugin/PreviewPanel.h"
48#include "hugin/RawImport.h"
49#include "base_wx/PTWXDlg.h"
51#include "base_wx/wxcms.h"
53#include "base_wx/wxutils.h"
54#include "hugin/HtmlWindow.h"
55#include "hugin/treelistctrl.h"
56#include "hugin/ImagesTree.h"
57#include "hugin/SplitButton.h"
58
59#include "base_wx/platform.h"
60#include "base_wx/huginConfig.h"
61#include <wx/cshelp.h>
62#include <wx/stdpaths.h>
63#ifdef __WXMSW__
64#include <wx/dir.h>
65#include <wx/taskbarbutton.h>
66#endif
67#if defined __WXGTK__
68#include "base_wx/wxPlatform.h"
69#endif
70
71#include <tiffio.h>
72
73#include "AboutDialog.h"
74
75//for natural sorting
77#include "lensdb/LensDB.h"
78
80{
81 return doj::alphanum_comp(std::string(v1.mb_str(wxConvLocal)),std::string(v2.mb_str(wxConvLocal))) < 0;
82};
83
85{
87 for (unsigned i=0; i < comp.size(); i++) {
88 ret.Append("[");
89 HuginGraph::ImageGraph::Components::value_type::const_iterator it = comp[i].begin();
90 while (it != comp[i].end())
91 {
92 unsigned int imgNr = *it;
93 ret << imgNr;
94 it++;
95 if (it != comp[i].end() && *it == imgNr + 1)
96 {
97 ret.Append("-");
98 while (it != comp[i].end() && *it == imgNr + 1)
99 {
100 ++it;
101 ++imgNr;
102 };
103 ret << imgNr;
104 if (it != comp[i].end())
105 {
106 ret.Append(", ");
107 };
108 }
109 else
110 {
111 if (it != comp[i].end())
112 {
113 ret.Append(", ");
114 };
115 };
116 };
117
118 ret.Append("]");
119 if (i + 1 != comp.size())
120 {
121 ret.Append(", ");
122 };
123 }
124 return ret;
125}
126
127// make wxwindows use this class as the main application
128#if defined USE_GDKBACKEND_X11
129// wxWidgets does not support wxGLCanvas on Wayland
130// so until it is fixed upstream enforce using x11 backend
131// see ticket http://trac.wxwidgets.org/ticket/17702
132#warning Using Hugin with hard coded GDK_BACKEND=x11
135#include <stdlib.h>
136int main(int argc, char **argv)
137{
139 char backend[]="GDK_BACKEND=x11";
141 return wxEntry(argc, argv);
142};
143#else
145#endif
146
148{
149 DEBUG_TRACE("ctor");
150 m_this=this;
152#if wxUSE_ON_FATAL_EXCEPTION
154#endif
155}
156
158{
159 DEBUG_TRACE("dtor");
160 // delete temporary dir
161// if (!wxRmdir(m_workDir)) {
162// DEBUG_ERROR("Could not remove temporary directory");
163// }
164
165 // todo: remove all listeners from the panorama object
166
167// delete frame;
169 // delete monitor profile
171 {
173 };
174 DEBUG_TRACE("dtor end");
175}
176
178{
179 DEBUG_TRACE("=========================== huginApp::OnInit() begin ===================");
180 SetAppName("hugin");
181#if defined __WXGTK__
183#endif
184 // here goes and comes configuration
185 wxConfigBase* config = wxConfigBase::Get();
186 // do not record default values in the preferences file
187 config->SetRecordDefaults(false);
188 config->Flush();
189 // init imagecache
191 {
192 return false;
193 }
194#if defined __WXMSW__ && wxCHECK_VERSION(3,3,0)
195 // automatically switch between light and dark mode
196 SetAppearance(Appearance::System);
197#endif
198
199#ifdef __WXMAC__
200 // do not use the native list control on OSX (it is very slow with the control point list window)
201 wxSystemOptions::SetOption("mac.listctrl.always_use_generic", 1);
202 // On OS X the file open does by default not show the file type list
203 // Apple means this is not necessary
204 // but the the add images dialog needs this selection, so force to
205 // display always the file type list
206 wxSystemOptions::SetOption(wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES, 1);
207#endif
208
209 // register our custom pano tools dialog handlers
211
212 // required by wxHtmlHelpController
213 wxFileSystem::AddHandler(new wxZipFSHandler);
214
215 // initialize help provider
217 wxHelpProvider::Set(provider);
218
219#if defined __WXMSW__
220 wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
222 exePath.RemoveLastDir();
224 m_xrcPrefix = huginRoot + "share\\hugin\\xrc\\";
225 m_DataDir = huginRoot + "share\\hugin\\data\\";
226
227 // locale setup
228 locale.AddCatalogLookupPathPrefix(huginRoot + "share\\locale");
229
230#elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
231 // initialize paths
232 {
234 if (thePath == wxEmptyString) {
235 hugin_utils::HuginMessageBox(_("xrc directory not found in bundle"), _("Hugin"), wxOK | wxICON_ERROR, wxGetActiveWindow());
236 return false;
237 }
238 m_xrcPrefix = thePath + "/";
239 m_DataDir = thePath + "/";
240 }
241
242#ifdef HUGIN_HSI
243 // Set PYTHONHOME for the hsi module
244 {
245 wxString pythonHome = MacGetPathToBundledFrameworksDirectory() + "/Python27.framework/Versions/Current";
246 if(! wxDir::Exists(pythonHome)){
247 hugin_utils::HuginMessageBox(wxString::Format(_("Directory '%s' does not exists"), pythonHome), _("Hugin"), wxOK | wxICON_ERROR, wxGetActiveWindow());
248 } else {
249 wxUnsetEnv("PYTHONPATH");
250 if(! wxSetEnv("PYTHONHOME", pythonHome)){
251 hugin_utils::HuginMessageBox(_("Could not set environment variable PYTHONHOME"), _("Hugin"), wxOK | wxICON_ERROR, wxGetActiveWindow());
252 } else {
253 DEBUG_TRACE("PYTHONHOME set to " << pythonHome);
254 }
255 }
256 }
257#endif
258
259#elif defined UNIX_SELF_CONTAINED_BUNDLE
260 // initialize paths
261 {
262 wxFileName exePath(wxStandardPaths::Get().GetExecutablePath());
264 exePath.RemoveLastDir();
266 m_xrcPrefix = huginRoot + "share/hugin/xrc/";
267 m_DataDir = huginRoot + "share/hugin/data/";
268
269 // locale setup
270 locale.AddCatalogLookupPathPrefix(huginRoot + "share/locale");
271 }
272
273#else
274 // add the locale directory specified during configure
277 locale.AddCatalogLookupPathPrefix(INSTALL_LOCALE_DIR);
278#endif
279
280 if ( ! wxFile::Exists(m_xrcPrefix + "/main_frame.xrc") ) {
281 hugin_utils::HuginMessageBox(wxString::Format(_("xrc directory not found, hugin needs to be properly installed\nTried Path: %s"), m_xrcPrefix), _("Hugin"), wxOK | wxICON_ERROR, wxGetActiveWindow());
282 return false;
283 }
284
285 // need to explicitly initialize locale for C++ library/runtime
286 setlocale(LC_ALL, "");
287 // initialize i18n
288 int localeID = config->Read("language", (long) HUGIN_LANGUAGE);
289 DEBUG_TRACE("localeID: " << localeID);
290 {
291 bool bLInit;
292 bLInit = locale.Init(localeID);
293 if (bLInit) {
294 DEBUG_TRACE("locale init OK");
295 DEBUG_TRACE("System Locale: " << locale.GetSysName().mb_str(wxConvLocal))
296 DEBUG_TRACE("Canonical Locale: " << locale.GetCanonicalName().mb_str(wxConvLocal))
297 } else {
298 DEBUG_TRACE("locale init failed");
299 }
300 }
301
302 // set the name of locale recource to look for
303 locale.AddCatalog("hugin");
304
305 // initialize image handlers
307
308 // Initialize all the XRC handlers.
309 wxXmlResource::Get()->InitAllHandlers();
310
311 // load all XRC files.
312 #ifdef _INCLUDE_UI_RESOURCES
314 #else
315
316 // add custom XRC handlers
317 wxXmlResource::Get()->AddHandler(new ImagesPanelXmlHandler());
318 wxXmlResource::Get()->AddHandler(new CPEditorPanelXmlHandler());
319 wxXmlResource::Get()->AddHandler(new CPImageCtrlXmlHandler());
320 wxXmlResource::Get()->AddHandler(new CPImagesComboBoxXmlHandler());
321 wxXmlResource::Get()->AddHandler(new MaskEditorPanelXmlHandler());
322 wxXmlResource::Get()->AddHandler(new MaskImageCtrlXmlHandler());
323 wxXmlResource::Get()->AddHandler(new OptimizePanelXmlHandler());
324 wxXmlResource::Get()->AddHandler(new OptimizePhotometricPanelXmlHandler());
325 wxXmlResource::Get()->AddHandler(new PanoPanelXmlHandler());
326 wxXmlResource::Get()->AddHandler(new PreviewPanelXmlHandler());
327 wxXmlResource::Get()->AddHandler(new HtmlWindowXmlHandler());
328 wxXmlResource::Get()->AddHandler(new wxcode::wxTreeListCtrlXmlHandler());
329 wxXmlResource::Get()->AddHandler(new ImagesTreeCtrlXmlHandler());
330 wxXmlResource::Get()->AddHandler(new CPListCtrlXmlHandler());
331 wxXmlResource::Get()->AddHandler(new SplitButtonXmlHandler());
332
333 // load XRC files
334 wxXmlResource::Get()->Load(m_xrcPrefix + "cp_list_frame.xrc");
335 wxXmlResource::Get()->Load(m_xrcPrefix + "preview_frame.xrc");
336 wxXmlResource::Get()->Load(m_xrcPrefix + "edit_script_dialog.xrc");
337 wxXmlResource::Get()->Load(m_xrcPrefix + "main_menu.xrc");
338 wxXmlResource::Get()->Load(m_xrcPrefix + "main_tool.xrc");
339 wxXmlResource::Get()->Load(m_xrcPrefix + "about.xrc");
340 wxXmlResource::Get()->Load(m_xrcPrefix + "pref_dialog.xrc");
341 wxXmlResource::Get()->Load(m_xrcPrefix + "cpdetector_dialog.xrc");
342 wxXmlResource::Get()->Load(m_xrcPrefix + "reset_dialog.xrc");
343 wxXmlResource::Get()->Load(m_xrcPrefix + "optimize_photo_panel.xrc");
344 wxXmlResource::Get()->Load(m_xrcPrefix + "cp_editor_panel.xrc");
345 wxXmlResource::Get()->Load(m_xrcPrefix + "images_panel.xrc");
346 wxXmlResource::Get()->Load(m_xrcPrefix + "main_frame.xrc");
347 wxXmlResource::Get()->Load(m_xrcPrefix + "optimize_panel.xrc");
348 wxXmlResource::Get()->Load(m_xrcPrefix + "pano_panel.xrc");
349 wxXmlResource::Get()->Load(m_xrcPrefix + "mask_editor_panel.xrc");
350 wxXmlResource::Get()->Load(m_xrcPrefix + "lensdb_dialogs.xrc");
351 wxXmlResource::Get()->Load(m_xrcPrefix + "image_variable_dlg.xrc");
352 wxXmlResource::Get()->Load(m_xrcPrefix + "dlg_warning.xrc");
353 wxXmlResource::Get()->Load(m_xrcPrefix + "import_raw_dialog.xrc");
354#endif
355
356#ifdef __WXMAC__
357 // If hugin is starting with file opening AppleEvent, MacOpenFile will be called on first wxYield().
358 // Those need to be initialised before first call of Yield which happens in Mainframe constructor.
359 m_macInitDone=false;
361#endif
362 // read monitor profile
364 // create main frame
365 frame = new MainFrame(NULL, pano);
367
368 // setup main frame size, after it has been created.
370#ifdef __WXMSW__
371 frame->SendSizeEvent();
372// wxUSE_TASKBARBUTTON 1 is default, nevertheless check that the feature has not been deactivated by the user, otherwise issue a warning
373#if wxUSE_TASKBARBUTTON
375 wxFileName exeFile(wxStandardPaths::Get().GetExecutablePath());
376 exeFile.SetName("PTBatcherGUI");
378 NULL, wxTASKBAR_JUMP_LIST_TASK, _("Open Batch Processor"), exeFile.GetFullPath(), wxEmptyString,
379 _("Opens PTBatcherGUI, the batch processor for Hugin's project files"),
380 exeFile.GetFullPath(), 0);
381 jumpList.GetTasks().Append(item1);
382 exeFile.SetName("calibrate_lens_gui");
384 NULL, wxTASKBAR_JUMP_LIST_TASK, _("Open Lens calibrate tool"), exeFile.GetFullPath(), wxEmptyString,
385 _("Opens Calibrate_lens_gui, a simple GUI for lens calibration"),
386 exeFile.GetFullPath(), 0);
387 jumpList.GetTasks().Append(item1);
388 exeFile.SetName("Hugin_toolbox");
390 NULL, wxTASKBAR_JUMP_LIST_TASK, _("Open Hugin toolbox"), exeFile.GetFullPath(), wxEmptyString,
391 _("Opens Hugin_toolbox, a GUI for several small helper programs"),
392 exeFile.GetFullPath(), 0);
393 jumpList.GetTasks().Append(item1);
394#else
395 #if defined _MSC_VER
396 #pragma message("Warning: huginApp.cpp - wxWidgets is compiled without support for taskbar buttons. Some features have therefore disabled.")
397 #else
398 #warning "Warning: huginApp.cpp - wxWidgets is compiled without support for taskbar buttons. Some features have therefore disabled."
399 #endif
400#endif
401#endif
402 // init help system
403 provider->SetHelpController(&frame->GetHelpController());
404#ifdef __WXMSW__
405 frame->GetHelpController().Initialize(m_xrcPrefix + "data/hugin_help_en_EN.chm");
406#else
407#if wxUSE_WXHTML_HELP
408 // using wxHtmlHelpController
409#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
410 // On Mac, xrc/data/help_LOCALE should be in the bundle as LOCALE.lproj/help
411 // which we can rely on the operating sytem to pick the right locale's.
413 if (!strFile.IsEmpty())
414 {
415 frame->GetHelpController().AddBook(wxFileName(strFile + "/hugin_help_en_EN.hhp"));
416 }
417 else
418 {
419 wxLogError(wxString::Format("Could not find help directory in the bundle", strFile.c_str()));
420 return false;
421 }
422#else
423 frame->GetHelpController().AddBook(wxFileName(m_xrcPrefix + "data/help_en_EN/hugin_help_en_EN.hhp"));
424#endif
425#else
426 // using wxExtHelpController
427 frame->GetHelpController().Initialize(Initialize(m_xrcPrefix + "data/help_en_EN"));
428#endif
429#endif
430
431 // we are closing Hugin, if the top level window is deleted
433 // show the frame.
435 {
437 }
438 else
439 {
440 frame->Show(TRUE);
441 };
442
443 wxString cwd = wxFileName::GetCwd();
444
445 m_workDir = config->Read("tempDir",wxEmptyString);
446 // FIXME, make secure against some symlink attacks
447 // get a temp dir
448 if (m_workDir == wxEmptyString) {
449#if (defined __WXMSW__)
450 DEBUG_DEBUG("figuring out windows temp dir");
451 /* added by Yili Zhao */
452 wxChar buffer[MAX_PATH];
453 GetTempPath(MAX_PATH, buffer);
454 m_workDir = buffer;
455#elif (defined __WXMAC__) && (defined MAC_SELF_CONTAINED_BUNDLE)
456 DEBUG_DEBUG("temp dir on Mac");
459 m_workDir = "/tmp";
460#else //UNIX
461 DEBUG_DEBUG("temp dir on unix");
462 // try to read environment variable
463 if (!wxGetEnv("TMPDIR", &m_workDir)) {
464 // still no tempdir, use /tmp
465 m_workDir = "/tmp";
466 }
467#endif
468
469 }
470
471 if (!wxFileName::DirExists(m_workDir)) {
472 DEBUG_DEBUG("creating temp dir: " << m_workDir.mb_str(wxConvLocal));
473 if (!wxMkdir(m_workDir)) {
474 DEBUG_ERROR("Tempdir could not be created: " << m_workDir.mb_str(wxConvLocal));
475 }
476 }
478 DEBUG_ERROR("could not change to temp. dir: " << m_workDir.mb_str(wxConvLocal));
479 }
480 DEBUG_DEBUG("using temp dir: " << m_workDir.mb_str(wxConvLocal));
481
482 // set some suitable defaults
485
486 // suppress tiff warnings
488
489 if (argc > 1)
490 {
491#ifdef __WXMSW__
492 //on Windows we need to update the fast preview first
493 //otherwise there is an infinite loop when starting with a project file
494 //and closed panorama editor aka mainframe
496 {
497 frame->getGLPreview()->Update();
498 };
499#endif
500 wxFileName file(argv[1]);
501 // if the first file is a project file, open it
502 if (file.GetExt().CmpNoCase("pto") == 0 ||
503 file.GetExt().CmpNoCase("pts") == 0 ||
504 file.GetExt().CmpNoCase("ptp") == 0 )
505 {
506 if(file.IsRelative())
507 file.MakeAbsolute(cwd);
508 // Loading the project file with set actualPath to its
509 // parent directory. (actualPath is used as starting
510 // directory by many subsequent file selection dialogs.)
511 frame->LoadProjectFile(file.GetFullPath());
512 } else {
513 std::vector<std::string> filesv;
514 std::vector<std::string> rawFilesv;
515 bool actualPathSet = false;
516 for (int i=1; i< argc; i++)
517 {
518#if defined __WXMSW__
519 //expand wildcards
521 if(fileList.IsRelative())
522 fileList.MakeAbsolute(cwd);
523 wxDir dir;
525 wxFileName file;
526 if(fileList.DirExists())
527 if(dir.Open(fileList.GetPath()))
528 if(dir.GetFirst(&foundFile,fileList.GetFullName(),wxDIR_FILES | wxDIR_HIDDEN))
529 do
530 {
531 file=foundFile;
532 file.MakeAbsolute(dir.GetName());
533#else
534 wxFileName file(argv[i]);
535#endif
536 if (file.IsRelative())
537 {
538 file.MakeAbsolute(cwd);
539 };
540 if (IsRawExtension(file.GetExt()))
541 {
542 // we got a raw file from command line
543 if (!containsInvalidCharacters(file.GetFullPath()))
544 {
545 rawFilesv.push_back((const char*)file.GetFullPath().mb_str(HUGIN_CONV_FILENAME));
546 // Use the first filename to set actualPath.
547 if (!actualPathSet)
548 {
549 config->Write("/actualPath", file.GetPath());
550 actualPathSet = true;
551 };
552 };
553 }
554 else
555 {
556 if (vigra::isImage(file.GetFullPath().mb_str(HUGIN_CONV_FILENAME)))
557 {
558 if (!containsInvalidCharacters(file.GetFullPath()))
559 {
560 filesv.push_back((const char *)(file.GetFullPath().mb_str(HUGIN_CONV_FILENAME)));
561 // Use the first filename to set actualPath.
562 if (!actualPathSet)
563 {
564 config->Write("/actualPath", file.GetPath());
565 actualPathSet = true;
566 };
567 };
568 };
569 };
570#if defined __WXMSW__
571 } while (dir.GetNext(&foundFile));
572#endif
573 }
574 if(!filesv.empty())
575 {
576 std::vector<PanoCommand::PanoCommand*> cmds;
579 cmds.push_back(new PanoCommand::CenterPanoCmd(pano));
581 };
582 if (!rawFilesv.empty())
583 {
584 if (rawFilesv.size() == 1)
585 {
586 hugin_utils::MessageDialog message=hugin_utils::GetMessageDialog(_("You selected only one raw file. This is not recommended.\nAll raw files should be converted at once."),
588 message->SetOKLabel(_("Convert anyway."));
589 if (message->ShowModal() != wxID_OK)
590 {
591 return true;
592 };
593 };
595 // check that raw files are from same camera and that all can be read
596 if (dlg.CheckRawFiles())
597 {
598 // now show dialog
599 if (dlg.ShowModal() == wxID_OK)
600 {
602 };
603 };
604 };
605 };
606 }
607#ifdef __WXMAC__
608 m_macInitDone = true;
610 m_macOpenFileOnStart = false;
611#endif
612
613 //check for no tip switch, needed by PTBatcher
614 wxString secondParam = argc > 2 ? wxString(argv[2]) : wxString();
615 if(secondParam.Cmp(_T("-notips"))!=0)
616 {
617 //load tip startup preferences (tips will be started after splash terminates)
618 int nValue = config->Read("/MainFrame/ShowStartTip", 1l);
619
620 //show tips if needed now
621 if(nValue > 0)
622 {
623 wxCommandEvent dummy;
625 }
626 }
627
628 DEBUG_TRACE("=========================== huginApp::OnInit() end ===================");
629 return true;
630}
631
633{
634 DEBUG_TRACE("");
635 delete wxHelpProvider::Set(NULL);
636 return 0;
637}
638
640{
641 if (m_this) {
642 return m_this;
643 } else {
644 DEBUG_FATAL("huginApp not yet created");
646 return 0;
647 }
648}
649
651{
652 if (m_this) {
653 return m_this->frame;
654 } else {
655 return 0;
656 }
657}
658
659#ifdef __WXMAC__
660void huginApp::MacOpenFile(const wxString &fileName)
661{
662 if(!m_macInitDone)
663 {
666 return;
667 }
668
669 if(frame) frame->MacOnOpenFile(fileName);
670}
671#endif
672
673#if wxUSE_ON_FATAL_EXCEPTION
674void huginApp::OnFatalException()
675{
676 GenerateReport(wxDebugReport::Context_Exception);
677};
678#endif
679
Definition of dialog for numeric transforms.
@ GUI_SIMPLE
Definition GuiLevel.h:33
Definition of HTMLWindow class which supports opening external links in default web browser.
declaration of main image tree control
class to access Hugins camera and lens database
int main(int argc, char *argv[])
Definition Main.cpp:167
void registerPTWXDlgFcn()
Definition PTWXDlg.cpp:178
Definition of dialog and functions to import RAW images to project file.
xrc handler for CPImagesComboBox
xrc handler for CPImagesComboBox
Definition CPListFrame.h:95
xrc handler for HTMLWindow
Definition HtmlWindow.h:54
static void Clean()
cleanup the static LensDB instance, must be called at the end of the program
Definition LensDB.cpp:2010
std::vector< HuginBase::UIntSet > Components
stores the components of the graph
Definition ImageGraph.h:50
bool OnInit() wxOVERRIDE
The main window frame.
Definition MainFrame.h:84
void LoadProjectFile(const wxString &filename)
void OnTipOfDay(wxCommandEvent &e)
const GuiLevel GetGuiLevel() const
Definition MainFrame.h:185
wxHelpController & GetHelpController()
Definition MainFrame.h:183
GLPreviewFrame * getGLPreview()
xrc handler for handling mask editor panel
xrc handler for mask editor
center panorama horizontically
PanoCommand to combine other PanoCommands.
Definition PanoCommand.h:40
void addCommand(PanoCommand *command, bool execute=true)
Adds a command to the history.
void clear()
Erases all the undo/redo history.
distributes all images above the sphere, for the assistant
static GlobalCmdHist & getInstance()
add image(s) to a panorama
start a new project, reset options to values in preferences
Dialog for raw import.
Definition RawImport.h:35
xrc handler for split button
Definition SplitButton.h:95
The application class for hugin.
Definition huginApp.h:43
static huginApp * m_this
Definition huginApp.h:128
wxString m_xrcPrefix
Definition huginApp.h:134
virtual ~huginApp()
dtor.
Definition huginApp.cpp:157
static MainFrame * getMainFrame()
Definition huginApp.cpp:650
cmsHPROFILE m_monitorProfile
Definition huginApp.h:141
bool OnInit() override
pseudo constructor.
Definition huginApp.cpp:177
MainFrame * frame
Definition huginApp.h:125
int OnExit() override
just for testing purposes
Definition huginApp.cpp:632
HuginBase::Panorama pano
Definition huginApp.h:131
wxString m_workDir
temporary working directory
Definition huginApp.h:123
static huginApp * Get()
hack.. kind of a pseudo singleton...
Definition huginApp.cpp:639
wxString m_monitorProfileName
Definition huginApp.h:140
wxString m_utilsBinDir
Definition huginApp.h:138
huginApp()
ctor.
Definition huginApp.cpp:147
wxLocale locale
locale for internationalisation
Definition huginApp.h:120
wxString m_DataDir
Definition huginApp.h:136
#define HUGIN_LANGUAGE
implementation of huginApp Class
#define HUGIN_CONV_FILENAME
Definition platform.h:40
wxIMPLEMENT_APP(huginApp)
bool checkVersion(wxString v1, wxString v2)
Definition huginApp.cpp:79
wxString Components2Str(const HuginGraph::ImageGraph::Components &comp)
Definition huginApp.cpp:84
functions for interaction with the hugin configuration file
#define DEBUG_ERROR(msg)
Definition utils.h:76
#define DEBUG_ASSERT(cond)
Definition utils.h:80
#define DEBUG_DEBUG(msg)
Definition utils.h:68
#define DEBUG_FATAL(msg)
Definition utils.h:78
#define DEBUG_TRACE(msg)
Definition utils.h:67
void GetMonitorProfile(wxString &profileName, cmsHPROFILE &profile)
retrieve monitor profile from system
Definition wxcms.cpp:201
int alphanum_comp(const std::string &l, const std::string &r)
Compare l and r with the same semantics as strcmp(), but with the "Alphanum Algorithm" which produces...
Definition alphanum.cpp:119
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
Definition wxutils.cpp:176
std::unique_ptr< wxMessageDialogBase > MessageDialog
Definition wxutils.h:90
MessageDialog GetMessageDialog(const wxString &message, const wxString &caption, int style, wxWindow *parent)
Definition wxutils.cpp:212
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
Definition wxutils.cpp:67
include file for the hugin project
include file for the hugin project
bool IsRawExtension(const wxString &testExt)
return true, if given extension is in list of known raw extension (comparision is case insensitive
Definition platform.cpp:112
bool containsInvalidCharacters(const wxString stringToTest)
returns true, if the given strings contains invalid characters
Definition platform.cpp:511
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
wxwindows specific panorama commands
platform/compiler specific stuff.