36 wxXmlResource::Get()->LoadDialog(
this,parent,wxT(
"failed_project_dialog"));
39 wxIconBundle myIcons(xrcPrefix+ wxT(
"data/ptbatcher.ico"),wxBITMAP_TYPE_ICO);
42 wxIcon myIcon(xrcPrefix + wxT(
"data/ptbatcher.png"),wxBITMAP_TYPE_PNG);
47 m_list=XRCCTRL(*
this,
"failed_list",wxListBox);
49 m_log=XRCCTRL(*
this,
"failed_log",wxTextCtrl);
64 wxConfigBase* config = wxConfigBase::Get();
67 wxDisplaySize(&dx,&dy);
68 bool maximized = config->Read(wxT(
"/FailedProjectsDialog/maximized"), 0l) != 0;
76 int w = config->Read(wxT(
"/FailedProjectsDialog/width"),-1l);
77 int h = config->Read(wxT(
"/FailedProjectsDialog/height"),-1l);
80 this->SetClientSize(w,h);
87 int splitter_pos=config->Read(wxT(
"/FailedProjectsDialog/splitterPos"),-1l);
88 wxSplitterWindow* splitWindow=XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow);
89 if(splitter_pos>0 && splitter_pos<splitWindow->GetSize().GetWidth())
91 splitWindow->SetSashPosition(splitter_pos);
94 int x = config->Read(wxT(
"/FailedProjectsDialog/positionX"),-1l);
95 int y = config->Read(wxT(
"/FailedProjectsDialog/positionY"),-1l);
96 if ( y >= 0 && x >= 0 && x < dx && y < dy)
109 wxConfigBase* config=wxConfigBase::Get();
110 if(!this->IsMaximized())
112 wxSize sz = this->GetClientSize();
113 config->Write(wxT(
"/FailedProjectsDialog/width"), sz.GetWidth());
114 config->Write(wxT(
"/FailedProjectsDialog/height"), sz.GetHeight());
115 wxPoint ps = this->GetPosition();
116 config->Write(wxT(
"/FailedProjectsDialog/positionX"), ps.x);
117 config->Write(wxT(
"/FailedProjectsDialog/positionY"), ps.y);
118 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 0);
122 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 1l);
124 config->Write(wxT(
"/FailedProjectsDialog/splitterPos"), XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow)->GetSashPosition());
129 int sel=
m_list->GetSelection();
134 if(!logfile.IsEmpty())
138 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
FailedProjectsDialog(wxWindow *parent, Batch *batch, wxString xrcPrefix)
Constructor, read from xrc ressource; restore last uses settings, size and position.
Definition of failed projects dialog.
size_t GetFailedProjectsCount()
returns number of failed projects
include file for the hugin project
wxString GetFailedProjectName(unsigned int i)
returns project file name of failed project with index i
~FailedProjectsDialog()
destructor, saves size and position
Batch processor for Hugin.
wxString GetFailedProjectLog(unsigned int i)
returns log file name of failed project with index i