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. --- .../cpp/app_templates/kdevlang/CMakeLists.txt | 27 ++++ languages/cpp/app_templates/kdevlang/Makefile.am | 17 +++ languages/cpp/app_templates/kdevlang/README.dox | 55 ++++++++ languages/cpp/app_templates/kdevlang/app.tdevelop | 115 +++++++++++++++ .../kdevlang/kdevlang-configure.in.in | 10 ++ .../cpp/app_templates/kdevlang/kdevlang.desktop | 14 ++ .../app_templates/kdevlang/kdevlang.kdevtemplate | 157 +++++++++++++++++++++ languages/cpp/app_templates/kdevlang/kdevlang.png | Bin 0 -> 483 bytes languages/cpp/app_templates/kdevlang/kdevlang.rc | 11 ++ .../cpp/app_templates/kdevlang/kdevlang_part.cpp | 154 ++++++++++++++++++++ .../cpp/app_templates/kdevlang/kdevlang_part.h | 44 ++++++ .../cpp/app_templates/kdevlang/src-Makefile.am | 14 ++ 12 files changed, 618 insertions(+) create mode 100644 languages/cpp/app_templates/kdevlang/CMakeLists.txt create mode 100644 languages/cpp/app_templates/kdevlang/Makefile.am create mode 100644 languages/cpp/app_templates/kdevlang/README.dox create mode 100644 languages/cpp/app_templates/kdevlang/app.tdevelop create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.desktop create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.png create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang.rc create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang_part.cpp create mode 100644 languages/cpp/app_templates/kdevlang/kdevlang_part.h create mode 100644 languages/cpp/app_templates/kdevlang/src-Makefile.am (limited to 'languages/cpp/app_templates/kdevlang') diff --git a/languages/cpp/app_templates/kdevlang/CMakeLists.txt b/languages/cpp/app_templates/kdevlang/CMakeLists.txt new file mode 100644 index 00000000..483f85d9 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/CMakeLists.txt @@ -0,0 +1,27 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_custom_target( kdevlang.tar.gz ALL + COMMAND tar zcf kdevlang.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevlang_part.cpp kdevlang_part.h + kdevlang.rc kdevlang.desktop app.tdevelop + kdevlang-configure.in.in README.dox +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevlang.tar.gz kdevlang.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevlang.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevlang/Makefile.am b/languages/cpp/app_templates/kdevlang/Makefile.am new file mode 100644 index 00000000..7afa5be8 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/Makefile.am @@ -0,0 +1,17 @@ +dataFiles = src-Makefile.am kdevlang_part.cpp kdevlang_part.h kdevlang.rc \ + kdevlang.desktop app.tdevelop kdevlang-configure.in.in README.dox +templateName = kdevlang + +### no need to change below: +template_DATA = $(templateName).kdevtemplate +templatedir = ${appwizarddatadir}/templates + +appwizarddatadir = ${kde_datadir}/kdevappwizard +$(templateName).tar.gz: ${dataFiles} + $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} + $(GZIP_COMMAND) -f9 $(templateName).tar + +archivedir = ${appwizarddatadir} +archive_DATA = $(templateName).tar.gz ${templateName}.png + +CLEANFILES = *.tar.gz \ No newline at end of file diff --git a/languages/cpp/app_templates/kdevlang/README.dox b/languages/cpp/app_templates/kdevlang/README.dox new file mode 100644 index 00000000..7069f3a5 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/README.dox @@ -0,0 +1,55 @@ +/** \class %{APPNAME} +Put a brief description here, the brief description ends at the first dot. +Put a more detailed description of your part in these lines. It can span +over several lines. You can even use some html commands in these lines like: +This is code, html links link text, +and images. + +\authors %{AUTHOR} +\authors 2nd author full name +... +\authors nth author full name + +\maintainer %{AUTHOR} +\maintainer 2nd maintainer full name +... +\maintainer nth maintainer full name + +\feature Describe the first feature +\feature Describe the second feature +... +\feature Describe the last feature + +\bug bugs in +YOUR_COMPONENT_NAME at Bugzilla database +\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet. +.. +\bug Describe a the nth bug that you know of, but probably hasn't been reported yet. + +\requirement Describe a the 1st requirement of your part. +\requirement Describe a the 2nd requirement of your part. +... +\requirement Describe a the nth requirement of your part. + +\todo Describe a the 1st TODO of your part. +\todo Describe a the 2nd TODO of your part. +... +\todo Describe a the nth TODO of your part. + +\faq First frequenly asked question about your part ? Answer. +\faq Second frequenly asked question about your part ? Answer. +... +\faq Last frequenly asked question about your part ? Answer. + +\note First note text. +\note Second note text. +... +\note Last note text. + +\warning First warning text. +\warning Second warning text. +... +\warning Last warning text. + +*/ diff --git a/languages/cpp/app_templates/kdevlang/app.tdevelop b/languages/cpp/app_templates/kdevlang/app.tdevelop new file mode 100644 index 00000000..3f477a08 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/app.tdevelop @@ -0,0 +1,115 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + + + src/%{APPNAMELC} + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in b/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in new file mode 100644 index 00000000..2e3823b0 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang-configure.in.in @@ -0,0 +1,10 @@ +#MIN_CONFIG(3.0.0) + +AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) +AC_C_BIGENDIAN +AC_CHECK_TDEMAXPATHLEN + +KDE_CHECK_HEADERS([tdevelop/kdevcore.h]) +KDE_CHECK_LIB([tdevelop],main, + [LIBTDEVELOP="-ltdevelop"]) +AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.desktop b/languages/cpp/app_templates/kdevlang/kdevlang.desktop new file mode 100644 index 00000000..93bb3c3b --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=%{APPNAME} +Comment[pt]=%{APPNAME$} +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +Icon=tdevelop +ServiceTypes=TDevelop/LanguageSupport +X-TDevelop-Language=ChangeMe +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate b/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate new file mode 100644 index 00000000..6d852324 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.kdevtemplate @@ -0,0 +1,157 @@ +# TDE Config File +[General] +Name=TDevelop Language Support Plugin (Standalone build) +Name[ca]=Connector per al suport de llenguatge a TDevelop (de construcció aïllada) +Name[da]=TDevelop plugin for sprogstøttet (alenestående bygning) +Name[de]=TDevelop-Modul für Sprachunterstützung (Unabhängige Erstellung) +Name[el]=Πρόσθετο υποστήριξης γλώσσας του TDevelop (αυτόνομη κατασκευή) +Name[es]=Complemento de implementación de lenguaje para TDevelop (construcción independiente) +Name[et]=TDevelopi keeletoetuse plugin (autonoomne) +Name[eu]=TDevelop-en lengoaien euskarrien interfazea (eraikuntza autonomoak) +Name[fa]=وصلۀ پشتیبانی زبان TDevelop )ساخت خوداتکا( +Name[fr]=Module externe de prise en charge de langage de TDevelop (construction autonome) +Name[ga]=Breiseán Tacaíochta Teanga le haghaidh TDevelop (Tógáil Shaorsheasaimh) +Name[gl]=Extensión de soporte de linguaxes para TDevelop (compilación independente) +Name[hu]=TDevelop nyelvtámogató modul (önálló) +Name[it]=Plugin di supporto per linguaggio di TDevelop (compilazione indipendente) +Name[ja]=TDevelop 言語サポートプラグイン (スタンダローンビルド) +Name[nds]=TDevelop-Moduul för Spraakünnerstütten (Enkelprogramm) +Name[ne]=केडीई विकास भाषा समर्थन प्लगइन (स्ट्यान्डअलोन निर्माण) +Name[nl]=TDEvelop Taalondersteuning Plugin (Standalone build) +Name[pl]=Wtyczka TDevelopa do obsługi języka (budowana oddzielnie) +Name[pt]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) +Name[pt_BR]='Plugin' de Suporte a Linguagens do TDevelop (compilação autónoma) +Name[ru]=Интерфейс языковой поддержки для TDevelop (внешний) +Name[sk]=TDevelop modul pre jazykovú podporu (samostatný build) +Name[sl]=Vstavek jezikovne podpore za TDevelop (samostojna izgradnja) +Name[sr]=TDevelop-ов интерфејс за језичку подршку (самостална градња) +Name[sr@Latn]=TDevelop-ov interfejs za jezičku podršku (samostalna gradnja) +Name[sv]=TDevelop-insticksprogram för språkstöd (att bygga fristående) +Name[tr]=TDevelop Dil Desteği Eklentisi (Kendi başına çalışabilen kurulum) +Name[zh_CN]=TDevelop 语言支持插件(独立编译) +Name[zh_TW]=TDevelop 語言支援外掛程式(單獨建立) +Category=C++/TDevelop/ +Comment=This generates a language support plugin for TDevelop, to be built outside of the TDevelop source tree. +Comment[ca]=Genera un connector per al suport de llenguatge a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. +Comment[da]=Dette genererer en sprogstøtte-plugin for TDevelop, der skal bygges udenfor TDevelop's kildetræ. +Comment[de]=Hiermit wird ein Sprachunterstützungsmodul für TDevelop generiert, das außerhalb des Quelltextbaumes von TDevelop erstellt wird. +Comment[el]=Αυτό δημιουργεί ένα πρόσθετο υποστήριξης γλώσσας για το TDevelop, για την κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. +Comment[es]=Genera un complemento de implementación de lenguaje para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. +Comment[et]=TDevelopi keeletoetuse plugina loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. +Comment[eu]=Honek TDevelop-en lengoai-euskarrirako plugin bat sortzen du, TDevelop-en iturburu zuhaitzetik at eraikitzeko. +Comment[fa]=یک وصلۀ پشتیبان برای TDevelop تولید می‌کند، تا در بیرون درخت منبع TDevelop ساخته شود. +Comment[fr]=Génère un module externe de prise en charge de langage pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. +Comment[gl]=Isto xera unha extensión de soporte de linguaxes para TDevelop que se compilará fóra da árbore de código de TDevelop. +Comment[hu]=Létrehoz egy nyelvtámogató modult a TDevelophoz, mely a TDevelopos forráskönyvtáron kívül fordítható le. +Comment[it]=Genera un plugin di supporto per linguaggio per TDevelop, deve essere compilato fuori dell'albero sorgente di TDevelop. +Comment[nds]=Dit stellt en Spraakünnerstütten-Moduul för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. +Comment[ne]=यसले केडीई विकासका लागि केडीई विकास स्रोत ट्रीको बाहिर निर्माण गर्न, भाषा समर्थन प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Dit genereert een taalondersteuningsplugin voor TDEvelop, welke buiten de TDevelop sourcetree wordt gebouwd. +Comment[pl]=Generuje wtyczkę do obsługi języka w TDevelopie. Wtyczka jest budowana poza drzewem źródłowym TDevelopa. +Comment[pt]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. +Comment[pt_BR]=Isto gera um 'plugin' de suporte de linguagens para o TDevelop, que possa ser compilado fora da árvore de código do TDevelop. +Comment[ru]=Создание интерфейса языковой поддержки для TDevelop со сборкой вне исходного кода TDevelop. +Comment[sk]=Vygeneruje modul pre jazykovú podporu pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojového stromu TDevelop. +Comment[sr]=Ово прави прикључак за језичку подршку за TDevelop, који се гради ван TDevelop-овог изворног стабла. +Comment[sr@Latn]=Ovo pravi priključak za jezičku podršku za TDevelop, koji se gradi van TDevelop-ovog izvornog stabla. +Comment[sv]=Detta skapar ett TDevelop-insticksprogram för språkstöd, att bygga utanför TDevelops källkodsträd. +Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacının dışında olacak, bir dil desteği eklentisi yaratır. +Comment[zh_CN]=这将生成 TDevelop 的语言支持插件,可以在 TDevelop 源代码树之外编译。 +Comment[zh_TW]=產生一個 TDevelop 語言支援外掛程式,建立在 TDevelop 程式源碼樹之外。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kdevlang.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE5] +Type=install +Source=%{src}/kdevlang-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/kdevlang_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE8] +Type=install +Source=%{src}/kdevlang_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE9] +Type=install +EscapeXML=true +Source=%{src}/kdevlang.rc +Dest=%{dest}/src/kdev%{APPNAMELC}.rc + +[FILE10] +Type=install +Source=%{src}/kdevlang.desktop +Dest=%{dest}/src/kdev%{APPNAMELC}.desktop + +[FILE11] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/src/README.dox + +[MSG] +Type=message +Comment=A language plugin for TDevelop for standalone build was created in %{dest} +Comment[ca]=Un connector per a llenguatge a TDevelop i de construcció aïllada ha estat creat en %{dest} +Comment[da]=Et sprog-plugin for TDevelop for alenestående bygning blev oprettet i %{dest} +Comment[de]=Ein Sprachunterstützungsmodul für TDevelop (unabhängige Erstellung) wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο γλώσσας για το TDevelop για αυτόνομη κατασκευή δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de lenguaje para TDevelop de construcción independiente ha sido creado en %{dest} +Comment[et]=TDevelopi autonoomne keeleplugin loodi asukohta %{dest} +Comment[eu]=TDevelop-en hizkuntza plugin autonomo bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ زبان برای TDevelop جهت ساخت خوداتکا در %{dest} ایجاد شد +Comment[fr]=Un module externe de langage pour TDevelop à construire de façon autonome a été créé dans %{dest} +Comment[gl]=Creouse unha extensión de linguaxe para TDevelop a compilar de forma independente en %{dest} +Comment[hu]=Létrejött egy TDevelopos nyelvtámogató modul (önálló lefordításra) itt: %{dest} +Comment[it]=È stato creato un plugin di linguaggio per TDevelop per compilazione indipendente %{dest} +Comment[nds]=In %{dest} wöör en Spraakünnerstütten-Moduul för TDevelop (Enkelprogramm) opstellt +Comment[ne]=स्ट्यान्डअलोन निर्माण गर्न केडीई विकासका लागि भाषा प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een taalplugin voor TDevelop voor standalone build is aangemaakt in %{dest} +Comment[pl]=Wtyczka języka dla TDevelopa do budowy oddzielnie została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de linguagens de compilação autónoma para o TDevelop em %{dest} +Comment[ru]=Внешний интерфейс языковой поддержки для TDevelop создан в %{dest} +Comment[sk]=Modul pre jazykovú podporu pre TDevelop bol vutvorený v %{dest} +Comment[sr]=Језички прикључак за TDevelop за самосталну градњу направљен је у %{dest} +Comment[sr@Latn]=Jezički priključak za TDevelop za samostalnu gradnju napravljen je u %{dest} +Comment[sv]=Ett TDevelop-insticksprogram för språkstöd att bygga fristående skapades i %{dest} +Comment[tr]=Kendi başına çalışabilen bir TDevelop dil eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个独立编译的 TDevelop 语言插件 +Comment[zh_TW]=一個單獨建立的 TDevelop 語言外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.png b/languages/cpp/app_templates/kdevlang/kdevlang.png new file mode 100644 index 00000000..840a953c Binary files /dev/null and b/languages/cpp/app_templates/kdevlang/kdevlang.png differ diff --git a/languages/cpp/app_templates/kdevlang/kdevlang.rc b/languages/cpp/app_templates/kdevlang/kdevlang.rc new file mode 100644 index 00000000..b4e153fa --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp new file mode 100644 index 00000000..559a931b --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang_part.cpp @@ -0,0 +1,154 @@ +%{CPP_TEMPLATE} + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//#include "%{APPNAMELC}_widget.h" +#include "%{APPNAMELC}_part.h" + +typedef KGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( "kdev%{APPNAMELC}" ) ); +static const KDevPluginInfo data("kdev%{APPNAMELC}"); + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList& ) +: KDevLanguageSupport(&data, parent, name ? name : "%{APPNAME}Part" ) +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdevlang_%{APPNAMELC}.rc"); + + + m_build = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); + + kdDebug() << "Creating %{APPNAMELC} Part" << endl; + + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); + connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); + connect( partController(), TQT_SIGNAL(savedFile(const KURL&)), this, TQT_SLOT(savedFile(const KURL&)) ); + connect(partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(slotActivePartChanged(KParts::Part *))); +} + + +%{APPNAME}Part::~%{APPNAME}Part() +{ + delete m_build; +} + +KDevLanguageSupport::Features %{APPNAME}Part::features() +{ + return Features(Variables | Functions); +} +KMimeType::List %{APPNAME}Part::mimeTypes() +{ + KMimeType::List list; + + KMimeType::Ptr mime = KMimeType::mimeType( "application/x-shellscript" ); + if( mime ) + list << mime; + + return list; +} +void %{APPNAME}Part::slotRun() +{ + // Execute the application here. +} +void %{APPNAME}Part::projectConfigWidget(KDialogBase *dlg) +{ + Q_UNUSED( dlg ); + // Create your config dialog here. +} +void %{APPNAME}Part::projectOpened() +{ + kdDebug(9014) << "projectOpened()" << endl; + + connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)), + this, TQT_SLOT(addedFilesToProject(const TQStringList &)) ); + connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)), + this, TQT_SLOT(removedFilesFromProject(const TQStringList &)) ); + + // We want to parse only after all components have been + // properly initialized + TQTimer::singleShot(0, this, TQT_SLOT(parse())); +} +void %{APPNAME}Part::projectClosed() +{ + +} +void %{APPNAME}Part::savedFile(const KURL &fileName) +{ + + + if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) + { + kdDebug(9014) << "parse file " << fileName.path() << endl; + emit addedSourceInfo( fileName.path() ); + } +} +void %{APPNAME}Part::addedFilesToProject(const TQStringList &fileList) +{ + kdDebug(9014) << "addedFilesToProject()" << endl; + + TQStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + ( *it ) << endl; + } + + emit updatedSourceInfo(); +} +void %{APPNAME}Part::removedFilesFromProject(const TQStringList &fileList) +{ + + + TQStringList::ConstIterator it; + + for ( it = fileList.begin(); it != fileList.end(); ++it ) + { + TQString fileName = project()->projectDirectory() + "/" + ( *it ); + if( codeModel()->hasFile(fileName) ) + { + kdDebug(9014) << "removed " << fileName << endl; + emit aboutToRemoveSourceInfo( fileName ); + codeModel()->removeFile( codeModel()->fileByName(fileName) ); + } + } + +} +void %{APPNAME}Part::parse() +{ + kdDebug(9014) << "initialParse()" << endl; + + if (project()) + { + kapp->setOverrideCursor(waitCursor); + TQStringList files = project()->allFiles(); + for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it) + { + kdDebug(9014) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl; + } + emit updatedSourceInfo(); + kapp->restoreOverrideCursor(); + } else { + kdDebug(9014) << "No project" << endl; + } +} +void %{APPNAME}Part::slotActivePartChanged(KParts::Part *part) +{ + kdDebug() << "Changeing active part..." << endl; +} + +#include "%{APPNAMELC}_part.moc" diff --git a/languages/cpp/app_templates/kdevlang/kdevlang_part.h b/languages/cpp/app_templates/kdevlang/kdevlang_part.h new file mode 100644 index 00000000..1cce0fa6 --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/kdevlang_part.h @@ -0,0 +1,44 @@ +%{H_TEMPLATE} + +#ifndef __TDEVPART_%{APPNAMEUC}_H__ +#define __TDEVPART_%{APPNAMEUC}_H__ + + +#include +#include +#include +#include +#include + +class TDEAction; + +/* + Please read the README.dox file for more info about this part + */ +class %{APPNAME}Part : public KDevLanguageSupport +{ + Q_OBJECT + + public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &); + ~%{APPNAME}Part(); + protected: + virtual Features features(); + virtual KMimeType::List mimeTypes(); + + private slots: + void slotRun(); + void projectConfigWidget(KDialogBase *dlg); + void projectOpened(); + void projectClosed(); + void savedFile(const KURL &fileName); + void addedFilesToProject(const TQStringList &fileList); + void removedFilesFromProject(const TQStringList &fileList); + void parse(); + void slotActivePartChanged(KParts::Part *part); + private: + TDEAction *m_build; +}; + + +#endif diff --git a/languages/cpp/app_templates/kdevlang/src-Makefile.am b/languages/cpp/app_templates/kdevlang/src-Makefile.am new file mode 100644 index 00000000..18b7a21a --- /dev/null +++ b/languages/cpp/app_templates/kdevlang/src-Makefile.am @@ -0,0 +1,14 @@ +AM_CPPFLAGS = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util -I$(kde_includes)/kinterfacedesigner $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +libkdev%{APPNAMELC}_la_LIBADD = -ltdevelop +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}_part.cpp + +METASOURCES = AUTO + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc -- cgit v1.2.1