00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Sami Rämö - sami.ramo@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 00023 #ifndef FRIENDGROUPITEM_H 00024 #define FRIENDGROUPITEM_H 00025 00026 #include <QList> 00027 00028 #include "baselocationitem.h" 00029 00030 class FriendLocationItem; 00031 00039 class FriendGroupItem : public BaseLocationItem 00040 { 00041 Q_OBJECT 00042 00043 public: 00052 FriendGroupItem(FriendLocationItem *item); 00053 00054 /******************************************************************************* 00055 * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS 00056 ******************************************************************************/ 00057 public: 00063 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); 00064 00065 protected: 00074 void mouseMoveEvent(QGraphicsSceneMouseEvent *event); 00075 00083 void mousePressEvent(QGraphicsSceneMouseEvent *event); 00084 00093 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); 00094 00095 /******************************************************************************* 00096 * MEMBER FUNCTIONS AND SLOTS 00097 ******************************************************************************/ 00098 public: 00104 void dropFriends(); 00105 00113 void joinFriend(FriendLocationItem *item); 00114 00115 /******************************************************************************* 00116 * SIGNALS 00117 ******************************************************************************/ 00118 signals: 00124 void locationItemClicked(const QList<QString> &userIDs); 00125 00126 /******************************************************************************* 00127 * DATA MEMBERS 00128 ******************************************************************************/ 00129 private: 00130 QList<FriendLocationItem *> m_friends; 00131 QPointF m_mousePressPosition; 00132 bool m_clickEvent; 00133 }; 00134 00135 #endif // FRIENDGROUPITEM_H