messagingapp/shareui/tsrc/testshareui/testshareuiview.cpp
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 30 6a20128ce557
child 32 f3f513612312
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
     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:  Offers message creation and sending services.
       
    15  *
       
    16 */
       
    17 
       
    18 #include <hbaction.h>
       
    19 #include <hbdevicedialog.h>
       
    20 #include <qtdebug>
       
    21 #include <xqservicerequest.h>
       
    22 #include "testshareuiview.h"
       
    23 #include "shareui.h"
       
    24 
       
    25 TestShareUiView::TestShareUiView(HbMainWindow* parent)
       
    26     {
       
    27     // TODO Auto-generated constructor stub
       
    28 
       
    29     }
       
    30 
       
    31 TestShareUiView::~TestShareUiView()
       
    32     {
       
    33     // TODO Auto-generated destructor stub
       
    34     }
       
    35 
       
    36 bool TestShareUiView::init()
       
    37     {
       
    38     // initialize
       
    39     qDebug() << "[DeviceView] " << "init()";
       
    40     mToolBar = toolBar();
       
    41     
       
    42     // clear actions
       
    43     mToolBar->clearActions();
       
    44     
       
    45     // add the actions now
       
    46     // when you press this, a device dialog should pop up.
       
    47     HbAction* openCvAction = new HbAction( HbIcon(""), tr("Launch Share Ui"), this);
       
    48     mToolBar->addAction(openCvAction);
       
    49     connect(openCvAction, SIGNAL(triggered()), this, SLOT(openCvPop()));
       
    50     
       
    51     return true;
       
    52     }
       
    53 
       
    54 void TestShareUiView::openCvPop()
       
    55     {
       
    56     qDebug() << "[DeviceView] " << "openCvPop() ";
       
    57     ShareUi dialog;
       
    58     QList<QVariant> fileList;
       
    59     fileList << QVariant(QString("c:\\Sunset.jpg"));
       
    60     dialog.init(fileList,true);    
       
    61     }
       
    62