summaryrefslogtreecommitdiffstats
path: root/kxkb/rules.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-12-21 17:32:43 +0200
committerMavridis Philippe <[email protected]>2023-12-25 16:38:10 +0200
commit9647d4c7ff182c1fadffb9c6218bc00132fe682e (patch)
tree2628ae8b408bc1ee90d4fbbfec35b023ee94bbd7 /kxkb/rules.cpp
parentf2dbf5b9035e9a4861b7d0ad348f4f86c4caba03 (diff)
downloadtdebase-9647d4c7ff182c1fadffb9c6218bc00132fe682e.tar.gz
tdebase-9647d4c7ff182c1fadffb9c6218bc00132fe682e.zip
Kxkb: move LayoutUnit struct into its own file and add getLayoutName function
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kxkb/rules.cpp')
-rw-r--r--kxkb/rules.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/kxkb/rules.cpp b/kxkb/rules.cpp
index 37cdc9bc4..442a78c00 100644
--- a/kxkb/rules.cpp
+++ b/kxkb/rules.cpp
@@ -73,3 +73,10 @@ XkbRules::getAvailableVariants(const TQString& layout)
return *result;
}
+TQString XkbRules::getLayoutName(LayoutUnit layout) const {
+ TQString fullName = i18n(m_layouts[layout.layout]);
+ if (!layout.variant.isEmpty()) {
+ fullName += " (" + layout.variant + ")";
+ }
+ return fullName;
+} \ No newline at end of file