Home · All Namespaces · All Classes

LauncherButton Class Reference

#include <launcherbutton.h>

List of all members.

Public Member Functions

 LauncherButton (const QString &desktopEntryPath=QString(), MWidget *parent=0)
virtual ~LauncherButton ()
void setAction (const LauncherAction &action)
 Sets the action to launch the application described by the desktop file.
LauncherAction action () const
 Returns the action to launch the application described by the desktop file.
QString desktopEntry () const
LauncherButtonModel::State buttonState () const
void updateFromDesktopEntry (const QString &desktopEntryPath)
void retranslateUi ()
void setState (LauncherButtonModel::State state, int progress, const QString &desktopEntryPath)
int operationProgress () const

Properties

QString desktopEntryPath
LauncherButtonModel::State buttonState
int operationProgress

Detailed Description

Button widget that can launch an application when its being clicked.

User has to set the target to be launched using setTarget() method and the target type using the setTargetType() method. The target type can be an Application. If the target type is an Application and the target is set this button widget launches the specified application into its own process when the button is clicked.


Constructor & Destructor Documentation

LauncherButton::LauncherButton ( const QString &  desktopEntryPath = QString(),
MWidget *  parent = 0 
)

Creates a launcher button instance from a MDesktopEntry.

Parameters:
desktopEntryPath Path to the desktop entry to create a launcher button from
parent the parent widget, defaults to NULL
LauncherButton::~LauncherButton (  )  [virtual]

Destroys the Launcher.


Member Function Documentation

LauncherAction LauncherButton::action (  )  const

Returns the action to launch the application described by the desktop file.

Returns:
The action to launch the application
LauncherButtonModel::State LauncherButton::buttonState (  )  const

Returns current button state.

Returns:
the button state.
QString LauncherButton::desktopEntry (  )  const

Returns the file name of the desktop entry where this launcher button was constructed from.

Returns:
the desktop entry file name.
int LauncherButton::operationProgress (  )  const

Returns progress of button's ongoing operation

Returns:
operation progress
void LauncherButton::retranslateUi (  ) 

Handles the language change notification and propagets is to MButton.

void LauncherButton::setAction ( const LauncherAction action  ) 

Sets the action to launch the application described by the desktop file.

Parameters:
action The action to launch the application
void LauncherButton::setState ( LauncherButtonModel::State  state,
int  progress,
const QString &  desktopEntryPath 
)

Sets the state and progress of a button Progress property is changed only if parameter progress is valid (0..100)

Parameters:
state State of a button
progress Progress of operation
desktopEntryPath Path to the desktop entry.
void LauncherButton::updateFromDesktopEntry ( const QString &  desktopEntryPath  ) 

Updates button from given desktop entry.

Parameters:
desktopEntryPath Path to the desktop entry to update the button from.

Property Documentation

LauncherButtonModel::State LauncherButton::buttonState [read]
QString LauncherButton::desktopEntryPath [read]
int LauncherButton::operationProgress [read]

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

Copyright © 2010 Nokia Corporation Generated on Sun Feb 6 23:02:53 2011
Doxygen 1.6.1
MeeGo Touch