Explorar el Código

Tabulator hinzugebaut
für Enter Symbole verwendet (damit nichts übersetzt werden muss)
andere Symbole für links,rechts auf ab und shift

Reinhard Russinger hace 8 años
padre
commit
5aa2ea813b
Se han modificado 2 ficheros con 30 adiciones y 10 borrados
  1. 18 2
      DeclarativeInputEngine.cpp
  2. 12 8
      InputPanel.qml

+ 18 - 2
DeclarativeInputEngine.cpp

@@ -106,14 +106,30 @@ void DeclarativeInputEngine::sendKeyToFocusItem(const QString& text)
         // Qt::Key_Enter
         QKeyEvent evEnterP(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
         QCoreApplication::sendEvent(QGuiApplication::focusObject(),&evEnterP);
-    } else  if (text == "\uf060") {
+    } else  if (text == "\u2190") {
         // move left
         QKeyEvent ev(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
         QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
-    } else  if (text == "\uf061") {
+    } else  if (text == "\u2192") {
         // move right
         QKeyEvent ev(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier);
         QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
+    } else  if (text == "\u2191") {
+        // move up
+        QKeyEvent ev(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier);
+        QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
+    } else  if (text == "\u2193") {
+        // move down
+        QKeyEvent ev(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier);
+        QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
+    } else  if (text == "\u21a6") {
+        // tabulator
+        QKeyEvent ev(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier);
+        QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
+    } else  if (text == "\u21a4") {
+        // backtab
+        QKeyEvent ev(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier);
+        QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
     } else {
 
         //add some text

+ 12 - 8
InputPanel.qml

@@ -133,7 +133,8 @@ Item {
                     width: 1.25*pimpl.buttonWidth
                     height: pimpl.rowHeight
                     font.family: "FontAwesome"
-                    text: "\uf062"
+                    font.bold: true
+                    text: "\u21ea" //"\uf062"
                     functionKey: true
                     onClicked: {
                         if (pimpl.symbolModifier) {
@@ -161,7 +162,7 @@ Item {
                     width: 1.25*pimpl.buttonWidth
                     height: pimpl.rowHeight
                     text: "\x7F"
-                    displayText: "\uf177"
+                    displayText: "\u27f5" //"\uf177"
                     inputPanel: root
                     repeat: true
                 }
@@ -176,7 +177,7 @@ Item {
                     width: 1.25*pimpl.buttonWidth
                     height: pimpl.rowHeight
                     font.family: "FontAwesome"
-                    text: "\uf078"
+                    text: "\uf11c" //"\uf078"
                     functionKey: true
                     onClicked: {
                         Qt.inputMethod.hide()
@@ -188,16 +189,18 @@ Item {
                     color: "#1e1b18"
                     width: 1.25*pimpl.buttonWidth
                     height: pimpl.rowHeight
-                    text: ""
+                    font.family: "FontAwesome"
+                    font.bold: true
+                    text:  (pimpl.shiftModifier) ? "\u21a4":"\u21a6"
                     inputPanel: root
-                    functionKey: true
+                    //functionKey: true
                 }
                 KeyButton {
                     color: "#1e1b18"
                     width: pimpl.buttonWidth
                     height: pimpl.rowHeight
                     font.family: "FontAwesome"
-                    text: "\uf060" // arrow left
+                    text: (pimpl.shiftModifier) ? "\u2191":"\u2190" //"\uf060" // arrow left
                     //onClicked: InputEngine.sendKeyToFocusItem(text)
                     inputPanel: root
                 }
@@ -214,7 +217,7 @@ Item {
                     width: pimpl.buttonWidth
                     height: pimpl.rowHeight
                     font.family: "FontAwesome"
-                    text: "\uf061"  //pimpl.symbolModifier ? ":" :"."
+                    text: (pimpl.shiftModifier) ?"\u2193":"\u2192" //"\uf061"  //pimpl.symbolModifier ? ":" :"."
                     inputPanel: root
                 }
                 KeyButton {
@@ -237,7 +240,8 @@ Item {
                     color: "#1e1b18"
                     width: 1.25*pimpl.buttonWidth
                     height: pimpl.rowHeight
-                    displayText: "Enter"
+                    font.bold: true
+                    displayText: "\u23ce" //"Enter"
                     text: "\n"
                     inputPanel: root
                 }