interfaces Library API Documentation

TermEmuInterface Class Reference

A widget for terminal emulation, interpreting vt102. More...

#include <terminal_emulation_interface.h>

List of all members.

Signals

virtual void sizeChanged (int width, int height)=0

Public Member Functions

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>
The actual widget is located in kdebase/konsole, with an interface in kdelibs. This means that it is a bit more comlicated to create an instance of it, but only a little bit more complicated.

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

virtual void TermEmuInterface::sizeChanged int  width,
int  height
[pure virtual, signal]
 

This signal is emitted when the widget's size changes...

virtual void TermEmuInterface::setCursorShown const  bool  )  [pure virtual]
 

set whether the cursor is shown...

See also:
isCursorShown()

virtual bool TermEmuInterface::isCursorShown  )  const [pure virtual]
 

whether the cursor is shown...

See also:
setCursorShown()

virtual void TermEmuInterface::setInteractive const  bool  )  [pure virtual]
 

allow the user to give input or not...

See also:
isInteractive()

virtual bool TermEmuInterface::isInteractive  )  const [pure virtual]
 

is the user allowed to give input ?

See also:
setInteractive()

virtual void TermEmuInterface::setProcess KProcess proc  )  [pure virtual]
 

set the process we're emulating a Terminal for...


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for interfaces Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 10 18:55:49 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003