Home · All Namespaces · All Classes
Public Member Functions

LauncherPage Class Reference

#include <launcherpage.h>

List of all members.

Public Member Functions

 LauncherPage (LauncherPageModel *model=new LauncherPageModel, MWidget *parent=NULL)
void setMaximumButtonCount (int maximumButtonCount)
int insertButton (QSharedPointer< LauncherButton > button, int positionIndex)
bool appendButton (QSharedPointer< LauncherButton > button)
void removeButton (QSharedPointer< LauncherButton > button)
bool removeButton (const QString &desktopEntryPath)
bool updateButton (const QString &desktopEntryPath)
int launcherButtonPosition (const QString &desktopEntryPath)
QSharedPointer< LauncherButtonbutton (const QString &desktopEntryPath)
 Returns button representing the given entry.

Constructor & Destructor Documentation

LauncherPage::LauncherPage ( LauncherPageModel model = new LauncherPageModel,
MWidget *  parent = NULL 
)

Constructs a LauncherPage

Parameters:
parent The parent widget of this page.

Member Function Documentation

bool LauncherPage::appendButton ( QSharedPointer< LauncherButton button  ) 
QSharedPointer< LauncherButton > LauncherPage::button ( const QString &  desktopEntryPath  ) 

Returns button representing the given entry.

Parameters:
desktopEntryPath Desktop entry path specifying the button to return
Returns:
Button representing the given desktop entry or NULL shared pointer if button is not found
int LauncherPage::insertButton ( QSharedPointer< LauncherButton button,
int  positionIndex 
)

Add button to page. Fixed positions for buttons are not maintained, so when multiple buttons are added, adding order must be position index order to assure inserting to correct index in button list. Two scenarios exist when the button is not added to a page:

  • If the position index is higher than the maximum items allowed per page,
  • If the page is full

The default maximum number of items per page is currently defined as 12.

Parameters:
button Button to be added.
positionIndex Position where button is to be added.
Returns:
Page index on which buttons was added to. -1 if button was not inserted (eg. if page is full).
int LauncherPage::launcherButtonPosition ( const QString &  desktopEntryPath  ) 

Get position of button from launcher page.

Parameters:
desktopEntryPath Desktop entry path of button.
Returns:
int position of button on page. Returns -1 if button is not found.
bool LauncherPage::removeButton ( const QString &  desktopEntryPath  ) 

Remove button from page. Removes a button only if button representing the given desktop entry is found on page.

Parameters:
desktopEntryPath Desktop entry path specifying the button to remove
Returns:
True if button representing the given desktop entry was found from the page
void LauncherPage::removeButton ( QSharedPointer< LauncherButton button  ) 

Remove button from page.

Parameters:
button Button to be removed.
void LauncherPage::setMaximumButtonCount ( int  maximumButtonCount  ) 

Sets the maximum number of buttons on the page. The page is not resized if it already has more than the desired maximum number of items.

Parameters:
maximumButtonCount the maximum number of buttons on the page.
bool LauncherPage::updateButton ( const QString &  desktopEntryPath  ) 

Updates a button if button representing the given desktop entry is found from page.

Parameters:
desktopEntryPath Desktop entry path to check
Returns:
True if button representing the given desktop entry was found from the page

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