emailuis/nmailui/src/nmattachmentpicker.cpp
author hgs
Tue, 19 Oct 2010 12:30:59 +0300
changeset 79 2508e95245f2
parent 66 084b5b1f02a7
permissions -rw-r--r--
201041_1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 - 2010 Nokia Corporation and/or its subsidiary(-ies).
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ecc8def7944a Revision: 201015
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".
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description: Utility class for launching different file pickers
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include "nmuiheaders.h"
47
hgs
parents: 43
diff changeset
    19
hgs
parents: 43
diff changeset
    20
static const int NmAttachmentPickerStillMode = 0;
hgs
parents: 43
diff changeset
    21
static const int NmAttachmentPickerVideoMode = 1;
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
/*!
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
    \class NmAttachmentPicker
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
    \brief Attachment picker for mail editor
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
/*!
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
    Constructor
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
*/
47
hgs
parents: 43
diff changeset
    31
NmAttachmentPicker::NmAttachmentPicker(QObject *parent):
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
    QObject(parent),
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
    mRequest(NULL)
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
{
43
hgs
parents: 23
diff changeset
    35
    NM_FUNCTION;
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
/*!
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
    Destructor
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
NmAttachmentPicker::~NmAttachmentPicker()
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
{
43
hgs
parents: 23
diff changeset
    43
    NM_FUNCTION;
56
hgs
parents: 47
diff changeset
    44
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
    delete mRequest;
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
/*!
56
hgs
parents: 47
diff changeset
    49
    Send request to start Photo picker
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
void NmAttachmentPicker::fetchImage()
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
{
43
hgs
parents: 23
diff changeset
    53
    NM_FUNCTION;
56
hgs
parents: 47
diff changeset
    54
43
hgs
parents: 23
diff changeset
    55
    fetch(XQI_IMAGE_FETCH, XQOP_IMAGE_FETCH);
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
/*!
56
hgs
parents: 47
diff changeset
    59
    Send request to start Music picker
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
void NmAttachmentPicker::fetchAudio()
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
{
43
hgs
parents: 23
diff changeset
    63
    NM_FUNCTION;
56
hgs
parents: 47
diff changeset
    64
hgs
parents: 47
diff changeset
    65
    fetch(XQI_MUSIC_FETCH, XQOP_MUSIC_FETCH);
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
/*!
56
hgs
parents: 47
diff changeset
    69
    Send request to start Video picker
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
void NmAttachmentPicker::fetchVideo()
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
{
43
hgs
parents: 23
diff changeset
    73
    NM_FUNCTION;
62
hgs
parents: 56
diff changeset
    74
43
hgs
parents: 23
diff changeset
    75
    fetch(XQI_VIDEO_FETCH, XQOP_VIDEO_FETCH);
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
/*!
56
hgs
parents: 47
diff changeset
    79
    Send request to start general file picker
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
*/
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
void NmAttachmentPicker::fetchOther()
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    82
{
43
hgs
parents: 23
diff changeset
    83
    NM_FUNCTION;
56
hgs
parents: 47
diff changeset
    84
43
hgs
parents: 23
diff changeset
    85
    QString path;
56
hgs
parents: 47
diff changeset
    86
    path = FmFileDialog::getOpenFileName(0, hbTrId("txt_mail_dialog_select_file"));
hgs
parents: 47
diff changeset
    87
hgs
parents: 47
diff changeset
    88
    QString temp = QDir::toNativeSeparators(path);
hgs
parents: 47
diff changeset
    89
    emit attachmentsFetchOk(QVariant(temp));
43
hgs
parents: 23
diff changeset
    90
}
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
43
hgs
parents: 23
diff changeset
    92
/*!
hgs
parents: 23
diff changeset
    93
    Send request to retrieve image from camera
hgs
parents: 23
diff changeset
    94
*/
hgs
parents: 23
diff changeset
    95
void NmAttachmentPicker::fetchCameraStill()
hgs
parents: 23
diff changeset
    96
{
hgs
parents: 23
diff changeset
    97
    NM_FUNCTION;
62
hgs
parents: 56
diff changeset
    98
43
hgs
parents: 23
diff changeset
    99
    fetchFromCamera(NmAttachmentPickerStillMode);
hgs
parents: 23
diff changeset
   100
}
hgs
parents: 23
diff changeset
   101
hgs
parents: 23
diff changeset
   102
/*!
hgs
parents: 23
diff changeset
   103
    Send request to retrieve video from camera
hgs
parents: 23
diff changeset
   104
*/
hgs
parents: 23
diff changeset
   105
void NmAttachmentPicker::fetchCameraVideo()
hgs
parents: 23
diff changeset
   106
{
hgs
parents: 23
diff changeset
   107
    NM_FUNCTION;
62
hgs
parents: 56
diff changeset
   108
43
hgs
parents: 23
diff changeset
   109
    fetchFromCamera(NmAttachmentPickerVideoMode);
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
}
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
/*!
43
hgs
parents: 23
diff changeset
   113
    Send request to retrieve image/video from camera
hgs
parents: 23
diff changeset
   114
*/
hgs
parents: 23
diff changeset
   115
void NmAttachmentPicker::fetchFromCamera(int mode)
hgs
parents: 23
diff changeset
   116
{
hgs
parents: 23
diff changeset
   117
    NM_FUNCTION;
hgs
parents: 23
diff changeset
   118
47
hgs
parents: 43
diff changeset
   119
    int cameraIndex(0);            //primary camera
hgs
parents: 43
diff changeset
   120
    int quality(0);                //default
hgs
parents: 43
diff changeset
   121
    bool allowModeSwitch(false);   //not allowed to change
hgs
parents: 43
diff changeset
   122
    bool allowCameraSwitch(true);  //allow changes
hgs
parents: 43
diff changeset
   123
    bool allowQualityChange(true); //allow changes
56
hgs
parents: 47
diff changeset
   124
43
hgs
parents: 23
diff changeset
   125
    QVariantMap parameters;
hgs
parents: 23
diff changeset
   126
    parameters.insert(XQCAMERA_INDEX, cameraIndex);
hgs
parents: 23
diff changeset
   127
    parameters.insert(XQCAMERA_QUALITY, quality);
hgs
parents: 23
diff changeset
   128
    parameters.insert(XQCAMERA_MODE_SWITCH, allowModeSwitch);
hgs
parents: 23
diff changeset
   129
    parameters.insert(XQCAMERA_INDEX_SWITCH, allowCameraSwitch);
56
hgs
parents: 47
diff changeset
   130
    parameters.insert(XQCAMERA_QUALITY_CHANGE, allowQualityChange);
hgs
parents: 47
diff changeset
   131
43
hgs
parents: 23
diff changeset
   132
    QList<QVariant> args;
hgs
parents: 23
diff changeset
   133
    args << mode;
hgs
parents: 23
diff changeset
   134
    args << parameters;
56
hgs
parents: 47
diff changeset
   135
43
hgs
parents: 23
diff changeset
   136
    fetch(XQI_CAMERA_CAPTURE, "capture(int,QVariantMap)", &args);
hgs
parents: 23
diff changeset
   137
}
hgs
parents: 23
diff changeset
   138
/*!
56
hgs
parents: 47
diff changeset
   139
    Construct & send appmgr request to start appropriate picker
43
hgs
parents: 23
diff changeset
   140
    param <interface> the interface to be connected to
hgs
parents: 23
diff changeset
   141
    param <operation> the operation of the interface
hgs
parents: 23
diff changeset
   142
    param <args> the arguments that needed by the operation
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
*/
56
hgs
parents: 47
diff changeset
   144
void NmAttachmentPicker::fetch(const QString &interface,
47
hgs
parents: 43
diff changeset
   145
    const QString &operation, const QList<QVariant> *args)
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
{
43
hgs
parents: 23
diff changeset
   147
    NM_FUNCTION;
56
hgs
parents: 47
diff changeset
   148
23
2dc6caa42ec3 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 20
diff changeset
   149
    delete mRequest;
2dc6caa42ec3 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 20
diff changeset
   150
    mRequest = NULL;
2dc6caa42ec3 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 20
diff changeset
   151
    XQApplicationManager appMgr;
2dc6caa42ec3 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 20
diff changeset
   152
    mRequest = appMgr.create(interface, operation, true);
56
hgs
parents: 47
diff changeset
   153
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
    if (mRequest) {
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
        mRequest->setSynchronous(false);
43
hgs
parents: 23
diff changeset
   156
        if (args) {
hgs
parents: 23
diff changeset
   157
            mRequest->setArguments(*args);
hgs
parents: 23
diff changeset
   158
        }
66
hgs
parents: 62
diff changeset
   159
        // Set the title pane text for the picker window
hgs
parents: 62
diff changeset
   160
		// sub-title comes from the pickers
hgs
parents: 62
diff changeset
   161
        QVariant title(mTitle);
hgs
parents: 62
diff changeset
   162
        XQRequestInfo info;
hgs
parents: 62
diff changeset
   163
        info.setInfo(XQINFO_KEY_WINDOW_TITLE, title);
hgs
parents: 62
diff changeset
   164
        mRequest->setInfo(info);
62
hgs
parents: 56
diff changeset
   165
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
        connect(mRequest, SIGNAL(requestOk(const QVariant&)),
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
                this, SIGNAL(attachmentsFetchOk(const QVariant&)));
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   169
        connect(mRequest, SIGNAL(requestError(int, const QString&)),
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
                this, SIGNAL(attachmentsFetchError(int, const QString&)));
56
hgs
parents: 47
diff changeset
   171
23
2dc6caa42ec3 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 20
diff changeset
   172
        mRequest->send();
56
hgs
parents: 47
diff changeset
   173
    }
20
ecc8def7944a Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
}
56
hgs
parents: 47
diff changeset
   175
hgs
parents: 47
diff changeset
   176
/*!
hgs
parents: 47
diff changeset
   177
	Launch the correct fetcher based on the clicked list item.
hgs
parents: 47
diff changeset
   178
*/
hgs
parents: 47
diff changeset
   179
void NmAttachmentPicker::selectFetcher(HbListWidgetItem *listItem)
hgs
parents: 47
diff changeset
   180
{
62
hgs
parents: 56
diff changeset
   181
    NM_FUNCTION;
hgs
parents: 56
diff changeset
   182
hgs
parents: 56
diff changeset
   183
    QString itemText = listItem->text();
56
hgs
parents: 47
diff changeset
   184
    if (itemText == hbTrId("txt_mail_list_photo")) {
hgs
parents: 47
diff changeset
   185
        fetchImage();
hgs
parents: 47
diff changeset
   186
    }
66
hgs
parents: 62
diff changeset
   187
    else if (itemText == hbTrId("txt_mail_list_sound")) {
56
hgs
parents: 47
diff changeset
   188
        fetchAudio();
hgs
parents: 47
diff changeset
   189
	}
hgs
parents: 47
diff changeset
   190
    else if (itemText == hbTrId("txt_mail_list_video")) {
hgs
parents: 47
diff changeset
   191
        fetchVideo();
hgs
parents: 47
diff changeset
   192
	}
hgs
parents: 47
diff changeset
   193
    else if (itemText == hbTrId("txt_mail_list_other")) {
hgs
parents: 47
diff changeset
   194
        QMetaObject::invokeMethod(this, "fetchOther", Qt::QueuedConnection);
hgs
parents: 47
diff changeset
   195
	}
hgs
parents: 47
diff changeset
   196
    else if (itemText == hbTrId("txt_mail_list_new_photo")) {
hgs
parents: 47
diff changeset
   197
        fetchCameraStill();
hgs
parents: 47
diff changeset
   198
	}
62
hgs
parents: 56
diff changeset
   199
    else if (itemText == hbTrId("txt_mail_list_new_video")) {
hgs
parents: 56
diff changeset
   200
        fetchCameraVideo();
hgs
parents: 56
diff changeset
   201
    }
56
hgs
parents: 47
diff changeset
   202
}
62
hgs
parents: 56
diff changeset
   203
hgs
parents: 56
diff changeset
   204
/*!
hgs
parents: 56
diff changeset
   205
    Sets the title used in the picker views
hgs
parents: 56
diff changeset
   206
*/
hgs
parents: 56
diff changeset
   207
void NmAttachmentPicker::setTitle(const QString &title)
hgs
parents: 56
diff changeset
   208
{
hgs
parents: 56
diff changeset
   209
    NM_FUNCTION;
hgs
parents: 56
diff changeset
   210
    
hgs
parents: 56
diff changeset
   211
    mTitle = title;
hgs
parents: 56
diff changeset
   212
}