Home · All Namespaces · All Classes
Public Member Functions | Protected Member Functions | Properties

LauncherButton Class Reference

#include <launcherbutton.h>

Collaboration diagram for LauncherButton:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LauncherButton (const QString &desktopEntryPath=QString(), MWidget *parent=0, LauncherButtonModel *model=new LauncherButtonModel)
virtual ~LauncherButton ()
QString desktopEntry () const
LauncherButtonModel::State buttonState () const
void updateFromDesktopEntry (const QString &desktopEntryPath)
void setState (LauncherButtonModel::State state, int progress)
int operationProgress () const
void setPackageName (const QString &packageName)
QString packageName () const
void setPackageRemovable (const bool removable)
bool packageRemovable () const

Protected Member Functions

virtual void retranslateUi ()
 REIMPLEMENTATION

Properties

QString desktopEntryPath
LauncherButtonModel::State buttonState
int operationProgress

Detailed Description

A button widget that represents a .desktop file. Triggers the default action associated with the .desktop file when clicked.


Constructor & Destructor Documentation

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

Creates a launcher button representing a .desktop file.

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

Destroys the Launcher.


Member Function Documentation

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
QString LauncherButton::packageName (  )  const

Returns the package name of the application that button is representing

Returns:
name Package name
bool LauncherButton::packageRemovable (  )  const

Return whether the package represented by button is removable

Returns:
true if package is removable, false otherwise
void LauncherButton::retranslateUi (  )  [protected, virtual]

REIMPLEMENTATION

void LauncherButton::setPackageName ( const QString &  packageName  ) 

Sets the package name of the application that button is representing

Parameters:
packageName Package name
void LauncherButton::setPackageRemovable ( const bool  removable  ) 

Sets whether the package represented by button is removable

Parameters:
removable Is package removable
void LauncherButton::setState ( LauncherButtonModel::State  state,
int  progress 
)

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
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 © 2011 Nokia Corporation Generated on Thu Jul 7 2011 22:14:50
Doxygen 1.7.1
MeeGo Touch