Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions | Protected Member Functions

MApplicationExtensionArea Class Reference

Inherits MExtensionArea.

List of all members.

Signals

void extensionInstantiated (MApplicationExtensionInterface *extension)
void extensionRemoved (MApplicationExtensionInterface *extension)

Public Member Functions

 MApplicationExtensionArea (const QString &interface, QGraphicsItem *parent=NULL)
virtual ~MApplicationExtensionArea ()
void setInProcessFilter (const QRegExp &inProcessFilter)
void setOutOfProcessFilter (const QRegExp &outOfProcessFilter)
void setOrder (const QStringList &order)
bool init ()
QList
< MApplicationExtensionInterface * > 
extensions ()

Protected Member Functions

 MApplicationExtensionArea (MApplicationExtensionAreaPrivate *dd, MApplicationExtensionAreaModel *model, QGraphicsItem *parent, const QString &interface)

Detailed Description

MApplicationExtensionArea is a widget which can be populated with application extensions. MApplicationExtensionArea can be placed on any view that wants to have application extension support.

The MApplicationExtensionArea will load application extensions which implement the specified interface.

See also:
Developing application extensions

Constructor & Destructor Documentation

MApplicationExtensionArea::MApplicationExtensionArea ( const QString interface,
QGraphicsItem parent = NULL 
) [explicit]

Constructs an application extension area. The area is not initialized until init() has been called.

Parameters:
interface the name of the interface the application extensions must implement in order to be loaded to this application extension area
parent optional parent graphics item
MApplicationExtensionArea::~MApplicationExtensionArea (  )  [virtual]

Destroys the application extension area.

MApplicationExtensionArea::MApplicationExtensionArea ( MApplicationExtensionAreaPrivate *  dd,
MApplicationExtensionAreaModel model,
QGraphicsItem parent,
const QString interface 
) [protected]

Protected constructor to be called by derived classes to set up the private implementation hierarchy.


Member Function Documentation

void MApplicationExtensionArea::extensionInstantiated ( MApplicationExtensionInterface extension  )  [signal]

Signal sent when an extension has been instantiated.

Parameters:
extension the extension that was instantiated
void MApplicationExtensionArea::extensionRemoved ( MApplicationExtensionInterface extension  )  [signal]

Signal sent when an extension has been removed.

Parameters:
extension the extension that was removed
QList< MApplicationExtensionInterface * > MApplicationExtensionArea::extensions (  ) 

Returns a list of in process extensions loaded by this manager

Returns:
List of application extension interface pointers. Receving party should appropriately cast them.
bool MApplicationExtensionArea::init (  ) 

Initializes the application extension area. All setters introduced by this class must be called before the area is initialized, and the signals must be connected, because calling init() will result in the extensions being created. Initialization will fail if no interface name has been provided or if the area has already been initialized.

Returns:
false if the initialization fails, true otherwise
void MApplicationExtensionArea::setInProcessFilter ( const QRegExp inProcessFilter  ) 

Sets a filter for allowing only certain extensions to be ran in the same process as the extension area. The filter is a regular expression which is matched against the .desktop file names of the extensions. By default all extensions are allowed to be loaded in-process. For example, use QRegExp("$^") to allow no extensions, QRegExp("/test(1|A).desktop$") to allow extensions test1.desktop and testA.desktop and QRegExp() to allow all extensions.

Must be called before init(). Calling this after init() has no effect.

Parameters:
inProcessFilter a regular expression for defining which extension are allowed in-process
void MApplicationExtensionArea::setOrder ( const QStringList order  ) 

Defines the order in which extensions are placed if they are found. Each extension is placed in the position in which it appears for the first time in the list. An empty string can be used to mark the place for unnamed extensions. Must be called before init(). Calling this after init() has no effect.

Parameters:
order a list of extension .desktop file names for defining the order in which certain extensions appear
void MApplicationExtensionArea::setOutOfProcessFilter ( const QRegExp outOfProcessFilter  ) 

Sets a filter for allowing only certain extensions to be ran in separate processes. The filter is a regular expression which is matched against the .desktop file names of the extensions. By default all extensions are allowed to be loaded in separate processes. For example, use QRegExp("$^") to allow no extensions, QRegExp("/test(1|A).desktop$") to allow extensions test1.desktop and testA.desktop and QRegExp() to allow all extensions.

Must be called before init(). Calling this after init() has no effect.

Parameters:
outOfProcessFilter a regular expression for defining which extension are allowed out-of-process

Copyright © 2010 Nokia Corporation
MeeGo Touch