void DSKY::EnterCallback(PanelSwitchItem* s) { if (s->GetState() == 1) { KeyDown_Enter = true; EnterPressed(); } else { ResetKeyDown(); } }
void CustomPlainTextEdit::keyPressEvent ( QKeyEvent * e ) { if( e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return ) { if (e->modifiers() & Qt::ShiftModifier) QPlainTextEdit::keyPressEvent(e); else emit EnterPressed(); }else QPlainTextEdit::keyPressEvent(e); }
PdRenamePic::PdRenamePic(QWidget *parent, const QString &inFile, const QString &inDir) : QDialog(parent), ui(new Ui::PdRenamePic) { ui->setupUi(this); ui->txtName->setPlainText(inFile); oldFullName = inDir + QDir::separator() + inFile; curDir = inDir; newName = ""; connect (ui->txtName, SIGNAL(EnterPressed()), this, SLOT(doRename())); qCur = ui->txtName->textCursor(); qCur.setPosition(setCursorPos(inFile)); ui->txtName->setTextCursor(qCur); }
void DSKY::ProcessKeyPress(int mx, int my) { if (mx > 2 && mx < 39) { if (my > 21 && my < 59) { KeyDown_Verb = true; VerbPressed(); } if (my > 61 && my < 99) { KeyDown_Noun = true; NounPressed(); } } if (mx > 2+1*41 && mx < 39+1*41) { if (my > 1 && my < 39) { KeyDown_Plus = true; PlusPressed(); } if (my > 41 && my < 79) { KeyDown_Minus = true; MinusPressed(); } if (my > 81 && my < 119) { KeyDown_0 = true; NumberPressed(0); } } if (mx > 2+2*41 && mx < 39+2*41) { if (my > 1 && my < 39) { KeyDown_7 = true; NumberPressed(7); } if (my > 41 && my < 79) { KeyDown_4 = true; NumberPressed(4); } if (my > 81 && my < 119) { KeyDown_1 = true; NumberPressed(1); } } if (mx > 2+3*41 && mx < 39+3*41) { if (my > 1 && my < 39) { KeyDown_8 = true; NumberPressed(8); } if (my > 41 && my < 79) { KeyDown_5 = true; NumberPressed(5); } if (my > 81 && my < 119) { KeyDown_2 = true; NumberPressed(2); } } if (mx > 2+4*41 && mx < 39+4*41) { if (my > 1 && my < 39) { KeyDown_9 = true; NumberPressed(9); } if (my > 41 && my < 79) { KeyDown_6 = true; NumberPressed(6); } if (my > 81 && my < 119) { KeyDown_3 = true; NumberPressed(3); } } if (mx > 2+5*41 && mx < 39+5*41) { if (my > 1 && my < 39) { KeyDown_Clear = true; ClearPressed(); } if (my > 41 && my < 79) { KeyDown_Prog = true; ProgPressed(); } if (my > 81 && my < 119) { KeyDown_KeyRel = true; KeyRel(); } } if (mx > 2+6*41 && mx < 39+6*41) { if (my > 21 && my < 59) { KeyDown_Enter= true; EnterPressed(); } if (my > 61 && my < 99) { KeyDown_Reset = true; ResetPressed(); } } }