Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[aacb50]: src / hugin1 / ptbatcher / RunStitchFrame.h Maximize Restore History

Download this file

RunStitchFrame.h    113 lines (94 with data), 3.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
// -*- c-basic-offset: 4 -*-
/** @file RunStitchFrame.h
*
* @brief Batch processor for Hugin
*
* @author Marko Kuder <marko.kuder@gmail.com>
*
* $Id: RunStitchFrame.h 3322 2008-08-16 5:00:07Z mkuder $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef RUNSTITCHFRAME_H
#define RUNSTITCHFRAME_H
//#include <hugin_config.h>
#include <hugin_version.h>
#include "panoinc_WX.h"
//#include "panoinc.h"
#include <wx/wfstream.h>
//#include <fstream>
//#include <sstream>
//#include <vigra/error.hxx>
//#include <vigra_ext/MultiThreadOperations.h>
//#include "PT/Panorama.h"
//#include "PT/utils.h"
#include "base_wx/RunStitchPanel.h"
#include "base_wx/huginConfig.h"
//#include "base_wx/MyProgressDialog.h"
//#include "base_wx/MyExternalCmdExecDialog.h"
#include "base_wx/platform.h"
//#include "common/wxPlatform.h"
//#include <tiffio.h>
// somewhere SetDesc gets defined.. this breaks wx/cmdline.h on OSX
#ifdef SetDesc
#undef SetDesc
#endif
//#include <wx/cmdline.h>
using namespace vigra;
using namespace PT;
using namespace std;
//using namespace utils;
class RunStitchFrame: public wxFrame
{
public:
//Constructor
RunStitchFrame(wxWindow * parent, const wxString& title, const wxPoint& pos, const wxSize& size); //ProjectArray projList, wxListBox *projListBox);
//Starts stitching of project file
bool StitchProject(wxString scriptFile, wxString outname,
HuginBase::PanoramaMakefilelibExport::PTPrograms progs);
/** starts assistant of project file */
bool DetectProject(wxString scriptFile, HuginBase::AssistantMakefilelibExport::AssistantPrograms progs);
//Returns process ID of running process
int GetProcessId();
//Gets project id from batch
int GetProjectId();
//Sets process ID of running process (if running process from outside)
void SetProcessId(int pid);
//Sets project id from batch
void SetProjectId(int id);
/** save the content of the window into a given log file
@return true if log was saved successful */
bool SaveLog(const wxString &filename);
//Cancels project execution - kills process
void OnCancel(wxCommandEvent & event);
RunStitchPanel * m_stitchPanel;
private:
wxEvtHandler* m_evtParent;
bool m_isStitching;
bool m_isDetecting;
int m_projectId;
int m_pid;
//Called in GUI application when process terminates
void OnProcessTerminate(wxProcessEvent & event);
DECLARE_EVENT_TABLE()
};
// event ID's for RunStitchPanel
enum
{
ID_Quit = 1,
ID_About
};
#endif //RUNSTITCHFRAME_H