phonebookui/pbkcommonui/src/cntgroupactionsview.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 20:16:15 +0300
changeset 65 ae724a111993
parent 59 a642906a277a
child 71 7cc7d74059f9
permissions -rw-r--r--
Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include "cntgroupactionsview.h"
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    19
#include "cntactionlauncher.h"
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    20
#include "cntglobal.h"
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    21
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    22
#include <cntactionpopup.h>
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    24
#include <hblistview.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    25
#include <hbmenu.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    26
#include <hbaction.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    27
#include <hblistview.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    28
#include <hblistviewitem.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    29
#include <hbview.h>
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
#include <hbaction.h>
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
#include <hblabel.h>
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    32
#include <hbicon.h>
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    33
#include <hbgroupbox.h>
40
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
    34
#include <cntlistmodel.h>
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    35
#include <hbframebackground.h>
40
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
    36
#include <hbnumbergrouping.h>
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    37
#include <QKeyEvent> 
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    38
#include <qtcontacts.h>
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    39
#include <hbmainwindow.h>
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    40
#include "cntactionlauncher.h"
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    41
#include <QEvent>
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    42
#include <QStandardItemModel>
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    44
const char *CNT_GROUPACTIONSVIEW_XML = ":/xml/contacts_groupactions.docml";
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    45
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    46
CntGroupActionsView::CntGroupActionsView() :
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    47
mGroupContact(NULL),
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    48
mModel(NULL),
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    49
mViewManager(NULL),
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    50
mListView(NULL),
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    51
mPopupCount(0),
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
    52
mIsExecutingAction(false)
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
{
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    bool ok = false;
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    55
    mDocumentLoader.load(CNT_GROUPACTIONSVIEW_XML, &ok);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    56
  
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
    if (ok)
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    58
    {
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    59
        mView = static_cast<HbView*>(mDocumentLoader.findWidget(QString("view")));
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    60
    }
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    61
    else
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    62
    {
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    63
        qFatal("Unable to read :/xml/contacts_groupactions.docml");
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    64
    }
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    65
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    66
    //back button
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    67
    mSoftkey = new HbAction(Hb::BackNaviAction, mView);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    68
    connect(mSoftkey, SIGNAL(triggered()), this, SLOT(showPreviousView()));
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    69
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    70
    // menu actions
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    71
    mEditGrpDetailAction = static_cast<HbAction*>(mDocumentLoader.findObject("cnt:editgroupdetail"));
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    72
    connect(mEditGrpDetailAction, SIGNAL(triggered()), this, SLOT(editGroup()));
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
}
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
/*!
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
Destructor
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
*/
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
CntGroupActionsView::~CntGroupActionsView()
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
{
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    80
    mView->deleteLater();
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    81
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    82
    delete mEditGrpDetailAction; 
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    83
    mEditGrpDetailAction = NULL;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    84
    
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
    delete mGroupContact;
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    86
    mGroupContact = NULL;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    87
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    88
    delete mModel;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    89
    mModel = NULL;
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
}
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
void CntGroupActionsView::editGroup()
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
{
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    95
    CntViewParameters viewParameters;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    96
    viewParameters.insert(EViewId, groupEditorView);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    97
    QVariant var;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
    98
    var.setValue(*mGroupContact);
37
fd64c38c277d Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 31
diff changeset
    99
    viewParameters.insert(ESelectedGroupContact, var);
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   100
    mViewManager->changeView(viewParameters);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   101
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
}
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
/*!
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
Activates a previous view
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
*/
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   108
void CntGroupActionsView::showPreviousView()
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
{
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   110
    CntViewParameters viewParameters;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   111
    QVariant var;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   112
    var.setValue(*mGroupContact);
37
fd64c38c277d Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 31
diff changeset
   113
    viewParameters.insert(ESelectedGroupContact, var);
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   114
    mViewManager->back(viewParameters);
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
}
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   116
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   117
void CntGroupActionsView::deactivate()
25
76a2435edfd4 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 24
diff changeset
   118
{
76a2435edfd4 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 24
diff changeset
   119
    
76a2435edfd4 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 24
diff changeset
   120
}
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   121
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
/*
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
Activates a default view and setup name label texts
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
*/
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   125
void CntGroupActionsView::activate( const CntViewParameters aArgs )
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   126
{
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   127
    if (mView->navigationAction() != mSoftkey)
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   128
        mView->setNavigationAction(mSoftkey);   
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   129
    
37
fd64c38c277d Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 31
diff changeset
   130
    mGroupContact = new QContact(aArgs.value(ESelectedGroupContact).value<QContact>());
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   131
    mViewManager = &mEngine->viewManager();
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   133
    QContactName contactName = mGroupContact->detail( QContactName::DefinitionName );
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   134
    QString groupName = contactName.value( QContactName::FieldCustomLabel );        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   135
    if (groupName.isEmpty())
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   136
    {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   137
        groupName = hbTrId("txt_phob_list_unnamed");
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   138
    }
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   139
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   140
    //group box
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   141
    HbGroupBox* groupBox = static_cast<HbGroupBox *>(mDocumentLoader.findWidget(QString("groupBox")));
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   142
    groupBox->setHeading(groupName);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   143
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   144
    // create list & model
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   145
    mListView = static_cast<HbListView*> (mDocumentLoader.findWidget("listView"));
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   146
    mListView->setUniformItemSizes(true);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   147
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   148
    HbFrameBackground frame;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   149
    frame.setFrameGraphicsName("qtg_fr_list_parent_normal");
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   150
    frame.setFrameType(HbFrameDrawer::NinePieces);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   151
    mListView->itemPrototypes().first()->setDefaultFrame(frame);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   152
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   153
    mListView->listItemPrototype()->setGraphicsSize(HbListViewItem::LargeIcon);
31
2a11b5b00470 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 27
diff changeset
   154
    mListView->listItemPrototype()->setStretchingStyle(HbListViewItem::StretchLandscape);
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
    
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
    
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   157
    mModel = new QStandardItemModel();
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
    
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   159
    QContactPhoneNumber confCallNumber = mGroupContact->detail<QContactPhoneNumber>();
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   160
    if(!confCallNumber.number().isEmpty())
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   161
    {
40
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
   162
        /*
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
   163
         * Internationalization support, activate the following code 
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
   164
         * when support available from Orbit
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
   165
         */
b46a585f6909 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 37
diff changeset
   166
        //populatelist(hbTrId("txt_phob_dblist_conference_call"), HbIcon("qtg_large_call_group"),HbNumberGrouping::formatPhoneNumber(confCallNumber.number()));
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   167
        populatelist(hbTrId("txt_phob_dblist_conference_call"), HbIcon("qtg_large_call_group"),confCallNumber.number(),"call");
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   168
    }
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   169
      
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   170
    populatelist(hbTrId("txt_phob_dblist_send_message"),HbIcon("qtg_large_message_group"),hbTrId("txt_phob_dblist_send_message_val_members"),"message");
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   171
    populatelist(hbTrId("txt_phob_dblist_email"),HbIcon("qtg_large_email_group"),hbTrId("txt_phob_dblist_send_message_val_members"),"email");
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   172
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   173
    mListView->setModel(mModel);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   174
    mListView->setSelectionMode(HbAbstractItemView::NoSelection);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   175
    
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   176
    connect(mListView, SIGNAL(activated(const QModelIndex&)),
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   177
                this, SLOT(listItemSelected(const QModelIndex&)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   178
    
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   179
    HbMainWindow* window = mView->mainWindow();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   180
    if (window)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   181
    {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   182
        window->installEventFilter(this);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   183
    }
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
}
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   186
void CntGroupActionsView::populatelist(QString primaryText,HbIcon icon,QString secondaryText,QString action)
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
{
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   188
    QList<QStandardItem*> items;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   189
    QStandardItem *labelItem = new QStandardItem();
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   190
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   191
    QStringList textList;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   192
   
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   193
    textList << primaryText << secondaryText;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   194
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   195
    labelItem->setData(textList, Qt::DisplayRole);
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   196
    labelItem->setData(icon, Qt::DecorationRole);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   197
    labelItem->setData(action, Qt::UserRole+1);
27
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   198
    
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   199
    items << labelItem ;
de1630741fbe Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 25
diff changeset
   200
    mModel->appendRow(items);
24
0ba2181d7c28 Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
}
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   202
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   203
void CntGroupActionsView::listItemSelected(const QModelIndex &index)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   204
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   205
    if (index.isValid()) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   206
        //reset flags
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   207
        mPopupCount=0;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   208
        mEmailActionParams.clear();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   209
        mMessageActionParams.clear();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   210
        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   211
        QString action = mModel->item(index.row())->data(Qt::UserRole+1).toString();
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   212
        QContactManager& mgr = mEngine->contactManager( SYMBIAN_BACKEND );
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   213
        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   214
        //conference call
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   215
        if (action.compare("call", Qt::CaseInsensitive) == 0 ) {
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   216
            CntActionLauncher* other = new CntActionLauncher( mgr, action);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   217
            connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   218
            other->execute(*mGroupContact, QContactDetail());
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   219
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   220
        //group email, message
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   221
        else {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   222
            QContactRelationshipFilter relationshipFilter;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   223
            relationshipFilter.setRelationshipType(QContactRelationship::HasMember);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   224
            relationshipFilter.setRelatedContactRole(QContactRelationship::First);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   225
            relationshipFilter.setRelatedContactId(mGroupContact->id());   
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   226
            QList<QContactLocalId> groupMembers = mgr.contactIds(relationshipFilter);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   227
            
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   228
            for (int i = 0;i<groupMembers.count();i++) {
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   229
                QContact contact = mgr.contact(groupMembers.at(i));
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   230
                QContactDetail preferredDetail = contact.preferredDetail(action);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   231
                //use preferred detail if exits
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   232
                if (!preferredDetail.isEmpty()) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   233
                    if(action.compare("message", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   234
                        QContactPhoneNumber phoneNumber = contact.detail<QContactPhoneNumber>();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   235
                        mMessageActionParams.insert(phoneNumber.number(),QVariant(contact.displayLabel()));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   236
                    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   237
                    else {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   238
                        QContactEmailAddress email = contact.detail<QContactEmailAddress>();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   239
                        mEmailActionParams.append(email.emailAddress());
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   240
                    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   241
                }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   242
                else {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   243
                    CntActionPopup *actionPopup = new CntActionPopup(&contact);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   244
                    if(actionPopup->showActionPopup(action)) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   245
                        //increment actionpopup counter
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   246
                        mPopupCount++;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   247
                        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   248
                        connect( actionPopup, SIGNAL(executeContactAction(QContact&, QContactDetail, QString)), this, 
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   249
                                                    SLOT(executeAction(QContact&, QContactDetail, QString)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   250
                        connect(actionPopup, SIGNAL(actionPopupCancelPressed()), this, SLOT(actionCancelled()));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   251
                    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   252
                    else {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   253
                        delete actionPopup;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   254
                    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   255
                }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   256
            }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   257
            //no popup dialog, execute action
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   258
            if (mPopupCount==0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   259
                QVariantMap map;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   260
                QVariant params;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   261
                if (action.compare("message", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   262
                    params.setValue(mMessageActionParams);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   263
                }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   264
                else if (action.compare("email", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   265
                    params.setValue(mEmailActionParams);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   266
                }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   267
                map.insert(action,params);
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   268
                CntActionLauncher* other = new CntActionLauncher(mgr, action);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   269
                connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   270
                other->execute(*mGroupContact, QContactDetail(), map);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   271
            }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   272
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   273
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   274
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   275
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   276
void CntGroupActionsView::executeAction(QContact& contact, QContactDetail detail, QString action)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   277
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   278
    Q_UNUSED(contact);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   279
    
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   280
    if (action.compare("message", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   281
        QContactPhoneNumber phoneNumber = static_cast<QContactPhoneNumber>(detail);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   282
        mMessageActionParams.insert(phoneNumber.number(),QVariant(contact.displayLabel()));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   283
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   284
    else if (action.compare("email", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   285
        QContactEmailAddress email = static_cast<QContactEmailAddress>(detail);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   286
        mEmailActionParams.append(email.emailAddress());
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   287
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   288
    
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   289
    //actionpopup executed, decrement counter
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   290
    mPopupCount--;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   291
    if (mPopupCount==0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   292
        QVariantMap map;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   293
        QVariant params;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   294
        if (action.compare("message", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   295
            params.setValue(mMessageActionParams);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   296
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   297
        else if (action.compare("email", Qt::CaseInsensitive) == 0) {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   298
            params.setValue(mEmailActionParams);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   299
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   300
        map.insert(action,params);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   301
        
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   302
        CntActionLauncher* other = new CntActionLauncher( mEngine->contactManager(SYMBIAN_BACKEND), action);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   303
        connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   304
        other->execute(*mGroupContact, QContactDetail(), map);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   305
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   306
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   307
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   308
bool CntGroupActionsView::eventFilter(QObject *obj, QEvent *event)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   309
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   310
    if (event->type() == QEvent::KeyPress && obj == mView->mainWindow())
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   311
    {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   312
        QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   313
        if (keyEvent->key() == Qt::Key_Yes)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   314
        {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   315
            return sendKeyPressed();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   316
        }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   317
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   318
    return false;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   319
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   320
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   321
bool CntGroupActionsView::sendKeyPressed()
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   322
{   
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   323
    QList<QContactPhoneNumber> numberDetails = mGroupContact->details<QContactPhoneNumber>();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   324
    bool keyConsumed = false;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   325
        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   326
    // check if conference call number is present
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   327
    if (!numberDetails.isEmpty()) 
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   328
    { 
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   329
        executeConferenceCallAction( *mGroupContact, mGroupContact->details<QContactPhoneNumber>().first(), "call");
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   330
        
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   331
        keyConsumed = true;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   332
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   333
    
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   334
    return keyConsumed;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   335
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   336
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   337
void CntGroupActionsView::executeConferenceCallAction(QContact& aContact, const QContactDetail& aDetail, const QString& aAction)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   338
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   339
    if (mIsExecutingAction)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   340
    {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   341
        return;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   342
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   343
    else
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   344
    {
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   345
        mIsExecutingAction = true;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   346
    }
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   347
    
65
ae724a111993 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 59
diff changeset
   348
    CntActionLauncher* other = new CntActionLauncher( mEngine->contactManager(SYMBIAN_BACKEND), aAction);
59
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   349
    connect(other, SIGNAL(actionExecuted(CntActionLauncher*)), this, SLOT(actionExecuted(CntActionLauncher*)));
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   350
    other->execute(aContact, aDetail);  
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   351
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   352
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   353
void CntGroupActionsView::actionCancelled()
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   354
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   355
    //actionpopup cancelled, decrement counter
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   356
    mPopupCount--;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   357
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   358
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   359
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   360
void CntGroupActionsView::actionExecuted(CntActionLauncher* aAction)
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   361
{
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   362
    //cleanup
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   363
    aAction->deleteLater();
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   364
    mIsExecutingAction = false;
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   365
}
a642906a277a Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 40
diff changeset
   366