/*!
 * Function is called when the Ok Action button is pressed
 */
void EapMschapv2NewPwdDialog::okPressed()
{
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_OKPRESSED_ENTRY );
    qDebug("EapMschapv2NewPwdDialog::okPressed ENTER");
    
    if ( validate() == true ) {
         
        QVariantMap data;
    
        data["password"] = mEdit1->text();
      
        qDebug("EapMschapv2NewPwdDialog::okPressed: emit deviceDialogData");
    
        emit deviceDialogData(data); 
        closeDeviceDialog(true);
        }
    else {    
        HbMessageBox* box = new HbMessageBox(hbTrId("txt_occ_info_passwords_do_not_match_try_again"),
            HbMessageBox::MessageTypeInformation);
        
        box->setAttribute(Qt::WA_DeleteOnClose);
        box->open();       
        }
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_OKPRESSED_EXIT );
    qDebug("EapMschapv2NewPwdDialog::okPressed EXIT");
}
Пример #2
0
/*!
    Helper function for showing error notes.
    
    @param[in] info Info string to be shown in note.
 */
void CpIapItem::showErrorNote(const QString &info)
{
    OstTraceFunctionEntry0(CPIAPITEM_SHOWERRORNOTE_ENTRY);
    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeInformation);
    note->clearActions();
    note->setAttribute(Qt::WA_DeleteOnClose);
    note->setText(info);
    note->setTimeout(HbPopup::NoTimeout);
    HbAction *errorOk = new HbAction(hbTrId("txt_common_button_ok"));                       
    note->addAction(errorOk);
    note->show();    
    OstTraceFunctionExit0(CPIAPITEM_SHOWERRORNOTE_EXIT);
}
Пример #3
0
/*!
    Shows confirmation query for access point deletion.
 */
void CpIapItem::showDeleteConfirmation()
{
    OstTraceFunctionEntry0(CPIAPITEM_SHOWDELETECONFIRMATION_ENTRY);
    HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
    note->clearActions();
    note->setAttribute(Qt::WA_DeleteOnClose);
    note->setText(HbParameterLengthLimiter(
        "txt_occ_info_delete_access_point_1").arg(mIapName));
    HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_yes"));
    bool connected = connect(
        primaryAction, 
        SIGNAL(triggered()), 
        this, 
        SLOT(deleteConfirmed()));
    Q_ASSERT(connected);
    note->addAction(primaryAction);
    note->addAction(new HbAction(hbTrId("txt_common_button_no")));
    note->setTimeout(HbPopup::NoTimeout);
    note->show();
    OstTraceFunctionExit0(CPIAPITEM_SHOWDELETECONFIRMATION_EXIT);
}
/*!
	Show delete confirmation query
 */
void AgendaEventView::showDeleteConfirmationQuery()
    {
    OstTraceFunctionEntry0( AGENDAEVENTVIEW_SHOWDELETECONFIRMATIONQUERY_ENTRY );
    
    HbMessageBox *popup = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
	// Set the parent for the dialog
	// Once the parent object is deleted the dialog will also be deleted
    popup->setParent(this);
    popup->setDismissPolicy(HbDialog::NoDismiss);
    popup->setTimeout(HbDialog::NoTimeout);
    popup->setAttribute( Qt::WA_DeleteOnClose, true );

    QString text = 0;

    switch (mAgendaEntry.type()) {
        case AgendaEntry::TypeAppoinment:
        case AgendaEntry::TypeEvent: {
			// Check for all-day
        	if (CalenAgendaUtils::isAlldayEvent(mAgendaEntry)) {
				text.append(hbTrId("txt_calendar_info_delete_allday_event"));
        	} else {
				text.append(hbTrId("txt_calendar_info_delete_meeting"));
			}

			break;
		}
        case AgendaEntry::TypeAnniversary: {
        text.append(hbTrId("txt_calendar_info_delete_anniversary"));
        break;
        }
        case AgendaEntry::TypeTodo: {
        text.append(hbTrId("txt_calendar_info_delete_todo_note"));
        break;
        }
        case AgendaEntry::TypeNote: {
        text.append(hbTrId("txt_calendar_info_delete_anniversary"));
        break;
        }
    }
    popup->setText(text);
    
    QList<QAction*> list = popup->actions();
    for(int i=0; i < list.count(); i++)
        {
        popup->removeAction(list[i]);
        }
    HbAction *deleteAction = 
					new HbAction(hbTrId("txt_common_button_delete"), popup);
    popup->addAction(deleteAction);
    connect(deleteAction, SIGNAL(triggered()), this ,
												SLOT(handleDeleteAction()));
    popup->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popup));
    popup->open();
    OstTraceFunctionExit0( AGENDAEVENTVIEW_SHOWDELETECONFIRMATIONQUERY_EXIT );
}