KCodecAction
#include <KCodecAction>

Properties | |
int | codecMib |
QString | codecName |
![]() | |
autoRepeat | |
checkable | |
checked | |
enabled | |
font | |
icon | |
iconText | |
iconVisibleInMenu | |
menuRole | |
priority | |
shortcut | |
shortcutContext | |
shortcutVisibleInContextMenu | |
statusTip | |
text | |
toolTip | |
visible | |
whatsThis | |
![]() | |
objectName | |
Signals | |
void | codecNameTriggered (const QString &name) |
void | codecTriggered (QTextCodec *codec) |
void | defaultItemTriggered () |
void | encodingProberTriggered (KEncodingProber::ProberType) |
void | triggered (const QString &text) |
void | triggered (int index) |
void | triggered (KEncodingProber::ProberType) |
void | triggered (QAction *action) |
void | triggered (QTextCodec *codec) |
![]() | |
void | indexTriggered (int index) |
void | textTriggered (const QString &text) |
void | triggered (const QString &text) |
void | triggered (int index) |
void | triggered (QAction *action) |
Protected Slots | |
void | actionTriggered (QAction *) override |
![]() | |
virtual void | actionTriggered (QAction *action) |
void | slotToggled (bool) |
Additional Inherited Members | |
![]() | |
enum | ToolBarMode |
![]() | |
enum | ActionEvent |
enum | MenuRole |
enum | Priority |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
ComboBoxMode | |
MenuMode | |
![]() | |
AboutQtRole | |
AboutRole | |
ApplicationSpecificRole | |
HighPriority | |
Hover | |
LowPriority | |
NormalPriority | |
NoRole | |
PreferencesRole | |
QuitRole | |
TextHeuristicRole | |
Trigger | |
![]() | |
typedef | QObjectList |
![]() | |
KWIDGETSADDONS_NO_EXPORT | KSelectAction (KSelectActionPrivate &dd, QObject *parent) |
QWidget * | createWidget (QWidget *parent) override |
void | deleteWidget (QWidget *widget) override |
![]() | |
QList< QWidget * > | createdWidgets () const const |
virtual bool | event (QEvent *event) override |
virtual bool | eventFilter (QObject *obj, QEvent *event) override |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Action for selecting one of several QTextCodec.
This action shows up a submenu with a list of the available codecs on the system.
Definition at line 29 of file kcodecaction.h.
Member Function Documentation
◆ codecForMib()
QTextCodec * KCodecAction::codecForMib | ( | int | mib | ) | const |
- Deprecated:
- since 5.103, use QTextCodec or QStringConverter.
Definition at line 139 of file kcodecaction.cpp.
◆ codecNameTriggered
|
signal |
Emitted when a codec was selected.
- Parameters
-
name the name of the selected encoding.
Note that textTriggered(const QString &) is emitted too (as defined in KSelectAction).
- Since
- 5.103
◆ codecTriggered
|
signal |
Specific (proper) codec was selected.
Note that textTriggered(const QString &) is emitted too (as defined in KSelectAction).
In your KCodecAction subclass to be backward-compatible to KF < 5.78, emit instead just the deprecated signal triggered(QTextCodec *). That will also automatically emit codecTriggered(QTextCodec *) because this signal is connected to the deprevcated one in the KCodecAction constructor. Only if you compile against a variant of KConfigWidgets built without all API deprecated up to version 5.78, then emit this signal directly. Your code would be like this:
- Since
- 5.78
- Deprecated:
- since 5.103, use codecNameTriggered()
◆ currentCodec()
QTextCodec * KCodecAction::currentCodec | ( | ) | const |
- Deprecated:
- since 5.103, use currentCodecName
Definition at line 213 of file kcodecaction.cpp.
◆ currentCodecMib()
int KCodecAction::currentCodecMib | ( | ) | const |
- Deprecated:
- since 5.103, use currentCodecName
Definition at line 273 of file kcodecaction.cpp.
◆ currentProberType()
KEncodingProber::ProberType KCodecAction::currentProberType | ( | ) | const |
Applicable only if showAutoOptions in c'tor was true.
- Returns
- KEncodingProber::None if specific encoding is selected, not autodetection, otherwise... you know it!
- Deprecated:
- since 5.102, no known users.
Definition at line 291 of file kcodecaction.cpp.
◆ defaultItemTriggered
|
signal |
Emitted when the 'Default' codec action is triggered.
◆ encodingProberTriggered
|
signal |
Autodetection has been selected.
emits KEncodingProber::Universal if Default was selected.
Applicable only if showAutoOptions in c'tor was true
In your KCodecAction subclass to be backward-compatible to KF < 5.78, emit instead just the deprecated signal triggered(KEncodingProber::ProberType). That will also automatically emit encodingProberTriggered(KEncodingProber::ProberType) because this signal is connected to the deprecated one in the KCodecAction constructor. Only if you compile against a variant of KConfigWidgets built without all API deprecated up to version 5.78, then emit this signal directly. Your code would be like this:
- Since
- 5.78
- Deprecated:
- since 5.102, no known users.
◆ mibForName()
int KCodecAction::mibForName | ( | const QString & | codecName, |
bool * | ok = nullptr |
||
) | const |
- Deprecated:
- since 5.103, use QTextCodec or QStringConverter.
Definition at line 103 of file kcodecaction.cpp.
◆ setCurrentCodec() [1/2]
bool KCodecAction::setCurrentCodec | ( | int | mib | ) |
- Deprecated:
- since 5.103, use setCurrentCodecName
Definition at line 280 of file kcodecaction.cpp.
◆ setCurrentCodec() [2/2]
bool KCodecAction::setCurrentCodec | ( | QTextCodec * | codec | ) |
- Deprecated:
- since 5.103, use setCurrentCodecName
Definition at line 220 of file kcodecaction.cpp.
◆ setCurrentProberType()
bool KCodecAction::setCurrentProberType | ( | KEncodingProber::ProberType | scri | ) |
Applicable only if showAutoOptions in c'tor was true.
KEncodingProber::Universal means 'Default' item
- Deprecated:
- since 5.102, no known users.
Definition at line 298 of file kcodecaction.cpp.
◆ triggered [1/2]
|
signal |
Autodetection has been selected.
emits KEncodingProber::Universal if Default was selected.
Applicable only if showAutoOptions in c'tor was true
- Deprecated:
- Since 5.78, use encodingProberTriggered(KEncodingProber::ProberType)
◆ triggered [2/2]
|
signal |
Specific (proper) codec was selected.
Note that triggered(const QString &) is emitted too (as defined in KSelectAction).
- Deprecated:
- Since 5.78, use codecTriggered(QTextCodec *)
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Dec 7 2023 03:49:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.