messagingapp/msgui/unifiedviewer/src/univiewerattachmentwidget.cpp
changeset 73 ecf6a73a9186
parent 63 eceabb8c7a12
equal deleted inserted replaced
68:e8a69c93c830 73:ecf6a73a9186
    28 
    28 
    29 #include <QFileInfo>
    29 #include <QFileInfo>
    30 #include <QTimer>
    30 #include <QTimer>
    31 
    31 
    32 // USER INCLUDES
    32 // USER INCLUDES
    33 #include "univiewerutils.h"
    33 #include "msgservicelaunchutil.h"
    34 #include "unidatamodelplugininterface.h"
    34 #include "unidatamodelplugininterface.h"
    35 
    35 
    36 // LOCAL CONSTANTS
    36 // LOCAL CONSTANTS
    37 #define LOC_OPEN hbTrId("txt_common_menu_open")
    37 #define LOC_OPEN hbTrId("txt_common_menu_open")
    38 #define LOC_SAVE_TO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts")
    38 #define LOC_SAVE_TO_CONTACTS hbTrId("txt_messaging_menu_save_to_contacts")
   170 void UniViewerAttachmentWidget::handleOpen()
   170 void UniViewerAttachmentWidget::handleOpen()
   171 {
   171 {
   172     this->ungrabGesture(Qt::TapGesture);
   172     this->ungrabGesture(Qt::TapGesture);
   173     
   173     
   174     if (!mViewerUtils) {
   174     if (!mViewerUtils) {
   175         mViewerUtils = new UniViewerUtils(this);
   175         mViewerUtils = new MsgServiceLaunchUtil(this);
   176     }
   176     }
   177     mViewerUtils->launchContentViewer(mMimeType, mMediaPath);
   177     mViewerUtils->launchContentViewer(mMimeType, mMediaPath);
   178     
   178     
   179     //fire timer to regrab gesture after some delay.
   179     //fire timer to regrab gesture after some delay.
   180     QTimer::singleShot(300,this,SLOT(regrabGesture()));
   180     QTimer::singleShot(300,this,SLOT(regrabGesture()));
   181 }
   181 }
       
   182 
       
   183 
   182 
   184 
   183 //----------------------------------------------------------------------------
   185 //----------------------------------------------------------------------------
   184 // UniViewerAttachmentWidget::handleShortTap
   186 // UniViewerAttachmentWidget::handleShortTap
   185 // @see header file
   187 // @see header file
   186 //----------------------------------------------------------------------------
   188 //----------------------------------------------------------------------------