Home · All Namespaces · All Classes · Main Classes
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties | Friends

DcpContentItem Class Reference

An activatable entry in the control panel. More...

#include <dcpcontentitem.h>

List of all members.

Public Slots

void helpClicked ()

Signals

void helpPageOpened (const QString &helpId)

Public Member Functions

 DcpContentItem (DcpAppletObject *applet=0, QGraphicsItem *parent=0)
 Constructor.
 ~DcpContentItem ()
void setApplet (DcpAppletObject *applet)
 Sets the applet the DcpContentItem should handle.
void setMetadata (DcpAppletMetadata *metadata)
DcpAppletObjectapplet () const
 Returns the applet the DcpContentItem visualizes.
DcpAppletMetadatametadata () const
void loadApplet ()

Protected Slots

void updateContents ()
 Make the object update according to the values the applet returns.
void onClicked ()
void sliderChanged (int value)
void onToggleChanged (bool toggle)

Protected Member Functions

virtual void retranslateUi ()
virtual void showEvent (QShowEvent *event)
virtual void hideEvent (QHideEvent *event)
virtual void constructRealWidget ()
void updateText ()
 Updates all texts according to the values the applet returns.
void updateImage ()
 Updates the picture according to what the applet returns.
void setImageFromFile (const QString &fileName)
void setImageName (const QString &name)
int widgetType () const
bool hasTwoTextLines () const
bool isChecked () const
QString title () const
QString subtitle () const
QString imageID () const
QString helpID () const

Properties

QString title
QString subtitle
bool checked
int widgetType
QString imageID

Friends

class Ut_DcpContentItem

Detailed Description

An activatable entry in the control panel.

This class implements the brief view of an applet shown on the screen in applet lists.

It has a DcpAppletObject associated with it, so when the user clicks on the widget the applet variant is activated. The widget connects its clicked() signal to the activate() signal of the DcpAppletObject object, so the applet variant will be started when the widget is clicked.

The widget updates its contents automatically if the applet notifies it about the changes, see DcpBrief::valuesChanged().


Constructor & Destructor Documentation

DcpContentItem::DcpContentItem ( DcpAppletObject applet = 0,
QGraphicsItem *  parent = 0 
)

Constructor.

If you do not set an applet here, be sure to do that before the widget gets shown on the screen. See setApplet().

DcpContentItem::~DcpContentItem (  ) 

Member Function Documentation

DcpAppletObject * DcpContentItem::applet (  )  const

Returns the applet the DcpContentItem visualizes.

void DcpContentItem::constructRealWidget (  )  [protected, virtual]

Sets up the contentitem according to the values the applet provides: widgettype, texts, icons etc.

bool DcpContentItem::hasTwoTextLines (  )  const [protected]
void DcpContentItem::helpClicked (  )  [slot]

emits a signal if help button is pressed

QString DcpContentItem::helpID (  )  const [protected]
void DcpContentItem::helpPageOpened ( const QString &  helpId  )  [signal]
void DcpContentItem::hideEvent ( QHideEvent *  event  )  [protected, virtual]
QString DcpContentItem::imageID (  )  const [protected]
bool DcpContentItem::isChecked (  )  const [protected]
void DcpContentItem::loadApplet (  ) 
DcpAppletMetadata * DcpContentItem::metadata (  )  const
void DcpContentItem::onClicked (  )  [protected, slot]
void DcpContentItem::onToggleChanged ( bool  toggle  )  [protected, slot]
void DcpContentItem::retranslateUi (  )  [protected, virtual]
void DcpContentItem::setApplet ( DcpAppletObject applet  ) 

Sets the applet the DcpContentItem should handle.

Currently you can only call it before the ContentItem is popped up, due to limitations of MContentItem.

void DcpContentItem::setImageFromFile ( const QString &  fileName  )  [protected]

sets the image based on its filepath

void DcpContentItem::setImageName ( const QString &  name  )  [protected]

sets the image with the given name (id)

void DcpContentItem::setMetadata ( DcpAppletMetadata metadata  ) 
void DcpContentItem::showEvent ( QShowEvent *  event  )  [protected, virtual]
void DcpContentItem::sliderChanged ( int  value  )  [protected, slot]
QString DcpContentItem::subtitle (  )  const [protected]
QString DcpContentItem::title (  )  const [protected]
void DcpContentItem::updateContents (  )  [protected, slot]

Make the object update according to the values the applet returns.

It is connected on the DcpBrief::valuesChanged() signal if any.

void DcpContentItem::updateImage (  )  [protected]

Updates the picture according to what the applet returns.

void DcpContentItem::updateText (  )  [protected]

Updates all texts according to the values the applet returns.

int DcpContentItem::widgetType (  )  const [protected]

Friends And Related Function Documentation

friend class Ut_DcpContentItem [friend]

Property Documentation

bool DcpContentItem::checked [read]
QString DcpContentItem::imageID [read]
QString DcpContentItem::subtitle [read]
QString DcpContentItem::title [read]
int DcpContentItem::widgetType [read]

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