Examples of QKeyEvent


Examples of com.trolltech.qt.gui.QKeyEvent

  public void setTableCursorPositionTab(int currentRow, int currentCol, int tableRows, int tableColumns) {
    if (tableRows == currentRow && currentCol == tableColumns) {
      insertTableRow();
    }
    KeyboardModifiers modifiers = new KeyboardModifiers(KeyboardModifier.NoModifier);
    QKeyEvent right = new QKeyEvent(Type.KeyPress, Qt.Key.Key_Right.value(), modifiers);
    QKeyEvent end = new QKeyEvent(Type.KeyPress, Qt.Key.Key_End.value(), modifiers);
    QKeyEvent end2 = new QKeyEvent(Type.KeyPress, Qt.Key.Key_End.value(), modifiers);
    getBrowser().focusWidget();
    QCoreApplication.postEvent(getBrowser(), end);
    QCoreApplication.postEvent(getBrowser(), right);
    QCoreApplication.postEvent(getBrowser(), end2);
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QKeyEvent

  public void setTableCursorPositionBackTab(int currentRow, int currentCol, int tableRows, int tableColumns) {
    if (currentRow  == 1 && currentCol == 1) {
      return;
    }
    KeyboardModifiers modifiers = new KeyboardModifiers(KeyboardModifier.NoModifier);
    QKeyEvent left = new QKeyEvent(Type.KeyPress, Qt.Key.Key_Left.value(), modifiers);
    QKeyEvent home = new QKeyEvent(Type.KeyPress, Qt.Key.Key_Home.value(), modifiers);
    getBrowser().focusWidget();
    QCoreApplication.postEvent(getBrowser(), home);
    QCoreApplication.postEvent(getBrowser(), left);
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QKeyEvent

    getBrowser().setFocus();
    boolean found;
     
    // Move to the start of page
    KeyboardModifiers ctrl = new KeyboardModifiers(KeyboardModifier.ControlModifier.value());
    QKeyEvent home = new QKeyEvent(Type.KeyPress, Key.Key_Home.value(), ctrl)
    browser.keyPressEvent(home);
    getBrowser().setFocus();
     
    tokenizer = new StringWordTokenizer(content);
    String word;
     
    while(tokenizer.hasMoreWords()) {
      word = tokenizer.nextWord();
      found = getBrowser().page().findText(word);
      if (found && !spellListener.abortSpellCheck) {
        spellChecker.checkSpelling(new StringWordTokenizer(word));
        getBrowser().setFocus();
      }
    }

    // Go to the end of the document & finish up.
    home = new QKeyEvent(Type.KeyPress, Key.Key_End.value(), ctrl)
    browser.keyPressEvent(home);
    if (!spellListener.errorsFound)
      QMessageBox.information(this, tr("Spell Check Complete"),
          tr("No Errors Found"));
View Full Code Here

Examples of com.trolltech.qt.gui.QKeyEvent

 
  @Override
  public boolean event(QEvent event)
    {
        if (event.type().equals(QEvent.Type.KeyPress)) {
            QKeyEvent ke = (QKeyEvent) event;
            if (ke.key() == Qt.Key.Key_Tab.value()) {
          parent.tabPressed();
          ke.accept();
                return true;
            }
            if (ke.key() == Qt.Key.Key_Backtab.value()) {
              parent.backtabPressed();
              return true;
            }
        }
        return super.event(event);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.