Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ set(QML_FILES
"qml/EnterKey.qml"
"qml/EsLayout.qml"
"qml/FrLayout.qml"
"qml/DaLayout.qml"
"qml/FiLayout.qml"
Comment on lines +23 to +24

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For better maintainability, it's good practice to keep this list of files sorted alphabetically. The newly added files break the existing (partial) alphabetical order.

DaLayout.qml should be placed after CySrBsLayout.qml.
FiLayout.qml should be placed after EsLayout.qml.

Consider sorting the entire list alphabetically to make it easier to navigate.

"qml/HideKey.qml"
"qml/InputPanel.qml"
"qml/ItLayout.qml"
Expand Down
2 changes: 2 additions & 0 deletions src/DeclarativeInputEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"}},
Comment on lines +42 to +43

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and readability, it would be better to group the Nordic languages together in this map, similar to how they are grouped in the InputLayouts enum in DeclarativeInputEngine.h. The Sv (Swedish) layout is defined elsewhere in this map. Consider moving this and the Sv entry together to improve maintainability.

{DeclarativeInputEngine::Hr, {"LtSrHrBsLayout", "Hrvatski"}},
{DeclarativeInputEngine::CyBs, {"CySrBsLayout", "Босански"}},
{DeclarativeInputEngine::LtBs, {"LtSrHrBsLayout", "Bosanski"}},
Expand Down
2 changes: 2 additions & 0 deletions src/DeclarativeInputEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class DeclarativeInputEngine : public QObject {
Cs,
El,
Pl,
Da,
Fi,
Sv,
Hr,
CyBs,
Expand Down
272 changes: 272 additions & 0 deletions src/qml/DaLayout.qml
Original file line number Diff line number Diff line change
@@ -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
}

}


}
Loading