/* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 { TQ_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 TQtDesignerIntegration 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 TQString &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 TQString &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 TQString &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 TQString &formName, const TQString &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 TQString &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 TQString& fileName); /**Emitted when a file has been removed from the memory symbol store.*/ void removedSourceInfo(const TQString& fileName); /**Emitted when a file has been added to the memory symbol store.*/ void addedSourceInfo( const TQString& fileName ); /**Emitted when the language part changes the Split View orientation.*/ void splitOrientationChanged( TQt::Orientation orientation ); }; #endif