Friend group map item. More...
#include <friendgroupitem.h>


Signals | |
| void | locationItemClicked (const QList< QString > &userIDs) |
| Signal is emitted when l item is clicked. | |
Public Member Functions | |
| FriendGroupItem (FriendLocationItem *item) | |
| Constructor. | |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| Paint event. | |
| void | dropFriends () |
| Drop all FriendLocationItem items from the group. | |
| void | joinFriend (FriendLocationItem *item) |
| Join new FriendLocationItem to this group. | |
Protected Member Functions | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
| Mouse move event. | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| Mouse press event. | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
| Mouse release event. | |
Private Attributes | |
| QList< FriendLocationItem * > | m_friends |
| List of joined FriendLocationItem items. | |
| QPointF | m_mousePressPosition |
| Mouse press position. | |
| bool | m_clickEvent |
| Mouse click event flag. | |
Friend group map item.
Contains grouped FriendLocationItem items and draws group image with number of grouped friends
| FriendGroupItem::FriendGroupItem | ( | FriendLocationItem * | item | ) |
Constructor.
Create new group, set picture and join first FriendLocationItem to the group. Group position is set to be exactly same as item given as parameter.
| item | First FriendLocationItem to be joined to new group |
| void FriendGroupItem::dropFriends | ( | ) |
Drop all FriendLocationItem items from the group.
Dropped items are set to visible again.
| void FriendGroupItem::joinFriend | ( | FriendLocationItem * | item | ) |
Join new FriendLocationItem to this group.
Given item is also hidden.
| item | FriendLocationItem to be joined |
| void FriendGroupItem::locationItemClicked | ( | const QList< QString > & | userIDs | ) | [signal] |
Signal is emitted when l item is clicked.
| userIDs | list of friends user IDs in the group |
| void FriendGroupItem::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Mouse move event.
Disables m_clickEvent flag if press and release where not in same area.
| event | QGraphicsSceneMouseEvent. |
| void FriendGroupItem::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Mouse press event.
Sets mouse press position.
| event | QGraphicsSceneMouseEvent. |
| void FriendGroupItem::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Mouse release event.
Emits friendGroupItemClicked signal if press and release where in same area.
| event | QGraphicsSceneMouseEvent. |
| void FriendGroupItem::paint | ( | QPainter * | painter, | |
| const QStyleOptionGraphicsItem * | option, | |||
| QWidget * | widget | |||
| ) |
Paint event.
Draw amount of joined FriendLocationItem items over the image.
1.6.1