diff --git a/keyboard_layout.cpp b/keyboard_layout.cpp index 7876a2e633..99bf9b63ec 100644 --- a/keyboard_layout.cpp +++ b/keyboard_layout.cpp @@ -291,6 +291,16 @@ KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface() QDBusConnection::sessionBus().unregisterService(s_keyboardService); } +void KeyboardLayoutDBusInterface::switchToNextLayout() +{ + m_keyboardLayout->switchToNextLayout(); +} + +void KeyboardLayoutDBusInterface::switchToPreviousLayout() +{ + m_keyboardLayout->switchToPreviousLayout(); +} + bool KeyboardLayoutDBusInterface::setLayout(const QString &layout) { const auto layouts = m_xkb->layoutNames(); diff --git a/keyboard_layout.h b/keyboard_layout.h index 72fbc2a6e0..19541c1b69 100644 --- a/keyboard_layout.h +++ b/keyboard_layout.h @@ -43,6 +43,8 @@ public: void init(); void checkLayoutChange(quint32 previousLayout); + void switchToNextLayout(); + void switchToPreviousLayout(); void resetLayout(); void updateNotifier(); @@ -57,8 +59,6 @@ private: void initDBusInterface(); void notifyLayoutChange(); void initNotifierItem(); - void switchToNextLayout(); - void switchToPreviousLayout(); void switchToLayout(xkb_layout_index_t index); void reinitNotifierMenu(); void loadShortcuts(); @@ -81,6 +81,8 @@ public: ~KeyboardLayoutDBusInterface() override; public Q_SLOTS: + void switchToNextLayout(); + void switchToPreviousLayout(); bool setLayout(const QString &layout); QString getCurrentLayout(); QString getCurrentLayoutLongName() const;