36 wxXmlResource::Get()->LoadDialog(
this,parent,wxT(
"failed_project_dialog"));
40 m_list=XRCCTRL(*
this,
"failed_list",wxListBox);
42 m_log=XRCCTRL(*
this,
"failed_log",wxTextCtrl);
57 wxConfigBase* config = wxConfigBase::Get();
60 wxDisplaySize(&dx,&dy);
61 bool maximized = config->Read(wxT(
"/FailedProjectsDialog/maximized"), 0l) != 0;
69 int w = config->Read(wxT(
"/FailedProjectsDialog/width"),-1l);
70 int h = config->Read(wxT(
"/FailedProjectsDialog/height"),-1l);
73 this->SetClientSize(w,h);
80 int splitter_pos=config->Read(wxT(
"/FailedProjectsDialog/splitterPos"),-1l);
81 wxSplitterWindow* splitWindow=XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow);
82 if(splitter_pos>0 && splitter_pos<splitWindow->GetSize().GetWidth())
84 splitWindow->SetSashPosition(splitter_pos);
87 int x = config->Read(wxT(
"/FailedProjectsDialog/positionX"),-1l);
88 int y = config->Read(wxT(
"/FailedProjectsDialog/positionY"),-1l);
89 if ( y >= 0 && x >= 0 && x < dx && y < dy)
102 wxConfigBase* config=wxConfigBase::Get();
103 if(!this->IsMaximized())
105 wxSize sz = this->GetClientSize();
106 config->Write(wxT(
"/FailedProjectsDialog/width"), sz.GetWidth());
107 config->Write(wxT(
"/FailedProjectsDialog/height"), sz.GetHeight());
108 wxPoint ps = this->GetPosition();
109 config->Write(wxT(
"/FailedProjectsDialog/positionX"), ps.x);
110 config->Write(wxT(
"/FailedProjectsDialog/positionY"), ps.y);
111 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 0);
115 config->Write(wxT(
"/FailedProjectsDialog/maximized"), 1l);
117 config->Write(wxT(
"/FailedProjectsDialog/splitterPos"), XRCCTRL(*
this,
"failed_splitter",wxSplitterWindow)->GetSashPosition());
122 int sel=
m_list->GetSelection();
127 if(!logfile.IsEmpty())
131 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