From 6392f5a9dfce2bf83617d49bb7f332181ec6004e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 25 May 2014 15:37:31 +0900 Subject: Revert "Finish renaming tdevelop components" This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73. --- lib/interfaces/extensions/CMakeLists.txt | 20 +- lib/interfaces/extensions/Mainpage.dox | 10 +- lib/interfaces/extensions/Makefile.am | 18 +- lib/interfaces/extensions/codebrowserfrontend.h | 8 +- lib/interfaces/extensions/dcop/CMakeLists.txt | 10 +- .../extensions/dcop/KDevAppFrontendIface.cpp | 76 +++++++ .../extensions/dcop/KDevAppFrontendIface.h | 52 +++++ .../extensions/dcop/KDevMakeFrontendIface.cpp | 46 ++++ .../extensions/dcop/KDevMakeFrontendIface.h | 45 ++++ lib/interfaces/extensions/dcop/Makefile.am | 10 +- .../extensions/dcop/TDevAppFrontendIface.cpp | 76 ------- .../extensions/dcop/TDevAppFrontendIface.h | 52 ----- .../extensions/dcop/TDevMakeFrontendIface.cpp | 46 ---- .../extensions/dcop/TDevMakeFrontendIface.h | 45 ---- lib/interfaces/extensions/kdevappfrontend.cpp | 2 + lib/interfaces/extensions/kdevappfrontend.h | 116 ++++++++++ lib/interfaces/extensions/kdevcreatefile.h | 146 +++++++++++++ lib/interfaces/extensions/kdevdifffrontend.cpp | 33 +++ lib/interfaces/extensions/kdevdifffrontend.h | 79 +++++++ lib/interfaces/extensions/kdevmakefrontend.cpp | 2 + lib/interfaces/extensions/kdevmakefrontend.h | 107 +++++++++ lib/interfaces/extensions/kdevquickopen.h | 130 +++++++++++ lib/interfaces/extensions/kdevsourceformatter.h | 69 ++++++ lib/interfaces/extensions/kdevversioncontrol.h | 239 +++++++++++++++++++++ lib/interfaces/extensions/tdevappfrontend.cpp | 2 - lib/interfaces/extensions/tdevappfrontend.h | 116 ---------- lib/interfaces/extensions/tdevcreatefile.h | 146 ------------- lib/interfaces/extensions/tdevdifffrontend.cpp | 33 --- lib/interfaces/extensions/tdevdifffrontend.h | 79 ------- lib/interfaces/extensions/tdevmakefrontend.cpp | 2 - lib/interfaces/extensions/tdevmakefrontend.h | 107 --------- lib/interfaces/extensions/tdevquickopen.h | 130 ----------- lib/interfaces/extensions/tdevsourceformatter.h | 69 ------ lib/interfaces/extensions/tdevversioncontrol.h | 239 --------------------- 34 files changed, 1180 insertions(+), 1180 deletions(-) create mode 100644 lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp create mode 100644 lib/interfaces/extensions/dcop/KDevAppFrontendIface.h create mode 100644 lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp create mode 100644 lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h delete mode 100644 lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp delete mode 100644 lib/interfaces/extensions/dcop/TDevAppFrontendIface.h delete mode 100644 lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp delete mode 100644 lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h create mode 100644 lib/interfaces/extensions/kdevappfrontend.cpp create mode 100644 lib/interfaces/extensions/kdevappfrontend.h create mode 100644 lib/interfaces/extensions/kdevcreatefile.h create mode 100644 lib/interfaces/extensions/kdevdifffrontend.cpp create mode 100644 lib/interfaces/extensions/kdevdifffrontend.h create mode 100644 lib/interfaces/extensions/kdevmakefrontend.cpp create mode 100644 lib/interfaces/extensions/kdevmakefrontend.h create mode 100644 lib/interfaces/extensions/kdevquickopen.h create mode 100644 lib/interfaces/extensions/kdevsourceformatter.h create mode 100644 lib/interfaces/extensions/kdevversioncontrol.h delete mode 100644 lib/interfaces/extensions/tdevappfrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevappfrontend.h delete mode 100644 lib/interfaces/extensions/tdevcreatefile.h delete mode 100644 lib/interfaces/extensions/tdevdifffrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevdifffrontend.h delete mode 100644 lib/interfaces/extensions/tdevmakefrontend.cpp delete mode 100644 lib/interfaces/extensions/tdevmakefrontend.h delete mode 100644 lib/interfaces/extensions/tdevquickopen.h delete mode 100644 lib/interfaces/extensions/tdevsourceformatter.h delete mode 100644 lib/interfaces/extensions/tdevversioncontrol.h (limited to 'lib/interfaces/extensions') diff --git a/lib/interfaces/extensions/CMakeLists.txt b/lib/interfaces/extensions/CMakeLists.txt index cf5514be..459c1197 100644 --- a/lib/interfaces/extensions/CMakeLists.txt +++ b/lib/interfaces/extensions/CMakeLists.txt @@ -22,9 +22,9 @@ include_directories( ##### headers ################################### install( FILES - codebrowserfrontend.h tdevappfrontend.h tdevcreatefile.h - tdevdifffrontend.h tdevmakefrontend.h tdevquickopen.h - tdevsourceformatter.h tdevversioncontrol.h + codebrowserfrontend.h kdevappfrontend.h kdevcreatefile.h + kdevdifffrontend.h kdevmakefrontend.h kdevquickopen.h + kdevsourceformatter.h kdevversioncontrol.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extensions ) install( FILES @@ -35,20 +35,20 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevextensions (static) ################### +##### kdevextensions (static) ################### add_custom_command( OUTPUT codebrowserfrontend.moc.cpp COMMAND ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h -o codebrowserfrontend.moc.cpp DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/codebrowserfrontend.h ) -add_custom_command( OUTPUT tdevversioncontrol.moc.cpp +add_custom_command( OUTPUT kdevversioncontrol.moc.cpp COMMAND - ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tdevversioncontrol.h -o tdevversioncontrol.moc.cpp - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tdevversioncontrol.h ) + ${TMOC_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h -o kdevversioncontrol.moc.cpp + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kdevversioncontrol.h ) -tde_add_library( tdevextensions STATIC_PIC AUTOMOC +tde_add_library( kdevextensions STATIC_PIC AUTOMOC SOURCES - tdevappfrontend.cpp tdevappfrontend.cpp tdevmakefrontend.cpp - codebrowserfrontend.moc.cpp tdevversioncontrol.moc.cpp + kdevappfrontend.cpp kdevappfrontend.cpp kdevmakefrontend.cpp + codebrowserfrontend.moc.cpp kdevversioncontrol.moc.cpp ) diff --git a/lib/interfaces/extensions/Mainpage.dox b/lib/interfaces/extensions/Mainpage.dox index 37c72c16..3b493fde 100644 --- a/lib/interfaces/extensions/Mainpage.dox +++ b/lib/interfaces/extensions/Mainpage.dox @@ -10,8 +10,8 @@ This library contains extension interfaces used by TDevelop plugin architecture. \section whatisextension What is the TDevelop extension Extension is a TDevelop plugin which implements one of extension interfaces. -Extension is usually not important enough to be returned by @ref TDevApi and @ref TDevPlugin -methods. Therefore extension instance can be obtained by @ref TDevPlugin::extension method. +Extension is usually not important enough to be returned by @ref KDevApi and @ref KDevPlugin +methods. Therefore extension instance can be obtained by @ref KDevPlugin::extension method. Note: extension plugins can be either core, global and project plugins. They are loaded in the same way other plugins are. But extensions differ from usual plugins. @@ -36,10 +36,10 @@ those should be loaded at a time. This can be accomplished by: @endcode - Define an abstract base class for an extension like: @code - class KDevMyExtension: public TDevPlugin { + class KDevMyExtension: public KDevPlugin { public: - KDevMyExtension(const TDevPluginInfo *info, QObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} + KDevMyExtension(const KDevPluginInfo *info, QObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} virtual void doSomething() = 0; }; diff --git a/lib/interfaces/extensions/Makefile.am b/lib/interfaces/extensions/Makefile.am index 55f4d774..a6d00bc2 100644 --- a/lib/interfaces/extensions/Makefile.am +++ b/lib/interfaces/extensions/Makefile.am @@ -1,7 +1,7 @@ tdevelopincludeextdir = $(includedir)/tdevelop/interfaces/extensions -tdevelopincludeext_HEADERS = codebrowserfrontend.h tdevappfrontend.h \ - tdevcreatefile.h tdevdifffrontend.h tdevmakefrontend.h tdevquickopen.h \ - tdevsourceformatter.h tdevversioncontrol.h +tdevelopincludeext_HEADERS = codebrowserfrontend.h kdevappfrontend.h \ + kdevcreatefile.h kdevdifffrontend.h kdevmakefrontend.h kdevquickopen.h \ + kdevsourceformatter.h kdevversioncontrol.h servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdevelopappfrontend.desktop \ @@ -10,14 +10,14 @@ servicetype_DATA = tdevelopappfrontend.desktop \ tdevelopversioncontrol.desktop SUBDIRS = dcop -libtdevextensions_la_LDFLAGS = $(all_libraries) -noinst_LTLIBRARIES = libtdevextensions.la -libtdevextensions_la_SOURCES = tdevappfrontend.cpp tdevmakefrontend.cpp +libkdevextensions_la_LDFLAGS = $(all_libraries) +noinst_LTLIBRARIES = libkdevextensions.la +libkdevextensions_la_SOURCES = kdevappfrontend.cpp kdevmakefrontend.cpp INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Extension Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Extension Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../../Doxyfile.am noinst_HEADERS = codebrowserfrontend.h diff --git a/lib/interfaces/extensions/codebrowserfrontend.h b/lib/interfaces/extensions/codebrowserfrontend.h index 68c4e90f..e8158fe4 100644 --- a/lib/interfaces/extensions/codebrowserfrontend.h +++ b/lib/interfaces/extensions/codebrowserfrontend.h @@ -20,18 +20,18 @@ #define CODEBROWSERRONTEND_H -#include +#include #include namespace Extensions { -class TDevCodeBrowserFrontend : public TDevPlugin { +class KDevCodeBrowserFrontend : public KDevPlugin { Q_OBJECT public: - TDevCodeBrowserFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "CodeBrowserFrontend") {} + KDevCodeBrowserFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "CodeBrowserFrontend") {} ///Used by the quickopen-plugin to notify extensions that it jumped to a searched item virtual bool jumpedToItem( ItemDom item ) = 0; diff --git a/lib/interfaces/extensions/dcop/CMakeLists.txt b/lib/interfaces/extensions/dcop/CMakeLists.txt index 8658d320..b6255fc6 100644 --- a/lib/interfaces/extensions/dcop/CMakeLists.txt +++ b/lib/interfaces/extensions/dcop/CMakeLists.txt @@ -21,14 +21,14 @@ include_directories( ##### headers ################################### install( FILES - TDevAppFrontendIface.h TDevMakeFrontendIface.h + KDevAppFrontendIface.h KDevMakeFrontendIface.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extensions/dcop ) -##### tdevdcopextensions (static) ############### +##### kdevdcopextensions (static) ############### -tde_add_library( tdevdcopextensions STATIC_PIC +tde_add_library( kdevdcopextensions STATIC_PIC SOURCES - TDevAppFrontendIface.cpp TDevMakeFrontendIface.cpp - TDevAppFrontendIface.skel TDevMakeFrontendIface.skel + KDevAppFrontendIface.cpp KDevMakeFrontendIface.cpp + KDevAppFrontendIface.skel KDevMakeFrontendIface.skel ) diff --git a/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp new file mode 100644 index 00000000..1eca4bfc --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.cpp @@ -0,0 +1,76 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Amilcar do Carmo Lucas + + 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. +*/ +#include "KDevAppFrontendIface.h" +#include "kdevappfrontend.h" + + +KDevAppFrontendIface::KDevAppFrontendIface(KDevAppFrontend *appFrontend) + : DCOPObject("KDevAppFrontend"), m_appFrontend(appFrontend) +{ +} + + +KDevAppFrontendIface::~KDevAppFrontendIface() +{} + + +void KDevAppFrontendIface::startAppCommand(const TQString &directory, const TQString &command, bool inTerminal) +{ + m_appFrontend->startAppCommand(directory, command, inTerminal); +} + +void KDevAppFrontendIface::stopApplication( ) +{ + m_appFrontend->stopApplication(); +} + +bool KDevAppFrontendIface::isRunning( ) +{ + return m_appFrontend->isRunning(); +} + +void KDevAppFrontendIface::clearView( ) +{ + m_appFrontend->clearView(); +} + +void KDevAppFrontendIface::insertStderrLine( const TQCString & line ) +{ + m_appFrontend->insertStderrLine(line); +} + +void KDevAppFrontendIface::insertStdoutLine( const TQCString & line ) +{ + m_appFrontend->insertStdoutLine(line); +} + +void KDevAppFrontendIface::addPartialStderrLine( const TQCString& line ) +{ + m_appFrontend->addPartialStderrLine(line); +} + +void KDevAppFrontendIface::addPartialStdoutLine( const TQCString& line ) +{ + m_appFrontend->addPartialStdoutLine(line); +} diff --git a/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h new file mode 100644 index 00000000..3903e897 --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevAppFrontendIface.h @@ -0,0 +1,52 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Roberto Raggi + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Amilcar do Carmo Lucas + + 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 _KDEVAPPFRONTENDIFACE_H_ +#define _KDEVAPPFRONTENDIFACE_H_ + +#include + +class KDevAppFrontend; + +class KDevAppFrontendIface : public DCOPObject +{ + K_DCOP + +public: + + KDevAppFrontendIface( KDevAppFrontend *appFrontend ); + ~KDevAppFrontendIface(); + +k_dcop: + void startAppCommand(const TQString &directory, const TQString &command, bool inTerminal); + void stopApplication(); + bool isRunning(); + void clearView(); + void insertStderrLine(const TQCString &line); + void insertStdoutLine(const TQCString &line); + void addPartialStderrLine(const TQCString &line); + void addPartialStdoutLine(const TQCString &line); + +private: + KDevAppFrontend *m_appFrontend; +}; + +#endif diff --git a/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp new file mode 100644 index 00000000..73305e4a --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.cpp @@ -0,0 +1,46 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2002 Roberto Raggi + + 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. +*/ +#include "KDevMakeFrontendIface.h" +#include "kdevmakefrontend.h" + + +KDevMakeFrontendIface::KDevMakeFrontendIface(KDevMakeFrontend *makeFrontend) + : DCOPObject("KDevMakeFrontend") +{ + m_makeFrontend = makeFrontend; +} + + +KDevMakeFrontendIface::~KDevMakeFrontendIface() +{} + + +void KDevMakeFrontendIface::queueCommand(const TQString &dir, const TQString &command) +{ + m_makeFrontend->queueCommand(dir, command); +} + +bool KDevMakeFrontendIface::isRunning( ) +{ + return m_makeFrontend->isRunning(); +} diff --git a/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h new file mode 100644 index 00000000..53217359 --- /dev/null +++ b/lib/interfaces/extensions/dcop/KDevMakeFrontendIface.h @@ -0,0 +1,45 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2002 Roberto Raggi + + 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 _KDEVMAKEFRONTENDIFACE_H_ +#define _KDEVMAKEFRONTENDIFACE_H_ + +#include + +class KDevMakeFrontend; + +class KDevMakeFrontendIface : public DCOPObject +{ + K_DCOP + +public: + + KDevMakeFrontendIface( KDevMakeFrontend *makeFrontend ); + ~KDevMakeFrontendIface(); + +k_dcop: + void queueCommand(const TQString &dir, const TQString &command); + bool isRunning(); + +private: + KDevMakeFrontend *m_makeFrontend; +}; + +#endif diff --git a/lib/interfaces/extensions/dcop/Makefile.am b/lib/interfaces/extensions/dcop/Makefile.am index e46606ac..116c4979 100644 --- a/lib/interfaces/extensions/dcop/Makefile.am +++ b/lib/interfaces/extensions/dcop/Makefile.am @@ -1,10 +1,10 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libtdevdcopextensions.la -libtdevdcopextensions_la_LDFLAGS = $(all_libraries) -libtdevdcopextensions_la_SOURCES = TDevAppFrontendIface.cpp \ - TDevMakeFrontendIface.cpp TDevAppFrontendIface.skel TDevMakeFrontendIface.skel +noinst_LTLIBRARIES = libkdevdcopextensions.la +libkdevdcopextensions_la_LDFLAGS = $(all_libraries) +libkdevdcopextensions_la_SOURCES = KDevAppFrontendIface.cpp \ + KDevMakeFrontendIface.cpp KDevAppFrontendIface.skel KDevMakeFrontendIface.skel dcopincludeextdir = $(includedir)/tdevelop/interfaces/extensions/dcop -dcopincludeext_HEADERS = TDevAppFrontendIface.h TDevMakeFrontendIface.h +dcopincludeext_HEADERS = KDevAppFrontendIface.h KDevMakeFrontendIface.h diff --git a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp b/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp deleted file mode 100644 index a42d0d7d..00000000 --- a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.cpp +++ /dev/null @@ -1,76 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Amilcar do Carmo Lucas - - 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. -*/ -#include "TDevAppFrontendIface.h" -#include "tdevappfrontend.h" - - -TDevAppFrontendIface::TDevAppFrontendIface(TDevAppFrontend *appFrontend) - : DCOPObject("TDevAppFrontend"), m_appFrontend(appFrontend) -{ -} - - -TDevAppFrontendIface::~TDevAppFrontendIface() -{} - - -void TDevAppFrontendIface::startAppCommand(const TQString &directory, const TQString &command, bool inTerminal) -{ - m_appFrontend->startAppCommand(directory, command, inTerminal); -} - -void TDevAppFrontendIface::stopApplication( ) -{ - m_appFrontend->stopApplication(); -} - -bool TDevAppFrontendIface::isRunning( ) -{ - return m_appFrontend->isRunning(); -} - -void TDevAppFrontendIface::clearView( ) -{ - m_appFrontend->clearView(); -} - -void TDevAppFrontendIface::insertStderrLine( const TQCString & line ) -{ - m_appFrontend->insertStderrLine(line); -} - -void TDevAppFrontendIface::insertStdoutLine( const TQCString & line ) -{ - m_appFrontend->insertStdoutLine(line); -} - -void TDevAppFrontendIface::addPartialStderrLine( const TQCString& line ) -{ - m_appFrontend->addPartialStderrLine(line); -} - -void TDevAppFrontendIface::addPartialStdoutLine( const TQCString& line ) -{ - m_appFrontend->addPartialStdoutLine(line); -} diff --git a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h b/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h deleted file mode 100644 index 5061c782..00000000 --- a/lib/interfaces/extensions/dcop/TDevAppFrontendIface.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Roberto Raggi - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Amilcar do Carmo Lucas - - 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 _TDEVAPPFRONTENDIFACE_H_ -#define _TDEVAPPFRONTENDIFACE_H_ - -#include - -class TDevAppFrontend; - -class TDevAppFrontendIface : public DCOPObject -{ - K_DCOP - -public: - - TDevAppFrontendIface( TDevAppFrontend *appFrontend ); - ~TDevAppFrontendIface(); - -k_dcop: - void startAppCommand(const TQString &directory, const TQString &command, bool inTerminal); - void stopApplication(); - bool isRunning(); - void clearView(); - void insertStderrLine(const TQCString &line); - void insertStdoutLine(const TQCString &line); - void addPartialStderrLine(const TQCString &line); - void addPartialStdoutLine(const TQCString &line); - -private: - TDevAppFrontend *m_appFrontend; -}; - -#endif diff --git a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp b/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp deleted file mode 100644 index 06bd432f..00000000 --- a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.cpp +++ /dev/null @@ -1,46 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2002 Roberto Raggi - - 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. -*/ -#include "TDevMakeFrontendIface.h" -#include "tdevmakefrontend.h" - - -TDevMakeFrontendIface::TDevMakeFrontendIface(TDevMakeFrontend *makeFrontend) - : DCOPObject("TDevMakeFrontend") -{ - m_makeFrontend = makeFrontend; -} - - -TDevMakeFrontendIface::~TDevMakeFrontendIface() -{} - - -void TDevMakeFrontendIface::queueCommand(const TQString &dir, const TQString &command) -{ - m_makeFrontend->queueCommand(dir, command); -} - -bool TDevMakeFrontendIface::isRunning( ) -{ - return m_makeFrontend->isRunning(); -} diff --git a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h b/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h deleted file mode 100644 index 3aee75be..00000000 --- a/lib/interfaces/extensions/dcop/TDevMakeFrontendIface.h +++ /dev/null @@ -1,45 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2002 Roberto Raggi - - 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 _TDEVMAKEFRONTENDIFACE_H_ -#define _TDEVMAKEFRONTENDIFACE_H_ - -#include - -class TDevMakeFrontend; - -class TDevMakeFrontendIface : public DCOPObject -{ - K_DCOP - -public: - - TDevMakeFrontendIface( TDevMakeFrontend *makeFrontend ); - ~TDevMakeFrontendIface(); - -k_dcop: - void queueCommand(const TQString &dir, const TQString &command); - bool isRunning(); - -private: - TDevMakeFrontend *m_makeFrontend; -}; - -#endif diff --git a/lib/interfaces/extensions/kdevappfrontend.cpp b/lib/interfaces/extensions/kdevappfrontend.cpp new file mode 100644 index 00000000..3d918fe2 --- /dev/null +++ b/lib/interfaces/extensions/kdevappfrontend.cpp @@ -0,0 +1,2 @@ +#include "kdevappfrontend.h" +#include "kdevappfrontend.moc" diff --git a/lib/interfaces/extensions/kdevappfrontend.h b/lib/interfaces/extensions/kdevappfrontend.h new file mode 100644 index 00000000..76952f35 --- /dev/null +++ b/lib/interfaces/extensions/kdevappfrontend.h @@ -0,0 +1,116 @@ +/* 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 John Firebaugh + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003 Hamish Rodda + Copyright (C) 2003 Jens Dagerbo + + 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 KDEVAPPFRONTEND_H +#define KDEVAPPFRONTEND_H + +#include +#include + +/** +@file kdevappfrontend.h +Application frontend interface. +*/ + +/** +Application frontend interface. +This interface is responsible for handling the running of an application in KDevelop. +Currently, this interface defines ways to do the following: +- check if the application is running; +- execute the application; +- stop the currently running application; +- control the output view as seen in the 'Application' tool dock. + +Instances that implement this interface are available through extension architecture: +@code +KDevAppFrontend *apf = extension("TDevelop/AppFrontend"); +if (apf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevAppFrontend : public KDevPlugin +{ + Q_OBJECT + + +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevAppFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevAppFrontend") {} + + /**@return Whether the application is currently running.*/ + virtual bool isRunning() = 0; + +public slots: + /** + * The component shall start to execute an app-like command. + * Running the application is always asynchronous. + * @param directory The working directory to start the app in, + * if empty then the user's home directory is used. + * @param program A program to start. + * @param inTerminal If true then the program is started in an external konsole. + */ + virtual void startAppCommand(const TQString &directory, const TQString &program, bool inTerminal) = 0; + + /** + * Stops the currently running application. + */ + virtual void stopApplication() = 0; + + /** + * Inserts a string into the application output view. + * @param line A string to insert. + */ + virtual void insertStdoutLine(const TQCString &line) = 0; + + /** + * Inserts a string into the application output view marked as stderr output + * (usually colored). + * @param line An error string to insert. + */ + virtual void insertStderrLine(const TQCString &line) = 0; + + virtual void addPartialStderrLine( const TQCString& line ) = 0; + virtual void addPartialStdoutLine( const TQCString& line ) = 0; + + /** + * Clears the output view. + */ + virtual void clearView() = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevcreatefile.h b/lib/interfaces/extensions/kdevcreatefile.h new file mode 100644 index 00000000..35b98d19 --- /dev/null +++ b/lib/interfaces/extensions/kdevcreatefile.h @@ -0,0 +1,146 @@ +/* This file is part of the KDE project + Copyright (C) 2003 Julian Rockey + Copyright (C) 2003 Roberto Raggi + + 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 KDEVCREATEFILE_H +#define KDEVCREATEFILE_H + +#include + +#include + +/** +@file kdevcreatefile.h +File creation facility interface. +*/ + +/** +File creation facility interface. + +An abstract class for all extensions that are responsible for file creation. + +Instances that implement this interface are available through extension architecture: +@code +KDevCreateFile *cf = extension("TDevelop/CreateFile"); +if (cf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevCreateFile : public KDevPlugin +{ + +public: + /**File created with @ref KDevCreateFile implementation.*/ + class CreatedFile { + + public: + /**The status of a file.*/ + enum Status { + STATUS_OK /** + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Roberto Raggi + + 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. +*/ +#include "kdevdifffrontend.h" + + +KDevDiffFrontend::KDevDiffFrontend(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name ? name : "KDevDiffFrontend") +{ +} + +KDevDiffFrontend::~KDevDiffFrontend() +{ +} + +#include "kdevdifffrontend.moc" diff --git a/lib/interfaces/extensions/kdevdifffrontend.h b/lib/interfaces/extensions/kdevdifffrontend.h new file mode 100644 index 00000000..6d4cb2b6 --- /dev/null +++ b/lib/interfaces/extensions/kdevdifffrontend.h @@ -0,0 +1,79 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Harald Fernengel + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Roberto Raggi + + 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 KDEVDIFFFRONTEND_H +#define KDEVDIFFFRONTEND_H + +#include +#include + +/** +@file kdevdifffrontend.h +Diff frontend interface. +*/ + +/** +KDevelop diff frontend interface. +This is the abstract base class for plugins that want to display differencies between +files. + +Instances that implement this interface are available through extension architecture: +@code +KDevDiffFrontend *df = extension("TDevelop/DiffFrontend"); +if (df) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevDiffFrontend : public KDevPlugin +{ + +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevDiffFrontend( const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevDiffFrontend") {} + + /**Displays the patch. + @param diff A string which contains a patch in unified format.*/ + virtual void showDiff( const TQString& diff ) = 0; + + /**Displays a patch file. + @param url An url of the patch file.*/ + virtual void openURL( const KURL &url ) = 0; + + /**Displays the difference between the two files. + @param url1 First file to compare. + @param url2 Second file to compare.*/ + virtual void showDiff( const KURL &url1, const KURL &url2 ) = 0; + +}; + +#endif diff --git a/lib/interfaces/extensions/kdevmakefrontend.cpp b/lib/interfaces/extensions/kdevmakefrontend.cpp new file mode 100644 index 00000000..5e035270 --- /dev/null +++ b/lib/interfaces/extensions/kdevmakefrontend.cpp @@ -0,0 +1,2 @@ +#include "kdevmakefrontend.h" +#include "kdevmakefrontend.moc" diff --git a/lib/interfaces/extensions/kdevmakefrontend.h b/lib/interfaces/extensions/kdevmakefrontend.h new file mode 100644 index 00000000..52afa3d3 --- /dev/null +++ b/lib/interfaces/extensions/kdevmakefrontend.h @@ -0,0 +1,107 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001 Sandy Meier + 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 Hamish Rodda + + 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 KDEVMAKEFRONTEND_H +#define KDEVMAKEFRONTEND_H + +#include +#include + +/** +@file kdevmakefrontend.h +Make frontend interface. +*/ + +/** +KDevelop make frontend interface. +This is the abstract base class for plugins that are able to run "make" +or similar commands to build a project, api documentation, etc. + +Instances that implement this interface are available through extension architecture: +@code +KDevMakeFrontend *mf = extension("TDevelop/MakeFrontend"); +if (mf) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevMakeFrontend : public KDevPlugin +{ + Q_OBJECT + + +public: + + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevMakeFrontend(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) + :KDevPlugin(info, parent, name ? name : "KDevMakeFrontend") {} + + /**@return The widget where the make output is shown.*/ + virtual TQWidget* widget() { return 0L; } + + /**The component shall start to execute a make-like command. + * Commands are always asynchronous. You can submit several jobs + * without caring about another job already running. There are + * executed in the order in which they are submitted. If one of + * then fails, all following jobs are dropped. + * You should not make any assumptions about the directory in which + * the command is started. If the command depends on that, put and + * explicit 'cd' into the command. + * @param dir A starting directory to find files when parsing compiler error + * messages. + * @param command A shell command to execute. + */ + virtual void queueCommand(const TQString &dir, const TQString &command) = 0; + + /**@return Whether the application is currently running.*/ + virtual bool isRunning() = 0; + + /**Advices to synchronize the settings from TDEConfig because they were changed externally.*/ + virtual void updateSettingsFromConfig() = 0; + +signals: + /** + * Only emitted if the command was succesfully finished. + */ + void commandFinished(const TQString &command); + + /** + * Emitted if a command failed. + */ + void commandFailed(const TQString &command); +}; + +#endif diff --git a/lib/interfaces/extensions/kdevquickopen.h b/lib/interfaces/extensions/kdevquickopen.h new file mode 100644 index 00000000..91dce7ca --- /dev/null +++ b/lib/interfaces/extensions/kdevquickopen.h @@ -0,0 +1,130 @@ +/* This file is part of the KDE project + Copyright (C) 2007 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 KDEVQUICKOPEN_H +#define KDEVQUICKOPEN_H + +#include +#include + +/** +@file kdevquickopen.h +Source formatter interface. +*/ + +/** +Quick open plugin interface. + +Use it when you need to present a dialog to choose between files to open. +@code +KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); +if (qo) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevQuickOpen : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevQuickOpen(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Shows the file selection dialog. + @param text A list of urls to open.*/ + virtual void quickOpenFile(const KURL::List urls) = 0; +}; + +#endif +/* This file is part of the KDE project + Copyright (C) 2007 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 KDEVQUICKOPEN_H +#define KDEVQUICKOPEN_H + +#include +#include + +/** +@file kdevquickopen.h +Source formatter interface. +*/ + +/** +Quick open plugin interface. + +Use it when you need to present a dialog to choose between files to open. +@code +KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); +if (qo) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevQuickOpen : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevQuickOpen(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Shows the file selection dialog. + @param text A list of urls to open.*/ + virtual void quickOpenFile(const KURL::List urls) = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevsourceformatter.h b/lib/interfaces/extensions/kdevsourceformatter.h new file mode 100644 index 00000000..c4a380cf --- /dev/null +++ b/lib/interfaces/extensions/kdevsourceformatter.h @@ -0,0 +1,69 @@ +/* This file is part of the KDE project + 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 KDEVSOURCEFORMATTER_H +#define KDEVSOURCEFORMATTER_H + +#include + +/** +@file kdevsourceformatter.h +Source formatter interface. +*/ + +/** +Source formatter interface. +This interface is responsible for formatting source files and strings of code. + +Instances that implement this interface are available through extension architecture: +@code +KDevSourceFormatter *sf = extension("TDevelop/SourceFormatter"); +if (sf) { + // do something +} else { + // fail +} +@endcode +@sa @ref KDevPlugin::extension method documentation. +@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. +*/ +class KDevSourceFormatter : public KDevPlugin +{ +public: + /**Constructor. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevSourceFormatter(const KDevPluginInfo *info, TQObject* parent, const char* name) + :KDevPlugin(info, parent, name) {} + + /**Formats the source. + @param text A string with a code. + @return The formatted string.*/ + virtual TQString formatSource(const TQString text) = 0; + + /**@return The indentation string. For example, tab or four spaces can be returned.*/ + virtual TQString indentString() const = 0; +}; + +#endif diff --git a/lib/interfaces/extensions/kdevversioncontrol.h b/lib/interfaces/extensions/kdevversioncontrol.h new file mode 100644 index 00000000..a19c6275 --- /dev/null +++ b/lib/interfaces/extensions/kdevversioncontrol.h @@ -0,0 +1,239 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2003 Mario Scalas + Copyright (C) 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 KDEVVERSIONCONTROL_H +#define KDEVVERSIONCONTROL_H + +#include +#include +#include +#include +#include + +#include + +/** +@file kdevversioncontrol.h +Version control system interface and utility classes. +*/ + +/** +Info about file state in VCS. + +Used, for example in file views to display VCS related information about files. +*/ +struct VCSFileInfo +{ + /**State of the file.*/ + enum FileState { + Unknown /** VCSFileInfoMap; @endcode +*/ +typedef TQMap VCSFileInfoMap; + +class KDevVCSFileInfoProvider; + + +/** +KDevelop version control system interface. +This is the abstract base class which encapsulates everything +necessary for communicating with version control systems. +VCS support plugins should implement this interface. + +Instances that implement this interface are available through extension architecture: +@code +KDevVersionControl *vcs = extension("TDevelop/VersionControl"); +if (vcs) { + // do something +} else { + // fail +} +@endcode +@sa KDevPlugin::extension method documentation. +*/ +class KDevVersionControl: public KDevPlugin +{ + Q_OBJECT + + +public: + /**Constructs a VCS plugin. + @param info Important information about the plugin - plugin internal and generic + (GUI) name, description, a list of authors, etc. That information is used to show + plugin information in various places like "about application" dialog, plugin selector + dialog, etc. Plugin does not take ownership on info object, also its lifetime should + be equal to the lifetime of the plugin. + @param parent The parent object for the plugin. Parent object must implement @ref KDevApi + interface. Otherwise the plugin will not be constructed. + @param name The internal name which identifies the plugin.*/ + KDevVersionControl(const KDevPluginInfo *info, TQObject *parent, const char *name ) + :KDevPlugin(info, parent, name ) {} + + /**Creates a new project in the passed path @p dir. This should instantiate + VCS infrastructure and import a project into the VCS in that directory. + @param dir The absolute path to the directory where VCS infrastructure should be + created.*/ + virtual void createNewProject(const TQString& dir) = 0; + + /**Fetches a module from remote repository, so it can be used for importing. + @return true in case of success.*/ + virtual bool fetchFromRepository() = 0; + + /**@return The file info provider for this version control (0 if none is available).*/ + virtual KDevVCSFileInfoProvider *fileInfoProvider() const = 0; + + /**Checks if the directory is valid for this version control (for example + CVS may check for the presence of "/CVS/" subdir and something else) + @param dirPath The absolute path of the directory. + @return true if the directory is valid for this version control + warning: this returns false by default.*/ + virtual bool isValidDirectory(const TQString &dirPath) const = 0; + + +signals: + /**Emitted when the Version Control has finished importing a module from remote + repository + @param destinationDir The directory where the module has been fetched.*/ + void finishedFetching(TQString destinationDir); + +}; + +/** +Basic interface for providing info on file registered in a version control repository repository. +*/ +class KDevVCSFileInfoProvider: public TQObject +{ + Q_OBJECT + +public: + /**Constructor. + @param parent The parent VCS plugin. + @param name The name of a provider object.*/ + KDevVCSFileInfoProvider(KDevVersionControl *parent, const char *name) + : TQObject( parent, name ), m_owner(parent) {} + + /**Gets the status for local files in the specified directory: + the info are collected locally so they are necessarily in sync with the repository + + This is a synchronous operation (blocking). + @param dirPath The relative (to project dir) directory path to stat. + @return Status for all registered files.*/ + virtual const VCSFileInfoMap *status(const TQString &dirPath) = 0; + + /**Starts a request for directory status to the remote repository. + Requests and answers are asynchronous. + + This is an asynchronous operation for requesting data, so + for obvious reasons: the caller must connect the statusReady() signal and + check for the return value of this method. + @param dirPath The (relative to project directory) directory which status you are asking for. + @param callerData The pointer to some data you want the provider will return + to you when it has done. + @param recursive If false, retrieve information only for dirPath's immediate children. + @param checkRepos If true, contact remote repository and augment repository's status. + If false, retrieve only for local modification information. + @return true if the request has been successfully started, false otherwise.*/ + virtual bool requestStatus( const TQString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ) = 0; + +signals: + /**Emitted when the status request to remote repository has finished. + @param fileInfoMap The status for registered in repository files. + @param callerData The pointer to some data you want the provider will return + to you when it has done + @see requestStatus for to find out when this signal should be used.*/ + void statusReady(const VCSFileInfoMap &fileInfoMap, void *callerData); + +protected: + /**@return The version control which owns this provider.*/ + KDevVersionControl *owner() const { return m_owner; } + +private: + KDevVersionControl *m_owner; + +private: + KDevVCSFileInfoProvider( const KDevVCSFileInfoProvider & ); + KDevVCSFileInfoProvider &operator=( const KDevVCSFileInfoProvider & ); +}; + +#endif diff --git a/lib/interfaces/extensions/tdevappfrontend.cpp b/lib/interfaces/extensions/tdevappfrontend.cpp deleted file mode 100644 index 4f7c52a7..00000000 --- a/lib/interfaces/extensions/tdevappfrontend.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "tdevappfrontend.h" -#include "tdevappfrontend.moc" diff --git a/lib/interfaces/extensions/tdevappfrontend.h b/lib/interfaces/extensions/tdevappfrontend.h deleted file mode 100644 index 085d3c9d..00000000 --- a/lib/interfaces/extensions/tdevappfrontend.h +++ /dev/null @@ -1,116 +0,0 @@ -/* 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 John Firebaugh - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003 Hamish Rodda - Copyright (C) 2003 Jens Dagerbo - - 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 TDEVAPPFRONTEND_H -#define TDEVAPPFRONTEND_H - -#include -#include - -/** -@file tdevappfrontend.h -Application frontend interface. -*/ - -/** -Application frontend interface. -This interface is responsible for handling the running of an application in KDevelop. -Currently, this interface defines ways to do the following: -- check if the application is running; -- execute the application; -- stop the currently running application; -- control the output view as seen in the 'Application' tool dock. - -Instances that implement this interface are available through extension architecture: -@code -TDevAppFrontend *apf = extension("TDevelop/AppFrontend"); -if (apf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevAppFrontend : public TDevPlugin -{ - Q_OBJECT - - -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevAppFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevAppFrontend") {} - - /**@return Whether the application is currently running.*/ - virtual bool isRunning() = 0; - -public slots: - /** - * The component shall start to execute an app-like command. - * Running the application is always asynchronous. - * @param directory The working directory to start the app in, - * if empty then the user's home directory is used. - * @param program A program to start. - * @param inTerminal If true then the program is started in an external konsole. - */ - virtual void startAppCommand(const TQString &directory, const TQString &program, bool inTerminal) = 0; - - /** - * Stops the currently running application. - */ - virtual void stopApplication() = 0; - - /** - * Inserts a string into the application output view. - * @param line A string to insert. - */ - virtual void insertStdoutLine(const TQCString &line) = 0; - - /** - * Inserts a string into the application output view marked as stderr output - * (usually colored). - * @param line An error string to insert. - */ - virtual void insertStderrLine(const TQCString &line) = 0; - - virtual void addPartialStderrLine( const TQCString& line ) = 0; - virtual void addPartialStdoutLine( const TQCString& line ) = 0; - - /** - * Clears the output view. - */ - virtual void clearView() = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevcreatefile.h b/lib/interfaces/extensions/tdevcreatefile.h deleted file mode 100644 index b1148e94..00000000 --- a/lib/interfaces/extensions/tdevcreatefile.h +++ /dev/null @@ -1,146 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Julian Rockey - Copyright (C) 2003 Roberto Raggi - - 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 TDEVCREATEFILE_H -#define TDEVCREATEFILE_H - -#include - -#include - -/** -@file tdevcreatefile.h -File creation facility interface. -*/ - -/** -File creation facility interface. - -An abstract class for all extensions that are responsible for file creation. - -Instances that implement this interface are available through extension architecture: -@code -TDevCreateFile *cf = extension("TDevelop/CreateFile"); -if (cf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevCreateFile : public TDevPlugin -{ - -public: - /**File created with @ref TDevCreateFile implementation.*/ - class CreatedFile { - - public: - /**The status of a file.*/ - enum Status { - STATUS_OK /** - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Roberto Raggi - - 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. -*/ -#include "tdevdifffrontend.h" - - -TDevDiffFrontend::TDevDiffFrontend(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name ? name : "TDevDiffFrontend") -{ -} - -TDevDiffFrontend::~TDevDiffFrontend() -{ -} - -#include "tdevdifffrontend.moc" diff --git a/lib/interfaces/extensions/tdevdifffrontend.h b/lib/interfaces/extensions/tdevdifffrontend.h deleted file mode 100644 index c0c343cb..00000000 --- a/lib/interfaces/extensions/tdevdifffrontend.h +++ /dev/null @@ -1,79 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Harald Fernengel - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Roberto Raggi - - 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 TDEVDIFFFRONTEND_H -#define TDEVDIFFFRONTEND_H - -#include -#include - -/** -@file tdevdifffrontend.h -Diff frontend interface. -*/ - -/** -KDevelop diff frontend interface. -This is the abstract base class for plugins that want to display differencies between -files. - -Instances that implement this interface are available through extension architecture: -@code -TDevDiffFrontend *df = extension("TDevelop/DiffFrontend"); -if (df) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevDiffFrontend : public TDevPlugin -{ - -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevDiffFrontend( const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevDiffFrontend") {} - - /**Displays the patch. - @param diff A string which contains a patch in unified format.*/ - virtual void showDiff( const TQString& diff ) = 0; - - /**Displays a patch file. - @param url An url of the patch file.*/ - virtual void openURL( const KURL &url ) = 0; - - /**Displays the difference between the two files. - @param url1 First file to compare. - @param url2 Second file to compare.*/ - virtual void showDiff( const KURL &url1, const KURL &url2 ) = 0; - -}; - -#endif diff --git a/lib/interfaces/extensions/tdevmakefrontend.cpp b/lib/interfaces/extensions/tdevmakefrontend.cpp deleted file mode 100644 index 140d074d..00000000 --- a/lib/interfaces/extensions/tdevmakefrontend.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "tdevmakefrontend.h" -#include "tdevmakefrontend.moc" diff --git a/lib/interfaces/extensions/tdevmakefrontend.h b/lib/interfaces/extensions/tdevmakefrontend.h deleted file mode 100644 index 47b14fc4..00000000 --- a/lib/interfaces/extensions/tdevmakefrontend.h +++ /dev/null @@ -1,107 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2001 Sandy Meier - 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 Hamish Rodda - - 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 TDEVMAKEFRONTEND_H -#define TDEVMAKEFRONTEND_H - -#include -#include - -/** -@file tdevmakefrontend.h -Make frontend interface. -*/ - -/** -KDevelop make frontend interface. -This is the abstract base class for plugins that are able to run "make" -or similar commands to build a project, api documentation, etc. - -Instances that implement this interface are available through extension architecture: -@code -TDevMakeFrontend *mf = extension("TDevelop/MakeFrontend"); -if (mf) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevMakeFrontend : public TDevPlugin -{ - Q_OBJECT - - -public: - - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevMakeFrontend(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0 ) - :TDevPlugin(info, parent, name ? name : "TDevMakeFrontend") {} - - /**@return The widget where the make output is shown.*/ - virtual TQWidget* widget() { return 0L; } - - /**The component shall start to execute a make-like command. - * Commands are always asynchronous. You can submit several jobs - * without caring about another job already running. There are - * executed in the order in which they are submitted. If one of - * then fails, all following jobs are dropped. - * You should not make any assumptions about the directory in which - * the command is started. If the command depends on that, put and - * explicit 'cd' into the command. - * @param dir A starting directory to find files when parsing compiler error - * messages. - * @param command A shell command to execute. - */ - virtual void queueCommand(const TQString &dir, const TQString &command) = 0; - - /**@return Whether the application is currently running.*/ - virtual bool isRunning() = 0; - - /**Advices to synchronize the settings from TDEConfig because they were changed externally.*/ - virtual void updateSettingsFromConfig() = 0; - -signals: - /** - * Only emitted if the command was succesfully finished. - */ - void commandFinished(const TQString &command); - - /** - * Emitted if a command failed. - */ - void commandFailed(const TQString &command); -}; - -#endif diff --git a/lib/interfaces/extensions/tdevquickopen.h b/lib/interfaces/extensions/tdevquickopen.h deleted file mode 100644 index e1fd2f65..00000000 --- a/lib/interfaces/extensions/tdevquickopen.h +++ /dev/null @@ -1,130 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 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 TDEVQUICKOPEN_H -#define TDEVQUICKOPEN_H - -#include -#include - -/** -@file tdevquickopen.h -Source formatter interface. -*/ - -/** -Quick open plugin interface. - -Use it when you need to present a dialog to choose between files to open. -@code -KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); -if (qo) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevQuickOpen : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevQuickOpen(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Shows the file selection dialog. - @param text A list of urls to open.*/ - virtual void quickOpenFile(const KURL::List urls) = 0; -}; - -#endif -/* This file is part of the KDE project - Copyright (C) 2007 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 TDEVQUICKOPEN_H -#define TDEVQUICKOPEN_H - -#include -#include - -/** -@file tdevquickopen.h -Source formatter interface. -*/ - -/** -Quick open plugin interface. - -Use it when you need to present a dialog to choose between files to open. -@code -KDevQuickOpen *qo = extension("TDevelop/QuickOpen"); -if (qo) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevQuickOpen : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevQuickOpen(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Shows the file selection dialog. - @param text A list of urls to open.*/ - virtual void quickOpenFile(const KURL::List urls) = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevsourceformatter.h b/lib/interfaces/extensions/tdevsourceformatter.h deleted file mode 100644 index 3403a5d2..00000000 --- a/lib/interfaces/extensions/tdevsourceformatter.h +++ /dev/null @@ -1,69 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVSOURCEFORMATTER_H -#define TDEVSOURCEFORMATTER_H - -#include - -/** -@file tdevsourceformatter.h -Source formatter interface. -*/ - -/** -Source formatter interface. -This interface is responsible for formatting source files and strings of code. - -Instances that implement this interface are available through extension architecture: -@code -KDevSourceFormatter *sf = extension("TDevelop/SourceFormatter"); -if (sf) { - // do something -} else { - // fail -} -@endcode -@sa @ref TDevPlugin::extension method documentation. -@sa @ref whatisextension and @ref creatingextension sections of Platform API documentation. -*/ -class KDevSourceFormatter : public TDevPlugin -{ -public: - /**Constructor. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - KDevSourceFormatter(const TDevPluginInfo *info, TQObject* parent, const char* name) - :TDevPlugin(info, parent, name) {} - - /**Formats the source. - @param text A string with a code. - @return The formatted string.*/ - virtual TQString formatSource(const TQString text) = 0; - - /**@return The indentation string. For example, tab or four spaces can be returned.*/ - virtual TQString indentString() const = 0; -}; - -#endif diff --git a/lib/interfaces/extensions/tdevversioncontrol.h b/lib/interfaces/extensions/tdevversioncontrol.h deleted file mode 100644 index d796e31f..00000000 --- a/lib/interfaces/extensions/tdevversioncontrol.h +++ /dev/null @@ -1,239 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2003 Mario Scalas - Copyright (C) 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 TDEVVERSIONCONTROL_H -#define TDEVVERSIONCONTROL_H - -#include -#include -#include -#include -#include - -#include - -/** -@file tdevversioncontrol.h -Version control system interface and utility classes. -*/ - -/** -Info about file state in VCS. - -Used, for example in file views to display VCS related information about files. -*/ -struct VCSFileInfo -{ - /**State of the file.*/ - enum FileState { - Unknown /** VCSFileInfoMap; @endcode -*/ -typedef TQMap VCSFileInfoMap; - -class TDevVCSFileInfoProvider; - - -/** -KDevelop version control system interface. -This is the abstract base class which encapsulates everything -necessary for communicating with version control systems. -VCS support plugins should implement this interface. - -Instances that implement this interface are available through extension architecture: -@code -TDevVersionControl *vcs = extension("TDevelop/VersionControl"); -if (vcs) { - // do something -} else { - // fail -} -@endcode -@sa TDevPlugin::extension method documentation. -*/ -class TDevVersionControl: public TDevPlugin -{ - Q_OBJECT - - -public: - /**Constructs a VCS plugin. - @param info Important information about the plugin - plugin internal and generic - (GUI) name, description, a list of authors, etc. That information is used to show - plugin information in various places like "about application" dialog, plugin selector - dialog, etc. Plugin does not take ownership on info object, also its lifetime should - be equal to the lifetime of the plugin. - @param parent The parent object for the plugin. Parent object must implement @ref TDevApi - interface. Otherwise the plugin will not be constructed. - @param name The internal name which identifies the plugin.*/ - TDevVersionControl(const TDevPluginInfo *info, TQObject *parent, const char *name ) - :TDevPlugin(info, parent, name ) {} - - /**Creates a new project in the passed path @p dir. This should instantiate - VCS infrastructure and import a project into the VCS in that directory. - @param dir The absolute path to the directory where VCS infrastructure should be - created.*/ - virtual void createNewProject(const TQString& dir) = 0; - - /**Fetches a module from remote repository, so it can be used for importing. - @return true in case of success.*/ - virtual bool fetchFromRepository() = 0; - - /**@return The file info provider for this version control (0 if none is available).*/ - virtual TDevVCSFileInfoProvider *fileInfoProvider() const = 0; - - /**Checks if the directory is valid for this version control (for example - CVS may check for the presence of "/CVS/" subdir and something else) - @param dirPath The absolute path of the directory. - @return true if the directory is valid for this version control - warning: this returns false by default.*/ - virtual bool isValidDirectory(const TQString &dirPath) const = 0; - - -signals: - /**Emitted when the Version Control has finished importing a module from remote - repository - @param destinationDir The directory where the module has been fetched.*/ - void finishedFetching(TQString destinationDir); - -}; - -/** -Basic interface for providing info on file registered in a version control repository repository. -*/ -class TDevVCSFileInfoProvider: public TQObject -{ - Q_OBJECT - -public: - /**Constructor. - @param parent The parent VCS plugin. - @param name The name of a provider object.*/ - TDevVCSFileInfoProvider(TDevVersionControl *parent, const char *name) - : TQObject( parent, name ), m_owner(parent) {} - - /**Gets the status for local files in the specified directory: - the info are collected locally so they are necessarily in sync with the repository - - This is a synchronous operation (blocking). - @param dirPath The relative (to project dir) directory path to stat. - @return Status for all registered files.*/ - virtual const VCSFileInfoMap *status(const TQString &dirPath) = 0; - - /**Starts a request for directory status to the remote repository. - Requests and answers are asynchronous. - - This is an asynchronous operation for requesting data, so - for obvious reasons: the caller must connect the statusReady() signal and - check for the return value of this method. - @param dirPath The (relative to project directory) directory which status you are asking for. - @param callerData The pointer to some data you want the provider will return - to you when it has done. - @param recursive If false, retrieve information only for dirPath's immediate children. - @param checkRepos If true, contact remote repository and augment repository's status. - If false, retrieve only for local modification information. - @return true if the request has been successfully started, false otherwise.*/ - virtual bool requestStatus( const TQString &dirPath, void *callerData, bool recursive = true, bool checkRepos = true ) = 0; - -signals: - /**Emitted when the status request to remote repository has finished. - @param fileInfoMap The status for registered in repository files. - @param callerData The pointer to some data you want the provider will return - to you when it has done - @see requestStatus for to find out when this signal should be used.*/ - void statusReady(const VCSFileInfoMap &fileInfoMap, void *callerData); - -protected: - /**@return The version control which owns this provider.*/ - TDevVersionControl *owner() const { return m_owner; } - -private: - TDevVersionControl *m_owner; - -private: - TDevVCSFileInfoProvider( const TDevVCSFileInfoProvider & ); - TDevVCSFileInfoProvider &operator=( const TDevVCSFileInfoProvider & ); -}; - -#endif -- cgit v1.2.3