ProcessWidget Class Reference
This class is designed to share code between the grep and application output widgets. More...
#include <processwidget.h>
Inheritance diagram for ProcessWidget:

Public Slots | |
void | startJob (const QString &dir, const QString &command) |
Starts the child process. | |
void | killJob (int signo=SIGTERM) |
Kills the child processss. | |
virtual void | insertStdoutLine (const QString &line) |
Inserts one line from stdin into the listbox. | |
virtual void | insertStderrLine (const QString &line) |
Inserts one line from stderr into the listbox. | |
Signals | |
void | processExited (KProcess *) |
void | rowSelected (int row) |
Public Member Functions | |
ProcessWidget (QWidget *parent, const char *name=0) | |
~ProcessWidget () | |
bool | isRunning () |
Returns whether a process is running in this view. | |
Protected Slots | |
void | slotProcessExited (KProcess *) |
Protected Member Functions | |
virtual void | childFinished (bool normal, int status) |
This is called when the child process exits. | |
virtual QSize | minimumSizeHint () const |
void | maybeScrollToBottom () |
Should be called right after an insertItem(), will automatic scroll the listbox if it is already at the bottom to prevent automatic scrolling when the user has scrolled up. | |
Private Attributes | |
KProcess * | childproc |
ProcessLineMaker * | procLineMaker |
Detailed Description
This class is designed to share code between the grep and application output widgets.
Definition at line 47 of file processwidget.h.
Constructor & Destructor Documentation
|
Definition at line 51 of file processwidget.cpp. References childproc, insertStderrLine(), insertStdoutLine(), processExited(), ProcessWidget(), procLineMaker, KProcess::setUseShell(), and slotProcessExited(). Referenced by ProcessWidget(). |
|
Definition at line 81 of file processwidget.cpp. References childproc, and procLineMaker. |
Member Function Documentation
|
This is called when the child process exits. The flag 'normal' is true if the process exited normally (i.e. not by a signal or similar), otherwise the exit status can be taken from 'status'. Reimplemented in GrepViewWidget, and AppOutputWidget. Definition at line 144 of file processwidget.cpp. References childFinished(). Referenced by childFinished(), and slotProcessExited(). |
|
Inserts one line from stderr into the listbox. This can be overridden by subclasses to implement syntax highlighting. By default, a ProcessListBoxItem is used. Definition at line 136 of file processwidget.cpp. References insertStderrLine(), and maybeScrollToBottom(). Referenced by insertStderrLine(), and ProcessWidget(). |
|
Inserts one line from stdin into the listbox. This can be overridden by subclasses to implement syntax highlighting. Reimplemented in GrepViewWidget. Definition at line 128 of file processwidget.cpp. References insertStdoutLine(), and maybeScrollToBottom(). Referenced by insertStdoutLine(), and ProcessWidget(). |
|
Returns whether a process is running in this view.
Definition at line 114 of file processwidget.cpp. References childproc, and KProcess::isRunning(). |
|
Kills the child processss.
Definition at line 106 of file processwidget.cpp. References childproc, KProcess::kill(), killJob(), and procLineMaker. Referenced by killJob(). |
|
Should be called right after an insertItem(), will automatic scroll the listbox if it is already at the bottom to prevent automatic scrolling when the user has scrolled up.
Definition at line 179 of file processwidget.cpp. Referenced by GrepViewWidget::childFinished(), insertStderrLine(), GrepViewWidget::insertStdoutLine(), insertStdoutLine(), and slotProcessExited(). |
|
Definition at line 166 of file processwidget.cpp. |
|
Referenced by ProcessWidget(), and slotProcessExited(). |
|
|
|
Definition at line 120 of file processwidget.cpp. References childFinished(), childproc, KProcess::exitStatus(), maybeScrollToBottom(), KProcess::normalExit(), processExited(), and slotProcessExited(). Referenced by ProcessWidget(), and slotProcessExited(). |
|
Starts the child process.
Definition at line 88 of file processwidget.cpp. References childproc, KProcess::clearArguments(), ProcessLineMaker::clearBuffers(), endl(), kdDebug(), procLineMaker, KProcess::start(), and startJob(). Referenced by startJob(). |
Member Data Documentation
|
Definition at line 104 of file processwidget.h. Referenced by isRunning(), killJob(), ProcessWidget(), slotProcessExited(), startJob(), and ~ProcessWidget(). |
|
Definition at line 105 of file processwidget.h. Referenced by killJob(), ProcessWidget(), startJob(), and ~ProcessWidget(). |
The documentation for this class was generated from the following files:
- lib/util/processwidget.h
- lib/util/processwidget.cpp