KCodecAction Class
Action for selecting one of several text codecs. More...
| Header: | #include <KCodecAction> |
| CMake: | find_package(KF6 REQUIRED COMPONENTS ConfigWidgets)target_link_libraries(mytarget PRIVATE KF6::ConfigWidgets) |
| Inherits: | KSelectAction |
Properties
- codecName : QString
Public Functions
| KCodecAction(QObject *parent, bool showAutoOptions = false) | |
| KCodecAction(const QString &text, QObject *parent, bool showAutoOptions = false) | |
| KCodecAction(const QIcon &icon, const QString &text, QObject *parent, bool showAutoOptions = false) | |
| QString | currentCodecName() const |
| bool | setCurrentCodec(const QString &codecName) |
Signals
| void | codecNameTriggered(const QByteArray &name) |
| void | defaultItemTriggered() |
Protected Slots
| virtual void | slotActionTriggered(QAction *) override |
Detailed Description
This action shows up a submenu with a list of the available codecs on the system.
Property Documentation
codecName : QString
Access functions:
| QString | currentCodecName() const |
| bool | setCurrentCodec(const QString &codecName) |
Member Function Documentation
[explicit] KCodecAction::KCodecAction(QObject *parent, bool showAutoOptions = false)
KCodecAction::KCodecAction(const QString &text, QObject *parent, bool showAutoOptions = false)
KCodecAction::KCodecAction(const QIcon &icon, const QString &text, QObject *parent, bool showAutoOptions = false)
[signal] void KCodecAction::codecNameTriggered(const QByteArray &name)
Emitted when a codec was selected
name the name of the selected encoding.
Note that textTriggered(const QString &) is emitted too (as defined in KSelectAction).
QString KCodecAction::currentCodecName() const
Note: Getter function for property codecName.
[signal] void KCodecAction::defaultItemTriggered()
Emitted when the 'Default' codec action is triggered.
bool KCodecAction::setCurrentCodec(const QString &codecName)
Note: Setter function for property codecName.
[override virtual protected slot] void KCodecAction::slotActionTriggered(QAction *)
Reimplements: KSelectAction::slotActionTriggered(QAction *action).