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

DcpContentButton Class Reference

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

#include <dcpcontentbutton.h>

List of all members.

Public Member Functions

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

Protected Slots

void updateContents ()
 Make the object update according to the values the applet returns.
void onClicked ()

Protected Member Functions

virtual void retranslateUi ()
virtual void showEvent (QShowEvent *event)
virtual void hideEvent (QHideEvent *event)
void updateText ()
 Updates all texts according to the values the applet returns.

Friends

class Ut_DcpContentButton

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

DcpContentButton::DcpContentButton ( 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().

DcpContentButton::~DcpContentButton (  ) 

Member Function Documentation

DcpAppletObject * DcpContentButton::applet (  )  const

Returns the applet the DcpContentButton represents.

void DcpContentButton::hideEvent ( QHideEvent *  event  )  [protected, virtual]
void DcpContentButton::loadApplet (  ) 
DcpAppletMetadata * DcpContentButton::metadata (  ) 
void DcpContentButton::onClicked (  )  [protected, slot]
void DcpContentButton::retranslateUi (  )  [protected, virtual]
void DcpContentButton::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 DcpContentButton::setMetadata ( DcpAppletMetadata metadata  ) 
void DcpContentButton::showEvent ( QShowEvent *  event  )  [protected, virtual]
void DcpContentButton::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 DcpContentButton::updateText (  )  [protected]

Updates all texts according to the values the applet returns.


Friends And Related Function Documentation

friend class Ut_DcpContentButton [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