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

KDEUI

  • sources
  • kde-4.12
  • kdelibs
  • kdeui
  • actions
kcodecaction.h
Go to the documentation of this file.
1 /*
2  kcodecaction.h
3 
4  Copyright (c) 2003 Jason Keirstead <jason@keirstead.org>
5  Copyright (c) 2003-2006 Michel Hermier <michel.hermier@gmail.com>
6  Copyright (c) 2007 Nick Shaforostoff <shafff@ukr.net>
7 
8  ********************************************************************
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2 of the License, or (at your option) any later version. *
14  * *
15  * This library is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU Lesser General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU Lesser General Public *
21  * License along with this library; if not, write to the *
22  * Free Software Foundation, Inc., 51 Franklin Street, *
23  * Fifth Floor, Boston, MA 02110-1301 USA *
24  * *
25  ********************************************************************
26 */
27 #ifndef KCODECACTION_H
28 #define KCODECACTION_H
29 
30 #include <kencodingdetector.h>
31 #include <kselectaction.h>
32 
38 class KDEUI_EXPORT KCodecAction
39  : public KSelectAction
40 {
41  Q_OBJECT
42 
43  Q_PROPERTY(QString codecName READ currentCodecName WRITE setCurrentCodec)
44  Q_PROPERTY(int codecMib READ currentCodecMib)
45 
46 public:
47  explicit KCodecAction(QObject *parent,bool showAutoOptions=false);
48 
49  KCodecAction(const QString &text, QObject *parent,bool showAutoOptions=false);
50 
51  KCodecAction(const KIcon &icon, const QString &text, QObject *parent,bool showAutoOptions=false);
52 
53  virtual ~KCodecAction();
54 
55 public:
56  int mibForName(const QString &codecName, bool *ok = 0) const;
57  QTextCodec *codecForMib(int mib) const;
58 
59  QTextCodec *currentCodec() const;
60  bool setCurrentCodec(QTextCodec *codec);
61 
62  QString currentCodecName() const;
63  bool setCurrentCodec(const QString &codecName);
64 
65  int currentCodecMib() const;
66  bool setCurrentCodec(int mib);
67 
73  KEncodingDetector::AutoDetectScript currentAutoDetectScript() const;
79  bool setCurrentAutoDetectScript(KEncodingDetector::AutoDetectScript);
80 
81 
82 Q_SIGNALS:
88  void triggered(QTextCodec *codec);
89 
96  void triggered(KEncodingDetector::AutoDetectScript);
97 
101  void defaultItemTriggered();
102 
103 
104 protected Q_SLOTS:
105  virtual void actionTriggered(QAction*);
106 
107 protected:
108  using KSelectAction::triggered;
109 
110 private:
111  class Private;
112  Private* const d;
113 
114  Q_PRIVATE_SLOT( d, void _k_subActionTriggered(QAction*) )
115 };
116 
117 #endif
KEncodingDetector
QString
QObject
KSelectAction
Action for selecting one of several items.
Definition: kselectaction.h:51
kencodingdetector.h
KIcon
A wrapper around QIcon that provides KDE icon features.
Definition: kicon.h:40
KCodecAction
Action for selecting one of several QTextCodec.
Definition: kcodecaction.h:38
KStandardGuiItem::ok
KGuiItem ok()
Returns the 'Ok' gui item.
Definition: kstandardguiitem.cpp:107
kselectaction.h
QAction
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal