messagingapp/shareui/src/shareuiprivate.cpp
changeset 38 4e4b6adb1024
parent 37 518b245aa84c
child 48 4f501b74aeb1
equal deleted inserted replaced
37:518b245aa84c 38:4e4b6adb1024
   207     mSharePopup = new HbDialog();
   207     mSharePopup = new HbDialog();
   208     // make it delete itself on close
   208     // make it delete itself on close
   209     mSharePopup->setAttribute( Qt::WA_DeleteOnClose, true );
   209     mSharePopup->setAttribute( Qt::WA_DeleteOnClose, true );
   210     HbTextItem* heading = new HbTextItem(LOC_SEND_SELECTED_ITEM, mSharePopup);
   210     HbTextItem* heading = new HbTextItem(LOC_SEND_SELECTED_ITEM, mSharePopup);
   211     heading->setAlignment(Qt::AlignCenter);
   211     heading->setAlignment(Qt::AlignCenter);
   212     mSharePopup->setDismissPolicy(HbDialog::NoDismiss);
   212     mSharePopup->setDismissPolicy(HbDialog::TapAnywhere);
   213     mSharePopup->setHeadingWidget(heading);
   213     mSharePopup->setHeadingWidget(heading);
   214     mSharePopup->setFrameType(HbDialog::Strong);
   214     mSharePopup->setFrameType(HbDialog::Strong);
   215     connect(mSharePopup, SIGNAL(aboutToClose()), this, SLOT(reset()));
   215     connect(mSharePopup, SIGNAL(aboutToClose()), this, SLOT(reset()));
   216         
   216         
   217     // Content widget
   217     // Content widget
   271 /**
   271 /**
   272  * Slot for handling send service selection on the UI.
   272  * Slot for handling send service selection on the UI.
   273  */
   273  */
   274 void ShareUiPrivate::onTriggered(void)
   274 void ShareUiPrivate::onTriggered(void)
   275     {
   275     {
       
   276     
   276     XQAiwRequest* request = 0;
   277     XQAiwRequest* request = 0;
   277     request = qobject_cast<XQAiwRequest*>(sender());
   278     request = qobject_cast<XQAiwRequest*>(sender());
   278     if(request)
   279     if(request)
   279         {
   280         {
   280         QList<QVariant> args;
   281         QList<QVariant> args;
   287 
   288 
   288 /**
   289 /**
   289  * Slot for handling valid returns from the framework.
   290  * Slot for handling valid returns from the framework.
   290  */
   291  */
   291 void ShareUiPrivate::handleOk(const QVariant& result)
   292 void ShareUiPrivate::handleOk(const QVariant& result)
   292     {
   293 {
   293     Q_UNUSED(result)
   294     Q_UNUSED(result)
   294     }
   295          
       
   296     XQAiwRequest* request = 0;
       
   297     request = qobject_cast<XQAiwRequest*>(sender());
       
   298     if(request)
       
   299     {
       
   300        disconnect(request, 
       
   301                SIGNAL(requestError(int,const QString&)), 
       
   302                this, 
       
   303                SLOT(handleError(int,const QString&)));
       
   304     }
       
   305 }
   295 
   306 
   296 /**
   307 /**
   297  * Slot for handling errors from the framework.
   308  * Slot for handling errors from the framework.
   298  */
   309  */
   299 void ShareUiPrivate::handleError(int errorCode, const QString& errorMessage)
   310 void ShareUiPrivate::handleError(int errorCode, const QString& errorMessage)
   318     
   329     
   319     if ( action )
   330     if ( action )
   320         {
   331         {
   321         action->setEnabled(true);
   332         action->setEnabled(true);
   322         action->activate(HbAction::Trigger);
   333         action->activate(HbAction::Trigger);
   323         }    
   334         } 
       
   335     
       
   336     mSharePopup->close();
   324     }
   337     }
   325 
   338 
   326 
   339 
   327 /**
   340 /**
   328  * Convert a qaction to hbaction.
   341  * Convert a qaction to hbaction.