~ubuntu-branches/ubuntu/trusty/hugin/trusty-proposed

« back to all changes in this revision

Viewing changes to src/hugin1/ptbatcher/Batch.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Metzler
  • Date: 2011-01-06 14:28:24 UTC
  • mfrom: (1.1.9 upstream) (0.1.21 experimental)
  • Revision ID: james.westby@ubuntu.com-20110106142824-zn9lxylg5z44dynn
* Drop Cyril Brulebois from Uploaders. Thank you very much for your work.
* Bump package version. (rc3 was re-released as 2010.4.0).

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
using namespace std;
47
47
 
 
48
struct FailedProject
 
49
{
 
50
    wxString project;
 
51
    wxString logfile;
 
52
};
 
53
 
48
54
class Batch : public wxFrame
49
55
{
50
56
public:
61
67
        //Adds an application entry in the batch list
62
68
        void  AddAppToBatch(wxString app);
63
69
        //Adds a project entry in the batch list
64
 
        void  AddProjectToBatch(wxString projectFile, wxString outputFile = _T(""));    
 
70
    void  AddProjectToBatch(wxString projectFile, wxString outputFile = _T(""), Project::Target target=Project::STITCHING);     
65
71
        //Returns true if there are no more projects pending execution
66
72
        bool  AllDone();
67
73
        //Appends projects from file to batch list
109
115
        void  OnProcessTerminate(wxProcessEvent & event);
110
116
        //Called to start stitch of project with input scriptFile
111
117
        bool  OnStitch(wxString scriptFile, wxString outname, int id);
 
118
    /** called to start detecting */
 
119
    bool OnDetect(wxString scriptFile, int id);
112
120
        //Pauses and continues batch execution
113
121
        void  PauseBatch();
114
122
        //Removes project with id from batch list
131
139
         * @param isVisible If true display the project output, otherwise hide it.
132
140
         */
133
141
        void ShowOutput(bool isVisible=true);
 
142
    /** returns number of failed projects */
 
143
    size_t GetFailedProjectsCount() { return m_failedProjects.size(); };
 
144
    /** returns project file name of failed project with index i */
 
145
    wxString GetFailedProjectName(unsigned int i);
 
146
    /** returns log file name of failed project with index i */
 
147
    wxString GetFailedProjectLog(unsigned int i);
134
148
 
135
149
private:
136
150
        //environment config objects
148
162
        bool m_paused;
149
163
        bool m_running;
150
164
        bool m_clearedInProgress;
 
165
 
 
166
    //vector, which stores the failed projects and filename of saved logfile
 
167
    std::vector<FailedProject> m_failedProjects;
151
168
        
152
169
        //external program config
153
170
        PTPrograms progs;
 
171
    AssistantPrograms progsAss;
154
172
 
155
173
        DECLARE_EVENT_TABLE()
156
174
};
157
175
 
 
176
#if _WINDOWS && defined Hugin_shared
 
177
    DECLARE_LOCAL_EVENT_TYPE(EVT_BATCH_FAILED,-1)
 
178
#else
 
179
    DECLARE_EVENT_TYPE(EVT_BATCH_FAILED,-1)
 
180
#endif
 
181
 
158
182
#endif //BATCH_H