返回介绍

QTextCodecPlugin Class

发布于 2019-10-04 15:03:20 字数 2495 浏览 916 评论 0 收藏 0

The QTextCodecPlugin class provides an abstract base for custom QTextCodec plugins. More...

#include <qtextcodecplugin.h>

List of all member functions.

Public Members

  • QTextCodecPlugin ()
  • ~QTextCodecPlugin ()
  • virtual QStringList names () const = 0
  • virtual QTextCodec * createForName ( constQString&name ) = 0
  • virtual QValueList<int> mibEnums () const = 0
  • virtual QTextCodec * createForMib ( intmib ) = 0

Detailed Description

The QTextCodecPlugin class provides an abstract base for custom QTextCodec plugins.

The text codec plugin is a simple plugin interface that makes it easy to create custom text codecs that can be loaded dynamically into applications.

Writing a text codec plugin is achieved by subclassing this base class, reimplementing the pure virtual functions names(), createForName(), mibEnums() and createForMib(), and exporting the class with the Q_EXPORT_PLUGIN macro. See the Qt Plugins documentation for details.

See the IANA character-sets encoding file for more information on mime names and mib enums.

See also Plugins.


Member Function Documentation

QTextCodecPlugin::QTextCodecPlugin ()

Constructs a text codec plugin. This is invoked automatically by the Q_EXPORT_PLUGIN macro.

QTextCodecPlugin::~QTextCodecPlugin ()

Destroys the text codec plugin.

You never have to call this explicitly. Qt destroys a plugin automatically when it is no longer used.

QTextCodec* QTextCodecPlugin::createForMib ( intmib ) [pure virtual]

Creates a QTextCodec object for the mib enum mib.

(See the IANA character-sets encoding file for more information)

See also mibEnums().

QTextCodec* QTextCodecPlugin::createForName ( constQString&name ) [pure virtual]

Creates a QTextCodec object for the codec called name.

See also names().

QValueList<int> QTextCodecPlugin::mibEnums () const [pure virtual]

Returns the list of mib enums this plugin supports.

See also createForMib().

QStringList QTextCodecPlugin::names () const [pure virtual]

Returns the list of mime names this plugin supports.

See also createForName().

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文