TerminalInterface
#include <kde_terminal_interface.h>
Public Member Functions | |
virtual QStringList | availableProfiles () const =0 |
virtual QString | currentProfileName () const =0 |
virtual QString | currentWorkingDirectory () const =0 |
virtual int | foregroundProcessId ()=0 |
virtual QString | foregroundProcessName ()=0 |
virtual QVariant | profileProperty (const QString &profileProperty) const =0 |
virtual void | sendInput (const QString &text)=0 |
virtual bool | setCurrentProfile (const QString &profileName)=0 |
virtual void | showShellInDir (const QString &dir)=0 |
virtual void | startProgram (const QString &program, const QStringList &args)=0 |
virtual int | terminalProcessId ()=0 |
Detailed Description
TerminalInterface is an interface implemented by KonsolePart to allow developers access to the KonsolePart in ways that are not possible through the normal KPart interface.
Note that besides the functions below here, KonsolePart also has some signals you can connect to. They aren't in this class cause we can't have signals without having a QObject, which TerminalInterface is not.
These are some signals you can connect to: void currentDirectoryChanged(const QString& dir);
See the example code below for how to connect to these.
Use it like this:
Definition at line 71 of file kde_terminal_interface.h.
Constructor & Destructor Documentation
◆ ~TerminalInterface()
|
inlinevirtual |
Definition at line 74 of file kde_terminal_interface.h.
Member Function Documentation
◆ availableProfiles()
|
pure virtual |
Returns the names of available profiles.
◆ currentProfileName()
|
pure virtual |
Returns the name of the currently active profile.
◆ currentWorkingDirectory()
|
pure virtual |
Returns the current working directory.
◆ foregroundProcessId()
|
pure virtual |
Return foregound PID, If there is no foreground process running, returns -1.
◆ foregroundProcessName()
|
pure virtual |
Returns sub process name.
If there is no sub process running, returns empty QString
◆ profileProperty()
|
pure virtual |
Returns the property profileProperty
of the currently active profile.
◆ sendInput()
|
pure virtual |
This sends.
- Parameters
-
text as input to the currently running program..
◆ setCurrentProfile()
|
pure virtual |
Changes the currently active profile to profileName
.
- Returns
- Returns true if setting the profile was successful
◆ startProgram()
|
pure virtual |
This starts program
, with arguments args
.
◆ terminalProcessId()
|
pure virtual |
Return terminal PID.
If no process is currently running, returns 0.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.