Home · All Namespaces · All Classes · Main Classes
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

DcpAppletMetadata Class Reference

This class contains all the information coming from the desktop file of the applet. More...

#include <dcpappletmetadata.h>

List of all members.

Public Member Functions

 DcpAppletMetadata (const QString &filename)
virtual ~DcpAppletMetadata ()
virtual bool isValid () const
virtual bool isUnique () const
virtual bool isModified () const
QString name () const
QString fileName () const
QString category () const
QString toggleIconId () const
int widgetTypeID () const
 Returns what type of brief widget shall an applet variant use.
QString binary () const
QString dslFilename () const
QString applicationCommand () const
bool hasApplicationCommand () const
bool toggle () const
QString fullBinary () const
Qt::Alignment align () const
QString text1 () const
QString text2 () const
QStringList translationCatalogs () const
 The list of catalog names the applets needs.
QString imageName () const
int order () const
int usage () const
void incrementUsage ()
QString part () const
bool isDisabled () const
void setDisabled (bool disabled)
void markActive ()
 Marks the plugin as active.
void markInactive ()
 Marks the plugin inactive.
bool isActive () const
 Returns if the plugin is active or not.
bool isHidden () const
QString helpId () const
 Quieries the help id of the applet.
bool hasMainView () const
bool hasInProcessBrief () const
QString sliderLeftImage () const
QString sliderRightImage () const
Qt::Orientation textOrientation () const

Static Public Member Functions

static bool usageGreatherThan (DcpAppletMetadata *meta1, DcpAppletMetadata *meta2)
static bool orderLessThan (DcpAppletMetadata *meta1, DcpAppletMetadata *meta2)
static bool nameLessThan (DcpAppletMetadata *meta1, DcpAppletMetadata *meta2)
static bool titleLessThan (DcpAppletMetadata *meta1, DcpAppletMetadata *meta2)
static DcpAppletMetadatalastUsed ()
 Returns the last openned applet's metadata.
static void setLastUsed (DcpAppletMetadata *metadata)
static QString storedLastUsedItem ()
 Queries the path of the desktop file of the last used metadata.
static QString defaultSOPath ()
static void setDefaultSOPath (const QString &path)

Protected Member Functions

MDesktopEntry * desktopEntry () const
QString desktopEntryStr (int id) const

Friends

class Ut_DcpAppletMetadata

Detailed Description

This class contains all the information coming from the desktop file of the applet.

This class provides all the information about an applet variant in practical format. Every applet can hold one or more .desktop file, for each there will be a DcpAppletMetadata class object, and each will define a configuration for the applet binary.

If an applet have more than one desktop file we say the applet have more than one applet variant, that is from the user point of view the applet seems like it were more than one applet, but these variants might share common elements (UI, code and data).


Constructor & Destructor Documentation

DcpAppletMetadata::DcpAppletMetadata ( const QString &  filename  ) 
DcpAppletMetadata::~DcpAppletMetadata (  )  [virtual]

Member Function Documentation

Qt::Alignment DcpAppletMetadata::align (  )  const
QString DcpAppletMetadata::applicationCommand (  )  const

Returns the value of the "M/X-MApplet-ApplicationCommand" key from the desktop file. This is the application command that will be executed when the applet is activated.

QString DcpAppletMetadata::binary (  )  const

Returns the value of the "M/X-MApplet-Applet" key from the desktop file. This is the binary applet file name, a file name of the shared object containing the binary code of the applet.

QString DcpAppletMetadata::category (  )  const

Returns the value of the "DCP/Category" key from the desktop file.

QString DcpAppletMetadata::defaultSOPath (  )  [static]
MDesktopEntry * DcpAppletMetadata::desktopEntry (  )  const [protected]
QString DcpAppletMetadata::desktopEntryStr ( int  id  )  const [protected]
QString DcpAppletMetadata::dslFilename (  )  const
QString DcpAppletMetadata::fileName (  )  const
QString DcpAppletMetadata::fullBinary (  )  const
bool DcpAppletMetadata::hasApplicationCommand (  )  const

Returns true if the metadata has a shell command associated to it.

bool DcpAppletMetadata::hasInProcessBrief (  )  const
bool DcpAppletMetadata::hasMainView (  )  const
QString DcpAppletMetadata::helpId (  )  const

Quieries the help id of the applet.

QString DcpAppletMetadata::imageName (  )  const
void DcpAppletMetadata::incrementUsage (  ) 
bool DcpAppletMetadata::isActive (  )  const

Returns if the plugin is active or not.

See markActive().

bool DcpAppletMetadata::isDisabled (  )  const
bool DcpAppletMetadata::isHidden (  )  const
bool DcpAppletMetadata::isModified (  )  const [virtual]
bool DcpAppletMetadata::isUnique (  )  const [virtual]
bool DcpAppletMetadata::isValid (  )  const [virtual]
DcpAppletMetadata * DcpAppletMetadata::lastUsed (  )  [static]

Returns the last openned applet's metadata.

gets the last openned applet

void DcpAppletMetadata::markActive (  ) 

Marks the plugin as active.

We mean by active that the plugin is somehow displayed on the screen, used by some widget etc. Think of this as a reference counter, when the plugin is referred by anyone, its translation will be loaded etc.

void DcpAppletMetadata::markInactive (  ) 

Marks the plugin inactive.

See markActive().

QString DcpAppletMetadata::name (  )  const
bool DcpAppletMetadata::nameLessThan ( DcpAppletMetadata meta1,
DcpAppletMetadata meta2 
) [static]
int DcpAppletMetadata::order (  )  const
bool DcpAppletMetadata::orderLessThan ( DcpAppletMetadata meta1,
DcpAppletMetadata meta2 
) [static]
QString DcpAppletMetadata::part (  )  const
void DcpAppletMetadata::setDefaultSOPath ( const QString &  path  )  [static]
void DcpAppletMetadata::setDisabled ( bool  disabled  ) 
void DcpAppletMetadata::setLastUsed ( DcpAppletMetadata metadata  )  [static]

sets the last openned applet

QString DcpAppletMetadata::sliderLeftImage (  )  const
QString DcpAppletMetadata::sliderRightImage (  )  const
QString DcpAppletMetadata::storedLastUsedItem (  )  [static]

Queries the path of the desktop file of the last used metadata.

QString DcpAppletMetadata::text1 (  )  const
QString DcpAppletMetadata::text2 (  )  const
Qt::Orientation DcpAppletMetadata::textOrientation (  )  const
bool DcpAppletMetadata::titleLessThan ( DcpAppletMetadata meta1,
DcpAppletMetadata meta2 
) [static]
bool DcpAppletMetadata::toggle (  )  const
QString DcpAppletMetadata::toggleIconId (  )  const
QStringList DcpAppletMetadata::translationCatalogs (  )  const

The list of catalog names the applets needs.

Returns:
The list of catalog names which contains the applet's translations.
int DcpAppletMetadata::usage (  )  const
bool DcpAppletMetadata::usageGreatherThan ( DcpAppletMetadata meta1,
DcpAppletMetadata meta2 
) [static]
int DcpAppletMetadata::widgetTypeID (  )  const

Returns what type of brief widget shall an applet variant use.

Gets the required brief widget type code of the applet variant.


Friends And Related Function Documentation

friend class Ut_DcpAppletMetadata [friend]

The documentation for this class was generated from the following files:

Copyright © 2009 Nokia Corporation Generated on Tue Jul 5 2011 15:01:31
Doxygen 1.7.1
Meego control panel