TermEmuInterface Class Reference
A widget for terminal emulation, interpreting vt102. More...
#include <terminal_emulation_interface.h>
Signals | |
virtual void | sizeChanged (int width, int height)=0 |
Public Methods | |
virtual void | setCursorShown (const bool)=0 |
virtual bool | isCursorShown () const=0 |
virtual void | setInteractive (const bool)=0 |
virtual bool | isInteractive () const=0 |
virtual void | setProcess (KProcess *proc)=0 |
Detailed Description
A widget for terminal emulation, interpreting vt102.
- Author:
- Dominique Devriese <fritmebufstek@pandora.be>
To check if Terminal in kdeutils is installed and available use this line:
bool installed=!KTrader::self()->query("TerminalEmulation/TerminalEmulation").isEmpty();
The following is a template for what you need to do to create an instance of the regular expression dialog:
QDialog *termDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "TerminalEmulation/TerminalEmulation" ); if ( editorDialog ) { // konsole was installed, so the dialog was found fetch the // editor interface TermEmuInterface* term = static_cast<TermEmuInterface*>( termDialog->qt_cast( "TermEmuInterface" ) ); Q_ASSERT( term ); // This should not fail! // now use it. KProcess* proc = new KProcess; proc << "ls" << "-l" << "/"; term->setProcess( proc ); proc->start(); // Finally show the dialog term->show(); } else { // annoy the user with an error message, telling him to install // konsole... }
Note: signals and slots must be connected to the termDialog object, not to the term object:
connect( this, SIGNAL( setReadOnly( bool ) ), termDialog, SLOT( setInteractive( bool ) ) );
Definition at line 53 of file terminal_emulation_interface.h.
Member Function Documentation
|
This signal is emitted when the widget's size changes...
|
|
set whether the cursor is shown...
|
|
whether the cursor is shown...
|
|
allow the user to give input or not...
|
|
is the user allowed to give input ?
|
|
set the process we're emulating a Terminal for...
|
The documentation for this class was generated from the following file: