File: fcitxqtconfiguiplugin.h

package info (click to toggle)
fcitx5-qt 5.1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,340 kB
  • sloc: cpp: 11,697; xml: 243; ansic: 46; makefile: 14; sh: 9
file content (54 lines) | stat: -rw-r--r-- 1,395 bytes parent folder | download | duplicates (5)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * SPDX-FileCopyrightText: 2012~2017 CSSlayer <wengxt@gmail.com>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */
#ifndef _WIDGETSADDONS_FCITXQTCONFIGUIPLUGIN_H_
#define _WIDGETSADDONS_FCITXQTCONFIGUIPLUGIN_H_

#include "fcitx5qt5widgetsaddons_export.h"
#include <QObject>
#include <QString>
#include <QStringList>

namespace fcitx {

class FcitxQtConfigUIWidget;

/**
 * interface for qt config ui
 */
struct FCITX5QT5WIDGETSADDONS_EXPORT FcitxQtConfigUIFactoryInterface {
    /**
     * create new widget based on key
     *
     * @see FcitxQtConfigUIPlugin::files
     *
     * @return plugin name
     */
    virtual FcitxQtConfigUIWidget *create(const QString &key) = 0;
};

#define FcitxQtConfigUIFactoryInterface_iid                                    \
    "org.fcitx.Fcitx.FcitxQtConfigUIFactoryInterface"
} // namespace fcitx

Q_DECLARE_INTERFACE(fcitx::FcitxQtConfigUIFactoryInterface,
                    FcitxQtConfigUIFactoryInterface_iid)
namespace fcitx {

/**
 * base class for qt config ui
 */
class FCITX5QT5WIDGETSADDONS_EXPORT FcitxQtConfigUIPlugin
    : public QObject,
      public FcitxQtConfigUIFactoryInterface {
    Q_OBJECT
    Q_INTERFACES(fcitx::FcitxQtConfigUIFactoryInterface)
public:
    explicit FcitxQtConfigUIPlugin(QObject *parent = 0);
    virtual ~FcitxQtConfigUIPlugin();
};
} // namespace fcitx

#endif // _WIDGETSADDONS_FCITXQTCONFIGUIPLUGIN_H_