diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ff0239d..f11d07b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -20,6 +20,8 @@ set(QML_FILES "qml/EnterKey.qml" "qml/EsLayout.qml" "qml/FrLayout.qml" + "qml/DaLayout.qml" + "qml/FiLayout.qml" "qml/HideKey.qml" "qml/InputPanel.qml" "qml/ItLayout.qml" diff --git a/src/DeclarativeInputEngine.cpp b/src/DeclarativeInputEngine.cpp index 8908e88..4df0eeb 100644 --- a/src/DeclarativeInputEngine.cpp +++ b/src/DeclarativeInputEngine.cpp @@ -39,6 +39,8 @@ struct DeclarativeInputEnginePrivate { {DeclarativeInputEngine::Cs, {"CsLayout", "Čeština"}}, {DeclarativeInputEngine::El, {"ElLayout", "Ελληνικός"}}, {DeclarativeInputEngine::Pl, {"PlLayout", "Polski"}}, + {DeclarativeInputEngine::Da, {"DaLayout", "Dansk"}}, + {DeclarativeInputEngine::Fi, {"FiLayout", "Suomi"}}, {DeclarativeInputEngine::Hr, {"LtSrHrBsLayout", "Hrvatski"}}, {DeclarativeInputEngine::CyBs, {"CySrBsLayout", "Босански"}}, {DeclarativeInputEngine::LtBs, {"LtSrHrBsLayout", "Bosanski"}}, diff --git a/src/DeclarativeInputEngine.h b/src/DeclarativeInputEngine.h index 4e1259a..348c0af 100644 --- a/src/DeclarativeInputEngine.h +++ b/src/DeclarativeInputEngine.h @@ -48,6 +48,8 @@ class DeclarativeInputEngine : public QObject { Cs, El, Pl, + Da, + Fi, Sv, Hr, CyBs, diff --git a/src/qml/DaLayout.qml b/src/qml/DaLayout.qml new file mode 100644 index 0000000..11318fc --- /dev/null +++ b/src/qml/DaLayout.qml @@ -0,0 +1,272 @@ +import QtQuick 2.0 +import QtQuick.Layouts 1.12 + +ColumnLayout { + property var inputPanel + + RowLayout { + property real keyWeight: 160 + + Key { + btnKey: Qt.Key_Q + btnText: "q" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_W + btnText: "w" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_E + btnText: "e" + alternativeKeys: "éèêë" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_R + btnText: "r" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_T + btnText: "t" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Y + btnText: "y" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_U + btnText: "u" + alternativeKeys: "úùûü" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_I + btnText: "i" + alternativeKeys: "íìîï" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_O + btnText: "o" + alternativeKeys: "óòôö" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_P + btnText: "p" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Aring + btnText: "å" + inputPanelRef: inputPanel + } + + BackspaceKey { + inputPanelRef: inputPanel + } + + } + + RowLayout { + property real keyWeight: 160 + + Key { + weight: 56 + functionKey: true + showPreview: false + btnBackground: "transparent" + } + + Key { + btnKey: Qt.Key_A + btnText: "a" + alternativeKeys: "áàâä" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_S + btnText: "s" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_D + btnText: "d" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_F + btnText: "f" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_G + btnText: "g" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_H + btnText: "h" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_J + btnText: "j" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_K + btnText: "k" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_L + btnText: "l" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_AE + btnText: "æ" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Ooblique + btnText: "ø" + inputPanelRef: inputPanel + } + + EnterKey { + weight: 283 + inputPanelRef: inputPanel + } + + } + + RowLayout { + property real keyWeight: 156 + + ShiftKey { + } + + Key { + btnKey: Qt.Key_Z + btnText: "z" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_X + btnText: "x" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_C + btnText: "c" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_V + btnText: "v" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_B + btnText: "b" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_N + btnText: "n" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_M + btnText: "m" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Comma + btnText: "," + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Period + btnText: "." + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Minus + btnText: "-" + inputPanelRef: inputPanel + } + + ShiftKey { + weight: 204 + } + + } + + RowLayout { + property real keyWeight: 154 + + SymbolKey { + weight: availableLanguageLayouts.length === 1 ? 217 : 108.5 + } + + LanguageKey { + visible: availableLanguageLayouts.length > 1 + weight: 108.5 + } + + SpaceKey { + weight: 1168 + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Apostrophe + btnText: "'" + inputPanelRef: inputPanel + } + + HideKey { + weight: 205 + } + + } + + +} diff --git a/src/qml/FiLayout.qml b/src/qml/FiLayout.qml new file mode 100644 index 0000000..653ba24 --- /dev/null +++ b/src/qml/FiLayout.qml @@ -0,0 +1,271 @@ +import QtQuick 2.0 +import QtQuick.Layouts 1.12 + +ColumnLayout { + property var inputPanel + + RowLayout { + property real keyWeight: 160 + + Key { + btnKey: Qt.Key_Q + btnText: "q" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_W + btnText: "w" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_E + btnText: "e" + alternativeKeys: "éèêë" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_R + btnText: "r" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_T + btnText: "t" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Y + btnText: "y" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_U + btnText: "u" + alternativeKeys: "úùûü" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_I + btnText: "i" + alternativeKeys: "íìîï" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_O + btnText: "o" + alternativeKeys: "óòôö" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_P + btnText: "p" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Aring + btnText: "å" + inputPanelRef: inputPanel + } + + BackspaceKey { + inputPanelRef: inputPanel + } + + } + + RowLayout { + property real keyWeight: 160 + + Key { + weight: 56 + functionKey: true + showPreview: false + btnBackground: "transparent" + } + + Key { + btnKey: Qt.Key_A + btnText: "a" + alternativeKeys: "áàâä" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_S + btnText: "s" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_D + btnText: "d" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_F + btnText: "f" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_G + btnText: "g" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_H + btnText: "h" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_J + btnText: "j" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_K + btnText: "k" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_L + btnText: "l" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Odiaeresis + btnText: "ö" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Adiaeresis + btnText: "ä" + inputPanelRef: inputPanel + } + + EnterKey { + weight: 283 + inputPanelRef: inputPanel + } + + } + + RowLayout { + property real keyWeight: 156 + + ShiftKey { + } + + Key { + btnKey: Qt.Key_Z + btnText: "z" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_X + btnText: "x" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_C + btnText: "c" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_V + btnText: "v" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_B + btnText: "b" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_N + btnText: "n" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_M + btnText: "m" + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Comma + btnText: "," + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Period + btnText: "." + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Minus + btnText: "-" + inputPanelRef: inputPanel + } + + ShiftKey { + weight: 204 + } + + } + + RowLayout { + property real keyWeight: 154 + + SymbolKey { + weight: availableLanguageLayouts.length === 1 ? 217 : 108.5 + } + + LanguageKey { + visible: availableLanguageLayouts.length > 1 + weight: 108.5 + } + + SpaceKey { + weight: 1168 + inputPanelRef: inputPanel + } + + Key { + btnKey: Qt.Key_Apostrophe + btnText: "'" + inputPanelRef: inputPanel + } + + HideKey { + weight: 205 + } + + } + +}