\section{Terminal\-Interface Class Reference}
\label{classTerminalInterface}\index{TerminalInterface@{TerminalInterface}}
Terminal\-Interface is an interface implemented by Konsole\-Part to allow developers access to the Konsole\-Part in ways that are not possible through the normal KPart interface.  


{\tt \#include $<$kde\_\-terminal\_\-interface.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf start\-Program} (const {\bf QString} \&program, const {\bf QStr\-List} \&args)=0
\item 
virtual void {\bf show\-Shell\-In\-Dir} (const {\bf QString} \&dir)=0
\item 
virtual void {\bf send\-Input} (const {\bf QString} \&text)=0
\end{CompactItemize}


\subsection{Detailed Description}
Terminal\-Interface is an interface implemented by Konsole\-Part to allow developers access to the Konsole\-Part in ways that are not possible through the normal KPart interface. 

Note that besides the functions below here, Konsole\-Part also has some signals you can connect to. They aren't in this class cause we can't have signals without having a {\bf QObject}, which Terminal\-Interface is not. These are the signals you can connect to: void process\-Exited( int status ); void received\-Data( const QString\& s ); See the example code below for how to connect to these..

Use it like this: 

\footnotesize\begin{verbatim}  // fetch the Library..
  KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
  if ( factory == 0L )
  {
    // inform the user that he should install konsole..
    return;
  };
  // fetch the part..
  KParts::Part* p = static_cast<KParts::Part*>(
      factory->create( this, "tralala", "QObject",
                       "KParts::ReadOnlyPart" ) );
  assert( p );
  setCentralWidget( p->widget() );

  // cast the part to the TerminalInterface..
  TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast( "TerminalInterface" ) );
  if( ! t )
  {
    // This probably happens because the konsole that is installed
    // comes from before KDE 3.2 , and the TerminalInterface is not
    // available..  What you can do here is either inform the user
    // that he needs a more recent konsole, or try to deliver the
    // functionality in some other way...
    return;
  };
  // now use the interface in all sorts of ways, e.g.
  //    t->showShellInDir( QDir::home().path() );
  // or:
  //    QStrList l;
  //    l.append( "python" );
  //    t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l);
  // or connect to one of the signals.  Connect to the Part object,
  // not to the TerminalInterface, since the latter is no QObject,
  // and as such cannot have signals..:
  //    connect( p, SIGNAL( processExited( int ) ),
  //             this, SLOT( shellExited( int ) ) );
  // etc.
\end{verbatim}
\normalsize


\begin{Desc}
\item[Since:]3.2\end{Desc}
\begin{Desc}
\item[Author:]Dominique Devriese $<${\tt devriese@kde.org}$>$ \end{Desc}




Definition at line 85 of file kde\_\-terminal\_\-interface.h.

\subsection{Member Function Documentation}
\index{TerminalInterface@{Terminal\-Interface}!startProgram@{startProgram}}
\index{startProgram@{startProgram}!TerminalInterface@{Terminal\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Terminal\-Interface::start\-Program (const {\bf QString} \& {\em program}, const {\bf QStr\-List} \& {\em args})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTerminalInterface_a0}


This starts {\tt program}, with arguments {\tt args}. 

\index{TerminalInterface@{Terminal\-Interface}!showShellInDir@{showShellInDir}}
\index{showShellInDir@{showShellInDir}!TerminalInterface@{Terminal\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Terminal\-Interface::show\-Shell\-In\-Dir (const {\bf QString} \& {\em dir})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTerminalInterface_a1}


If a shell is currently shown, this sends it a cd command. 

Otherwise, this starts a shell, and sends it a cd command too... \index{TerminalInterface@{Terminal\-Interface}!sendInput@{sendInput}}
\index{sendInput@{sendInput}!TerminalInterface@{Terminal\-Interface}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void Terminal\-Interface::send\-Input (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classTerminalInterface_a2}


This sends. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]as input to the currently running program.. \end{description}
\end{Desc}


The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
kde\_\-terminal\_\-interface.h\end{CompactItemize}
