void SymbianPhone::handleKeyEventCode(int keyCode) { switch(keyCode) { case LEFT_KEY: emit leftSoftKeyPressed(); break; case RIGHT_KEY: emit rightSoftKeyPressed(); break; case C_KEY: emit deleteKeyPressed(); break; case GREEN_KEY: emit greenKeyPressed(); break; case RED_KEY: emit redKeyPressed(); break; case NUMBER_1: emit number1KeyPressed(); break; case NUMBER_2: emit number2KeyPressed(); break; case NUMBER_3: emit number3KeyPressed(); break; case NUMBER_4: emit number4KeyPressed(); break; case NUMBER_5: emit number5KeyPressed(); break; case NUMBER_6: emit number6KeyPressed(); break; case NUMBER_7: emit number7KeyPressed(); break; case NUMBER_8: emit number8KeyPressed(); break; case NUMBER_9: emit number9KeyPressed(); break; case STAR: emit starKeyPressed(); break; case SHARP: emit sharpKeyPressed(); break; default: break; } }
void HistoryView::setupActions() { QAction *selectAction = new QAction(QString("Wybierz"), this); selectAction->setSoftKeyRole(QAction::PositiveSoftKey); this->addAction(selectAction); QAction *backAction = new QAction(QString("Wstecz"), this); backAction->setSoftKeyRole(QAction::NegativeSoftKey); this->addAction(backAction); connect(selectAction, SIGNAL(triggered()), SLOT(selectItem())); connect(backAction, SIGNAL(triggered()), SLOT(goBack())); connect(historyList, SIGNAL(itemActivated(QListWidgetItem*)), SLOT(selectItem(QListWidgetItem*))); connect(this, SIGNAL(itemSelected(QUrl)), SLOT(goBack())); connect(this, SIGNAL(rightSoftKeyPressed()), SLOT(goBack())); connect(this, SIGNAL(leftSoftKeyPressed()), SLOT(selectItem())); }