tuchulcha  0.10.1
Graphical Workflow Configuration Editor
LogDialog Class Reference

class for logging display and communication with external processes More...

#include <LogDialog.h>

Inheritance diagram for LogDialog:

Public Slots

virtual void done (int r)
 handle process termination More...
 
void kill (bool force=false)
 kill process More...
 
void loadSettings ()
 load config from settings
 
void printStatus (QString msg)
 print status message
 
void reprint ()
 reparse log output
 
void saveSettings ()
 store config to settings
 
void terminate (bool force=false)
 terminate process More...
 

Signals

void helpRequested (QString)
 request help on specified page
 

Public Member Functions

 LogDialog (LogDecorators::Decorator *decorator, QWidget *parent=0, Qt::WindowFlags f=0)
 constructor More...
 
bool hasErrorLines ()
 query for possible error lines in logfile
 
bool waitForFinished (int msecs=1500)
 wait for process to finish More...
 

Private Slots

void on_bSaveLog_clicked ()
 save logfile
 
void on_bSearchDown_clicked ()
 search down
 
void on_bSearchUp_clicked ()
 search up
 
void on_buttonBox_helpRequested ()
 handle help request
 
void on_checkDD_toggled (bool)
 handle debug checkbox
 
void on_eFilter_textEdited (QString)
 handle search filter changes
 
void on_proc_error (QProcess::ProcessError)
 handle errors running the process
 
void on_proc_finished (int=0)
 setup close button and hide progress bar
 
void on_proc_readyReadStandardError ()
 update content by querying process (stderr)
 
void on_proc_readyReadStandardOutput ()
 update content by querying process (stdout)
 
void on_proc_started ()
 setup abort button and show progress bar
 
void on_sBufSize_valueChanged (int)
 handle buf size changes
 
void searchLog (QString filter, int offset=0, bool up=false)
 search for given string More...
 

Private Attributes

LogDecorators::Decorator_decorator
 decorator implementation
 
bool _errorLinesDetected
 true if log contains error lines
 
QStringListModel * _log
 log model
 
QFile * _logFile
 log content output
 
QMutex * _logMutex
 avoid parallel writes to log window
 
LogViewProxyModel_logProx
 log model proxy
 
QProcess * _proc
 tuchulcha-run process
 
Ui::LogDialog * _ui
 designer ui
 

Detailed Description

This widget implements the decorator pattern to handle different kinds of log dialogs like the one used during plugin update and running of workflows.

The decorator implementation has to be given to the instance constructor.

Definition at line 47 of file LogDialog.h.

Constructor & Destructor Documentation

LogDialog::LogDialog ( LogDecorators::Decorator decorator,
QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
explicit

Member Function Documentation

void LogDialog::done ( int  r)
virtualslot
Parameters
rreturn value

Definition at line 195 of file LogDialog.cpp.

References _proc, printStatus(), and terminate().

void LogDialog::kill ( bool  force = false)
slot
Parameters
forcedo not ask before terminating

Definition at line 227 of file LogDialog.cpp.

References _proc.

void LogDialog::searchLog ( QString  filter,
int  offset = 0,
bool  up = false 
)
privateslot
Parameters
filtersearch filter (unix wildcard)
offsetserach offset (added to current row)
upsearch upward (reverse)

Definition at line 476 of file LogDialog.cpp.

References _ui.

void LogDialog::terminate ( bool  force = false)
slot
Parameters
forcedo not ask before terminating

Definition at line 214 of file LogDialog.cpp.

References _proc, kill(), and printStatus().

bool LogDialog::waitForFinished ( int  msecs = 1500)
Parameters
msecstime to wait
Return values
falseprocess still running (timeout)

Definition at line 237 of file LogDialog.cpp.

References _proc.


The documentation for this class was generated from the following files: