File: main.cpp

package info (click to toggle)
fcitx5-skk 5.1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 388 kB
  • sloc: cpp: 1,400; makefile: 3; sh: 1
file content (34 lines) | stat: -rw-r--r-- 728 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * SPDX-FileCopyrightText: 2013~2020 CSSlayer <wengxt@gmail.com>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 */

#include "main.h"
#include <QApplication>
#include <fcitx-utils/i18n.h>
#include <glib-object.h>
#include <libskk/libskk.h>
#include <qplugin.h>
#include "dictwidget.h"

namespace fcitx {

SkkConfigPlugin::SkkConfigPlugin(QObject *parent)
    : FcitxQtConfigUIPlugin(parent) {
#if !GLIB_CHECK_VERSION(2, 36, 0)
    g_type_init();
#endif
    skk_init();
    registerDomain("fcitx5-skk", FCITX_INSTALL_LOCALEDIR);
}

FcitxQtConfigUIWidget *SkkConfigPlugin::create(const QString &key) {
    if (key == "dictionary_list") {
        return new SkkDictWidget;
    }
    return nullptr;
}

} // namespace fcitx