From 9647d4c7ff182c1fadffb9c6218bc00132fe682e Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 21 Dec 2023 17:32:43 +0200 Subject: Kxkb: move LayoutUnit struct into its own file and add getLayoutName function Signed-off-by: Mavridis Philippe --- kxkb/rules.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'kxkb/rules.cpp') 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 -- cgit v1.2.3