huginApp Class Reference

The application class for hugin. More...

#include <huginApp.h>

List of all members.

Public Member Functions

 huginApp ()
 ctor.
virtual ~huginApp ()
 dtor.
virtual bool OnInit ()
 pseudo constructor.
virtual int OnExit ()
 just for testing purposes
void relayImageLoaded (ImageReadyEvent &event)
 Relay image loaded event when the UI thread is ready to process it.
wxLocale & GetLocale ()
 return currently active locale
wxString GetWorkDir ()
const wxString & GetXRCPath ()
 return the current xrc path
const wxString & GetDataPath ()
 return the current data path
const wxString & GetUtilsBinDir ()
const cmsHPROFILE GetMonitorProfile () const
 returns the monitor profile, if no monitor profile was found the sRGB profile is used instead
bool HasMonitorProfile () const
 return true if we found a suitable monitor profile and could loading it
const wxString & GetMonitorProfileName () const
 return filename of monitor profile

Static Public Member Functions

static huginAppGet ()
 hack.. kind of a pseudo singleton...
static MainFramegetMainFrame ()
static void imageLoadedAsync (HuginBase::ImageCache::RequestPtr request, HuginBase::ImageCache::EntryPtr entry)
 Queue up an image loaded event when an image has just loaded.

Private Attributes

wxLocale locale
 locale for internationalisation
wxString m_workDir
 temporary working directory
MainFrameframe
HuginBase::Panorama pano
wxString m_xrcPrefix
wxString m_DataDir
wxString m_utilsBinDir
wxString m_monitorProfileName
cmsHPROFILE m_monitorProfile

Static Private Attributes

static huginAppm_this = 0


Detailed Description

The application class for hugin.

it contains the main frame.

Definition at line 92 of file huginApp.h.


Constructor & Destructor Documentation

huginApp::huginApp (  ) 

ctor.

Definition at line 137 of file huginApp.cpp.

References DEBUG_TRACE.

huginApp::~huginApp (  )  [virtual]

dtor.

Definition at line 147 of file huginApp.cpp.

References HuginBase::LensDB::LensDB::Clean(), DEBUG_TRACE, and m_monitorProfile.


Member Function Documentation

huginApp * huginApp::Get (  )  [static]

hack.. kind of a pseudo singleton...

Definition at line 549 of file huginApp.cpp.

References DEBUG_ASSERT, DEBUG_FATAL, and m_this.

Referenced by CPDetectorDialog::CPDetectorDialog(), CPListFrame::CPListFrame(), PreviewPanel::Create(), ImagesPanel::Create(), CPImageCtrl::Create(), TextureManager::TextureInfo::DefineLevels(), MainFrame::DisplayHelp(), EVT_BUTTON(), EVT_CHOICE(), EVT_NOTEBOOK_PAGE_CHANGED(), EVT_TEXT(), MainFrame::GetSVMModel(), AboutDialog::GetSystemInformation(), MainFrame::GetXRCPath(), GLPreviewFrame::GLPreviewFrame(), MainFrame::MainFrame(), MaskLoadDialog::MaskLoadDialog(), PreferencesDialog::OnRestoreDefaults(), PanoOutputDialog::PanoOutputDialog(), Papywizard::PapywizardImportDialog::PapywizardImportDialog(), PreviewFrame::PreviewFrame(), MaskImageCtrl::rescaleImage(), CPImageCtrl::rescaleImage(), ResetDialog::ResetDialog(), AboutDialog::SetLogo(), PreviewPanel::updatePreview(), and ImagesPanel::UpdatePreviewImage().

const wxString& huginApp::GetDataPath (  )  [inline]

return the current data path

Definition at line 140 of file huginApp.h.

References m_DataDir.

Referenced by MainFrame::GetSVMModel(), and PreferencesDialog::OnRestoreDefaults().

wxLocale& huginApp::GetLocale (  )  [inline]

return currently active locale

Definition at line 123 of file huginApp.h.

References locale.

Referenced by MainFrame::DisplayHelp(), and EVT_NOTEBOOK_PAGE_CHANGED().

MainFrame * huginApp::getMainFrame (  )  [static]

Definition at line 560 of file huginApp.cpp.

References frame, and m_this.

Referenced by TextureManager::TextureInfo::DefineLevels().

const cmsHPROFILE huginApp::GetMonitorProfile (  )  const [inline]

returns the monitor profile, if no monitor profile was found the sRGB profile is used instead

Definition at line 151 of file huginApp.h.

References m_monitorProfile.

Referenced by MaskImageCtrl::rescaleImage(), CPImageCtrl::rescaleImage(), and ImagesPanel::UpdatePreviewImage().

const wxString& huginApp::GetMonitorProfileName (  )  const [inline]

return filename of monitor profile

Definition at line 161 of file huginApp.h.

References m_monitorProfileName.

const wxString& huginApp::GetUtilsBinDir (  )  [inline]

Definition at line 145 of file huginApp.h.

References m_utilsBinDir.

wxString huginApp::GetWorkDir (  )  [inline]

Definition at line 128 of file huginApp.h.

References m_workDir.

const wxString& huginApp::GetXRCPath (  )  [inline]

return the current xrc path

Definition at line 134 of file huginApp.h.

References m_xrcPrefix.

Referenced by PreviewPanel::Create(), CPImageCtrl::Create(), EVT_NOTEBOOK_PAGE_CHANGED(), MainFrame::GetXRCPath(), MainFrame::MainFrame(), and AboutDialog::SetLogo().

bool huginApp::HasMonitorProfile (  )  const [inline]

return true if we found a suitable monitor profile and could loading it

Definition at line 156 of file huginApp.h.

References m_monitorProfileName.

Referenced by MaskImageCtrl::rescaleImage(), CPImageCtrl::rescaleImage(), PreviewPanel::updatePreview(), and ImagesPanel::UpdatePreviewImage().

static void huginApp::imageLoadedAsync ( HuginBase::ImageCache::RequestPtr  request,
HuginBase::ImageCache::EntryPtr  entry 
) [static]

Queue up an image loaded event when an image has just loaded.

Referenced by OnInit().

int huginApp::OnExit (  )  [virtual]

just for testing purposes

Definition at line 539 of file huginApp.cpp.

References DEBUG_TRACE.

bool huginApp::OnInit (  )  [virtual]

pseudo constructor.

with the ability to fail gracefully.

Definition at line 167 of file huginApp.cpp.

References CommandHistory::addCommand(), CommandHistory::clear(), containsInvalidCharacters(), DEBUG_DEBUG, DEBUG_ERROR, DEBUG_TRACE, frame, MainFrame::getGLPreview(), MainFrame::GetGuiLevel(), PanoCommand::GlobalCmdHist::getInstance(), HuginBase::Color::GetMonitorProfile(), GUI_SIMPLE, HUGIN_CONV_FILENAME, HUGIN_LANGUAGE, imageLoadedAsync(), INSTALL_DATA_DIR, INSTALL_LOCALE_DIR, INSTALL_XRC_DIR, MainFrame::LoadProjectFile(), locale, m_DataDir, m_monitorProfile, m_monitorProfileName, m_utilsBinDir, m_workDir, m_xrcPrefix, MainFrame::OnTipOfDay(), pano, registerPTWXDlgFcn(), and RestoreFramePosition().

void huginApp::relayImageLoaded ( ImageReadyEvent event  ) 

Relay image loaded event when the UI thread is ready to process it.

Definition at line 569 of file huginApp.cpp.

References ImageReadyEvent::entry, and ImageReadyEvent::request.


Member Data Documentation

MainFrame* huginApp::frame [private]

Definition at line 186 of file huginApp.h.

Referenced by getMainFrame(), and OnInit().

wxLocale huginApp::locale [private]

locale for internationalisation

Definition at line 164 of file huginApp.h.

Referenced by GetLocale(), and OnInit().

wxString huginApp::m_DataDir [private]

Definition at line 197 of file huginApp.h.

Referenced by GetDataPath(), and OnInit().

cmsHPROFILE huginApp::m_monitorProfile [private]

Definition at line 202 of file huginApp.h.

Referenced by GetMonitorProfile(), OnInit(), and ~huginApp().

wxString huginApp::m_monitorProfileName [private]

Definition at line 201 of file huginApp.h.

Referenced by GetMonitorProfileName(), HasMonitorProfile(), and OnInit().

huginApp * huginApp::m_this = 0 [static, private]

Definition at line 189 of file huginApp.h.

Referenced by Get(), and getMainFrame().

wxString huginApp::m_utilsBinDir [private]

Definition at line 199 of file huginApp.h.

Referenced by GetUtilsBinDir(), and OnInit().

wxString huginApp::m_workDir [private]

temporary working directory

Definition at line 184 of file huginApp.h.

Referenced by GetWorkDir(), and OnInit().

wxString huginApp::m_xrcPrefix [private]

Definition at line 195 of file huginApp.h.

Referenced by GetXRCPath(), and OnInit().

HuginBase::Panorama huginApp::pano [private]

Definition at line 192 of file huginApp.h.

Referenced by OnInit().


The documentation for this class was generated from the following files:
Generated on 30 May 2016 for Hugintrunk by  doxygen 1.4.7