Konsole
#include <ViewManager.h>
Public Types | |
enum | NavigationMethod { TabbedNavigation, NoNavigation } |
enum | NewTabBehavior { PutNewTabAtTheEnd = 0, PutNewTabAfterCurrentTab = 1 } |
Public Slots | |
Q_SCRIPTABLE int | currentSession () |
Q_SCRIPTABLE QString | defaultProfile () |
Q_SCRIPTABLE void | moveSessionLeft () |
Q_SCRIPTABLE void | moveSessionRight () |
Q_SCRIPTABLE int | newSession (QString profile, QString directory) |
Q_SCRIPTABLE int | newSession () |
Q_SCRIPTABLE void | nextSession () |
Q_SCRIPTABLE void | prevSession () |
Q_SCRIPTABLE QStringList | profileList () |
Q_SCRIPTABLE int | sessionCount () |
Q_SCRIPTABLE void | setTabWidthToText (bool) |
Signals | |
void | activeViewChanged (SessionController *controller) |
void | empty () |
void | newViewRequest () |
void | newViewRequest (Profile::Ptr) |
void | setMenuBarVisibleRequest (bool) |
void | splitViewToggle (bool multipleViews) |
void | unplugController (SessionController *controller) |
void | updateWindowIcon () |
void | viewDetached (Session *session) |
void | viewPropertiesChanged (const QList< ViewProperties * > &propertiesList) |
Public Member Functions | |
ViewManager (QObject *parent, KActionCollection *collection) | |
~ViewManager () | |
QWidget * | activeView () const |
SessionController * | activeViewController () const |
void | applyProfileToView (TerminalDisplay *view, const Profile::Ptr profile) |
void | createView (Session *session) |
int | managerId () const |
NavigationMethod | navigationMethod () const |
void | restoreSessions (const KConfigGroup &group) |
void | saveSessions (KConfigGroup &group) |
IncrementalSearchBar * | searchBar () const |
QList< Session * > | sessions () |
void | setNavigationBehavior (int behavior) |
void | setNavigationMethod (NavigationMethod method) |
void | setNavigationPosition (int position) |
void | setNavigationStyleSheet (const QString &styleSheet) |
void | setNavigationVisibility (int visibility) |
void | setShowQuickButtons (bool show) |
QList< ViewProperties * > | viewProperties () const |
QWidget * | widget () 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) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
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 |
Additional Inherited Members | |
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) |
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
Manages the terminal display widgets in a Konsole window or part.
When a view manager is created, it constructs a splitter widget ( accessed via widget() ) to hold one or more view containers. Each view container holds one or more terminal displays and a navigation widget ( eg. tabs or a list ) to allow the user to navigate between the displays in that container.
The view manager provides menu actions ( defined in the 'konsoleui.rc' XML file ) to manipulate the views and view containers - for example, actions to split the view left/right or top/bottom, detach a view from the current window and navigate between views and containers. These actions are added to the collection specified in the ViewManager's constructor.
The view manager provides facilities to construct display widgets for a terminal session and also to construct the SessionController which provides the menus and other user interface elements specific to each display/session pair.
Definition at line 66 of file ViewManager.h.
Member Enumeration Documentation
This enum describes the available types of navigation widget which newly created containers can provide to allow navigation between open sessions.
Enumerator | |
---|---|
TabbedNavigation |
Each container has a row of tabs (one per session) which the user can click on to navigate between open sessions. |
NoNavigation |
The container has no navigation widget. |
Definition at line 117 of file ViewManager.h.
This enum describes where newly created tab should be placed.
Enumerator | |
---|---|
PutNewTabAtTheEnd |
Put newly created tab at the end. |
PutNewTabAfterCurrentTab |
Put newly created tab right after current tab. |
Definition at line 130 of file ViewManager.h.
Constructor & Destructor Documentation
ViewManager::ViewManager | ( | QObject * | parent, |
KActionCollection * | collection | ||
) |
Constructs a new view manager with the specified parent
.
View-related actions defined in 'konsoleui.rc' are created and added to the specified collection
.
Definition at line 57 of file ViewManager.cpp.
ViewManager::~ViewManager | ( | ) |
Definition at line 109 of file ViewManager.cpp.
Member Function Documentation
QWidget * ViewManager::activeView | ( | ) | const |
Returns the view manager's active view.
Definition at line 118 of file ViewManager.cpp.
|
signal |
Emitted when the active view changes.
- Parameters
-
controller The controller associated with the active view
SessionController * ViewManager::activeViewController | ( | ) | const |
Returns the controller for the active view.
activeViewChanged() is emitted when this changes.
Definition at line 533 of file ViewManager.cpp.
void ViewManager::applyProfileToView | ( | TerminalDisplay * | view, |
const Profile::Ptr | profile | ||
) |
Applies the view-specific settings associated with specified profile
to the terminal display view
.
Definition at line 799 of file ViewManager.cpp.
void ViewManager::createView | ( | Session * | session | ) |
Creates a new view to display the output from and deliver input to session
.
Constructs a new container to hold the views if no container has yet been created.
Definition at line 587 of file ViewManager.cpp.
|
slot |
DBus slot that returns the current (active) session window.
Definition at line 1007 of file ViewManager.cpp.
|
slot |
Definition at line 1048 of file ViewManager.cpp.
|
signal |
Emitted when the last view is removed from the view manager.
int ViewManager::managerId | ( | ) | const |
Definition at line 113 of file ViewManager.cpp.
|
slot |
DBus slot that switches the current session (as returned by currentSession()) with the left (or previous) one in the navigation tab.
Definition at line 1068 of file ViewManager.cpp.
|
slot |
DBus slot that Switches the current session (as returned by currentSession()) with the right (or next) one in the navigation tab.
Definition at line 1073 of file ViewManager.cpp.
ViewManager::NavigationMethod ViewManager::navigationMethod | ( | ) | const |
Returns the type of navigation widget created in new containers.
Definition at line 740 of file ViewManager.cpp.
DBus slot that creates a new session in the current view.
- Parameters
-
profile the name of the profile to be used directory the working directory where the session is started.
Definition at line 1027 of file ViewManager.cpp.
|
slot |
DBus slot that creates a new session in the current view with the associated default profile and the default working directory.
Definition at line 1016 of file ViewManager.cpp.
|
signal |
Requests creation of a new view with the default profile.
|
signal |
Requests creation of a new view, with the selected profile.
|
slot |
DBus slot that changes the view port to the next session.
Definition at line 1058 of file ViewManager.cpp.
|
slot |
DBus slot that changes the view port to the previous session.
Definition at line 1063 of file ViewManager.cpp.
|
slot |
Definition at line 1053 of file ViewManager.cpp.
void ViewManager::restoreSessions | ( | const KConfigGroup & | group | ) |
Definition at line 967 of file ViewManager.cpp.
void ViewManager::saveSessions | ( | KConfigGroup & | group | ) |
Session management.
Definition at line 932 of file ViewManager.cpp.
IncrementalSearchBar * ViewManager::searchBar | ( | ) | const |
Returns the search bar.
Definition at line 538 of file ViewManager.cpp.
|
slot |
DBus slot that returns the number of sessions in the current view.
Definition at line 1002 of file ViewManager.cpp.
Returns a list of sessions in this ViewManager.
Definition at line 178 of file ViewManager.h.
|
signal |
Emitted when menu bar visibility changes because a profile that requires so is activated.
void ViewManager::setNavigationBehavior | ( | int | behavior | ) |
Definition at line 1141 of file ViewManager.cpp.
void ViewManager::setNavigationMethod | ( | NavigationMethod | method | ) |
Sets the type of widget provided to navigate between open sessions in a container.
The changes will only apply to newly created containers.
The default method is TabbedNavigation. To disable navigation widgets, call setNavigationMethod(ViewManager::NoNavigation) before creating any sessions.
Definition at line 695 of file ViewManager.cpp.
void ViewManager::setNavigationPosition | ( | int | position | ) |
Definition at line 1103 of file ViewManager.cpp.
void ViewManager::setNavigationStyleSheet | ( | const QString & | styleSheet | ) |
Definition at line 1114 of file ViewManager.cpp.
void ViewManager::setNavigationVisibility | ( | int | visibility | ) |
Definition at line 1093 of file ViewManager.cpp.
void ViewManager::setShowQuickButtons | ( | bool | show | ) |
Definition at line 1123 of file ViewManager.cpp.
|
slot |
DBus slot that sets ALL tabs' width to match their text.
Definition at line 1078 of file ViewManager.cpp.
|
signal |
Emitted when the number of views containers changes.
This is used to disable or enable menu items which can only be used when there are one or multiple containers visible.
- Parameters
-
multipleViews True if there are multiple view containers open or false if there is just a single view.
|
signal |
Emitted when the current session needs unplugged from factory().
- Parameters
-
controller The controller associated with the active view
|
signal |
|
signal |
Emitted when a session is detached from a view owned by this ViewManager.
QList< ViewProperties * > ViewManager::viewProperties | ( | ) | const |
Returns the list of view properties for views in the active container.
Each view widget is associated with a ViewProperties instance which provides access to basic information about the session being displayed in the view, such as title, current directory and associated icon.
Definition at line 915 of file ViewManager.cpp.
|
signal |
Emitted when the list of view properties ( as returned by viewProperties() ) changes.
This occurs when views are added to or removed from the active container, or if the active container is changed.
QWidget * ViewManager::widget | ( | ) | const |
Return the main widget for the view manager which holds all of the views managed by this ViewManager instance.
Definition at line 128 of file ViewManager.cpp.
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.