FriendListPanel Class Reference

Class for sliding friends list panel. More...

#include <friendlistpanel.h>

Inheritance diagram for FriendListPanel:
Inheritance graph
[legend]
Collaboration diagram for FriendListPanel:
Collaboration graph
[legend]

List of all members.

Public Slots

void friendImageReady (User *user)
 Slot to update friend item's image.
void friendInfoReceived (QList< User * > &friendList)
 Slot to refresh friends list.

Signals

void findFriend (const GeoCoordinate &coordinates)
 Signal for friend finding.
void requestContactDialog (const QString &facebookId)
 Requests contact dialog.
void routeToFriend (const GeoCoordinate &coordinates)
 Signal for routing to friend.

Public Member Functions

 FriendListPanel (QWidget *parent=0)
 Default constructor.

Protected Member Functions

void hideEvent (QHideEvent *event)
 Re-implemented from QWidget::hideEvent().
void showEvent (QShowEvent *event)
 Re-implemented from QWidget::showEvent().

Private Slots

void anyPanelClosed ()
 Called when any of the panel tabs is closed.
void anyPanelOpened ()
 Called when any of the panel tabs is opened.
void clearFiltering ()
 Slot for clearing the filtering.
void clearTextFiltering ()
 Slot for clearing the text based filtering.
void filterTextChanged (const QString &text)
 Updates the filtering when filtering text value is changed.
void requestSelectedFriendContactDialog ()
 Requests selected friend's contact dialog.
void routeToSelectedFriend ()
 Routes to selected friend.
void setRouteButtonDisabled ()
 Sets route button disabled.
void showFriendsInList (const QList< QString > &userIDs)
 Slot to show friends in list.
void topmostWindowChanged (bool mainWindowIsTopmost)
 Called when topmost window is changed.

Private Member Functions

void setFilteringLayoutVisibility (bool visible)
 Set visibility for filtering text field and clearing button.
void updateKeyboardGrabbing ()
 Takes care of grabbing and releasing the keyboard when required.

Private Attributes

bool m_mainWindowIsTopmost
 Is the MainWindow the topmost one.
bool m_somePanelIsOpen
 Is any panel tab open.
QLabel * m_headerLabel
 Show how many friends are selected.
QLineEdit * m_filterField
 Text field for the filter text.
QPushButton * m_clearTextFilteringButton
 Button for clearing the text filtering.
QWidget * m_headerWidget
 Friend list header widget.
FriendListViewm_friendListView
 Friend list view.
ImageButtonm_clearGroupFilteringButton
 Button for clearing friend group filtering.
ImageButtonm_showContactButton
 Button for showing contact dialog.
ImageButtonm_routeButton
 Button for routing to selected friend.

Detailed Description

Class for sliding friends list panel.

Author:
Kaj Wallin - kaj.wallin (at) ixonos.com
Henri Lampela - henri.lampela (at) ixonos.com
Pekka Nissinen - pekka.nissinen (at) ixonos.com
Jussi Laitinen - jussi.laitinen (at) ixonos.com
Sami Rämö - sami.ramo (at) ixonos.com

Constructor & Destructor Documentation

FriendListPanel::FriendListPanel ( QWidget *  parent = 0  ) 

Default constructor.

Parameters:
parent 

Member Function Documentation

void FriendListPanel::anyPanelClosed (  )  [private, slot]

Called when any of the panel tabs is closed.

Does call clearFriendGroupFiltering().

Calls updateKeyboardGrabbing() for releasing the grabbing when FriendListPanel is closed, not changed to other panel. In this case the hideEvent() is not triggered.

void FriendListPanel::anyPanelOpened (  )  [private, slot]

Called when any of the panel tabs is opened.

Calls updateKeyboardGrabbing() for grabbing the keyboard when FriendListPanel is closed and is the last selected tab. In this case the showEvent() is not triggered.

void FriendListPanel::clearFiltering (  )  [private, slot]

Slot for clearing the filtering.

Clears friend group (or single friend) filtering and calls clearTextFiltering().

void FriendListPanel::clearTextFiltering (  )  [private, slot]

Slot for clearing the text based filtering.

Does clear only the text based filtering. Friend group based filtering is not affected.

void FriendListPanel::filterTextChanged ( const QString &  text  )  [private, slot]

Updates the filtering when filtering text value is changed.

Filtering UI elements are invoked when the text becomes not empty and hidden when text becomes empty.

Sets the new filtering text.

Parameters:
text New text value
void FriendListPanel::findFriend ( const GeoCoordinate coordinates  )  [signal]

Signal for friend finding.

Parameters:
coordinates Target coordinate
void FriendListPanel::friendImageReady ( User user  )  [slot]

Slot to update friend item's image.

Parameters:
user Friend
void FriendListPanel::friendInfoReceived ( QList< User * > &  friendList  )  [slot]

Slot to refresh friends list.

Parameters:
friendList 
void FriendListPanel::hideEvent ( QHideEvent *  event  )  [protected]

Re-implemented from QWidget::hideEvent().

Calls updateKeyboardGrabbing() and clearFriendGroupFiltering().

Parameters:
event 
void FriendListPanel::requestContactDialog ( const QString &  facebookId  )  [signal]

Requests contact dialog.

Parameters:
facebookId contact's facebookId
void FriendListPanel::routeToFriend ( const GeoCoordinate coordinates  )  [signal]

Signal for routing to friend.

Parameters:
coordinates friend's geo coordinates
void FriendListPanel::routeToSelectedFriend (  )  [private, slot]

Routes to selected friend.

Emits routeToFriend if friend is selected from list.

void FriendListPanel::setFilteringLayoutVisibility ( bool  visible  )  [private]

Set visibility for filtering text field and clearing button.

Parameters:
visible True if items should be visible, false if not
void FriendListPanel::setRouteButtonDisabled (  )  [private, slot]

Sets route button disabled.

Disabled if there isn't any list item selected.

void FriendListPanel::showEvent ( QShowEvent *  event  )  [protected]

Re-implemented from QWidget::showEvent().

Calls updateKeyboardGrabbing().

Parameters:
event 
void FriendListPanel::showFriendsInList ( const QList< QString > &  userIDs  )  [private, slot]

Slot to show friends in list.

Shows only friends that are on userIDs list

Parameters:
userIDs list of user ID's
void FriendListPanel::topmostWindowChanged ( bool  mainWindowIsTopmost  )  [private, slot]

Called when topmost window is changed.

Does set m_mainWindowIsTopmost and calls updateKeyboardGrabbing()

Parameters:
mainWindowIsTopmost True if MainWindow is the topmost one
void FriendListPanel::updateKeyboardGrabbing (  )  [private]

Takes care of grabbing and releasing the keyboard when required.

Keyboard is grabbed when MainWindow it the topmost window, panel tab is open and FriendListPanel is visible. Releasing is done if the MainWindow is not the topmost window or panel tab is not open or FriendListPanel is invisible.


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

Generated on Fri Sep 3 12:05:41 2010 for Situare client for Maemo by  doxygen 1.6.1