phonebookui/pbkcommonui/inc/cntgroupmemberview_p.h
changeset 59 a642906a277a
child 61 d30183af6ca6
equal deleted inserted replaced
47:7cbcb2896f0e 59:a642906a277a
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CNTGROUPMEMBERVIEW_P_H
       
    19 #define CNTGROUPMEMBERVIEW_P_H
       
    20 
       
    21 #include "cntgroupmemberview.h"
       
    22 #include "cntglobal.h"
       
    23 
       
    24 #include <QObject>
       
    25 #include <QList>
       
    26 #include <hbdocumentloader.h>
       
    27 #include <QSet>
       
    28 #include <cntabstractview.h>
       
    29 
       
    30 class CntListModel;
       
    31 class CntAbstractViewManager;
       
    32 class CntContactCardHeadingItem;
       
    33 class HbView;
       
    34 class HbAction;
       
    35 class HbListView;
       
    36 class HbAbstractViewItem;
       
    37 class ThumbnailManager;
       
    38 class QModelIndex;
       
    39 class CntImageLabel;
       
    40 class HbDocumentLoader;
       
    41 
       
    42 QTM_BEGIN_NAMESPACE
       
    43 class QContact;
       
    44 QTM_END_NAMESPACE
       
    45 
       
    46 QTM_USE_NAMESPACE
       
    47 
       
    48 class CntGroupMemberViewPrivate : public QObject
       
    49 {
       
    50     Q_OBJECT
       
    51 
       
    52 public:
       
    53     CntGroupMemberViewPrivate();
       
    54     ~CntGroupMemberViewPrivate();
       
    55     
       
    56     void activate( CntAbstractViewManager* aMgr, const CntViewParameters aArgs );
       
    57     void deactivate();
       
    58     
       
    59 public:
       
    60     CntGroupMemberView* q_ptr;
       
    61     
       
    62 private slots:
       
    63     void showPreviousView();
       
    64     void openGroupActions();
       
    65     void manageMembers();
       
    66     void handleManageMembers(QSet<QContactLocalId> aIds);
       
    67     void editGroup();
       
    68     void deleteGroup();
       
    69     void handleDeleteGroup(int action); // Delete action
       
    70     
       
    71     void showContextMenu(HbAbstractViewItem *item, const QPointF &coords); // item owned by HbListView
       
    72     void handleMenu(HbAction* action);
       
    73 
       
    74     void showContactView(const QModelIndex &index);
       
    75     void removeFromGroup(const QModelIndex &index);
       
    76     void editContact(const QModelIndex &index);
       
    77     void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error);
       
    78     void openImageEditor();
       
    79     void setOrientation(Qt::Orientation orientation);
       
    80     
       
    81     void drawImageMenu(const QPointF &aCoords);
       
    82     void createModel();
       
    83   
       
    84     void removeImage();
       
    85     void sendToHs(const QModelIndex &index);
       
    86    
       
    87 private:
       
    88     QContactManager* getContactManager();
       
    89     void setRelationship(QSet<QContactLocalId>        &aLocalId,
       
    90                          QList<QContactRelationship>  &aRelationshipList);
       
    91     
       
    92 private:
       
    93     Q_DECLARE_PUBLIC(CntGroupMemberView)
       
    94     friend class TestCntGroupMemberView;
       
    95     
       
    96 private:
       
    97     QContact*                   mGroupContact; // own
       
    98     CntAbstractViewManager*     mViewManager;
       
    99     HbDocumentLoader            mDocumentLoader;
       
   100     HbView*                     mView; // own
       
   101     HbAction*                   mSoftkey; // owned by view
       
   102     CntContactCardHeadingItem*  mHeadingItem; // owned by layout
       
   103     ThumbnailManager*           mThumbnailManager; // own
       
   104     HbAction*                   mManageAction; // owned by view
       
   105     HbAction*                   mDeleteAction; // owned by view
       
   106     HbAction*                   mShowActionsAction; // owned by view
       
   107     HbAction*                   mEditGroupAction; // owned by view
       
   108     CntListModel*               mModel; // own
       
   109     CntImageLabel*              mImageLabel;
       
   110     HbListView*                 mListView; // owned by layout
       
   111     HbDocumentLoader*           mDocument;
       
   112     QList<QContactLocalId>      mOriginalGroupMembers;
       
   113     QContactAvatar*             mAvatar;
       
   114     CntViewParameters           mArgs;
       
   115 };
       
   116 
       
   117 #endif // CNTGROUPMEMBERVIEW_P_H
       
   118 
       
   119 // EOF