| 1 | /* |
|---|
| 2 | * This file is part of Licq, an instant messaging client for UNIX. |
|---|
| 3 | * Copyright (C) 2000-2006 Licq developers |
|---|
| 4 | * |
|---|
| 5 | * Licq is free software; you can redistribute it and/or modify |
|---|
| 6 | * it under the terms of the GNU General Public License as published by |
|---|
| 7 | * the Free Software Foundation; either version 2 of the License, or |
|---|
| 8 | * (at your option) any later version. |
|---|
| 9 | * |
|---|
| 10 | * Licq is distributed in the hope that it will be useful, |
|---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | * GNU General Public License for more details. |
|---|
| 14 | * |
|---|
| 15 | * You should have received a copy of the GNU General Public License |
|---|
| 16 | * along with Licq; if not, write to the Free Software |
|---|
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 18 | */ |
|---|
| 19 | |
|---|
| 20 | #ifndef MMUSERVIEW_H |
|---|
| 21 | #define MMUSERVIEW_H |
|---|
| 22 | |
|---|
| 23 | #include "userviewbase.h" |
|---|
| 24 | |
|---|
| 25 | class QMenu; |
|---|
| 26 | |
|---|
| 27 | class ICQUser; |
|---|
| 28 | |
|---|
| 29 | namespace LicqQtGui |
|---|
| 30 | { |
|---|
| 31 | class ContactListModel;; |
|---|
| 32 | |
|---|
| 33 | class MMUserView : public UserViewBase |
|---|
| 34 | { |
|---|
| 35 | Q_OBJECT |
|---|
| 36 | public: |
|---|
| 37 | MMUserView(QString id, unsigned long ppid, ContactListModel* contactList, QWidget* parent = 0); |
|---|
| 38 | virtual ~MMUserView(); |
|---|
| 39 | |
|---|
| 40 | const QSet<QPair<QString, unsigned long> >& contacts() const; |
|---|
| 41 | |
|---|
| 42 | void add(QString id, unsigned long ppid); |
|---|
| 43 | void removeFirst(); |
|---|
| 44 | |
|---|
| 45 | public slots: |
|---|
| 46 | void clear(); |
|---|
| 47 | |
|---|
| 48 | private: |
|---|
| 49 | QMenu* myMenu; |
|---|
| 50 | QString myId; |
|---|
| 51 | unsigned long myPpid; |
|---|
| 52 | |
|---|
| 53 | virtual void mousePressEvent(QMouseEvent* event); |
|---|
| 54 | virtual void keyPressEvent(QKeyEvent* event); |
|---|
| 55 | virtual void dragEnterEvent(QDragEnterEvent* event); |
|---|
| 56 | virtual void dropEvent(QDropEvent* event); |
|---|
| 57 | virtual void contextMenuEvent(QContextMenuEvent* event); |
|---|
| 58 | |
|---|
| 59 | private slots: |
|---|
| 60 | void remove(); |
|---|
| 61 | void crop(); |
|---|
| 62 | void addCurrentGroup(); |
|---|
| 63 | void addAll(); |
|---|
| 64 | }; |
|---|
| 65 | |
|---|
| 66 | } // namespace LicqQtGui |
|---|
| 67 | |
|---|
| 68 | #endif |
|---|