SimApp::SimApp(QWidget *parent, Qt::WFlags f) : QMainWindow(parent, f), view(0), notification(0), hasStk(false), simToolkitAvailable(false), eventList(0), idleModeMsgId(0), failLabel(0), commandOutsideMenu(false), hasSustainedDisplayText(false) { status = new QValueSpaceObject("/Telephony/Status", this); setWindowTitle(tr("SIM Applications")); stack = new QStackedWidget(this); stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); setCentralWidget(stack); stk = new QSimToolkit( QString(), this ); iconReader = 0; connect(stk, SIGNAL(command(QSimCommand)), this, SLOT(simCommand(QSimCommand))); connect(stk, SIGNAL(beginFailed()), this, SLOT(beginFailed())); QSimInfo *simInfo = new QSimInfo(QString(), this); connect(simInfo, SIGNAL(removed()), this, SLOT(simRemoved())); #ifndef QTOPIA_TEST waitDlg = new DelayedWaitDialog( this ); waitDlg->setText( tr( "Waiting for response..." ) ); waitDlg->setDelay( 500 ); #endif }
void NeoSimToolkit::begin() { if ( !supportsStk ) { // SIM toolkit functionality is not available. emit beginFailed(); } else if ( lastCommand.type() == QSimCommand::SetupMenu ) { // We just fetched the main menu, so return what we fetched. emit command( lastCommand ); } else if ( mainMenu.type() == QSimCommand::SetupMenu ) { // We have a cached main menu from a previous invocation. lastCommand = mainMenu; lastCommandBytes = mainMenuBytes; emit command( mainMenu ); } else { // The SIM toolkit is in an unknown state, so we cannot proceed. // If the NEO could perform a proper STK reset, we might have // been able to do something. emit beginFailed(); } }
/*! \reimp This default implementation emits beginFailed(). It should be overridden in modem vendor plug-ins. */ void QModemSimToolkit::begin() { emit beginFailed(); }