kate Library API Documentation

katesyntaxdocument.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org> 00003 Copyright (C) 2000 Scott Manson <sdmanson@alltel.net> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #ifndef __KATE_SYNTAXDOCUMENT_H__ 00021 #define __KATE_SYNTAXDOCUMENT_H__ 00022 00023 #include <qdom.h> 00024 #include <qptrlist.h> 00025 #include <qstringlist.h> 00026 00030 class KateSyntaxModeListItem 00031 { 00032 public: 00033 QString name; 00034 QString nameTranslated; 00035 QString section; 00036 QString mimetype; 00037 QString extension; 00038 QString identifier; 00039 QString version; 00040 QString priority; 00041 QString author; 00042 QString license; 00043 bool hidden; 00044 }; 00045 00049 typedef QPtrList<KateSyntaxModeListItem> KateSyntaxModeList; 00050 00054 class KateSyntaxContextData 00055 { 00056 public: 00057 QDomElement parent; 00058 QDomElement currentGroup; 00059 QDomElement item; 00060 }; 00061 00065 class KateSyntaxDocument : public QDomDocument 00066 { 00067 public: 00073 KateSyntaxDocument(bool force = false); 00074 00078 ~KateSyntaxDocument(); 00079 00086 bool setIdentifier(const QString& identifier); 00087 00092 KateSyntaxModeList modeList() { return myModeList; } 00093 00099 bool nextGroup(KateSyntaxContextData* data); 00100 00106 bool nextItem(KateSyntaxContextData* data); 00107 00111 QString groupItemData(const KateSyntaxContextData* data,const QString& name); 00112 QString groupData(const KateSyntaxContextData* data,const QString& name); 00113 00114 void freeGroupInfo(KateSyntaxContextData* data); 00115 KateSyntaxContextData* getSubItems(KateSyntaxContextData* data); 00116 00121 KateSyntaxContextData* getConfig(const QString& mainGroupName, const QString &config); 00122 00127 KateSyntaxContextData* getGroupInfo(const QString& mainGroupName, const QString &group); 00128 00132 QStringList& finddata(const QString& mainGroup,const QString& type,bool clearList=true); 00133 00134 private: 00139 void setupModeList(bool force); 00140 00145 bool getElement (QDomElement &element, const QString &mainGroupName, const QString &config); 00146 00150 KateSyntaxModeList myModeList; 00151 00155 QString currentFile; 00156 00160 QStringList m_data; 00161 }; 00162 00163 #endif 00164 00165 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.3.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sun Oct 17 11:35:13 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003