mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 06:13:09 +00:00
Switch from maliit-keyboard to plasma-keyboard
Now that plasma-keyboard has had its first release, we can switch to it as the default keyboard and drop maliit-keyboard (and its Qt 5 dependency). We also drop the maliit-keyboard kcm here (moved to https://invent.kde.org/devinlin/maliit-keyboard-kcm), which is replaced by the one installed by plasma-keyboard.
This commit is contained in:
parent
1f333d008d
commit
3f0b0f1454
15 changed files with 2 additions and 816 deletions
|
|
@ -92,9 +92,6 @@ find_package(QCoro6 REQUIRED COMPONENTS DBus Qml)
|
||||||
qcoro_enable_coroutines()
|
qcoro_enable_coroutines()
|
||||||
kde_enable_exceptions()
|
kde_enable_exceptions()
|
||||||
|
|
||||||
pkg_check_modules(GOBJECT gobject-2.0 REQUIRED IMPORTED_TARGET)
|
|
||||||
pkg_check_modules(GIO gio-2.0 REQUIRED IMPORTED_TARGET)
|
|
||||||
|
|
||||||
find_package(KF6KirigamiAddons 0.6 REQUIRED)
|
find_package(KF6KirigamiAddons 0.6 REQUIRED)
|
||||||
find_package(epoxy REQUIRED)
|
find_package(epoxy REQUIRED)
|
||||||
find_package(XCB REQUIRED COMPONENTS XCB)
|
find_package(XCB REQUIRED COMPONENTS XCB)
|
||||||
|
|
|
||||||
|
|
@ -30,4 +30,4 @@ QT_QPA_PLATFORM=offscreen plasma-mobile-envmanager --apply-settings
|
||||||
|
|
||||||
# start the shell
|
# start the shell
|
||||||
export PLASMA_DEFAULT_SHELL=org.kde.plasma.mobileshell
|
export PLASMA_DEFAULT_SHELL=org.kde.plasma.mobileshell
|
||||||
startplasma-wayland --xwayland --inputmethod maliit-keyboard
|
startplasma-wayland
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const QMap<QString, QMap<QString, QVariant>> KDEGLOBALS_SETTINGS = {{"KDE", {{"L
|
||||||
const QMap<QString, QMap<QString, QVariant>> KWINRC_DEFAULT_SETTINGS = {
|
const QMap<QString, QMap<QString, QVariant>> KWINRC_DEFAULT_SETTINGS = {
|
||||||
{"Wayland",
|
{"Wayland",
|
||||||
{
|
{
|
||||||
{"InputMethod", "/usr/share/applications/com.github.maliit.keyboard.desktop"} // ensure maliit is our default vkbd
|
{"InputMethod", "/usr/share/applications/org.kde.plasma.keyboard.desktop"} // ensure plasma-keyboard is our default vkbd
|
||||||
}}};
|
}}};
|
||||||
|
|
||||||
// .config/plasma-mobile/kwinrc - immutable settings:
|
// .config/plasma-mobile/kwinrc - immutable settings:
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,4 @@ add_subdirectory(waydroidintegration)
|
||||||
add_subdirectory(mobileshell)
|
add_subdirectory(mobileshell)
|
||||||
add_subdirectory(info)
|
add_subdirectory(info)
|
||||||
add_subdirectory(time)
|
add_subdirectory(time)
|
||||||
add_subdirectory(virtualkeyboard)
|
|
||||||
add_subdirectory(navigation)
|
add_subdirectory(navigation)
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
|
|
||||||
set(MALIIT_KEYBOARD_LANGUAGES_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/maliit/keyboard2/languages" CACHE PATH "Directory containing maliit-keyboard data")
|
|
||||||
|
|
||||||
add_definitions(-DQT_NO_KEYWORDS)
|
|
||||||
|
|
||||||
kcmutils_add_qml_kcm(kcm_mobile_onscreenkeyboard)
|
|
||||||
|
|
||||||
target_sources(kcm_mobile_onscreenkeyboard PRIVATE
|
|
||||||
languagemodel.cpp
|
|
||||||
gsettingsitem.cpp
|
|
||||||
virtualkeyboard.cpp
|
|
||||||
)
|
|
||||||
target_compile_definitions(kcm_mobile_onscreenkeyboard PRIVATE "MALIIT_KEYBOARD_LANGUAGES_DIR=\"${MALIIT_KEYBOARD_LANGUAGES_DIR}\"")
|
|
||||||
|
|
||||||
target_link_libraries(kcm_mobile_onscreenkeyboard PRIVATE
|
|
||||||
Qt::Core
|
|
||||||
KF6::CoreAddons
|
|
||||||
KF6::I18n
|
|
||||||
KF6::KCMUtilsQuick
|
|
||||||
KF6::ConfigCore
|
|
||||||
PkgConfig::GIO
|
|
||||||
PkgConfig::GOBJECT
|
|
||||||
)
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
$XGETTEXT $(find . -name \*.cpp -o -name \*.h -o -name \*.qml) -o $podir/kcm_mobile_virtualkeyboard.pot
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: LGPL-2.1-only
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
#include "gsettingsitem.h"
|
|
||||||
|
|
||||||
QVariant GSettingsItem::value(const QString &key) const
|
|
||||||
{
|
|
||||||
if (!m_settings) {
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
GVariant *gvalue = g_settings_get_value(m_settings, key.toLatin1().data());
|
|
||||||
|
|
||||||
QVariant toReturn;
|
|
||||||
|
|
||||||
switch (g_variant_classify(gvalue)) {
|
|
||||||
case G_VARIANT_CLASS_BOOLEAN:
|
|
||||||
toReturn = QVariant(static_cast<bool>(g_variant_get_boolean(gvalue)));
|
|
||||||
break;
|
|
||||||
case G_VARIANT_CLASS_STRING:
|
|
||||||
toReturn = QVariant(QString::fromUtf8(g_variant_get_string(gvalue, nullptr)));
|
|
||||||
break;
|
|
||||||
case G_VARIANT_CLASS_ARRAY:
|
|
||||||
if (g_variant_is_of_type(gvalue, G_VARIANT_TYPE_STRING_ARRAY)) {
|
|
||||||
GVariantIter iter;
|
|
||||||
QStringList list;
|
|
||||||
const gchar *str;
|
|
||||||
g_variant_iter_init(&iter, gvalue);
|
|
||||||
while (g_variant_iter_next(&iter, "&s", &str)) {
|
|
||||||
list.append(str);
|
|
||||||
}
|
|
||||||
return QVariant(list);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
qWarning() << "Unhandled variant type in value()";
|
|
||||||
}
|
|
||||||
|
|
||||||
g_variant_unref(gvalue);
|
|
||||||
|
|
||||||
return toReturn;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GSettingsItem::set(const QString &key, const QVariant &val)
|
|
||||||
{
|
|
||||||
if (!m_settings) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// It might be hard to detect the right GVariant type from
|
|
||||||
// complex QVariant types such as string lists or more detailed
|
|
||||||
// types such as integers (GVariant has different sizes),
|
|
||||||
// therefore we get the current value for the key and convert
|
|
||||||
// to QVariant using the GVariant type
|
|
||||||
GVariant *oldValue = g_settings_get_value(m_settings, key.toLatin1().data());
|
|
||||||
GVariant *newValue = nullptr;
|
|
||||||
|
|
||||||
switch (g_variant_type_peek_string(g_variant_get_type(oldValue))[0]) {
|
|
||||||
case G_VARIANT_CLASS_BOOLEAN:
|
|
||||||
newValue = g_variant_new_boolean(val.toBool());
|
|
||||||
break;
|
|
||||||
case G_VARIANT_CLASS_STRING:
|
|
||||||
newValue = g_variant_new_string(val.toString().toUtf8().constData());
|
|
||||||
break;
|
|
||||||
case G_VARIANT_CLASS_ARRAY:
|
|
||||||
if (g_variant_is_of_type(oldValue, G_VARIANT_TYPE_STRING_ARRAY)) {
|
|
||||||
const QStringList list = val.toStringList();
|
|
||||||
GVariantBuilder builder;
|
|
||||||
g_variant_builder_init(&builder, G_VARIANT_TYPE_STRING_ARRAY);
|
|
||||||
for (const QString &string : list) {
|
|
||||||
g_variant_builder_add(&builder, "s", string.toUtf8().constData());
|
|
||||||
}
|
|
||||||
|
|
||||||
newValue = g_variant_builder_end(&builder);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
qWarning() << "Unhandled variant array type in set()";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
qWarning() << "Unhandled variant type in set()";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newValue) {
|
|
||||||
g_settings_set_value(m_settings, key.toLatin1().data(), newValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_variant_unref(oldValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GSettingsItem::isValid() const
|
|
||||||
{
|
|
||||||
return m_settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
GSettingsItem::GSettingsItem(const QString &key, QObject *parent)
|
|
||||||
: QObject(parent)
|
|
||||||
{
|
|
||||||
const char schemaId[] = "org.maliit.keyboard.maliit";
|
|
||||||
|
|
||||||
// g_settings_new_with_path asserts if the schema doesn't exist, check this manually to avoid an abort.
|
|
||||||
auto *defaultSource = g_settings_schema_source_get_default();
|
|
||||||
if (!defaultSource) {
|
|
||||||
qWarning() << "No GSettings schemas are installed on the system";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto *schema = g_settings_schema_source_lookup(defaultSource, schemaId, true /*recursive*/);
|
|
||||||
if (!schema) {
|
|
||||||
qWarning() << "Settings schema" << schemaId << "is not installed";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_settings = g_settings_new_with_path(schemaId, key.toLatin1().data());
|
|
||||||
g_settings_schema_unref(schema);
|
|
||||||
|
|
||||||
g_signal_connect(m_settings, "changed", G_CALLBACK(GSettingsItem::settingChanged), this);
|
|
||||||
}
|
|
||||||
|
|
||||||
GSettingsItem::~GSettingsItem()
|
|
||||||
{
|
|
||||||
g_settings_sync();
|
|
||||||
if (m_settings)
|
|
||||||
g_object_unref(m_settings);
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: LGPL-2.1-only
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef GSETTINGSITEM_H
|
|
||||||
#define GSETTINGSITEM_H
|
|
||||||
|
|
||||||
#include <QObject>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QVariant>
|
|
||||||
|
|
||||||
#include <gio/gio.h>
|
|
||||||
|
|
||||||
class GSettingsItem : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit GSettingsItem(const QString &key, QObject *parent = nullptr);
|
|
||||||
~GSettingsItem() override;
|
|
||||||
|
|
||||||
QVariant value(const QString &key) const;
|
|
||||||
void set(const QString &key, const QVariant &val);
|
|
||||||
|
|
||||||
bool isValid() const;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void subtreeChanged();
|
|
||||||
|
|
||||||
private:
|
|
||||||
GSettings *m_settings = nullptr;
|
|
||||||
|
|
||||||
static void settingChanged(GSettings *settings, const gchar *key, gpointer data)
|
|
||||||
{
|
|
||||||
Q_UNUSED(settings)
|
|
||||||
Q_UNUSED(key)
|
|
||||||
|
|
||||||
GSettingsItem *self = static_cast<GSettingsItem *>(data);
|
|
||||||
Q_EMIT self->subtreeChanged();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // GSETTINGSITEM_H
|
|
||||||
|
|
@ -1,158 +0,0 @@
|
||||||
{
|
|
||||||
"KPlugin": {
|
|
||||||
"Authors": [
|
|
||||||
{
|
|
||||||
"Name": "Bhushan Shah",
|
|
||||||
"Name[ar]": "بوشان شاه",
|
|
||||||
"Name[ast]": "Bhushan Shah",
|
|
||||||
"Name[az]": "Bhushan Shah",
|
|
||||||
"Name[ca@valencia]": "Bhushan Shah",
|
|
||||||
"Name[ca]": "Bhushan Shah",
|
|
||||||
"Name[cs]": "Bhushan Shah",
|
|
||||||
"Name[de]": "Bhushan Shah",
|
|
||||||
"Name[en_GB]": "Bhushan Shah",
|
|
||||||
"Name[eo]": "Bhushan Shah",
|
|
||||||
"Name[es]": "Bhushan Shah",
|
|
||||||
"Name[eu]": "Bhushan Shah",
|
|
||||||
"Name[fi]": "Bhushan Shah",
|
|
||||||
"Name[fr]": "Bhushan Shah",
|
|
||||||
"Name[gl]": "Bhushan Shah",
|
|
||||||
"Name[he]": "בושן צ׳ה",
|
|
||||||
"Name[hu]": "Bhushan Shah",
|
|
||||||
"Name[ia]": "Bhushan Shah",
|
|
||||||
"Name[is]": "Bhushan Shah",
|
|
||||||
"Name[it]": "Bhushan Shah",
|
|
||||||
"Name[ka]": "Bhushan Shah",
|
|
||||||
"Name[ko]": "Bhushan Shah",
|
|
||||||
"Name[lv]": "Bhushan Shah",
|
|
||||||
"Name[nl]": "Bhushan Shah",
|
|
||||||
"Name[nn]": "Bhushan Shah",
|
|
||||||
"Name[pa]": "ਭੂਸ਼ਨ ਸ਼ਾਹ",
|
|
||||||
"Name[pl]": "Bhushan Shah",
|
|
||||||
"Name[pt]": "Bhushan Shah",
|
|
||||||
"Name[pt_BR]": "Bhushan Shah",
|
|
||||||
"Name[ru]": "Bhushan Shah",
|
|
||||||
"Name[sa]": "भूषण शाह",
|
|
||||||
"Name[sk]": "Bhushan Shah",
|
|
||||||
"Name[sl]": "Bhushan Shah",
|
|
||||||
"Name[sv]": "Bhushan Shah",
|
|
||||||
"Name[tr]": "Buşan Şah",
|
|
||||||
"Name[uk]": "Bhushan Shah",
|
|
||||||
"Name[zh_CN]": "Bhushan Shah",
|
|
||||||
"Name[zh_TW]": "Bhushan Shah"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"Description": "On-Screen Keyboard configuration",
|
|
||||||
"Description[ar]": "ضبط لوحة المفاتيح على الشاشة",
|
|
||||||
"Description[ca@valencia]": "Configureu el teclat en pantalla",
|
|
||||||
"Description[ca]": "Configuració del teclat en pantalla",
|
|
||||||
"Description[cs]": "Nastavení klávesnice na obrazovce",
|
|
||||||
"Description[de]": "Einrichtung der Bildschirmtastatur",
|
|
||||||
"Description[en_GB]": "On-Screen Keyboard configuration",
|
|
||||||
"Description[eo]": "Agordo sur Ekrana Klavaro",
|
|
||||||
"Description[es]": "Configuración del teclado en pantalla",
|
|
||||||
"Description[eu]": "Pantailako teklatua konfiguratzea",
|
|
||||||
"Description[fi]": "Näyttönäppäimistön asetukset",
|
|
||||||
"Description[fr]": "Configuration du clavier en incrustation vidéo",
|
|
||||||
"Description[gl]": "Configuración do teclado en pantalla.",
|
|
||||||
"Description[he]": "הגדרות מקלדת על גבי המסך",
|
|
||||||
"Description[hu]": "A képernyő-billentyűzet beállítása",
|
|
||||||
"Description[ia]": "Configuration de Claviero sur le schermo",
|
|
||||||
"Description[is]": "Grunnstillingar skjályklaborðs",
|
|
||||||
"Description[it]": "Configurazione della tastiera su schermo",
|
|
||||||
"Description[ka]": "კლავიატურის კრანზე მორგება",
|
|
||||||
"Description[ko]": "가상 키보드 설정",
|
|
||||||
"Description[lv]": "Konfigurēt ekrāna tastatūru",
|
|
||||||
"Description[nl]": "Configuratie van toetsenbord op het scherm",
|
|
||||||
"Description[nn]": "Oppsett av skjermtastatur",
|
|
||||||
"Description[pa]": "ਆਨ-ਸਕਰੀਨ ਕੀਬੋਰਡ ਸੰਰਚਨਾ",
|
|
||||||
"Description[pl]": "Ustawienia klawiatury ekranowej",
|
|
||||||
"Description[pt_BR]": "Configuração do teclado virtual",
|
|
||||||
"Description[ru]": "Настройка экранной клавиатуры",
|
|
||||||
"Description[sa]": "On-Screen कीबोर्ड विन्यासः",
|
|
||||||
"Description[sk]": "Konfigurácia klávesnice na obrazovke",
|
|
||||||
"Description[sl]": "Konfiguracija zaslonske tipkovnice",
|
|
||||||
"Description[sv]": "Inställning av skärmtangentbord",
|
|
||||||
"Description[ta]": "மெய்நிகர் விசைப்பலகை அமைப்புகள்",
|
|
||||||
"Description[tr]": "Ekran Klavyesi yapılandırması",
|
|
||||||
"Description[uk]": "Налаштування екранної клавіатури",
|
|
||||||
"Description[zh_CN]": "屏幕键盘配置",
|
|
||||||
"Description[zh_TW]": "螢幕上的虛擬鍵盤設定",
|
|
||||||
"FormFactors": [
|
|
||||||
"handset",
|
|
||||||
"tablet"
|
|
||||||
],
|
|
||||||
"Icon": "input-keyboard",
|
|
||||||
"License": "GPL",
|
|
||||||
"Name": "On-Screen Keyboard",
|
|
||||||
"Name[ar]": "لوحة المفاتيح على الشّاشة",
|
|
||||||
"Name[ca@valencia]": "Teclat en pantalla",
|
|
||||||
"Name[ca]": "Teclat en pantalla",
|
|
||||||
"Name[cs]": "Klávesnice na obrazovce",
|
|
||||||
"Name[de]": "Bildschirmtastatur",
|
|
||||||
"Name[en_GB]": "On-Screen Keyboard",
|
|
||||||
"Name[eo]": "Surekrana Klavaro",
|
|
||||||
"Name[es]": "Teclado en pantalla",
|
|
||||||
"Name[eu]": "Pantailako teklatua",
|
|
||||||
"Name[fi]": "Näyttönäppäimistö",
|
|
||||||
"Name[fr]": "Clavier en incrustation vidéo",
|
|
||||||
"Name[gl]": "Teclado en pantalla",
|
|
||||||
"Name[he]": "מקלדת על המסך",
|
|
||||||
"Name[hu]": "Képernyő-billentyűzet",
|
|
||||||
"Name[ia]": "Claviero sur schermo",
|
|
||||||
"Name[is]": "Lyklaborð á skjá",
|
|
||||||
"Name[it]": "Tastiera su schermo",
|
|
||||||
"Name[ka]": "ეკრანის კლავიატურა",
|
|
||||||
"Name[ko]": "가상 키보드",
|
|
||||||
"Name[lv]": "Ekrāna tastatūra",
|
|
||||||
"Name[nl]": "Toetsenbord op scherm",
|
|
||||||
"Name[nn]": "Skjermtastatur",
|
|
||||||
"Name[pa]": "ਆਨ-ਸਕਰੀਨ ਕੀਬੋਰਡ",
|
|
||||||
"Name[pl]": "Klawiatura ekranowa",
|
|
||||||
"Name[pt_BR]": "Teclado virtual",
|
|
||||||
"Name[ru]": "Экранная клавиатура",
|
|
||||||
"Name[sa]": "ऑन-स्क्रीन् कीबोर्ड",
|
|
||||||
"Name[sk]": "Klávesnica na obrazovke",
|
|
||||||
"Name[sl]": "Zaslonska tipkovnica",
|
|
||||||
"Name[sv]": "Skärmtangentbord",
|
|
||||||
"Name[ta]": "திரை விசைப்பலகை",
|
|
||||||
"Name[tr]": "Ekran Klavyesi",
|
|
||||||
"Name[uk]": "Екранна клавіатура",
|
|
||||||
"Name[zh_CN]": "屏幕键盘",
|
|
||||||
"Name[zh_TW]": "螢幕上的虛擬鍵盤",
|
|
||||||
"Website": "https://plasma-mobile.org"
|
|
||||||
},
|
|
||||||
"X-KDE-Keywords": "onscreen,osk,virtualkeyboard,keyboard",
|
|
||||||
"X-KDE-Keywords[ar]": "على الشاشة,لوحة المفاتيح الافتراضية,لوحة المفاتيح",
|
|
||||||
"X-KDE-Keywords[ca@valencia]": "en pantalla,osk,teclat virtual,teclat",
|
|
||||||
"X-KDE-Keywords[ca]": "en pantalla,osk,teclat virtual,teclat",
|
|
||||||
"X-KDE-Keywords[de]": "Bildschirmtastatur,Virtuelle Tastatur,Tastatur",
|
|
||||||
"X-KDE-Keywords[en_GB]": "onscreen,osk,virtualkeyboard,keyboard",
|
|
||||||
"X-KDE-Keywords[eo]": "surekrana,osk,virtualklavaro,klavaro",
|
|
||||||
"X-KDE-Keywords[es]": "en pantalla,osk,teclado virtual,teclado",
|
|
||||||
"X-KDE-Keywords[eu]": "pantailako,osk,alegiazko teklatua,teklatu birtuala,teklatua",
|
|
||||||
"X-KDE-Keywords[fi]": "ruutunäyttö,näyttönäppäimistö,virtuaalinäppäimistö,näppäimistö",
|
|
||||||
"X-KDE-Keywords[fr]": "à l'écran, incrustation vidéo, clavier virtuel, clavier",
|
|
||||||
"X-KDE-Keywords[gl]": "onscreen,en pantalla,osk,virtualkeyboard,teclado virtual,keyboard,teclado",
|
|
||||||
"X-KDE-Keywords[he]": "על המסך,מקלדת על המסך,מקלדת וירטואלית,מקלדת",
|
|
||||||
"X-KDE-Keywords[hu]": "képernyő,képernyőbillentyűzet,virtuális billentyűzet,billentyűzet",
|
|
||||||
"X-KDE-Keywords[ia]": "onscreen,osk,virtualkeyboard,keyboard",
|
|
||||||
"X-KDE-Keywords[is]": "á skjá,osk,sýndarlyklaborð,lyklaborð",
|
|
||||||
"X-KDE-Keywords[it]": "onscreen,osk,tastiera virtuale,tastiera",
|
|
||||||
"X-KDE-Keywords[ka]": "onscreen,osk,virtualkeyboard,keyboard,ეკრანზე, კლავიატურა ეკრანზე, კლავიატურა",
|
|
||||||
"X-KDE-Keywords[ko]": "onscreen,osk,virtualkeyboard,keyboard,키보드,가상 키보드",
|
|
||||||
"X-KDE-Keywords[lv]": "ekrānā,osk,virtuālātastatūra,tastatūra",
|
|
||||||
"X-KDE-Keywords[nl]": "op-scherm,osk,virtueel toetsenbord,toetsenbord",
|
|
||||||
"X-KDE-Keywords[nn]": "skjermtastatur,virtuelt tastatur,tastatur",
|
|
||||||
"X-KDE-Keywords[pl]": "klawiatura ekranowa,osk,klawiatura wirtualna,klawiatura",
|
|
||||||
"X-KDE-Keywords[pt_BR]": "na tela,osk,teclado virtual,teclado",
|
|
||||||
"X-KDE-Keywords[ru]": "onscreen,osk,virtualkeyboard,keyboard,экранный,виртуальная клавиатура,клавиатура",
|
|
||||||
"X-KDE-Keywords[sa]": "onscreen,osk,वर्चुअलकीबोर्ड,कीबोर्ड",
|
|
||||||
"X-KDE-Keywords[sl]": "na zaslonu,osk,virtualna tipkovnica,tipkovnica",
|
|
||||||
"X-KDE-Keywords[sv]": "på skärmen,virtuellt tangentbord,tangentbord",
|
|
||||||
"X-KDE-Keywords[tr]": "ekran üzeri,ekran,osk,osd,sanal klavye,klavye,düğme",
|
|
||||||
"X-KDE-Keywords[uk]": "onscreen,osk,virtualkeyboard,keyboard,екранна,екран,клавіатура",
|
|
||||||
"X-KDE-Keywords[zh_CN]": "onscreen,osk,virtualkeyboard,keyboard,pingmujianpan,pingmujianpan,pingshangjianpan,xunijianpan,jianpan,屏幕键盘,屏幕显示,屏上键盘,虚拟键盘,键盘",
|
|
||||||
"X-KDE-Keywords[zh_TW]": "螢幕上,虛擬鍵盤,小鍵盤",
|
|
||||||
"X-KDE-System-Settings-Parent-Category": "input-devices"
|
|
||||||
}
|
|
||||||
|
|
@ -1,104 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QDirIterator>
|
|
||||||
#include <QPluginLoader>
|
|
||||||
|
|
||||||
#include "gsettingsitem.h"
|
|
||||||
#include "languagemodel.h"
|
|
||||||
|
|
||||||
LanguageModel::LanguageModel(QObject *parent, GSettingsItem *settings)
|
|
||||||
: QAbstractListModel(parent)
|
|
||||||
, m_gsettings(settings)
|
|
||||||
{
|
|
||||||
beginResetModel();
|
|
||||||
loadPlugins();
|
|
||||||
endResetModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LanguageModel::loadPlugins()
|
|
||||||
{
|
|
||||||
const QStringList enabledLangs = m_gsettings->value("enabled-languages").toStringList();
|
|
||||||
|
|
||||||
QStringList langPaths;
|
|
||||||
QDirIterator it(QStringLiteral(MALIIT_KEYBOARD_LANGUAGES_DIR), {"*plugin.so"}, QDir::NoFilter, QDirIterator::Subdirectories);
|
|
||||||
while (it.hasNext()) {
|
|
||||||
langPaths << it.next();
|
|
||||||
}
|
|
||||||
m_languages.clear();
|
|
||||||
for (const auto &langPath : std::as_const(langPaths)) {
|
|
||||||
QPluginLoader langPlugin(langPath);
|
|
||||||
const auto &metadata = langPlugin.metaData().value("MetaData").toObject();
|
|
||||||
Data lang;
|
|
||||||
lang.langName = metadata.value("Language").toString();
|
|
||||||
lang.langCode = metadata.value("LanguageId").toString();
|
|
||||||
lang.enabled = enabledLangs.contains(lang.langCode);
|
|
||||||
m_languages.append(lang);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant LanguageModel::data(const QModelIndex &index, int role) const
|
|
||||||
{
|
|
||||||
if (!index.isValid()) {
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index.row() >= m_languages.size()) {
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
const Data data = m_languages.at(index.row());
|
|
||||||
switch (role) {
|
|
||||||
case EnabledRole:
|
|
||||||
return data.enabled;
|
|
||||||
case NameRole:
|
|
||||||
return data.langName;
|
|
||||||
case LanguageIdRole:
|
|
||||||
return data.langCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool LanguageModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
|
||||||
{
|
|
||||||
if (!index.isValid()) {
|
|
||||||
return QAbstractListModel::setData(index, value, role);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (role == EnabledRole) {
|
|
||||||
Data &data = m_languages[index.row()];
|
|
||||||
if (data.enabled != value.toBool()) {
|
|
||||||
data.enabled = value.toBool();
|
|
||||||
}
|
|
||||||
Q_EMIT dataChanged(this->index(index.row(), 0), this->index(index.row(), 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList enabledLangs;
|
|
||||||
for (const auto &data : std::as_const(m_languages)) {
|
|
||||||
if (data.enabled) {
|
|
||||||
enabledLangs << data.langCode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
m_gsettings->set("enabled-languages", enabledLangs);
|
|
||||||
return QAbstractListModel::setData(index, value, role);
|
|
||||||
}
|
|
||||||
|
|
||||||
int LanguageModel::rowCount(const QModelIndex &parent) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(parent)
|
|
||||||
return m_languages.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
QHash<int, QByteArray> LanguageModel::roleNames() const
|
|
||||||
{
|
|
||||||
return {
|
|
||||||
{NameRole, "name"},
|
|
||||||
{EnabledRole, "enabled"},
|
|
||||||
{LanguageIdRole, "langId"},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef LANGUAGEMODEL_H
|
|
||||||
#define LANGUAGEMODEL_H
|
|
||||||
|
|
||||||
#include "gsettingsitem.h"
|
|
||||||
#include <QAbstractListModel>
|
|
||||||
|
|
||||||
struct Data {
|
|
||||||
QString langCode;
|
|
||||||
QString langName;
|
|
||||||
bool enabled;
|
|
||||||
};
|
|
||||||
|
|
||||||
class LanguageModel : public QAbstractListModel
|
|
||||||
{
|
|
||||||
enum ModelRoles {
|
|
||||||
NameRole = Qt::DisplayRole,
|
|
||||||
EnabledRole = Qt::UserRole + 1,
|
|
||||||
LanguageIdRole,
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
LanguageModel(QObject *parent, GSettingsItem *gsettingsItem);
|
|
||||||
|
|
||||||
QVariant data(const QModelIndex &index, int role) const override;
|
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
|
||||||
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
|
|
||||||
|
|
||||||
QHash<int, QByteArray> roleNames() const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
QVector<Data> m_languages;
|
|
||||||
void loadPlugins();
|
|
||||||
GSettingsItem *m_gsettings;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.7
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
import QtQuick.Controls 2.11 as QQC2
|
|
||||||
|
|
||||||
import org.kde.kcmutils as KCM
|
|
||||||
import org.kde.kitemmodels 1.0 as KItemModel
|
|
||||||
|
|
||||||
import org.kde.kcm.virtualkeyboard 1.0
|
|
||||||
|
|
||||||
KCM.ScrollViewKCM {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
title: i18n("Languages")
|
|
||||||
|
|
||||||
view: ListView {
|
|
||||||
id: languageList
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
|
|
||||||
model: KItemModel.KSortFilterProxyModel {
|
|
||||||
sourceModel: kcm.languageModel
|
|
||||||
sortRoleName: "name"
|
|
||||||
sortOrder: Qt.AscendingOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: QQC2.CheckDelegate {
|
|
||||||
width: ListView.view.width
|
|
||||||
text: model.name
|
|
||||||
checked: model.enabled
|
|
||||||
onToggled: {
|
|
||||||
model.enabled = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer: RowLayout {
|
|
||||||
QQC2.Button {
|
|
||||||
text: i18n("Apply")
|
|
||||||
icon.name: "dialog-ok"
|
|
||||||
onClicked: kcm.pop()
|
|
||||||
Layout.alignment: Qt.AlignRight
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
||||||
*/
|
|
||||||
|
|
||||||
import QtQuick 2.7
|
|
||||||
import QtQuick.Layouts 1.1
|
|
||||||
import QtQuick.Controls 2.11 as QQC2
|
|
||||||
|
|
||||||
import org.kde.kirigami 2.19 as Kirigami
|
|
||||||
import org.kde.kcmutils as KCM
|
|
||||||
import org.kde.kitemmodels 1.0 as KItemModel
|
|
||||||
import org.kde.kirigamiaddons.formcard 1.0 as FormCard
|
|
||||||
|
|
||||||
KCM.SimpleKCM {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
title: i18n("On-Screen Keyboard")
|
|
||||||
|
|
||||||
leftPadding: 0
|
|
||||||
rightPadding: 0
|
|
||||||
topPadding: Kirigami.Units.gridUnit
|
|
||||||
bottomPadding: Kirigami.Units.gridUnit
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
width: parent.width
|
|
||||||
|
|
||||||
FormCard.FormCard {
|
|
||||||
FormCard.FormTextFieldDelegate {
|
|
||||||
label: i18n("Type anything here…")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormHeader {
|
|
||||||
title: i18nc("@title:group", "Feedback")
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormCard {
|
|
||||||
FormCard.FormSwitchDelegate {
|
|
||||||
id: firstFeedbackCheckBox
|
|
||||||
text: i18n("Sound")
|
|
||||||
description: i18n("Whether to emit a sound on keypress.")
|
|
||||||
checked: kcm.soundFeedback
|
|
||||||
onCheckedChanged: kcm.soundFeedback = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: firstFeedbackCheckBox; below: secondFeedbackCheckBox }
|
|
||||||
|
|
||||||
FormCard.FormSwitchDelegate {
|
|
||||||
id: secondFeedbackCheckBox
|
|
||||||
text: i18n("Vibration")
|
|
||||||
description: i18n("Whether to vibrate on keypress.")
|
|
||||||
checked: kcm.vibrateFeedback
|
|
||||||
onCheckedChanged: kcm.vibrateFeedback = checked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormHeader {
|
|
||||||
title: i18nc("@title:group", "Text Correction")
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormCard {
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
|
||||||
id: firstTextCorrectionCheckBox
|
|
||||||
text: i18n("Check spelling of entered text")
|
|
||||||
checked: kcm.spellCheck
|
|
||||||
onCheckedChanged: kcm.spellCheck = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: firstTextCorrectionCheckBox; below: capitalizeCheck }
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
|
||||||
id: capitalizeCheck
|
|
||||||
text: i18n("Capitalize the first letter of each sentence")
|
|
||||||
checked: kcm.autoCapitalize
|
|
||||||
onCheckedChanged: kcm.autoCapitalize = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: capitalizeCheck; below: wordCompletionCheck }
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
|
||||||
id: wordCompletionCheck
|
|
||||||
text: i18n("Complete current word with first suggestion when hitting space")
|
|
||||||
checked: kcm.autoCompleteOnSpace
|
|
||||||
onCheckedChanged: kcm.autoCompleteOnSpace = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: wordCompletionCheck; below: wordSuggestionCheck }
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
|
||||||
id: wordSuggestionCheck
|
|
||||||
text: i18n("Suggest potential words in word ribbon")
|
|
||||||
checked: kcm.showSuggestions
|
|
||||||
onCheckedChanged: {
|
|
||||||
kcm.showSuggestions = checked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: wordSuggestionCheck; below: fullStopCheck }
|
|
||||||
|
|
||||||
FormCard.FormCheckDelegate {
|
|
||||||
id: fullStopCheck
|
|
||||||
text: i18n("Insert a full-stop when space is pressed twice")
|
|
||||||
checked: kcm.fullStopOnDoubleSpace
|
|
||||||
onCheckedChanged: {
|
|
||||||
kcm.fullStopOnDoubleSpace = checked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FormCard.FormDelegateSeparator { above: fullStopCheck; below: languageButton }
|
|
||||||
|
|
||||||
FormCard.FormButtonDelegate {
|
|
||||||
id: languageButton
|
|
||||||
text: i18n("Configure Languages")
|
|
||||||
icon.name: "set-language"
|
|
||||||
onClicked: kcm.push("languages.qml")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "virtualkeyboard.h"
|
|
||||||
#include <KLocalizedString>
|
|
||||||
#include <KPluginFactory>
|
|
||||||
|
|
||||||
#include <QDir>
|
|
||||||
|
|
||||||
#include "languagemodel.h"
|
|
||||||
|
|
||||||
// clang-format off
|
|
||||||
|
|
||||||
#define SETTER(setter, member, gsetting, signal) \
|
|
||||||
void VirtualKeyboard::setter(bool enabled) \
|
|
||||||
{ \
|
|
||||||
if (member != enabled) {\
|
|
||||||
member = enabled; \
|
|
||||||
m_gsettings->set(gsetting, enabled); \
|
|
||||||
Q_EMIT signal();\
|
|
||||||
}\
|
|
||||||
}
|
|
||||||
|
|
||||||
// clang-format on
|
|
||||||
|
|
||||||
K_PLUGIN_CLASS_WITH_JSON(VirtualKeyboard, "kcm_mobile_onscreenkeyboard.json")
|
|
||||||
|
|
||||||
VirtualKeyboard::VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData)
|
|
||||||
: KQuickConfigModule(parent, metaData)
|
|
||||||
, m_gsettings(new GSettingsItem("/org/maliit/keyboard/maliit/", parent))
|
|
||||||
, m_langModel(new LanguageModel(this, m_gsettings))
|
|
||||||
{
|
|
||||||
setButtons({});
|
|
||||||
|
|
||||||
qmlRegisterAnonymousType<LanguageModel>("org.kde.kcm.virtualkeyboard", 1);
|
|
||||||
|
|
||||||
m_autoCapitalize = m_gsettings->value("auto-capitalization").toBool();
|
|
||||||
m_autoCompleteOnSpace = m_gsettings->value("auto-completion").toBool();
|
|
||||||
m_showSuggestions = m_gsettings->value("predictive-text").toBool();
|
|
||||||
m_fullStopOnDoubleSpace = m_gsettings->value("double-space-full-stop").toBool();
|
|
||||||
m_spellCheck = m_gsettings->value("spell-checking").toBool();
|
|
||||||
|
|
||||||
m_soundFeedback = m_gsettings->value("key-press-feedback").toBool();
|
|
||||||
m_vibrateFeedback = m_gsettings->value("key-press-haptic-feedback").toBool();
|
|
||||||
}
|
|
||||||
|
|
||||||
SETTER(setAutoCapitalize, m_autoCapitalize, "auto-capitalization", autoCapitalizeChanged)
|
|
||||||
SETTER(setAutoCompleteOnSpace, m_autoCompleteOnSpace, "auto-completion", autoCompleteOnSpaceChanged);
|
|
||||||
SETTER(setShowSuggestions, m_showSuggestions, "predictive-text", showSuggestionsChanged)
|
|
||||||
SETTER(setFullStopOnDoubleSpace, m_fullStopOnDoubleSpace, "double-space-full-stop", fullStopOnDoubleSpaceChanged)
|
|
||||||
SETTER(setSpellCheck, m_spellCheck, "spell-checking", spellCheckChanged)
|
|
||||||
|
|
||||||
SETTER(setSoundFeedback, m_soundFeedback, "key-press-feedback", soundFeedbackChanged)
|
|
||||||
SETTER(setVibrateFeedback, m_vibrateFeedback, "key-press-haptic-feedback", vibrateFeedbackChanged)
|
|
||||||
|
|
||||||
#include "virtualkeyboard.moc"
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
/*
|
|
||||||
SPDX-FileCopyrightText: 2020 Bhushan Shah <bshah@kde.org>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "languagemodel.h"
|
|
||||||
#include <KQuickConfigModule>
|
|
||||||
|
|
||||||
#include <QList>
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
#ifndef VIRTUALKEYBOARD_H
|
|
||||||
#define VIRTUALKEYBOARD_H
|
|
||||||
|
|
||||||
class VirtualKeyboard : public KQuickConfigModule
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
Q_PROPERTY(LanguageModel *languageModel MEMBER m_langModel CONSTANT)
|
|
||||||
|
|
||||||
Q_PROPERTY(bool spellCheck MEMBER m_spellCheck WRITE setSpellCheck NOTIFY spellCheckChanged)
|
|
||||||
Q_PROPERTY(bool autoCapitalize MEMBER m_autoCapitalize WRITE setAutoCapitalize NOTIFY autoCapitalizeChanged)
|
|
||||||
Q_PROPERTY(bool autoCompleteOnSpace MEMBER m_autoCompleteOnSpace WRITE setAutoCompleteOnSpace NOTIFY autoCompleteOnSpaceChanged)
|
|
||||||
Q_PROPERTY(bool showSuggestions MEMBER m_showSuggestions WRITE setShowSuggestions NOTIFY showSuggestionsChanged)
|
|
||||||
Q_PROPERTY(bool fullStopOnDoubleSpace MEMBER m_fullStopOnDoubleSpace WRITE setFullStopOnDoubleSpace NOTIFY fullStopOnDoubleSpaceChanged)
|
|
||||||
|
|
||||||
Q_PROPERTY(bool soundFeedback MEMBER m_soundFeedback WRITE setSoundFeedback NOTIFY soundFeedbackChanged)
|
|
||||||
Q_PROPERTY(bool vibrateFeedback MEMBER m_vibrateFeedback WRITE setVibrateFeedback NOTIFY vibrateFeedbackChanged)
|
|
||||||
|
|
||||||
public:
|
|
||||||
VirtualKeyboard(QObject *parent, const KPluginMetaData &metaData);
|
|
||||||
|
|
||||||
void setSpellCheck(bool enabled);
|
|
||||||
void setAutoCapitalize(bool enabled);
|
|
||||||
void setAutoCompleteOnSpace(bool enabled);
|
|
||||||
void setShowSuggestions(bool enabled);
|
|
||||||
void setFullStopOnDoubleSpace(bool enabled);
|
|
||||||
|
|
||||||
void setSoundFeedback(bool enabled);
|
|
||||||
void setVibrateFeedback(bool enabled);
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void spellCheckChanged();
|
|
||||||
void autoCapitalizeChanged();
|
|
||||||
void autoCompleteOnSpaceChanged();
|
|
||||||
void showSuggestionsChanged();
|
|
||||||
void fullStopOnDoubleSpaceChanged();
|
|
||||||
void soundFeedbackChanged();
|
|
||||||
void vibrateFeedbackChanged();
|
|
||||||
|
|
||||||
private:
|
|
||||||
GSettingsItem *m_gsettings;
|
|
||||||
LanguageModel *m_langModel;
|
|
||||||
|
|
||||||
// spell check
|
|
||||||
bool m_spellCheck;
|
|
||||||
bool m_autoCapitalize;
|
|
||||||
bool m_autoCompleteOnSpace;
|
|
||||||
bool m_showSuggestions;
|
|
||||||
bool m_fullStopOnDoubleSpace;
|
|
||||||
|
|
||||||
// feedback
|
|
||||||
bool m_soundFeedback;
|
|
||||||
bool m_vibrateFeedback;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
Loading…
Reference in a new issue