Konsole
Konsole::ViewProperties Class Reference
Encapsulates user-visible information about the terminal session currently being displayed in a view, such as the associated title and icon. More...
#include <ViewProperties.h>

Public Slots | |
virtual void | rename () |
Signals | |
void | activity (ViewProperties *item) |
void | iconChanged (ViewProperties *properties) |
void | titleChanged (ViewProperties *properties) |
Public Member Functions | |
virtual bool | confirmClose () const |
virtual QString | currentDir () const |
QIcon | icon () const |
int | identifier () const |
QString | title () const |
virtual KUrl | url () const |
ViewProperties (QObject *parent) | |
virtual | ~ViewProperties () |
Static Public Member Functions | |
static QMimeData * | createMimeData (int id) |
static int | decodeMimeData (const QMimeData *mimeData) |
static QString | mimeType () |
static ViewProperties * | propertiesById (int id) |
Protected Slots | |
void | fireActivity () |
Protected Member Functions | |
void | setIcon (const QIcon &icon) |
void | setIdentifier (int id) |
void | setTitle (const QString &title) |
Detailed Description
Encapsulates user-visible information about the terminal session currently being displayed in a view, such as the associated title and icon.This can be used by navigation widgets in a ViewContainer sub-class to provide a tab, label or other item for switching between views.
Definition at line 42 of file ViewProperties.h.
Constructor & Destructor Documentation
ViewProperties::ViewProperties | ( | QObject * | parent | ) |
Definition at line 30 of file ViewProperties.cpp.
ViewProperties::~ViewProperties | ( | ) | [virtual] |
Definition at line 36 of file ViewProperties.cpp.
Member Function Documentation
void Konsole::ViewProperties::activity | ( | ViewProperties * | item | ) | [signal] |
Emitted when activity has occurred in this view.
virtual bool Konsole::ViewProperties::confirmClose | ( | ) | const [inline, 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 in Konsole::SessionController.
Definition at line 79 of file ViewProperties.h.
static QMimeData* Konsole::ViewProperties::createMimeData | ( | int | id | ) | [inline, static] |
Returns a new QMimeData instance which represents the view with the given id
(See identifier()).
The QMimeData instance returned must be deleted by the caller.
Definition at line 92 of file ViewProperties.h.
QString ViewProperties::currentDir | ( | ) | const [virtual] |
Returns the current directory associated with a view.
This may be the same as url() The default implementation returns an empty string.
Reimplemented in Konsole::SessionController.
Definition at line 48 of file ViewProperties.cpp.
static int Konsole::ViewProperties::decodeMimeData | ( | const QMimeData * | mimeData | ) | [inline, static] |
Decodes a QMimeData instance created with createMimeData() and returns the identifier of the associated view.
The associated ViewProperties instance can then be retrieved by calling propertiesById()
The QMimeData instance must support the mime format returned by mimeType()
Definition at line 105 of file ViewProperties.h.
void ViewProperties::fireActivity | ( | ) | [protected, slot] |
QIcon ViewProperties::icon | ( | ) | const |
void Konsole::ViewProperties::iconChanged | ( | ViewProperties * | properties | ) | [signal] |
Emitted when the icon for a view changes.
int ViewProperties::identifier | ( | ) | const |
A unique identifier associated with this ViewProperties instance.
Definition at line 97 of file ViewProperties.cpp.
static QString Konsole::ViewProperties::mimeType | ( | ) | [inline, static] |
Name of mime format to use in drag-and-drop operations.
Definition at line 86 of file ViewProperties.h.
ViewProperties * ViewProperties::propertiesById | ( | int | id | ) | [static] |
Finds a ViewProperties instance given its numeric identifier.
Definition at line 40 of file ViewProperties.cpp.
void ViewProperties::rename | ( | ) | [virtual, slot] |
Requests the renaming of this view.
The default implementation does nothing.
Reimplemented in Konsole::SessionController.
Definition at line 57 of file ViewProperties.cpp.
void ViewProperties::setIcon | ( | const QIcon & | icon | ) | [protected] |
Subclasses may call this method to change the icon.
This causes an iconChanged() signal to be emitted
Definition at line 69 of file ViewProperties.cpp.
void ViewProperties::setIdentifier | ( | int | id | ) | [protected] |
Subclasses may call this method to change the identifier.
Definition at line 80 of file ViewProperties.cpp.
void ViewProperties::setTitle | ( | const QString & | title | ) | [protected] |
Subclasses may call this method to change the title.
This causes a titleChanged() signal to be emitted
Definition at line 61 of file ViewProperties.cpp.
QString ViewProperties::title | ( | ) | const |
void Konsole::ViewProperties::titleChanged | ( | ViewProperties * | properties | ) | [signal] |
Emitted when the title for a view changes.
KUrl ViewProperties::url | ( | ) | const [virtual] |
Returns the URL current associated with a view.
The default implementation returns an empty URL.
Reimplemented in Konsole::SessionController.
Definition at line 44 of file ViewProperties.cpp.
The documentation for this class was generated from the following files: