Konsole
#include <SessionController.h>
Public Types | |
enum | CopyInputToEnum { CopyInputToAllTabsMode = 0, CopyInputToSelectedTabsMode = 1, CopyInputToNoneMode = 2 } |
Public Slots | |
void | closeSession () |
void | decreaseFontSize () |
void | increaseFontSize () |
void | openUrl (const KUrl &url) |
void | selectionChanged (const QString &selectedText) |
void | setupPrimaryScreenSpecificActions (bool use) |
Public Slots inherited from Konsole::ViewProperties |
Signals | |
void | currentDirectoryChanged (const QString &dir) |
void | focused (SessionController *controller) |
void | rawTitleChanged () |
Signals inherited from Konsole::ViewProperties | |
void | activity (ViewProperties *item) |
void | iconChanged (ViewProperties *properties) |
void | titleChanged (ViewProperties *properties) |
Public Member Functions | |
SessionController (Session *session, TerminalDisplay *view, QObject *parent) | |
~SessionController () | |
virtual bool | confirmClose () const |
virtual bool | confirmForceClose () const |
virtual QString | currentDir () const |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
bool | isValid () const |
EditProfileDialog * | profileDialogPointer () |
virtual void | rename () |
IncrementalSearchBar * | searchBar () const |
QPointer< Session > | session () |
void | setSearchBar (IncrementalSearchBar *searchBar) |
void | setSearchStartTo (int line) |
void | setSearchStartToWindowCurrentLine () |
void | setShowMenuAction (QAction *action) |
virtual KUrl | url () const |
QString | userTitle () const |
QPointer< TerminalDisplay > | view () |
Public Member Functions inherited from Konsole::ViewProperties | |
ViewProperties (QObject *parent) | |
virtual | ~ViewProperties () |
QIcon | icon () const |
int | identifier () const |
QString | title () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
Static Public Member Functions | |
static QSet< SessionController * > | allControllers () |
Static Public Member Functions inherited from Konsole::ViewProperties | |
static QMimeData * | createMimeData (int id) |
static int | decodeMimeData (const QMimeData *mimeData) |
static QString | mimeType () |
static ViewProperties * | propertiesById (int id) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Additional Inherited Members | |
Protected Slots inherited from Konsole::ViewProperties | |
void | fireActivity () |
Protected Member Functions inherited from Konsole::ViewProperties | |
void | setIcon (const QIcon &icon) |
void | setIdentifier (int id) |
void | setTitle (const QString &title) |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
Provides the menu actions to manipulate a single terminal session and view pair.
The actions provided by this class are defined in the sessionui.rc XML file.
SessionController monitors the session and provides access to basic information about the session such as title(), icon() and currentDir(). SessionController provides notifications of activity in the session via the activity() signal.
When the controlled view receives the focus, the focused() signal is emitted with a pointer to the controller. This can be used by main application window which contains the view to plug the controller's actions into the menu when the view is focused.
Definition at line 85 of file SessionController.h.
Member Enumeration Documentation
Definition at line 90 of file SessionController.h.
Constructor & Destructor Documentation
SessionController::SessionController | ( | Session * | session, |
TerminalDisplay * | view, | ||
QObject * | parent | ||
) |
Constructs a new SessionController which operates on session
and view
.
Definition at line 100 of file SessionController.cpp.
SessionController::~SessionController | ( | ) |
Definition at line 217 of file SessionController.cpp.
Member Function Documentation
|
inlinestatic |
Returns the set of all controllers that exist.
Definition at line 168 of file SessionController.h.
|
slot |
close the associated session.
This might involve user interaction for confirmation.
Definition at line 905 of file SessionController.cpp.
|
virtual |
Sub-classes may re-implement this method to display a message to the user to allow them to confirm whether to close a view.
The default implementation always returns true
Reimplemented from Konsole::ViewProperties.
Definition at line 855 of file SessionController.cpp.
|
virtual |
Definition at line 880 of file SessionController.cpp.
|
virtual |
Returns the current directory associated with a view.
This may be the same as url() The default implementation returns an empty string.
Reimplemented from Konsole::ViewProperties.
Definition at line 285 of file SessionController.cpp.
|
signal |
Emitted when the current working directory of the session associated with the controller is changed.
|
slot |
Decrease font size.
Definition at line 1446 of file SessionController.cpp.
Reimplemented from QObject.
Definition at line 460 of file SessionController.cpp.
|
signal |
Emitted when the view associated with the controller is focused.
This can be used by other classes to plug the controller's actions into a window's menus.
|
slot |
Increase font size.
Definition at line 1441 of file SessionController.cpp.
|
inline |
Returns true if the controller is valid.
A valid controller is one which has a non-null session() and view().
Equivalent to "!session().isNull() && !view().isNull()"
Definition at line 364 of file SessionController.h.
|
slot |
Issues a command to the session to navigate to the specified URL.
This may not succeed if the foreground program does not understand the command sent to it ( 'cd path' for local URLs ) or is not responding to input.
openUrl() currently supports urls for local paths and those using the 'ssh' protocol ( eg. "ssh://joebloggs@hostname" )
Definition at line 300 of file SessionController.cpp.
EditProfileDialog * SessionController::profileDialogPointer | ( | ) |
Definition at line 799 of file SessionController.cpp.
|
signal |
|
virtual |
Requests the renaming of this view.
The default implementation does nothing.
Reimplemented from Konsole::ViewProperties.
Definition at line 295 of file SessionController.cpp.
IncrementalSearchBar * SessionController::searchBar | ( | ) | const |
see setSearchBar()
Definition at line 545 of file SessionController.cpp.
|
slot |
update actions which are closely related with the selected text.
Definition at line 376 of file SessionController.cpp.
Returns the session associated with this controller.
Definition at line 108 of file SessionController.h.
void SessionController::setSearchBar | ( | IncrementalSearchBar * | searchBar | ) |
Sets the widget used for searches through the session's output.
When the user clicks on the "Search Output" menu action the searchBar
's show() method will be called. The SessionController will then connect to the search bar's signals to update the search when the widget's controls are pressed.
Definition at line 521 of file SessionController.cpp.
void SessionController::setSearchStartTo | ( | int | line | ) |
Set the start line from which the next search will be done.
Definition at line 1105 of file SessionController.cpp.
void SessionController::setSearchStartToWindowCurrentLine | ( | ) |
set start line to the first or last line (depending on the reverse search setting) in the terminal display
Definition at line 1100 of file SessionController.cpp.
void SessionController::setShowMenuAction | ( | QAction * | action | ) |
Sets the action displayed in the session's context menu to hide or show the menu bar.
Definition at line 550 of file SessionController.cpp.
|
slot |
update actions which are meaningful only when primary screen is in use.
Definition at line 361 of file SessionController.cpp.
|
virtual |
Returns the URL current associated with a view.
The default implementation returns an empty URL.
Reimplemented from Konsole::ViewProperties.
Definition at line 290 of file SessionController.cpp.
QString SessionController::userTitle | ( | ) | const |
Returns the "window title" of the associated session.
Definition at line 1984 of file SessionController.cpp.
|
inline |
Returns the view associated with this controller.
Definition at line 112 of file SessionController.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.