KDEUI
#include <kcodecaction.h>

Signals | |
void | defaultItemTriggered () |
void | triggered (const QString &text) |
void | triggered (int index) |
void | triggered (KEncodingDetector::AutoDetectScript) |
void | triggered (QAction *action) |
void | triggered (QTextCodec *codec) |
![]() | |
void | triggered (const QString &text) |
void | triggered (int index) |
void | triggered (QAction *action) |
![]() | |
void | authorized (KAuth::Action *action) |
void | globalShortcutChanged (const QKeySequence &) |
void | triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) |
Public Member Functions | |
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) | |
virtual | ~KCodecAction () |
QTextCodec * | codecForMib (int mib) const |
KEncodingDetector::AutoDetectScript | currentAutoDetectScript () const |
QTextCodec * | currentCodec () const |
int | currentCodecMib () const |
QString | currentCodecName () const |
int | mibForName (const QString &codecName, bool *ok=0) const |
bool | setCurrentAutoDetectScript (KEncodingDetector::AutoDetectScript) |
bool | setCurrentCodec (const QString &codecName) |
bool | setCurrentCodec (int mib) |
bool | setCurrentCodec (QTextCodec *codec) |
![]() | |
KSelectAction (const KIcon &icon, const QString &text, QObject *parent) | |
KSelectAction (const QString &text, QObject *parent) | |
KSelectAction (QObject *parent) | |
virtual | ~KSelectAction () |
QAction * | action (const QString &text, Qt::CaseSensitivity cs=Qt::CaseSensitive) const |
QAction * | action (int index) const |
QList< QAction * > | actions () const |
KAction * | addAction (const KIcon &icon, const QString &text) |
KAction * | addAction (const QString &text) |
virtual void | addAction (QAction *action) |
void | changeItem (int index, const QString &text) |
void | clear () |
int | comboWidth () const |
QAction * | currentAction () const |
int | currentItem () const |
QString | currentText () const |
bool | isEditable () const |
QStringList | items () const |
bool | menuAccelsEnabled () const |
virtual QAction * | removeAction (QAction *action) |
void | removeAllActions () |
QActionGroup * | selectableActionGroup () const |
void | setComboWidth (int width) |
bool | setCurrentAction (const QString &text, Qt::CaseSensitivity cs=Qt::CaseSensitive) |
bool | setCurrentAction (QAction *action) |
bool | setCurrentItem (int index) |
void | setEditable (bool) |
void | setItems (const QStringList &lst) |
void | setMaxComboViewCount (int n) |
void | setMenuAccelsEnabled (bool b) |
void | setToolBarMode (ToolBarMode mode) |
void | setToolButtonPopupMode (QToolButton::ToolButtonPopupMode mode) |
ToolBarMode | toolBarMode () const |
QToolButton::ToolButtonPopupMode | toolButtonPopupMode () const |
![]() | |
KAction (const KIcon &icon, const QString &text, QObject *parent) | |
KAction (const QString &text, QObject *parent) | |
KAction (QObject *parent) | |
virtual | ~KAction () |
KAuth::Action * | authAction () const |
bool | event (QEvent *) |
void | forgetGlobalShortcut () |
const KShortcut & | globalShortcut (ShortcutTypes type=ActiveShortcut) const |
bool | globalShortcutAllowed () const |
bool | isGlobalShortcutEnabled () const |
bool | isShortcutConfigurable () const |
KRockerGesture | rockerGesture (ShortcutTypes type=ActiveShortcut) const |
void | setAuthAction (const QString &actionName) |
void | setAuthAction (KAuth::Action *action) |
void | setGlobalShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut), GlobalShortcutLoading loading=Autoloading) |
void | setGlobalShortcutAllowed (bool allowed, GlobalShortcutLoading loading=Autoloading) |
void | setHelpText (const QString &text) |
void | setRockerGesture (const KRockerGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut)) |
void | setShapeGesture (const KShapeGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut)) |
void | setShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut)) |
void | setShortcut (const QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut)) |
void | setShortcutConfigurable (bool configurable) |
void | setShortcuts (const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut)) |
KShapeGesture | shapeGesture (ShortcutTypes type=ActiveShortcut) const |
KShortcut | shortcut (ShortcutTypes types=ActiveShortcut) const |
Protected Slots | |
virtual void | actionTriggered (QAction *) |
![]() | |
virtual void | actionTriggered (QAction *action) |
void | slotToggled (bool) |
Properties | |
int | codecMib |
QString | codecName |
![]() | |
int | comboWidth |
QAction * | currentAction |
int | currentItem |
QString | currentText |
bool | editable |
QStringList | items |
ToolBarMode | toolBarMode |
QToolButton::ToolButtonPopupMode | toolButtonPopupMode |
![]() | |
KShortcut | globalShortcut |
bool | globalShortcutAllowed |
bool | globalShortcutEnabled |
KShortcut | shortcut |
bool | shortcutConfigurable |
Additional Inherited Members | |
![]() | |
enum | ToolBarMode { MenuMode , ComboBoxMode } |
![]() | |
enum | GlobalShortcutLoading { Autoloading = 0x0 , NoAutoloading = 0x4 } |
enum | ShortcutType { ActiveShortcut = 0x1 , DefaultShortcut = 0x2 } |
![]() | |
KSelectAction (KSelectActionPrivate &dd, QObject *parent) | |
virtual QWidget * | createWidget (QWidget *parent) |
virtual void | deleteWidget (QWidget *widget) |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
![]() | |
KSelectActionPrivate * | d_ptr |
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() [1/3]
|
explicit |
Definition at line 62 of file kcodecaction.cpp.
◆ KCodecAction() [2/3]
KCodecAction::KCodecAction | ( | const QString & | text, |
QObject * | parent, | ||
bool | showAutoOptions = false |
||
) |
Definition at line 69 of file kcodecaction.cpp.
◆ KCodecAction() [3/3]
KCodecAction::KCodecAction | ( | const KIcon & | icon, |
const QString & | text, | ||
QObject * | parent, | ||
bool | showAutoOptions = false |
||
) |
Definition at line 76 of file kcodecaction.cpp.
◆ ~KCodecAction()
|
virtual |
Definition at line 83 of file kcodecaction.cpp.
Member Function Documentation
◆ actionTriggered
|
protectedvirtualslot |
Definition at line 161 of file kcodecaction.cpp.
◆ codecForMib()
QTextCodec * KCodecAction::codecForMib | ( | int | mib | ) | const |
Definition at line 150 of file kcodecaction.cpp.
◆ currentAutoDetectScript()
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.
◆ currentCodec()
QTextCodec * KCodecAction::currentCodec | ( | ) | const |
Definition at line 191 of file kcodecaction.cpp.
◆ currentCodecMib()
int KCodecAction::currentCodecMib | ( | ) | const |
Definition at line 233 of file kcodecaction.cpp.
◆ currentCodecName()
QString KCodecAction::currentCodecName | ( | ) | const |
Definition at line 223 of file kcodecaction.cpp.
◆ defaultItemTriggered
|
signal |
If showAutoOptions==true, then better handle triggered(KEncodingDetector::AutoDetectScript) signal.
◆ mibForName()
int KCodecAction::mibForName | ( | const QString & | codecName, |
bool * | ok = 0 |
||
) | const |
Definition at line 117 of file kcodecaction.cpp.
◆ setCurrentAutoDetectScript()
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.
◆ setCurrentCodec() [1/3]
bool KCodecAction::setCurrentCodec | ( | const QString & | codecName | ) |
Definition at line 228 of file kcodecaction.cpp.
◆ setCurrentCodec() [2/3]
bool KCodecAction::setCurrentCodec | ( | int | mib | ) |
Definition at line 238 of file kcodecaction.cpp.
◆ setCurrentCodec() [3/3]
bool KCodecAction::setCurrentCodec | ( | QTextCodec * | codec | ) |
Definition at line 196 of file kcodecaction.cpp.
◆ triggered [1/5]
|
protectedsignal |
This signal is emitted when an item is selected;.
- Parameters
-
text indicates the item selected.
◆ triggered [2/5]
|
protectedsignal |
This signal is emitted when an item is selected;.
- Parameters
-
index indicates the item selected.
◆ triggered [3/5]
|
signal |
Autodetection has been selected.
emits KEncodingDetector::SemiautomaticDetection if Default was selected.
Applicable only if showAutoOptions in c'tor was true
◆ triggered [4/5]
|
protectedsignal |
This signal is emitted when an item is selected;.
- Parameters
-
action indicates the item selected.
◆ triggered [5/5]
|
signal |
Specific (proper) codec was selected.
Note that triggered(const QString&) is emitted too (as defined in KSelectAction)
Property Documentation
◆ codecMib
|
read |
Definition at line 1 of file kcodecaction.h.
◆ codecName
|
readwrite |
Definition at line 1 of file kcodecaction.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.