• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Konsole

  • Konsole
  • ViewManager
Public Types | Public Slots | Signals | Public Member Functions | List of all members
Konsole::ViewManager Class Reference

#include <ViewManager.h>

Inheritance diagram for Konsole::ViewManager:
Inheritance graph
[legend]

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 &regExp) 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

enum Konsole::ViewManager::NavigationMethod

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.

enum Konsole::ViewManager::NewTabBehavior

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.

void Konsole::ViewManager::activeViewChanged ( SessionController *  controller)
signal

Emitted when the active view changes.

Parameters
controllerThe 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.

int ViewManager::currentSession ( )
slot

DBus slot that returns the current (active) session window.

Definition at line 1007 of file ViewManager.cpp.

QString ViewManager::defaultProfile ( )
slot

Definition at line 1048 of file ViewManager.cpp.

void Konsole::ViewManager::empty ( )
signal

Emitted when the last view is removed from the view manager.

int ViewManager::managerId ( ) const

Definition at line 113 of file ViewManager.cpp.

void ViewManager::moveSessionLeft ( )
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.

void ViewManager::moveSessionRight ( )
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.

See setNavigationMethod()

Definition at line 740 of file ViewManager.cpp.

int ViewManager::newSession ( QString  profile,
QString  directory 
)
slot

DBus slot that creates a new session in the current view.

Parameters
profilethe name of the profile to be used
directorythe working directory where the session is started.

Definition at line 1027 of file ViewManager.cpp.

int ViewManager::newSession ( )
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.

void Konsole::ViewManager::newViewRequest ( )
signal

Requests creation of a new view with the default profile.

void Konsole::ViewManager::newViewRequest ( Profile::Ptr  )
signal

Requests creation of a new view, with the selected profile.

void ViewManager::nextSession ( )
slot

DBus slot that changes the view port to the next session.

Definition at line 1058 of file ViewManager.cpp.

void ViewManager::prevSession ( )
slot

DBus slot that changes the view port to the previous session.

Definition at line 1063 of file ViewManager.cpp.

QStringList ViewManager::profileList ( )
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.

int ViewManager::sessionCount ( )
slot

DBus slot that returns the number of sessions in the current view.

Definition at line 1002 of file ViewManager.cpp.

QList<Session*> Konsole::ViewManager::sessions ( )
inline

Returns a list of sessions in this ViewManager.

Definition at line 178 of file ViewManager.h.

void Konsole::ViewManager::setMenuBarVisibleRequest ( bool  )
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.

void ViewManager::setTabWidthToText ( bool  useTextWidth)
slot

DBus slot that sets ALL tabs' width to match their text.

Definition at line 1078 of file ViewManager.cpp.

void Konsole::ViewManager::splitViewToggle ( bool  multipleViews)
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
multipleViewsTrue if there are multiple view containers open or false if there is just a single view.
void Konsole::ViewManager::unplugController ( SessionController *  controller)
signal

Emitted when the current session needs unplugged from factory().

Parameters
controllerThe controller associated with the active view
void Konsole::ViewManager::updateWindowIcon ( )
signal
void Konsole::ViewManager::viewDetached ( Session *  session)
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.

void Konsole::ViewManager::viewPropertiesChanged ( const QList< ViewProperties * > &  propertiesList)
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:
  • ViewManager.h
  • ViewManager.cpp
This file is part of the KDE documentation.
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.

Konsole

Skip menu "Konsole"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal