QTextCodecPlugin(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QTextCodecPlugin πŸ’– (from the 3qt manual, bestie)

🌸 NAME 🌸

QTextCodecPlugin β€” the abstract base class for making your own custom QTextCodec plugins. it's giving "build your own codec, but make it pluggable" ✨


πŸŽ€ SYNOPSIS πŸŽ€

okay so first things first, the vibe check:

All the functions in this class are reentrant when Qt is built with thread support. 🧡✨

and you get to it like this:

#include <qtextcodecplugin.h>

πŸ‘‘ Public Members πŸ‘‘

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so QTextCodecPlugin is literally the abstract base for custom QTextCodec plugins. that's the whole thing. πŸ’…

the text codec plugin is a simple plugin interface that makes it so easy to create custom text codecs that can get loaded dynamically into applications. plug and play, no cap. πŸ”Œβœ¨

here's how you actually write one, bestie: you subclass this base class, you reimplement the pure virtual functions names(), createForName(), mibEnums() and createForMib(), and then you export the class with the Q_EXPORT_PLUGIN macro. that's it. that's the recipe. 🧁 the Qt Plugins documentation has the full tea if you want it.

also, go peek at the IANA character-sets encoding file for more info on mime names and mib enums β€” it's the source of truth, iykyk.

See also Plugins. 🫢


🌈 MEMBER FUNCTION DOCUMENTATION 🌈

QTextCodecPlugin::QTextCodecPlugin ()

Constructs a text codec plugin. the way this gets invoked automatically by the Q_EXPORT_PLUGIN macro? iconic, you never have to think about it. ✨

QTextCodecPlugin::~QTextCodecPlugin ()

Destroys the text codec plugin. 🫧

you never have to call this explicitly, fr fr. Qt destroys a plugin automatically when it's no longer used. it handles itself, main character energy. πŸ‘‘

QTextCodec * QTextCodecPlugin::createForMib ( int mib ) [pure virtual]

Creates a QTextCodec object for the mib enum mib. πŸ› οΈ

(go check the IANA character-sets encoding file for more info, it's all there)

See also mibEnums(). πŸ’œ

QTextCodec * QTextCodecPlugin::createForName ( const QString & 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 supported by this plugin. a whole little list of them. πŸ“‹βœ¨

See also createForMib(). πŸ’œ

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

Returns the list of mime names supported by this plugin. yes bestie, the names. πŸŽ€

See also createForName(). πŸ’œ


🌟 SEE ALSO 🌟


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. πŸ“œ


πŸ’« AUTHOR πŸ’«

Generated automatically from the source code. (yes, the author is a robot, and honestly? slay. πŸ€–βœ¨)


πŸ’€ BUGS πŸ’€

if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us to help you. thank you!! πŸ™πŸ’–

the definitive Qt documentation is provided in HTML format β€” it lives at $QTDIR/doc/html and you can read it using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. so like, it's a cute lil bonus, not the official thing. πŸ™ˆ

if you find errors in this manual page, please report them to qt-bugs@trolltech.com. please include the name of the manual page (qtextcodecplugin.3qt) and the Qt version (3.3.8). thank you bestie, you're doing the lord's work. 🫢

anyway that's the whole page! πŸ’… this was brought to you by Trolltech AS, dated 2 February 2007, straight out of the QTextCodecPlugin(3qt) man page β€” mwah, go write a codec, you got this πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from