• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KCodecAction Class Reference

Action for selecting one of several QTextCodec. More...

#include <kcodecaction.h>

Inheritance diagram for KCodecAction:

Inheritance graph
[legend]

List of all members.


Signals

void defaultItemTriggered ()
void triggered (KEncodingDetector::AutoDetectScript)
void triggered (const QString &)
void triggered (QTextCodec *codec)

Public Member Functions

QTextCodec * codecForMib (int mib) const
KEncodingDetector::AutoDetectScript currentAutoDetectScript () const
QTextCodec * currentCodec () const
int currentCodecMib () const
QString currentCodecName () const
 KCodecAction (const KIcon &icon, const QString &text, QObject *parent, bool showAutoOptions=false)
 KCodecAction (const QString &text, QObject *parent, bool showAutoOptions=false)
 KCodecAction (QObject *parent, bool showAutoOptions=false)
int mibForName (const QString &codecName, bool *ok=0) const
bool setCurrentAutoDetectScript (KEncodingDetector::AutoDetectScript)
bool setCurrentCodec (int mib)
bool setCurrentCodec (const QString &codecName)
bool setCurrentCodec (QTextCodec *codec)
virtual ~KCodecAction ()

Protected Slots

virtual void actionTriggered (QAction *)

Properties

int codecMib
QString codecName

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 38 of file kcodecaction.h.


Constructor & Destructor Documentation

KCodecAction::KCodecAction ( QObject *  parent,
bool  showAutoOptions = false 
) [explicit]

Definition at line 62 of file kcodecaction.cpp.

KCodecAction::KCodecAction ( const QString &  text,
QObject *  parent,
bool  showAutoOptions = false 
)

Definition at line 69 of file kcodecaction.cpp.

KCodecAction::KCodecAction ( const KIcon &  icon,
const QString &  text,
QObject *  parent,
bool  showAutoOptions = false 
)

Definition at line 76 of file kcodecaction.cpp.

KCodecAction::~KCodecAction (  )  [virtual]

Definition at line 83 of file kcodecaction.cpp.


Member Function Documentation

void KCodecAction::actionTriggered ( QAction *  action  )  [protected, virtual, slot]

This function is called whenever an action from the selections is triggered.

Reimplemented from KSelectAction.

Definition at line 161 of file kcodecaction.cpp.

QTextCodec * KCodecAction::codecForMib ( int  mib  )  const

Definition at line 150 of file kcodecaction.cpp.

KEncodingDetector::AutoDetectScript KCodecAction::currentAutoDetectScript (  )  const

Applicable only if showAutoOptions in c'tor was true.

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

Definition at line 246 of file kcodecaction.cpp.

QTextCodec * KCodecAction::currentCodec (  )  const

Definition at line 191 of file kcodecaction.cpp.

int KCodecAction::currentCodecMib (  )  const

Definition at line 233 of file kcodecaction.cpp.

QString KCodecAction::currentCodecName (  )  const

Definition at line 223 of file kcodecaction.cpp.

void KCodecAction::defaultItemTriggered (  )  [signal]

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

int KCodecAction::mibForName ( const QString &  codecName,
bool *  ok = 0 
) const

Definition at line 117 of file kcodecaction.cpp.

bool KCodecAction::setCurrentAutoDetectScript ( KEncodingDetector::AutoDetectScript  scri  ) 

Applicable only if showAutoOptions in c'tor was true.

KEncodingDetector::SemiautomaticDetection means 'Default' item

Definition at line 253 of file kcodecaction.cpp.

bool KCodecAction::setCurrentCodec ( int  mib  ) 

Definition at line 238 of file kcodecaction.cpp.

bool KCodecAction::setCurrentCodec ( const QString &  codecName  ) 

Definition at line 228 of file kcodecaction.cpp.

bool KCodecAction::setCurrentCodec ( QTextCodec *  codec  ) 

Definition at line 196 of file kcodecaction.cpp.

void KCodecAction::triggered ( KEncodingDetector::AutoDetectScript   )  [signal]

Autodetection has been selected.

emits KEncodingDetector::SemiautomaticDetection if Default was selected.

Applicable only if showAutoOptions in c'tor was true

void KCodecAction::triggered ( const QString &   )  [signal]

Specific (proper) codec was selected.

Returns:
codec name

Reimplemented from KSelectAction.

void KCodecAction::triggered ( QTextCodec *  codec  )  [signal]

Specific (proper) codec was selected.


Property Documentation

int KCodecAction::codecMib [read]

Definition at line 44 of file kcodecaction.h.

QString KCodecAction::codecName [read, write]

Definition at line 43 of file kcodecaction.h.


The documentation for this class was generated from the following files:
  • kcodecaction.h
  • kcodecaction.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal