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

KDEUI

kcodecaction.h

Go to the documentation of this file.
00001 /*
00002    kcodecaction.h
00003 
00004     Copyright (c) 2003      Jason Keirstead   <jason@keirstead.org>
00005     Copyright (c) 2003-2006 Michel Hermier    <michel.hermier@gmail.com>
00006     Copyright (c) 2007      Nick Shaforostoff <shafff@ukr.net>
00007 
00008     ********************************************************************
00009     *                                                                  *
00010     * This library is free software; you can redistribute it and/or    *
00011     * modify it under the terms of the GNU Lesser General Public       *
00012     * License as published by the Free Software Foundation; either     *
00013     * version 2 of the License, or (at your option) any later version. *
00014     *                                                                  *
00015     * This library is distributed in the hope that it will be useful,  *
00016     * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00017     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00018     * GNU Lesser General Public License for more details.              *
00019     *                                                                  *
00020     * You should have received a copy of the GNU Lesser General Public *
00021     * License along with this library; if not, write to the            *
00022     * Free Software Foundation, Inc., 51 Franklin Street,              *
00023     * Fifth Floor, Boston, MA  02110-1301  USA                         *
00024     *                                                                  *
00025     ********************************************************************
00026 */
00027 #ifndef KCODECACTION_H
00028 #define KCODECACTION_H
00029 
00030 #include <kencodingdetector.h>
00031 #include <kselectaction.h>
00032 
00038 class KDEUI_EXPORT KCodecAction
00039     : public KSelectAction
00040 {
00041     Q_OBJECT
00042 
00043     Q_PROPERTY(QString codecName READ currentCodecName WRITE setCurrentCodec)
00044     Q_PROPERTY(int codecMib READ currentCodecMib)
00045 
00046 public:
00047     explicit KCodecAction(QObject *parent,bool showAutoOptions=false);
00048 
00049     KCodecAction(const QString &text, QObject *parent,bool showAutoOptions=false);
00050 
00051     KCodecAction(const KIcon &icon, const QString &text, QObject *parent,bool showAutoOptions=false);
00052 
00053     virtual ~KCodecAction();
00054 
00055 public:
00056         int mibForName(const QString &codecName, bool *ok = 0) const;
00057         QTextCodec *codecForMib(int mib) const;
00058 
00059     QTextCodec *currentCodec() const;
00060     bool setCurrentCodec(QTextCodec *codec);
00061 
00062     QString currentCodecName() const;
00063     bool setCurrentCodec(const QString &codecName);
00064 
00065     int currentCodecMib() const;
00066     bool setCurrentCodec(int mib);
00067 
00073     KEncodingDetector::AutoDetectScript currentAutoDetectScript() const;
00079     bool setCurrentAutoDetectScript(KEncodingDetector::AutoDetectScript);
00080 
00081 
00082 Q_SIGNALS:
00086     void triggered(QTextCodec *codec);
00087 
00093         void triggered(const QString&);
00094 
00101         void triggered(KEncodingDetector::AutoDetectScript);
00102 
00106         void defaultItemTriggered();
00107 
00108 
00109 protected Q_SLOTS:
00110     virtual void actionTriggered(QAction*);
00111 
00112 private:
00113     class Private;
00114     Private* const d;
00115 
00116     Q_PRIVATE_SLOT( d, void _k_subActionTriggered(QAction*) )
00117 };
00118 
00119 #endif

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