Hugin trunk 0.1
Loading...
Searching...
No Matches
huginApp.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
24#ifndef _HUGINAPP_H
25#define _HUGINAPP_H
26
27#include "hugin_config.h"
28#include <huginapp/ImageCache.h>
29#include <lcms2.h>
31
33#include "hugin/MainFrame.h"
34
35// utility functions
37
42class huginApp : public ImageCacheApp
43{
44public:
45
48 huginApp();
49
52 virtual ~huginApp();
53
56 bool OnInit() override;
57
59 int OnExit() override;
60
62 static huginApp * Get();
63 static MainFrame* getMainFrame();
64
67 {
68 return locale;
69 }
70
72 {
73 return m_workDir;
74 }
75
78 {
79 return m_xrcPrefix;
80 }
81
84 {
85 return m_DataDir;
86 }
87
89 {
90 return m_utilsBinDir;
91 }
92
95 {
96 return m_monitorProfile;
97 }
99 bool HasMonitorProfile() const
100 {
101 return !m_monitorProfileName.IsEmpty();
102 }
105 {
107 };
108
109#ifdef __WXMAC__
110 //Defined in wxApp.h; This one lets project file to be opened from Finder and other applications.
111 void MacOpenFile(const wxString &fileName);
112#endif
113
114#if wxUSE_ON_FATAL_EXCEPTION
115 void OnFatalException() override;
116#endif
117
118private:
121
124
126
127 // self
128 static huginApp * m_this;
129
130 // the model
132
133 // folder for xrc (GUI resources)
135 // folder for data shared by CLI and GUI to enable separate packaging of CLI tools
137 // folder for CLI tools
139 // monitor profile
142
143#ifdef __WXMAC__
144 bool m_macInitDone;
147#endif
148};
149
151
152#endif // _HUGINAPP_H
Model for a panorama.
Definition Panorama.h:153
std::vector< HuginBase::UIntSet > Components
stores the components of the graph
Definition ImageGraph.h:50
The main window frame.
Definition MainFrame.h:84
The application class for hugin.
Definition huginApp.h:43
static huginApp * m_this
Definition huginApp.h:128
wxString GetWorkDir()
Definition huginApp.h:71
wxString m_xrcPrefix
Definition huginApp.h:134
virtual ~huginApp()
dtor.
Definition huginApp.cpp:157
static MainFrame * getMainFrame()
Definition huginApp.cpp:650
const wxString & GetUtilsBinDir()
Definition huginApp.h:88
bool HasMonitorProfile() const
return true if we found a suitable monitor profile and could loading it
Definition huginApp.h:99
cmsHPROFILE m_monitorProfile
Definition huginApp.h:141
wxLocale & GetLocale()
return currently active locale
Definition huginApp.h:66
bool OnInit() override
pseudo constructor.
Definition huginApp.cpp:177
MainFrame * frame
Definition huginApp.h:125
const wxString & GetMonitorProfileName() const
return filename of monitor profile
Definition huginApp.h:104
const cmsHPROFILE GetMonitorProfile() const
returns the monitor profile, if no monitor profile was found the sRGB profile is used instead
Definition huginApp.h:94
const wxString & GetDataPath()
return the current data path
Definition huginApp.h:83
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
const wxString & GetXRCPath()
return the current xrc path
Definition huginApp.h:77
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
wxString Components2Str(const HuginGraph::ImageGraph::Components &comp)
Definition huginApp.cpp:84
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