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

Kate

insanehtmlplugin_le.h

Go to the documentation of this file.
00001 /* 
00002 Copyright (C) 2010 Joseph Wenninger <jowenn@kde.org>
00003 
00004 Redistribution and use in source and binary forms, with or without
00005 modification, are permitted provided that the following conditions
00006 are met:
00007 
00008 1. Redistributions of source code must retain the above copyright
00009    notice, this list of conditions and the following disclaimer.
00010 2. Redistributions in binary form must reproduce the above copyright
00011    notice, this list of conditions and the following disclaimer in the
00012    documentation and/or other materials provided with the distribution.
00013 
00014 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00015 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00016 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00017 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00018 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00019 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00020 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00021 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00022 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00023 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00024 */
00025 
00026 #ifndef INSANE_HTML_PLUGIN_H
00027 #define INSANE_HTML_PLUGIN_H
00028 
00029 #include <ktexteditor/plugin.h>
00030 #include <kxmlguiclient.h>
00031 #include <ktexteditor/view.h>
00032 #include <QMap>
00033 
00034 class InsaneHTMLPluginLEView: public QObject, public KXMLGUIClient {
00035   Q_OBJECT
00036 public:
00037   InsaneHTMLPluginLEView(QObject *parent, KTextEditor::View *view);
00038   virtual ~InsaneHTMLPluginLEView();
00039 public Q_SLOTS:
00040   void expand();
00041 private:
00042   KTextEditor::View *m_view;
00043   QStringList m_emptyTags;
00044   QMultiMap<QString,QString> m_defaultAttributes;
00045   int find_region_start(int cursor_x, const QString& line, int * filtercount);
00046   int find_region_end(int cursor_x, const QString& line, int * filtercount);
00047   QStringList parse(const QString& input, int offset, int *newOffset=0);
00048   QString parseIdentifier(const QString& input, int *offset,bool firstDigit=false);
00049   int parseNumber(const QString& input, int *offset);
00050   void apply_filter_e(QStringList *lines);
00051   void apply_filter_c(QStringList *lines);
00052 };
00053 
00054 class InsaneHTMLPluginLE: public KTextEditor::Plugin {
00055   Q_OBJECT
00056 public:
00057   InsaneHTMLPluginLE(QObject *parent, const QList<QVariant> data=QList<QVariant>());
00058   virtual ~InsaneHTMLPluginLE(){}
00059   virtual void addView (KTextEditor::View *view);
00060   virtual void removeView (KTextEditor::View *view);
00061 private:
00062   QMap<KTextEditor::View*,InsaneHTMLPluginLEView*> m_map;
00063 };
00064 #endif
00065 
00066 // kate: space-indent on; indent-width 2; replace-tabs on;

Kate

Skip menu "Kate"
  • Main Page
  • 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
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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