From 114a878c64ce6f8223cfd22d76a20eb16d177e5e Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/interfaces/kdevlanguagesupport.h | 260 +++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 lib/interfaces/kdevlanguagesupport.h (limited to 'lib/interfaces/kdevlanguagesupport.h') diff --git a/lib/interfaces/kdevlanguagesupport.h b/lib/interfaces/kdevlanguagesupport.h new file mode 100644 index 00000000..06be2f26 --- /dev/null +++ b/lib/interfaces/kdevlanguagesupport.h @@ -0,0 +1,260 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003-2004 Alexander Dymo + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ +#ifndef KDEVLANGUAGESUPPORT_H +#define KDEVLANGUAGESUPPORT_H + +#include +#include +#include +#include "kdevplugin.h" +#include "codemodel.h" +#include + +/** +@file kdevlanguagesupport.h +Interface to programming language specific features. +*/ + +class Tag; +class KDevDesignerIntegration; + +using namespace KInterfaceDesigner; + +/** +KDevelop language support interface - the base class for all programming language support plugins. +Language support is used to load facilities specific to certain programming language. +Language supports are usually loaded among with a project. In this case project file defines +which language support to load. + +Language support plugin is a good place for: +- a language parser which fills memory and persistent symbol store +(see @ref CodeModel and @ref KDevCodeRepository); +- code wizards specific to a programming language (like new class wizard); +- GUI designer integration (see @ref KDevLanguageSupport::designer method +documentation and @ref KDevDesignerIntegration class documentation; +- symbol (class, function, etc.) name formatting to a human-readable convention (pretty +formatted name). +. +*/ +class KDevLanguageSupport: public KDevPlugin +{ + Q_OBJECT + +public: + + /**Features supported by this language support.*/ + enum Features { + /*features of the language itself*/ + Classes=1 /**loadSettings(*project()->projectDom(), "kdevmylangsupport/designerintegration"); + saveDesignerToCache(type, des); + } + break; + } + return des; + @endcode + @ref ImplementationWidget and @ref QtDesignerIntegration classes are available + from designerintegration support library. + @param type The type of the designer to integrate. + @return The pointer to designer integration of given type or 0.*/ + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + +public slots: + /**Adds a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to implement (add).*/ + void addFunction(DesignerType type, const QString &formName, Function function); + + /**Removes a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to remove.*/ + void removeFunction(DesignerType type, const QString &formName, Function function); + + /**Edits a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param oldFunction The old function signature before editing. + @param function The new function signature after editing.*/ + void editFunction(DesignerType type, const QString &formName, Function oldFunction, Function function); + + /**Opens a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param functionName The name of a function to seek in the code for.*/ + void openFunction(DesignerType type, const QString &formName, const QString &functionName); + + /**Opens a form source requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form.*/ + void openSource(DesignerType type, const QString &formName); + +signals: + /**Emitted when the content of the memory symbol store has been modified.*/ + void updatedSourceInfo(); + + /**Emitted before removing the file from the memory symbol store.*/ + void aboutToRemoveSourceInfo(const QString& fileName); + + /**Emitted when a file has been removed from the memory symbol store.*/ + void removedSourceInfo(const QString& fileName); + + /**Emitted when a file has been added to the memory symbol store.*/ + void addedSourceInfo( const QString& fileName ); + + /**Emitted when the language part changes the Split View orientation.*/ + void splitOrientationChanged( Qt::Orientation orientation ); +}; + +#endif -- cgit v1.2.3