MyExecPanel Class Reference

#include <MyExternalCmdExecDialog.h>

Inheritance diagram for MyExecPanel:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 MyExecPanel (wxWindow *parent)
void KillProcess ()
void PauseProcess (bool pause=true)
 function to pause running process, argument pause defaults to true - to resume, set it to false
void ContinueProcess ()
long GetPid ()
int ExecWithRedirect (wxString command)
int ExecQueue (HuginQueue::CommandQueue *queue)
void OnTimer (wxTimerEvent &event)
void OnProcessTerminated (MyPipedProcess *process, int pid, int status)
bool SaveLog (const wxString &filename)
 save the content of the window into a given log file
void CopyLogToClipboard ()
 copy the content of the log window into the clipboard
void AddString (const wxString &s)
 display the string in the panel
virtual ~MyExecPanel ()

Private Member Functions

void AddToOutput (wxInputStream &s)
void DoAsyncExec (const wxString &cmd)
void AddAsyncProcess (MyPipedProcess *process)
void RemoveAsyncProcess (MyPipedProcess *process)
int ExecNextQueue ()
 execute next command in queue

Private Attributes

long m_pidLast
wxTextCtrl * m_textctrl
long m_lastLineStart
MyProcessesArray m_running
wxTimer m_timerIdleWakeUp
HuginQueue::CommandQueuem_queue
size_t m_queueLength
bool m_checkReturnCode

Detailed Description

Definition at line 54 of file MyExternalCmdExecDialog.h.


Constructor & Destructor Documentation

MyExecPanel::MyExecPanel ( wxWindow *  parent  )  [explicit]

Definition at line 79 of file MyExternalCmdExecDialog.cpp.

MyExecPanel::~MyExecPanel (  )  [virtual]

Definition at line 494 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.


Member Function Documentation

void MyExecPanel::AddAsyncProcess ( MyPipedProcess process  )  [private]

Definition at line 316 of file MyExternalCmdExecDialog.cpp.

References m_running, and m_timerIdleWakeUp.

Referenced by ExecWithRedirect().

void MyExecPanel::AddString ( const wxString &  s  ) 

display the string in the panel

Definition at line 510 of file MyExternalCmdExecDialog.cpp.

References m_lastLineStart, and m_textctrl.

Referenced by MyExecDialog::AddString(), ExecNextQueue(), and RunStitchPanel::StitchProject().

void MyExecPanel::AddToOutput ( wxInputStream &  s  )  [private]

Definition at line 347 of file MyExternalCmdExecDialog.cpp.

References DEBUG_TRACE, m_lastLineStart, and m_textctrl.

Referenced by OnProcessTerminated().

void MyExecPanel::ContinueProcess (  ) 

Definition at line 193 of file MyExternalCmdExecDialog.cpp.

References PauseProcess().

Referenced by RunStitchPanel::ContinueStitch().

void MyExecPanel::CopyLogToClipboard (  ) 

copy the content of the log window into the clipboard

Definition at line 504 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Referenced by MyExecDialog::OnProcessTerminate().

void MyExecPanel::DoAsyncExec ( const wxString &  cmd  )  [private]

int MyExecPanel::ExecNextQueue (  )  [private]

execute next command in queue

Definition at line 287 of file MyExternalCmdExecDialog.cpp.

References AddString(), HuginQueue::NormalCommand::CheckReturnCode(), ExecWithRedirect(), HuginQueue::NormalCommand::GetCommand(), HuginQueue::NormalCommand::GetComment(), m_checkReturnCode, m_queue, m_queueLength, and hugin_utils::roundi().

Referenced by ExecQueue(), and OnProcessTerminated().

int MyExecPanel::ExecQueue ( HuginQueue::CommandQueue queue  ) 

Definition at line 255 of file MyExternalCmdExecDialog.cpp.

References ExecNextQueue(), m_queue, and m_queueLength.

Referenced by RunStitchPanel::DetectProject(), MyExecDialog::ExecQueue(), and RunStitchPanel::StitchProject().

int MyExecPanel::ExecWithRedirect ( wxString  command  ) 

Definition at line 203 of file MyExternalCmdExecDialog.cpp.

References AddAsyncProcess(), cout, and m_pidLast.

Referenced by ExecNextQueue(), and MyExecDialog::ExecWithRedirect().

long MyExecPanel::GetPid (  ) 

Definition at line 198 of file MyExternalCmdExecDialog.cpp.

References m_pidLast.

Referenced by RunStitchPanel::GetPid().

void MyExecPanel::KillProcess (  ) 

Definition at line 104 of file MyExternalCmdExecDialog.cpp.

References DEBUG_DEBUG, and m_pidLast.

Referenced by RunStitchPanel::CancelStitch().

void MyExecPanel::OnProcessTerminated ( MyPipedProcess process,
int  pid,
int  status 
) [virtual]

Implements MyProcessListener.

Definition at line 459 of file MyExternalCmdExecDialog.cpp.

References AddToOutput(), DEBUG_TRACE, ExecNextQueue(), m_checkReturnCode, m_queue, and RemoveAsyncProcess().

void MyExecPanel::OnTimer ( wxTimerEvent &  event  ) 

void MyExecPanel::PauseProcess ( bool  pause = true  ) 

function to pause running process, argument pause defaults to true - to resume, set it to false

Definition at line 131 of file MyExternalCmdExecDialog.cpp.

References m_pidLast.

Referenced by ContinueProcess(), and RunStitchPanel::PauseStitch().

void MyExecPanel::RemoveAsyncProcess ( MyPipedProcess process  )  [private]

Definition at line 331 of file MyExternalCmdExecDialog.cpp.

References m_running, and m_timerIdleWakeUp.

Referenced by OnProcessTerminated().

bool MyExecPanel::SaveLog ( const wxString &  filename  ) 

save the content of the window into a given log file

Returns:
true if log was saved successful

Definition at line 499 of file MyExternalCmdExecDialog.cpp.

References m_textctrl.

Referenced by RunStitchPanel::SaveLog().


Member Data Documentation

bool MyExecPanel::m_checkReturnCode [private]

Definition at line 110 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), and OnProcessTerminated().

long MyExecPanel::m_lastLineStart [private]

Definition at line 100 of file MyExternalCmdExecDialog.h.

Referenced by AddString(), and AddToOutput().

long MyExecPanel::m_pidLast [private]

Definition at line 97 of file MyExternalCmdExecDialog.h.

Referenced by ExecWithRedirect(), GetPid(), KillProcess(), and PauseProcess().

HuginQueue::CommandQueue* MyExecPanel::m_queue [private]

Definition at line 107 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), ExecQueue(), and OnProcessTerminated().

size_t MyExecPanel::m_queueLength [private]

Definition at line 108 of file MyExternalCmdExecDialog.h.

Referenced by ExecNextQueue(), and ExecQueue().

MyProcessesArray MyExecPanel::m_running [private]

Definition at line 102 of file MyExternalCmdExecDialog.h.

Referenced by AddAsyncProcess(), and RemoveAsyncProcess().

wxTextCtrl* MyExecPanel::m_textctrl [private]

Definition at line 99 of file MyExternalCmdExecDialog.h.

Referenced by AddString(), AddToOutput(), CopyLogToClipboard(), SaveLog(), and ~MyExecPanel().

wxTimer MyExecPanel::m_timerIdleWakeUp [private]

Definition at line 105 of file MyExternalCmdExecDialog.h.

Referenced by AddAsyncProcess(), and RemoveAsyncProcess().


The documentation for this class was generated from the following files:
Generated on 4 Aug 2015 for Hugintrunk by  doxygen 1.4.7