KCodecAction

KDE 4.5 PyKDE API Reference

- KDE's Python API

# KCodecAction Class Reference

`from PyKDE4.kdeui import *`

Inherits: KSelectAction → KAction → QWidgetAction → QAction → QObject

## 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.

## Signals
| defaultItemTriggered ()
| triggered (QTextCodec codec)
| triggered (KEncodingDetector.AutoDetectScript a0)
## Methods
| __init__ (self, QObject parent, bool showAutoOptions=0)
| __init__ (self, QString text, QObject parent, bool showAutoOptions=0)
| __init__ (self, KIcon icon, QString text, QObject parent, bool showAutoOptions=0)
| actionTriggered (self, QAction a0)
QTextCodec | codecForMib (self, int mib)
KEncodingDetector.AutoDetectScript | currentAutoDetectScript (self)
QTextCodec | currentCodec (self)
int | currentCodecMib (self)
QString | currentCodecName (self)
int, bool ok | mibForName (self, QString codecName)
bool | setCurrentAutoDetectScript (self, KEncodingDetector.AutoDetectScript a0)
bool | setCurrentCodec (self, QTextCodec codec)
bool | setCurrentCodec (self, QString codecName)
bool | setCurrentCodec (self, int mib)

## Signal Documentation

defaultItemTriggered | ( |  | ) |

If showAutoOptions==true, then better handle triggered(KEncodingDetector.AutoDetectScript) signal

Signal syntax:
  `QObject.connect(source, SIGNAL("defaultItemTriggered()"), target_slot)`

triggered | ( | QTextCodec | codec
| ) |  |  |

Autodetection has been selected. emits KEncodingDetector.SemiautomaticDetection if Default was selected.

Applicable only if showAutoOptions in c'tor was true

Signal syntax:
  `QObject.connect(source, SIGNAL("triggered(QTextCodec*)"), target_slot)`

triggered | ( | KEncodingDetector.AutoDetectScript | a0
| ) |  |  |

Autodetection has been selected. emits KEncodingDetector.SemiautomaticDetection if Default was selected.

Applicable only if showAutoOptions in c'tor was true

Signal syntax:
  `QObject.connect(source, SIGNAL("triggered(KEncodingDetector::AutoDetectScript)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QObject | parent,
|  | bool | showAutoOptions=0
| ) |  |  |

__init__ | ( | self, |
|  | QString | text,
|  | QObject | parent,
|  | bool | showAutoOptions=0
| ) |  |  |

__init__ | ( | self, |
|  | KIcon | icon,
|  | QString | text,
|  | QObject | parent,
|  | bool | showAutoOptions=0
| ) |  |  |

actionTriggered | ( | self, |
|  | QAction | a0
| ) |  |  |

QTextCodec codecForMib | ( | self, |
|  | int | mib
| ) |  |  |

KEncodingDetector.AutoDetectScript currentAutoDetectScript | ( |  | self ) |

Applicable only if showAutoOptions in c'tor was true

Returns:
  KEncodingDetector.None if specific encoding is selected, not autodetection, otherwise... you know it!

QTextCodec currentCodec | ( |  | self ) |

int currentCodecMib | ( |  | self ) |

QString currentCodecName | ( |  | self ) |

int, bool ok mibForName | ( | self, |
|  | QString | codecName
| ) |  |  |

bool setCurrentAutoDetectScript | ( | self, |
|  | KEncodingDetector.AutoDetectScript | a0
| ) |  |  |

Applicable only if showAutoOptions in c'tor was true

KEncodingDetector.SemiautomaticDetection means 'Default' item

bool setCurrentCodec | ( | self, |
|  | QTextCodec | codec
| ) |  |  |

bool setCurrentCodec | ( | self, |
|  | QString | codecName
| ) |  |  |

bool setCurrentCodec | ( | self, |
|  | int | mib
| ) |  |  |