40 wxXmlResource::Get()->LoadDialog(
this,parent,wxT(
"failed_project_dialog"));
43 wxIconBundle myIcons(xrcPrefix+ wxT(
"data/ptbatcher.ico"),wxBITMAP_TYPE_ICO);
46 wxIcon myIcon(xrcPrefix + wxT(
"data/ptbatcher.png"),wxBITMAP_TYPE_PNG);
51 m_list=XRCCTRL(*
this,
"failed_list",wxListBox);
52 m_log=XRCCTRL(*
this,
"failed_log",wxTextCtrl);
55 for(
unsigned int i=0; i<batch->GetFailedProjectsCount(); i++)
57 m_list->AppendString(batch->GetFailedProjectName(i));
59 if(m_list->GetCount()>0)
61 m_list->SetSelection(0);
63 OnSelectProject(dummy);
67 wxConfigBase* config = wxConfigBase::Get();
70 wxDisplaySize(&dx,&dy);
71 bool maximized = config->Read(wxT(
"/FailedProjectsDialog/maximized"), 0l) != 0;
79 int w = config->Read(wxT(
"/FailedProjectsDialog/width"),-1l);
80 int h = config->Read(wxT(
"/FailedProjectsDialog/height"),-1l);
83 this->SetClientSize(w,h);
90 int splitter_pos=config->Read(wxT(
"/FailedProjectsDialog/splitterPos"),-1l);
91 wxSplitterWindow* splitWindow=XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow);
92 if(splitter_pos>0 && splitter_pos<splitWindow->GetSize().GetWidth())
94 splitWindow->SetSashPosition(splitter_pos);
97 int x = config->Read(wxT(
"/FailedProjectsDialog/positionX"),-1l);
98 int y = config->Read(wxT(
"/FailedProjectsDialog/positionY"),-1l);
99 if ( y >= 0 && x >= 0 && x < dx && y < dy)
112 wxConfigBase* config=wxConfigBase::Get();
113 if(!this->IsMaximized())
115 wxSize sz = this->GetClientSize();
116 config->Write(wxT(
"/FailedProjectsDialog/width"), sz.GetWidth());
117 config->Write(wxT(
"/FailedProjectsDialog/height"), sz.GetHeight());
118 wxPoint ps = this->GetPosition();
119 config->Write(wxT(
"/FailedProjectsDialog/positionX"), ps.x);
120 config->Write(wxT(
"/FailedProjectsDialog/positionY"), ps.y);
121 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 0);
125 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 1l);
127 config->Write(wxT(
"/FailedProjectsDialog/splitterPos"), XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow)->GetSashPosition());
132 int sel=
m_list->GetSelection();
137 if(!logfile.IsEmpty())
141 m_log->LoadFile(logfile);
bool FileExists(const std::string &filename)
checks if file exists
void OnSelectProject(wxCommandEvent &e)
event handler, if new project was selected
Definition of failed projects dialog.
include file for the hugin project
~FailedProjectsDialog()
destructor, saves size and position
Dialog for finding panorama in given directory.
Batch processor for Hugin.
wxString GetFailedProjectLog(unsigned int i)
returns log file name of failed project with index i