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

KDEUI

krichtextwidget.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002 
00003    Copyright 2008 Stephen Kelly <steveire@gmail.com>
00004    Copyright 2008 Thomas McGuire <thomas.mcguire@gmx.net>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018    Boston, MA 02110-1301, USA.
00019 */
00020 #ifndef KRICHTEXTWIDGET_H
00021 #define KRICHTEXTWIDGET_H
00022 
00023 #include "krichtextedit.h"
00024 
00025 class KActionCollection;
00026 
00043 class KDEUI_EXPORT KRichTextWidget : public KRichTextEdit
00044 {
00045     Q_OBJECT
00046 public:
00047 
00052     enum RichTextSupportValues {
00057         DisableRichText = 0x00,
00058 
00065         SupportBold = 0x01,
00066 
00073         SupportItalic = 0x02,
00074 
00081         SupportUnderline = 0x04,
00082 
00089         SupportStrikeOut = 0x08,
00090 
00099         SupportFontFamily = 0x10,
00100 
00108         SupportFontSize = 0x20,
00109 
00116         SupportTextForegroundColor = 0x40,
00117 
00124         SupportTextBackgroundColor = 0x80,
00125 
00130         FullTextFormattingSupport = 0xff,
00131 
00139         SupportChangeListStyle = 0x100,
00140 
00145         SupportIndentLists = 0x200,
00146 
00150         SupportDedentLists = 0x400,
00151 
00156         FullListSupport = 0xf00,
00157 
00158 // Not implemented yet.
00159 //         SupportCreateTables = 0x1000,
00160 //         SupportChangeCellMargin = 0x2000,
00161 //         SupportChangeCellPadding = 0x4000,
00162 //         SupportChangeTableBorderWidth = 0x8000,
00163 //         SupportChangeTableBorderColor = 0x10000,
00164 //         SupportChangeTableBorderStyle = 0x20000,
00165 //         SupportChangeCellBackground = 0x40000,
00166 //         SupportCellFillPatterns = 0x80000,
00167 //
00168 //         FullTableSupport = 0xff000,
00169 
00175         SupportAlignment = 0x100000,
00176 
00177         // Not yet implemented SupportImages = 0x200000,
00178 
00182         SupportRuleLine = 0x400000,
00183 
00189         SupportHyperlinks = 0x800000,
00190 
00196         SupportFormatPainting = 0x1000000,
00197 
00202         SupportToPlainText = 0x2000000,
00203 
00210          SupportSuperScriptAndSubScript = 0x4000000,
00211 
00212 //         SupportChangeParagraphSpacing = 0x200000,
00213 
00217         FullSupport = 0xffffffff
00218     };
00219     Q_DECLARE_FLAGS(RichTextSupport, RichTextSupportValues)
00220 
00221     
00225     explicit KRichTextWidget(QWidget *parent);
00226 
00234     explicit KRichTextWidget(const QString& text, QWidget *parent = 0);
00235 
00239     ~KRichTextWidget();
00240 
00283     virtual void createActions(KActionCollection *actionCollection);
00284 
00295     void setRichTextSupport(const KRichTextWidget::RichTextSupport &support);
00296 
00301     RichTextSupport richTextSupport() const;
00302 
00311     void updateActionStates();
00312 
00313 public Q_SLOTS:
00314 
00322     void setActionsEnabled(bool enabled);
00323 
00324 protected:
00329     virtual void mouseReleaseEvent(QMouseEvent *event);
00330 
00331 
00332 private:
00333     //@cond PRIVATE
00334     class Private;
00335     friend class Private;
00336     Private *const d;
00337     Q_PRIVATE_SLOT(d, void _k_setTextForegroundColor())
00338     Q_PRIVATE_SLOT(d, void _k_setTextBackgroundColor())
00339     Q_PRIVATE_SLOT(d, void _k_manageLink())
00340     Q_PRIVATE_SLOT(d, void _k_formatPainter(bool))
00341     Q_PRIVATE_SLOT(d, void _k_updateCharFormatActions(const QTextCharFormat &))
00342     Q_PRIVATE_SLOT(d, void _k_updateMiscActions())
00343     Q_PRIVATE_SLOT(d, void _k_setListStyle(int))
00344     //@endcond
00345 };
00346 
00347 Q_DECLARE_OPERATORS_FOR_FLAGS(KRichTextWidget::RichTextSupport)
00348 
00349 #endif
00350 
00351 // kate: space-indent on; indent-width 4; encoding utf-8; replace-tabs on;

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